Ticket #19949: 19949.diff

File 19949.diff, 707 bytes (added by scribu, 16 months ago)
  • wp-includes/post-thumbnail-template.php

    diff --git wp-includes/post-thumbnail-template.php wp-includes/post-thumbnail-template.php
    index b4cf8bf..a54b088 100644
    function the_post_thumbnail( $size = 'post-thumbnail', $attr = '' ) { 
    4949/** 
    5050 * Update cache for thumbnails in the current loop 
    5151 * 
     52 * @param object $wp_query Optional. A WP_Query instance. Defaults to the $wp_query global. 
     53 * 
    5254 * @since 3.2 
    5355 */ 
    54 function update_post_thumbnail_cache() { 
    55         global $wp_query; 
     56function update_post_thumbnail_cache( $wp_query = null ) { 
     57        if ( !$wp_query ) 
     58                $wp_query = $GLOBALS['wp_query']; 
    5659 
    5760        if ( $wp_query->thumbnails_cached ) 
    5861                return;