Make WordPress Core

Changeset 1145


Ignore:
Timestamp:
04/24/2004 08:12:58 PM (21 years ago)
Author:
saxmatt
Message:

Correctly respect excerpt wishes.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-rdf.php

    r1121 r1145  
    55    require('wp-blog-header.php');
    66}
     7$more = 1;
    78
    89header('Content-type: application/rss+xml', true);
     
    4546    <dc:creator><?php the_author() ?> (mailto:<?php the_author_email() ?>)</dc:creator>
    4647    <?php the_category_rss('rdf') ?>
    47 <?php $more = 1; if (get_settings('rss_use_excerpt')) {
    48 ?>
     48<?php if (get_settings('rss_use_excerpt')) : ?>
    4949    <description><?php the_excerpt_rss(get_settings('rss_excerpt_length'), 2) ?></description>
    50 <?php
    51 } else { // use content
    52 ?>
     50<?php else : ?>
    5351    <description><?php the_content_rss('', 0, '', get_settings('rss_excerpt_length'), 2) ?></description>
    54 <?php
    55 } // end else use content
    56 ?>
    5752    <content:encoded><![CDATA[<?php the_content('', 0, '') ?>]]></content:encoded>
     53<?php endif; ?>
     54   
    5855</item>
    5956<?php } }  ?>
  • trunk/wp-rss2.php

    r1112 r1145  
    55    require('wp-blog-header.php');
    66}
    7 
     7$more = 1;
    88$charset = get_settings('blog_charset');
    99if (!$charset) $charset = 'UTF-8';
    10 header('Content-type: application/rss+xml', true);
     10header('Content-type: text/xml', true);
    1111
    1212?>
     
    3434        <?php the_category_rss() ?>
    3535        <guid><?php the_permalink($id); ?></guid>
    36 <?php $more = 1; if (get_settings('rss_use_excerpt')) {
    37 ?>
     36<?php if (get_settings('rss_use_excerpt')) : ?>
    3837        <description><?php the_excerpt_rss(get_settings('rss_excerpt_length'), 2) ?></description>
    39 <?php
    40 } else { // use content
    41 ?>
     38<?php else : ?>
    4239        <description><?php the_content_rss('', 0, '', get_settings('rss_excerpt_length'), 2) ?></description>
    43 <?php
    44 } // end else use content
    45 ?>
    4640        <content:encoded><![CDATA[<?php the_content('', 0, '') ?>]]></content:encoded>
     41<?php endif; ?>
     42       
    4743    </item>
    4844    <?php $items_count++; if (($items_count == get_settings('posts_per_rss')) && empty($m)) { break; } } } ?>
Note: See TracChangeset for help on using the changeset viewer.