Changeset 39615
- Timestamp:
- 12/16/2016 06:43:48 AM (8 years ago)
- Location:
- branches/4.7
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.7
-
branches/4.7/src/wp-includes/feed-rss2.php
r38925 r39615 45 45 <lastBuildDate><?php 46 46 $date = get_lastpostmodified( 'GMT' ); 47 echo $date ? mysql2date( 'D, d M Y H:i:s +0000', $date ) : date( 'D, d M Y H:i:s +0000' );47 echo $date ? mysql2date( 'D, d M Y H:i:s +0000', $date, false ) : date( 'D, d M Y H:i:s +0000' ); 48 48 ?></lastBuildDate> 49 49 <language><?php bloginfo_rss( 'language' ); ?></language> -
branches/4.7/tests/phpunit/tests/feed/rss2.php
r38929 r39615 137 137 138 138 /** 139 * Test that translated feeds have a valid listed date. 140 * @group 39141 141 */ 142 function test_channel_pubdate_element_translated() { 143 $original_locale = $GLOBALS['wp_locale']; 144 /* @var WP_Locale $locale */ 145 $locale = clone $GLOBALS['wp_locale']; 146 147 $locale->weekday[2] = 'Tuesday_Translated'; 148 $locale->weekday_abbrev[ 'Tuesday_Translated' ] = 'Tue_Translated'; 149 150 $GLOBALS['wp_locale'] = $locale; 151 152 $this->go_to( '/?feed=rss2' ); 153 $feed = $this->do_rss2(); 154 155 // Restore original locale. 156 $GLOBALS['wp_locale'] = $original_locale; 157 158 $xml = xml_to_array( $feed ); 159 160 // Verify the date is untranslated. 161 $pubdate = xml_find( $xml, 'rss', 'channel', 'lastBuildDate' ); 162 $this->assertNotContains( 'Tue_Translated', $pubdate[0]['content'] ); 163 } 164 165 /** 139 166 * @ticket UT32 140 167 */
Note: See TracChangeset
for help on using the changeset viewer.