Make WordPress Core


Ignore:
Timestamp:
11/11/2010 04:22:18 PM (16 years ago)
Author:
ryan
Message:

Prevent stomping of global. Props prettyboymp. fixes #13945

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/general-template.php

    r16211 r16303  
    13531353 */
    13541354function the_date( $d = '', $before = '', $after = '', $echo = true ) {
    1355         global $day, $previousday;
     1355        global $currentday, $previousday;
    13561356        $the_date = '';
    1357         if ( $day != $previousday ) {
     1357        if ( $currentday != $previousday ) {
    13581358                $the_date .= $before;
    13591359                $the_date .= get_the_date( $d );
    13601360                $the_date .= $after;
    1361                 $previousday = $day;
     1361                $previousday = $currentday;
    13621362
    13631363                $the_date = apply_filters('the_date', $the_date, $d, $before, $after);
    … …  
    15651565        global $wp_locale, $post, $day, $previousweekday;
    15661566        $the_weekday_date = '';
    1567         if ( $day != $previousweekday ) {
     1567        if ( $currentday != $previousweekday ) {
    15681568                $the_weekday_date .= $before;
    15691569                $the_weekday_date .= $wp_locale->get_weekday(mysql2date('w', $post->post_date, false));
    15701570                $the_weekday_date .= $after;
    1571                 $previousweekday = $day;
     1571                $previousweekday = $currentday;
    15721572        }
    15731573        $the_weekday_date = apply_filters('the_weekday_date', $the_weekday_date, $before, $after);
Note: See TracChangeset for help on using the changeset viewer.