Changeset 22702
- Timestamp:
- 11/20/2012 02:58:33 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/media.php
r22677 r22702 1329 1329 ); 1330 1330 1331 if ( isset( $args['post'] ) )1332 $settings['postId'] = get_post( $args['post'] )->ID;1333 1334 wp_localize_script( 'media-views', '_wpMediaViewsL10n', array(1335 // Settings1336 'settings' => $settings, 1337 1331 $post = null; 1332 if ( isset( $args['post'] ) ) { 1333 $post = get_post( $args['post'] ); 1334 $settings['postId'] = $post->ID; 1335 } 1336 1337 $strings = array( 1338 1338 // Generic 1339 1339 'url' => __( 'URL' ), … … 1370 1370 'continueEditing' => __( 'Continue editing' ), 1371 1371 'addToGallery' => __( 'Add to gallery' ), 1372 ) ); 1372 ); 1373 1374 $settings = apply_filters( 'media_view_settings', $settings, $post ); 1375 $strings = apply_filters( 'media_view_strings', $strings, $post ); 1376 1377 $strings['settings'] = $settings; 1378 1379 wp_localize_script( 'media-views', '_wpMediaViewsL10n', $strings ); 1373 1380 1374 1381 wp_enqueue_script( 'media-upload' );
Note: See TracChangeset
for help on using the changeset viewer.