Changeset 22994 for trunk/wp-admin/includes/dashboard.php
- Timestamp:
- 12/03/2012 07:17:10 AM (13 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/includes/dashboard.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/dashboard.php
r22964 r22994 506 506 507 507 $post_ID = (int) $post->ID; 508 509 $media_settings = array( 510 'id' => $post->ID, 511 'nonce' => wp_create_nonce( 'update-post_' . $post->ID ), 512 ); 513 514 if ( current_theme_supports( 'post-thumbnails', $post->post_type ) && post_type_supports( $post->post_type, 'thumbnail' ) ) { 515 $featured_image_id = get_post_meta( $post->ID, '_thumbnail_id', true ); 516 $media_settings['featuredImageId'] = $featured_image_id ? $featured_image_id : -1; 517 } 508 518 ?> 509 519 … … 525 535 </div> 526 536 527 <script type="text/javascript">edCanvas = document.getElementById('content');edInsertContent = null;</script> 537 <script type="text/javascript"> 538 edCanvas = document.getElementById('content'); 539 edInsertContent = null; 540 <?php if ( $_POST ) : ?> 541 wp.media.editor.remove('content'); 542 wp.media.view.settings.post = <?php echo json_encode( $media_settings ); // big juicy hack. ?>; 543 wp.media.editor.add('content'); 544 <?php endif; ?> 545 </script> 528 546 529 547 <div class="input-text-wrap" id="tags-input-wrap">
Note: See TracChangeset
for help on using the changeset viewer.