Make WordPress Core

Changeset 20172


Ignore:
Timestamp:
03/14/2012 09:48:57 AM (13 years ago)
Author:
duck_
Message:

Use return value of update_post_meta() in set_post_thumbnail() instead of always returning true. Props webord. Fixes #20218.

File:
1 edited

Legend:

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

    r20171 r20172  
    51795179        $thumbnail_html = wp_get_attachment_image( $thumbnail_id, 'thumbnail' );
    51805180        if ( ! empty( $thumbnail_html ) ) {
    5181             update_post_meta( $post->ID, '_thumbnail_id', $thumbnail_id );
    5182             return true;
     5181            return update_post_meta( $post->ID, '_thumbnail_id', $thumbnail_id );
    51835182        }
    51845183    }
Note: See TracChangeset for help on using the changeset viewer.