Ticket #21092: 21092.patch
| File 21092.patch, 957 bytes (added by , 13 years ago) |
|---|
-
wp-includes/media.php
1328 1328 ), admin_url('media-upload.php') ), 1329 1329 ); 1330 1330 1331 if ( isset( $args['post'] ) ) 1332 $settings['postId'] = get_post( $args['post'] )->ID; 1331 $post = null; 1332 if ( isset( $args['post'] ) ) { 1333 $post = get_post( $args['post'] ); 1334 $settings['postId'] = $post->ID; 1335 } 1333 1336 1334 wp_localize_script( 'media-views', '_wpMediaViewsL10n', a rray(1337 wp_localize_script( 'media-views', '_wpMediaViewsL10n', apply_filters( 'media_views_l10n', array( 1335 1338 // Settings 1336 1339 'settings' => $settings, 1337 1340 … … 1375 1378 'updateGallery' => __( 'Update gallery' ), 1376 1379 'continueEditing' => __( 'Continue editing' ), 1377 1380 'addToGallery' => __( 'Add to gallery' ), 1378 ) );1381 ), $post ) ); 1379 1382 1380 1383 wp_enqueue_script( 'media-upload' ); 1381 1384 wp_enqueue_style( 'media-views' );