Make WordPress Core


Ignore:
Timestamp:
12/03/2012 07:17:10 AM (14 years ago)
Author:
ryan
Message:

In the QuickPress media modal, use the new post id when a post is published.

Props nacin, koopersmith
fixes #22673

File:
1 edited

Legend:

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

    r22979 r22994  
    16751675
    16761676function wp_ajax_set_post_thumbnail() {
    1677         $json = ! empty( $_REQUEST['json'] );
     1677        $json = ! empty( $_REQUEST['json'] ); // New-style request
    16781678
    16791679        $post_ID = intval( $_POST['post_id'] );
    … …  
    16831683        $thumbnail_id = intval( $_POST['thumbnail_id'] );
    16841684
    1685         check_ajax_referer( "set_post_thumbnail-$post_ID" );
     1685        if ( $json )
     1686                check_ajax_referer( "update-post_$post_ID" );
     1687        else
     1688                check_ajax_referer( "set_post_thumbnail-$post_ID" );
    16861689
    16871690        if ( $thumbnail_id == '-1' ) {
Note: See TracChangeset for help on using the changeset viewer.