Changeset 22212
- Timestamp:
- 10/12/2012 04:02:45 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/ajax-actions.php
r22200 r22212 1834 1834 wp_send_json_error(); 1835 1835 1836 check_ajax_referer( 'save-attachment', 'nonce' ); 1837 1836 1838 if ( ! current_user_can( 'edit_post', $id ) ) 1837 1839 wp_send_json_error(); -
trunk/wp-includes/js/media-models.js
r22173 r22212 2 2 3 3 (function($){ 4 var Attachment, Attachments, Query, compare ;4 var Attachment, Attachments, Query, compare, l10n; 5 5 6 6 /** … … 20 20 21 21 _.extend( media, { model: {}, view: {}, controller: {} }); 22 23 // Link any localized strings. 24 l10n = media.model.l10n = _.isUndefined( _wpMediaModelsL10n ) ? {} : _wpMediaModelsL10n; 22 25 23 26 /** … … 193 196 options.data = _.extend( options.data || {}, { 194 197 action: 'save-attachment', 195 id: this.id 198 id: this.id, 199 nonce: l10n.saveAttachmentNonce 196 200 }); 197 201 -
trunk/wp-includes/script-loader.php
r22182 r22212 316 316 317 317 $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 318 322 $scripts->add( 'media-views', "/wp-includes/js/media-views$suffix.js", array( 'media-models', 'wp-plupload' ), false, 1 ); 319 323 did_action( 'init' ) && $scripts->localize( 'media-views', '_wpMediaViewsL10n', array(
Note: See TracChangeset
for help on using the changeset viewer.