WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/10/2012 07:51:37 AM (9 years ago)
Author:
koopersmith
Message:

Media: Backwards compatibility for media_upload_tabs.

  • Adds createIframeStates() to the MediaFrame view. It creates states and bindings for the media_upload_tabs output, and is included on MediaFrame.Post by default.
  • Hijacks tb_remove() when the media modal is open to ensure the modal closes correctly.
  • Adds a chromeless parameter to thickbox media tab URLs to render the UI without the old row of tabs.

see #22186, #21390.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/media.php

    r22489 r22523  
    12761276 */
    12771277function media_upload_header() {
    1278     ?>
    1279     <script type="text/javascript">post_id = <?php echo intval($_REQUEST['post_id']); ?>;</script>
    1280     <div id="media-upload-header">
    1281     <?php the_media_upload_tabs(); ?>
    1282     </div>
    1283     <?php
     1278    echo '<script type="text/javascript">post_id = ' . intval( $_REQUEST['post_id'] ) . ";</script>\n";
     1279    if ( empty( $_GET['chromeless'] ) ) {
     1280        echo '<div id="media-upload-header">';
     1281        the_media_upload_tabs();
     1282        echo '</div>';
     1283    }
    12841284}
    12851285
Note: See TracChangeset for help on using the changeset viewer.