Make WordPress Core


Ignore:
Timestamp:
05/06/2014 09:38:23 PM (10 years ago)
Author:
wonderboymusic
Message:

In get_pages(), $cache does not need to be reset to an empty array. update_post_cache( $pages ) takes care of priming.

In set_post_thumbnail(), (accidental) assignment is unnecessary for $thumbnail_html as it is not used.

See #27882.

File:
1 edited

Legend:

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

    r28194 r28332  
    41774177    }
    41784178
    4179     if ( !is_array($cache) )
    4180         $cache = array();
    4181 
    41824179    $inclusions = '';
    41834180    if ( ! empty( $include ) ) {
     
    56095606    $thumbnail_id = absint( $thumbnail_id );
    56105607    if ( $post && $thumbnail_id && get_post( $thumbnail_id ) ) {
    5611         if ( $thumbnail_html = wp_get_attachment_image( $thumbnail_id, 'thumbnail' ) )
     5608        if ( wp_get_attachment_image( $thumbnail_id, 'thumbnail' ) )
    56125609            return update_post_meta( $post->ID, '_thumbnail_id', $thumbnail_id );
    56135610        else
Note: See TracChangeset for help on using the changeset viewer.