Changeset 22568 for trunk/wp-includes/media.php
- Timestamp:
- 11/14/2012 09:06:10 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/media.php
r22557 r22568 1301 1301 * @since 3.5.0 1302 1302 */ 1303 function wp_enqueue_media() { 1303 function wp_enqueue_media( $args = array() ) { 1304 $defaults = array( 1305 'post' => null, 1306 ); 1307 $args = wp_parse_args( $args, $defaults ); 1308 1304 1309 // We're going to pass the old thickbox media tabs to `media_upload_tabs` 1305 1310 // to ensure plugins will work. We will then unset those tabs. … … 1321 1326 ), admin_url('media-upload.php') ), 1322 1327 ); 1328 1329 if ( isset( $args['post'] ) ) 1330 $settings['postId'] = get_post( $args['post'] )->ID; 1323 1331 1324 1332 wp_localize_script( 'media-views', '_wpMediaViewsL10n', array(
Note: See TracChangeset
for help on using the changeset viewer.