Ticket #13945: 13945.diff
File 13945.diff, 2.5 KB (added by , 15 years ago) |
---|
-
wp-includes/functions.php
1321 1321 * @return int 1 when new day, 0 if not a new day. 1322 1322 */ 1323 1323 function is_new_day() { 1324 global $ day, $previousday;1325 if ( $ day != $previousday )1324 global $currentday, $previousday; 1325 if ( $currentday != $previousday ) 1326 1326 return 1; 1327 1327 else 1328 1328 return 0; -
wp-includes/query.php
2844 2844 * @return bool True when finished. 2845 2845 */ 2846 2846 function setup_postdata($post) { 2847 global $id, $authordata, $ day, $currentmonth, $page, $pages, $multipage, $more, $numpages;2847 global $id, $authordata, $currentday, $currentmonth, $page, $pages, $multipage, $more, $numpages; 2848 2848 2849 2849 $id = (int) $post->ID; 2850 2850 2851 2851 $authordata = get_userdata($post->post_author); 2852 2852 2853 $ day = mysql2date('d.m.y', $post->post_date, false);2853 $currentday = mysql2date('d.m.y', $post->post_date, false); 2854 2854 $currentmonth = mysql2date('m', $post->post_date, false); 2855 2855 $numpages = 1; 2856 2856 $page = get_query_var('page'); -
wp-includes/general-template.php
1334 1334 * @return string|null Null if displaying, string if retrieving. 1335 1335 */ 1336 1336 function the_date( $d = '', $before = '', $after = '', $echo = true ) { 1337 global $ day, $previousday;1337 global $currentday, $previousday; 1338 1338 $the_date = ''; 1339 if ( $ day != $previousday ) {1339 if ( $currentday != $previousday ) { 1340 1340 $the_date .= $before; 1341 1341 $the_date .= get_the_date( $d ); 1342 1342 $the_date .= $after; 1343 $previousday = $ day;1343 $previousday = $currentday; 1344 1344 1345 1345 $the_date = apply_filters('the_date', $the_date, $d, $before, $after); 1346 1346 … … 1546 1546 function the_weekday_date($before='',$after='') { 1547 1547 global $wp_locale, $post, $day, $previousweekday; 1548 1548 $the_weekday_date = ''; 1549 if ( $ day != $previousweekday ) {1549 if ( $currentday != $previousweekday ) { 1550 1550 $the_weekday_date .= $before; 1551 1551 $the_weekday_date .= $wp_locale->get_weekday(mysql2date('w', $post->post_date, false)); 1552 1552 $the_weekday_date .= $after; 1553 $previousweekday = $ day;1553 $previousweekday = $currentday; 1554 1554 } 1555 1555 $the_weekday_date = apply_filters('the_weekday_date', $the_weekday_date, $before, $after); 1556 1556 echo $the_weekday_date;