WordPress.org

Make WordPress Core

Changeset 16303


Ignore:
Timestamp:
11/11/10 16:22:18 (7 years ago)
Author:
ryan
Message:

Prevent stomping of global. Props prettyboymp. fixes #13945

Location:
trunk/wp-includes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r16300 r16303  
    13451345 */ 
    13461346function is_new_day() { 
    1347     global $day, $previousday; 
    1348     if ( $day != $previousday ) 
     1347    global $currentday, $previousday; 
     1348    if ( $currentday != $previousday ) 
    13491349        return 1; 
    13501350    else 
  • 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); 
  • trunk/wp-includes/query.php

    r16286 r16303  
    31893189 */ 
    31903190function setup_postdata($post) { 
    3191     global $id, $authordata, $day, $currentmonth, $page, $pages, $multipage, $more, $numpages; 
     3191    global $id, $authordata, $currentday, $currentmonth, $page, $pages, $multipage, $more, $numpages; 
    31923192 
    31933193    $id = (int) $post->ID; 
     
    31953195    $authordata = get_userdata($post->post_author); 
    31963196 
    3197     $day = mysql2date('d.m.y', $post->post_date, false); 
     3197    $currentday = mysql2date('d.m.y', $post->post_date, false); 
    31983198    $currentmonth = mysql2date('m', $post->post_date, false); 
    31993199    $numpages = 1; 
Note: See TracChangeset for help on using the changeset viewer.