WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/12/2012 04:02:45 PM (9 years ago)
Author:
koopersmith
Message:

Add a nonce to wp_ajax_save_attachment. see #21390, #21807.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/script-loader.php

    r22182 r22212  
    316316
    317317    $scripts->add( 'media-models', "/wp-includes/js/media-models$suffix.js", array( 'backbone', 'jquery' ), false, 1 );
     318    did_action( 'init' ) && $scripts->localize( 'media-models', '_wpMediaModelsL10n', array(
     319        'saveAttachmentNonce' => wp_create_nonce( 'save-attachment' ),
     320    ) );
     321
    318322    $scripts->add( 'media-views',  "/wp-includes/js/media-views$suffix.js",  array( 'media-models', 'wp-plupload' ), false, 1 );
    319323    did_action( 'init' ) && $scripts->localize( 'media-views', '_wpMediaViewsL10n', array(
Note: See TracChangeset for help on using the changeset viewer.