Changeset 22751 for trunk/wp-admin/media-new.php
- Timestamp:
- 11/21/2012 12:19:40 PM (13 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/media-new.php
r22746 r22751 9 9 * @subpackage Administration 10 10 */ 11 12 if ( ! isset( $_GET['inline'] ) )13 define( 'IFRAME_REQUEST' , true );14 11 15 12 /** Load WordPress Administration Bootstrap */ … … 25 22 wp_enqueue_script( 'media-gallery' ); 26 23 27 @header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));28 24 29 25 // IDs should be integers … … 35 31 wp_die( __( 'Cheatin’ uh?' ) ); 36 32 37 if ( isset($_GET['inline']) ) {38 33 $errors = array(); 39 34 … … 97 92 <h2><?php echo esc_html( $title ); ?></h2> 98 93 99 <form enctype="multipart/form-data" method="post" action="<?php echo admin_url('media- upload.php?inline=&upload-page-form='); ?>" class="<?php echo $form_class; ?>" id="file-form">94 <form enctype="multipart/form-data" method="post" action="<?php echo admin_url('media-new.php?inline=&upload-page-form='); ?>" class="<?php echo $form_class; ?>" id="file-form"> 100 95 101 96 <?php media_upload_form(); ?> … … 121 116 <?php 122 117 include('./admin-footer.php'); 123 124 } else {125 if ( ! empty( $_REQUEST['post_id'] ) && ! current_user_can( 'edit_post' , $_REQUEST['post_id'] ) )126 wp_die( __( 'Cheatin’ uh?' ) );127 128 // upload type: image, video, file, ..?129 if ( isset($_GET['type']) )130 $type = strval($_GET['type']);131 else132 $type = apply_filters('media_upload_default_type', 'file');133 134 // tab: gallery, library, or type-specific135 if ( isset($_GET['tab']) )136 $tab = strval($_GET['tab']);137 else138 $tab = apply_filters('media_upload_default_tab', 'type');139 140 $body_id = 'media-upload';141 142 // let the action code decide how to handle the request143 if ( $tab == 'type' || $tab == 'type_url' || ! array_key_exists( $tab , media_upload_tabs() ) )144 do_action("media_upload_$type");145 else146 do_action("media_upload_$tab");147 }
Note: See TracChangeset
for help on using the changeset viewer.