Make WordPress Core


Ignore:
Timestamp:
02/10/2012 05:41:37 PM (12 years ago)
Author:
ryan
Message:

Add post ID argument to _wp_post_thumbnail_html() rather than relying on a global. Post the ID from wp_ajax_set_post_thumbnail(). Props batmoo. fixes #20003

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/ajax-actions.php

    r19897 r19902  
    15721572    if ( $thumbnail_id == '-1' ) {
    15731573        if ( delete_post_thumbnail( $post_ID ) )
    1574             wp_die( _wp_post_thumbnail_html() );
     1574            wp_die( _wp_post_thumbnail_html( null, $post_ID ) );
    15751575        else
    15761576            wp_die( 0 );
     
    15781578
    15791579    if ( set_post_thumbnail( $post_ID, $thumbnail_id ) )
    1580         wp_die( _wp_post_thumbnail_html( $thumbnail_id ) );
     1580        wp_die( _wp_post_thumbnail_html( $thumbnail_id, $post_ID ) );
    15811581    wp_die( 0 );
    15821582}
Note: See TracChangeset for help on using the changeset viewer.