Make WordPress Core

Changeset 23320


Ignore:
Timestamp:
01/22/2013 03:52:13 PM (12 years ago)
Author:
ryan
Message:

Avoid the appearance of a magic number.

Props nacin
see #23167

Location:
trunk/wp-includes
Files:
2 edited

Legend:

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

    r23319 r23320  
    252252        $last_changed = wp_cache_get( 'last_changed', 'comment' );
    253253        if ( ! $last_changed ) {
    254             wp_cache_set( 'last_changed', 1, 'comment' );
    255254            $last_changed = 1;
     255            wp_cache_set( 'last_changed', $last_changed, 'posts' );
    256256        }
    257257        $cache_key = "get_comments:$key:$last_changed";
  • trunk/wp-includes/post.php

    r23319 r23320  
    36543654    $last_changed = wp_cache_get( 'last_changed', 'posts' );
    36553655    if ( ! $last_changed ) {
    3656         wp_cache_set( 'last_changed', 1, 'posts' );
    36573656        $last_changed = 1;
     3657        wp_cache_set( 'last_changed', $last_changed, 'posts' );
    36583658    }
    36593659
Note: See TracChangeset for help on using the changeset viewer.