Make WordPress Core


Ignore:
Timestamp:
10/28/2010 03:46:11 PM (15 years ago)
Author:
ryan
Message:

get_current_blog_id(). Props aaroncampbell. fixes #15233

File:
1 edited

Legend:

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

    r15973 r16050  
    10171017 * - publish_posts - Controls publishing objects of this post type.
    10181018 * - read_private_posts - Controls whether private objects can be read.
    1019  
     1019
    10201020 * These four primitive capabilities are checked in core in various locations.
    10211021 * There are also seven other primitive capabilities which are not referenced
     
    22662266        'suppress_filters' => true
    22672267    );
    2268    
     2268
    22692269    $r = wp_parse_args( $args, $defaults );
    22702270
    22712271    $results = get_posts( $r );
    2272    
     2272
    22732273    // Backward compatibility. Prior to 3.1 expected posts to be returned in array
    22742274    if ( ARRAY_A == $output ){
     
    41424142 */
    41434143function _get_last_post_time( $timezone, $field ) {
    4144     global $wpdb, $blog_id;
     4144    global $wpdb;
    41454145
    41464146    if ( !in_array( $field, array( 'date', 'modified' ) ) )
     
    41534153    $post_types = apply_filters( "get_lastpost{$field}_post_types", (array) $post_types );
    41544154
    4155     $key = "lastpost{$field}:$blog_id:$timezone:" . md5( serialize( $post_types ) );
     4155    $key = "lastpost{$field}:" . get_current_blog_id() . ":$timezone:" . md5( serialize( $post_types ) );
    41564156
    41574157    $date = wp_cache_get( $key, 'timeinfo' );
Note: See TracChangeset for help on using the changeset viewer.