Ticket #3670: 3670.4.diff
| File 3670.4.diff, 6.7 KB (added by , 11 years ago) |
|---|
-
wp-includes/comment.php
2517 2517 $excerpt = apply_filters( 'the_excerpt', $post->post_excerpt ); 2518 2518 } 2519 2519 2520 $excerpt = str_replace(']]>', ']]>', $excerpt);2521 2520 $excerpt = wp_html_excerpt($excerpt, 252, '…'); 2522 2521 2523 2522 /** This filter is documented in wp-includes/post-template.php */ -
wp-includes/feed-atom.php
67 67 <updated><?php echo get_post_modified_time('Y-m-d\TH:i:s\Z', true); ?></updated> 68 68 <published><?php echo get_post_time('Y-m-d\TH:i:s\Z', true); ?></published> 69 69 <?php the_category_rss('atom') ?> 70 <summary type="<?php html_type_rss(); ?>">< ![CDATA[<?php the_excerpt_rss(); ?>]]></summary>70 <summary type="<?php html_type_rss(); ?>"><?php echo _esc_xml_cdata( get_the_excerpt_rss() ); ?></summary> 71 71 <?php if ( !get_option('rss_use_excerpt') ) : ?> 72 <content type="<?php html_type_rss(); ?>" xml:base="<?php the_permalink_rss() ?>">< ![CDATA[<?php the_content_feed('atom') ?>]]></content>72 <content type="<?php html_type_rss(); ?>" xml:base="<?php the_permalink_rss() ?>"><?php echo _esc_xml_cdata( get_the_content_feed( 'atom' ) ); ?></content> 73 73 <?php endif; ?> 74 74 <?php atom_enclosure(); 75 75 /** -
wp-includes/feed-rdf.php
67 67 <dc:creator><![CDATA[<?php the_author() ?>]]></dc:creator> 68 68 <?php the_category_rss('rdf') ?> 69 69 <?php if (get_option('rss_use_excerpt')) : ?> 70 <description>< ![CDATA[<?php the_excerpt_rss() ?>]]></description>70 <description><?php echo _esc_xml_cdata( get_the_excerpt_rss() ); ?></description> 71 71 <?php else : ?> 72 <description>< ![CDATA[<?php the_excerpt_rss() ?>]]></description>73 <content:encoded>< ![CDATA[<?php the_content_feed('rdf') ?>]]></content:encoded>72 <description><?php echo _esc_xml_cdata( get_the_excerpt_rss() ); ?></description> 73 <content:encoded><?php echo _esc_xml_cdata( get_the_content_feed( 'rdf' ) ); ?></content:encoded> 74 74 <?php endif; ?> 75 75 <?php 76 76 /** -
wp-includes/feed-rss.php
30 30 <?php while (have_posts()) : the_post(); ?> 31 31 <item> 32 32 <title><?php the_title_rss() ?></title> 33 <description>< ![CDATA[<?php the_excerpt_rss() ?>]]></description>33 <description><?php echo _esc_xml_cdata( get_the_excerpt_rss() ); ?></description> 34 34 <link><?php the_permalink_rss() ?></link> 35 35 <?php 36 36 /** -
wp-includes/feed-rss2.php
90 90 91 91 <guid isPermaLink="false"><?php the_guid(); ?></guid> 92 92 <?php if (get_option('rss_use_excerpt')) : ?> 93 <description>< ![CDATA[<?php the_excerpt_rss(); ?>]]></description>93 <description><?php echo _esc_xml_cdata( get_the_excerpt_rss() ); ?></description> 94 94 <?php else : ?> 95 <description>< ![CDATA[<?php the_excerpt_rss(); ?>]]></description>96 <?php $content = get_the_content_feed( 'rss2'); ?>95 <description><?php echo _esc_xml_cdata( get_the_excerpt_rss() ); ?></description> 96 <?php $content = get_the_content_feed( 'rss2' ); ?> 97 97 <?php if ( strlen( $content ) > 0 ) : ?> 98 <content:encoded>< ![CDATA[<?php echo $content; ?>]]></content:encoded>98 <content:encoded><?php echo _esc_xml_cdata( $content ); ?></content:encoded> 99 99 <?php else : ?> 100 <content:encoded>< ![CDATA[<?php the_excerpt_rss(); ?>]]></content:encoded>100 <content:encoded><?php echo _esc_xml_cdata( get_the_excerpt_rss() ); ?></content:encoded> 101 101 <?php endif; ?> 102 102 <?php endif; ?> 103 103 <wfw:commentRss><?php echo esc_url( get_post_comments_feed_link(null, 'rss2') ); ?></wfw:commentRss> -
wp-includes/feed.php
184 184 185 185 /** This filter is documented in wp-includes/post-template.php */ 186 186 $content = apply_filters( 'the_content', get_the_content() ); 187 $content = str_replace(']]>', ']]>', $content);188 187 /** 189 188 * Filter the post content for use in feeds. 190 189 * … … 209 208 } 210 209 211 210 /** 212 * Displaythe post excerpt for the feed.211 * Retrieve the post excerpt for the feed. 213 212 * 214 * @since 0.71 213 * @since x.x.x 214 * 215 * @return string Current post excerpt. 215 216 */ 216 function the_excerpt_rss() {217 function get_the_excerpt_rss() { 217 218 $output = get_the_excerpt(); 218 219 /** 219 220 * Filter the post excerpt for a feed. … … 222 223 * 223 224 * @param string $output The current post excerpt. 224 225 */ 225 echoapply_filters( 'the_excerpt_rss', $output );226 return apply_filters( 'the_excerpt_rss', $output ); 226 227 } 227 228 228 229 /** 230 * Display the post excerpt for the feed. 231 * 232 * @since 0.71 233 */ 234 function the_excerpt_rss() { 235 echo get_the_excerpt_rss(); 236 } 237 238 /** 229 239 * Display the permalink to the post for use in feeds. 230 240 * 231 241 * @since 2.3.0 -
wp-includes/formatting.php
2550 2550 2551 2551 /** This filter is documented in wp-includes/post-template.php */ 2552 2552 $text = apply_filters( 'the_content', $text ); 2553 $text = str_replace(']]>', ']]>', $text);2554 2553 2555 2554 /** 2556 2555 * Filter the number of words in an excerpt. … … 4015 4014 4016 4015 return $spaces; 4017 4016 } 4017 4018 /** 4019 * Wrap a string in CDATA tags for inclusion of non-XML content in XML. 4020 * 4021 * The only invalid string in CDATA is "]]>". Since adjacent CDATA sections 4022 * are equivalent to the result of their concatenation, the preferred method 4023 * of including "]]>" is to split it between two sections. 4024 * 4025 * @since x.x.x 4026 * 4027 * @param string $string A string which might contain non-XML content. 4028 * @return string A CDATA block containing the supplied string. 4029 */ 4030 function _esc_xml_cdata( $string ) { 4031 $string = str_replace( ']]>', ']]]]><![CDATA[>', $string ); 4032 return '<![CDATA[' . $string . ']]>'; 4033 } -
wp-includes/post-template.php
219 219 * @param string $content Content of the current post. 220 220 */ 221 221 $content = apply_filters( 'the_content', $content ); 222 $content = str_replace( ']]>', ']]>', $content );223 222 echo $content; 224 223 } 225 224