WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/24/2011 07:31:38 PM (10 years ago)
Author:
nacin
Message:

delete_post_thumbnail(). props CoenJacobs, duck_. fixes #17895.

File:
1 edited

Legend:

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

    r18709 r18767  
    14741474
    14751475    if ( $thumbnail_id == '-1' ) {
    1476         delete_post_meta( $post_ID, '_thumbnail_id' );
    1477         die( _wp_post_thumbnail_html() );
     1476        if ( delete_post_thumbnail( $post_ID ) )
     1477            die( _wp_post_thumbnail_html() );
     1478        else
     1479            die( '0' );
    14781480    }
    14791481
Note: See TracChangeset for help on using the changeset viewer.