Ticket #6425: rtl-feeds.patch
| File rtl-feeds.patch, 12.4 KB (added by , 18 years ago) |
|---|
-
feed-atom-comments.php
13 13 xml:lang="<?php echo get_option('rss_language'); ?>" 14 14 <?php do_action('atom_ns'); ?> 15 15 > 16 <title type="text"> <?php16 <title type="text">‫<?php 17 17 if ( is_singular() ) 18 18 printf(__('Comments on: %s'), get_the_title_rss()); 19 19 elseif ( is_search() ) 20 20 printf(__('Comments for %1$s searching on %2$s'), get_bloginfo_rss( 'name' ), attribute_escape(get_search_query())); 21 21 else 22 22 printf(__('Comments for %s'), get_bloginfo_rss( 'name' ) . get_wp_title_rss()); 23 ?> </title>24 <subtitle type="text"> <?php bloginfo_rss('description'); ?></subtitle>23 ?>‬</title> 24 <subtitle type="text">‫<?php bloginfo_rss('description'); ?>‬</subtitle> 25 25 26 26 <updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastcommentmodified('GMT')); ?></updated> 27 27 <?php the_generator( 'atom' ); ?> … … 46 46 get_post_custom($comment_post->ID); 47 47 ?> 48 48 <entry> 49 <title> <?php49 <title>‫<?php 50 50 if ( !is_singular() ) { 51 51 $title = get_the_title($comment_post->ID); 52 52 $title = apply_filters('the_title_rss', $title); … … 54 54 } else { 55 55 printf(__('By: %s'), get_comment_author_rss()); 56 56 } 57 ?> </title>57 ?>‬</title> 58 58 <link rel="alternate" href="<?php comment_link(); ?>" type="<?php bloginfo_rss('html_type'); ?>" /> 59 59 60 60 <author> 61 <name> <?php comment_author_rss(); ?></name>61 <name>‫<?php comment_author_rss(); ?>‬</name> s 62 62 <?php if (get_comment_author_url()) echo '<uri>' . get_comment_author_url() . '</uri>'; ?> 63 63 64 64 </author> -
feed-atom.php
17 17 xml:base="<?php bloginfo_rss('home') ?>/wp-atom.php" 18 18 <?php do_action('atom_ns'); ?> 19 19 > 20 <title type="text"> <?php bloginfo_rss('name'); wp_title_rss(); ?></title>21 <subtitle type="text"> <?php bloginfo_rss("description") ?></subtitle>20 <title type="text">‫<?php bloginfo_rss('name'); wp_title_rss(); ?>‬</title> 21 <subtitle type="text">‫<?php bloginfo_rss("description") ?>‬</subtitle> 22 22 23 23 <updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('GMT')); ?></updated> 24 24 <?php the_generator( 'atom' ); ?> 25 25 26 26 <link rel="alternate" type="text/html" href="<?php bloginfo_rss('home') ?>" /> 27 27 <id><?php bloginfo('atom_url'); ?></id> 28 <link rel="self" type="application/atom+xml" href="<?php self_link(); ?>" />28 <link rel="self" type="application/atom+xml" href="<?php bloginfo('atom_url'); ?>" /> 29 29 30 30 <?php do_action('atom_head'); ?> 31 31 <?php while (have_posts()) : the_post(); ?> 32 32 <entry> 33 33 <author> 34 <name> <?php the_author() ?></name>34 <name>‫<?php the_author() ?>‬</name> 35 35 <?php $author_url = get_the_author_url(); if ( !empty($author_url) ) : ?> 36 36 <uri><?php the_author_url()?></uri> 37 37 <?php endif; ?> 38 38 </author> 39 <title type="<?php html_type_rss(); ?>"><![CDATA[ <?php the_title_rss() ?>]]></title>39 <title type="<?php html_type_rss(); ?>"><![CDATA[‫<?php the_title_rss() ?>‬]]></title> 40 40 <link rel="alternate" type="text/html" href="<?php the_permalink_rss() ?>" /> 41 41 <id><?php the_guid(); ?></id> 42 42 <updated><?php echo get_post_modified_time('Y-m-d\TH:i:s\Z', true); ?></updated> 43 43 <published><?php echo get_post_time('Y-m-d\TH:i:s\Z', true); ?></published> 44 44 <?php the_category_rss('atom') ?> 45 <summary type="<?php html_type_rss(); ?>"><![CDATA[ <?php the_excerpt_rss(); ?>]]></summary>45 <summary type="<?php html_type_rss(); ?>"><![CDATA[‫<?php the_excerpt_rss(); ?>‬]]></summary> 46 46 <?php if ( !get_option('rss_use_excerpt') ) : ?> 47 <content type="<?php html_type_rss(); ?>" xml:base="<?php the_permalink_rss() ?>"><![CDATA[< ?php the_content('', 0, '') ?>]]></content>47 <content type="<?php html_type_rss(); ?>" xml:base="<?php the_permalink_rss() ?>"><![CDATA[<div dir="rtl"><?php the_content('', 0, '') ?></div>]]></content> 48 48 <?php endif; ?> 49 49 <?php atom_enclosure(); ?> 50 50 <?php do_action('atom_entry'); ?> -
feed-rdf.php
20 20 <?php do_action('rdf_ns'); ?> 21 21 > 22 22 <channel rdf:about="<?php bloginfo_rss("url") ?>"> 23 <title> <?php bloginfo_rss('name'); wp_title_rss(); ?></title>23 <title>‫<?php bloginfo_rss('name'); wp_title_rss(); ?>‬</title> 24 24 <link><?php bloginfo_rss('url') ?></link> 25 <description> <?php bloginfo_rss('description') ?></description>25 <description>‫<?php bloginfo_rss('description') ?>‬</description> 26 26 <dc:date><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('GMT'), false); ?></dc:date> 27 27 <?php the_generator( 'rdf' ); ?> 28 28 <sy:updatePeriod>hourly</sy:updatePeriod> … … 39 39 </channel> 40 40 <?php rewind_posts(); while (have_posts()): the_post(); ?> 41 41 <item rdf:about="<?php the_permalink_rss() ?>"> 42 <title> <?php the_title_rss() ?></title>42 <title>‫<?php the_title_rss() ?>‬</title> 43 43 <link><?php the_permalink_rss() ?></link> 44 44 <dc:date><?php echo mysql2date('Y-m-d\TH:i:s\Z', $post->post_date_gmt, false); ?></dc:date> 45 <dc:creator> <?php the_author() ?></dc:creator>45 <dc:creator>‫<?php the_author() ?>‬</dc:creator> 46 46 <?php the_category_rss('rdf') ?> 47 47 <?php if (get_option('rss_use_excerpt')) : ?> 48 <description> <?php the_excerpt_rss() ?></description>48 <description>‫<?php the_excerpt_rss() ?>‬</description> 49 49 <?php else : ?> 50 <description> <?php the_content_rss('', 0, '', get_option('rss_excerpt_length'), 2) ?></description>51 <content:encoded><![CDATA[< ?php the_content('', 0, '') ?>]]></content:encoded>50 <description>‫<?php the_content_rss('', 0, '', get_option('rss_excerpt_length'), 2) ?>‬</description> 51 <content:encoded><![CDATA[<div dir="rtl"><?php the_content('', 0, '') ?></div>]]></content:encoded> 52 52 <?php endif; ?> 53 53 <?php do_action('rdf_item'); ?> 54 54 </item> -
feed-rss.php
13 13 <?php the_generator( 'comment' ); ?> 14 14 <rss version="0.92"> 15 15 <channel> 16 <title> <?php bloginfo_rss('name'); wp_title_rss(); ?></title>16 <title>‫<?php bloginfo_rss('name'); wp_title_rss(); ?>‬</title> 17 17 <link><?php bloginfo_rss('url') ?></link> 18 <description> <?php bloginfo_rss('description') ?></description>18 <description>‫<?php bloginfo_rss('description') ?>‬</description> 19 19 <lastBuildDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?></lastBuildDate> 20 20 <docs>http://backend.userland.com/rss092</docs> 21 21 <language><?php echo get_option('rss_language'); ?></language> … … 23 23 24 24 <?php while (have_posts()) : the_post(); ?> 25 25 <item> 26 <title> <?php the_title_rss() ?></title>26 <title>‫<?php the_title_rss() ?>‬</title> 27 27 <?php if (get_option('rss_use_excerpt')) { ?> 28 <description><![CDATA[ <?php the_excerpt_rss() ?>]]></description>28 <description><![CDATA[‫<?php the_excerpt_rss() ?>‬]]></description> 29 29 <?php } else { // use content ?> 30 <description> <?php the_content_rss('', 0, '', get_option('rss_excerpt_length')) ?></description>30 <description>‫<?php the_content_rss('', 0, '', get_option('rss_excerpt_length')) ?>‬</description> 31 31 <?php } ?> 32 32 <link><?php the_permalink_rss() ?></link> 33 33 <?php do_action('rss_item'); ?> -
feed-rss2-comments.php
15 15 xmlns:atom="http://www.w3.org/2005/Atom" 16 16 > 17 17 <channel> 18 <title> <?php18 <title>‫<?php 19 19 if ( is_singular() ) 20 20 printf(__('Comments on: %s'), get_the_title_rss()); 21 21 elseif ( is_search() ) 22 22 printf(__('Comments for %s searching on %s'), get_bloginfo_rss( 'name' ), attribute_escape($wp_query->query_vars['s'])); 23 23 else 24 24 printf(__('Comments for %s'), get_bloginfo_rss( 'name' ) . get_wp_title_rss()); 25 ?></title> 26 <atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" /> 25 ?>‬</title> 27 26 <link><?php (is_single()) ? the_permalink_rss() : bloginfo_rss("url") ?></link> 28 <description> <?php bloginfo_rss("description") ?></description>27 <description>‫<?php bloginfo_rss("description") ?>‬</description> 29 28 <pubDate><?php echo gmdate('r'); ?></pubDate> 30 29 <?php the_generator( 'rss2' ); ?> 31 30 <?php do_action('commentsrss2_head'); ?> … … 35 34 get_post_custom($comment_post->ID); 36 35 ?> 37 36 <item> 38 <title> <?php37 <title>‫<?php 39 38 if ( !is_singular() ) { 40 39 $title = get_the_title($comment_post->ID); 41 40 $title = apply_filters('the_title_rss', $title); … … 43 42 } else { 44 43 printf(__('By: %s'), get_comment_author_rss()); 45 44 } 46 ?> </title>45 ?>‬</title> 47 46 <link><?php comment_link() ?></link> 48 <dc:creator> <?php echo get_comment_author_rss() ?></dc:creator>47 <dc:creator>‫<?php echo get_comment_author_rss() ?>‬</dc:creator> 49 48 <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_comment_time('Y-m-d H:i:s', true), false); ?></pubDate> 50 49 <guid isPermaLink="false"><?php comment_guid() ?></guid> 51 50 <?php if (!empty($comment_post->post_password) && $_COOKIE['wp-postpass'] != $comment_post->post_password) : ?> 52 <description> <?php _e('Protected Comments: Please enter your password to view comments.'); ?></description>51 <description>‫<?php _e('Protected Comments: Please enter your password to view comments.'); ?>‬</description> 53 52 <content:encoded><![CDATA[<?php echo get_the_password_form() ?>]]></content:encoded> 54 53 <?php else : // post pass ?> 55 <description> <?php comment_text_rss() ?></description>54 <description>‫<?php comment_text_rss() ?>‬</description> 56 55 <content:encoded><![CDATA[<?php comment_text() ?>]]></content:encoded> 57 56 <?php endif; // post pass 58 57 do_action('commentrss2_item', $comment->comment_ID, $comment_post->ID); -
feed-rss2.php
20 20 > 21 21 22 22 <channel> 23 <title><?php bloginfo_rss('name'); wp_title_rss(); ?></title> 24 <atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" /> 23 <title>‫<?php bloginfo_rss('name'); wp_title_rss(); ?>‬</title> 25 24 <link><?php bloginfo_rss('url') ?></link> 26 <description> <?php bloginfo_rss("description") ?></description>25 <description>‫<?php bloginfo_rss("description") ?>‬</description> 27 26 <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?></pubDate> 28 27 <?php the_generator( 'rss2' ); ?> 29 28 <language><?php echo get_option('rss_language'); ?></language> 30 29 <?php do_action('rss2_head'); ?> 31 30 <?php while( have_posts()) : the_post(); ?> 32 31 <item> 33 <title> <?php the_title_rss() ?></title>32 <title>‫<?php the_title_rss() ?>‬</title> 34 33 <link><?php the_permalink_rss() ?></link> 35 34 <comments><?php comments_link(); ?></comments> 36 35 <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_post_time('Y-m-d H:i:s', true), false); ?></pubDate> 37 <dc:creator> <?php the_author() ?></dc:creator>36 <dc:creator>‫<?php the_author() ?>‬</dc:creator> 38 37 <?php the_category_rss() ?> 39 38 40 39 <guid isPermaLink="false"><?php the_guid(); ?></guid> 41 40 <?php if (get_option('rss_use_excerpt')) : ?> 42 <description><![CDATA[ <?php the_excerpt_rss() ?>]]></description>41 <description><![CDATA[‫<?php the_excerpt_rss() ?>‬]]></description> 43 42 <?php else : ?> 44 <description><![CDATA[ <?php the_excerpt_rss() ?>]]></description>43 <description><![CDATA[‫<?php the_excerpt_rss() ?>‬]]></description> 45 44 <?php if ( strlen( $post->post_content ) > 0 ) : ?> 46 <content:encoded><![CDATA[< ?php the_content() ?>]]></content:encoded>45 <content:encoded><![CDATA[<div dir="rtl"><?php the_content() ?></div>]]></content:encoded> 47 46 <?php else : ?> 48 <content:encoded><![CDATA[ <?php the_excerpt_rss() ?>]]></content:encoded>47 <content:encoded><![CDATA[‫<?php the_excerpt_rss() ?>‬]]></content:encoded> 49 48 <?php endif; ?> 50 49 <?php endif; ?> 51 50 <wfw:commentRss><?php echo get_post_comments_feed_link(); ?></wfw:commentRss>