Changeset 19335
- Timestamp:
- 11/18/2011 08:43:16 AM (13 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/media.php
r19330 r19335 63 63 */ 64 64 function the_media_upload_tabs() { 65 global $redir_tab ;65 global $redir_tab, $is_iphone; 66 66 $tabs = media_upload_tabs(); 67 68 if ( $is_iphone ) { 69 unset($tabs['type']); 70 $default = 'type_url'; 71 } else { 72 $default = 'type'; 73 } 67 74 68 75 if ( !empty($tabs) ) { … … 73 80 $current = $_GET['tab']; 74 81 else 75 $current = apply_filters('media_upload_default_tab', 'type');82 $current = apply_filters('media_upload_default_tab', $default); 76 83 77 84 foreach ( $tabs as $callback => $text ) { 78 85 $class = ''; 86 79 87 if ( $current == $callback ) 80 88 $class = " class='current'"; 81 $href = add_query_arg(array('tab'=>$callback, 's'=>false, 'paged'=>false, 'post_mime_type'=>false, 'm'=>false)); 89 90 $href = add_query_arg(array('tab' => $callback, 's' => false, 'paged' => false, 'post_mime_type' => false, 'm' => false)); 82 91 $link = "<a href='" . esc_url($href) . "'$class>$text</a>"; 83 92 echo "\t<li id='" . esc_attr("tab-$callback") . "'>$link</li>\n"; … … 345 354 <body<?php if ( isset($GLOBALS['body_id']) ) echo ' id="' . $GLOBALS['body_id'] . '"'; ?> class="no-js"> 346 355 <script type="text/javascript"> 347 //<![CDATA[ 348 (function(){ 349 var c = document.body.className; 350 c = c.replace(/no-js/, 'js'); 351 document.body.className = c; 352 })(); 353 //]]> 356 document.body.className = document.body.className.replace('no-js', 'js'); 354 357 </script> 355 358 <?php … … 498 501 */ 499 502 function wp_media_upload_handler() { 503 global $is_iphone; 504 500 505 $errors = array(); 501 506 $id = 0; … … 568 573 } 569 574 570 return wp_iframe( 'media_upload_type_form', 'image', $errors, $id ); 575 if ( $is_iphone ) 576 return wp_iframe( 'media_upload_type_url_form', 'image', $errors, $id ); 577 else 578 return wp_iframe( 'media_upload_type_form', 'image', $errors, $id ); 571 579 } 572 580 … … 1264 1272 */ 1265 1273 function media_upload_form( $errors = null ) { 1266 global $type, $tab, $pagenow, $is_IE, $is_opera; 1274 global $type, $tab, $pagenow, $is_IE, $is_opera, $is_iphone; 1275 1276 if ( $is_iphone ) 1277 return; 1267 1278 1268 1279 $upload_action_url = admin_url('async-upload.php'); … … 1388 1399 */ 1389 1400 function media_upload_type_form($type = 'file', $errors = null, $id = null) { 1401 global $is_iphone; 1402 1403 if ( $is_iphone ) 1404 return; 1405 1390 1406 media_upload_header(); 1391 1407 -
trunk/wp-admin/media-new.php
r17748 r19335 7 7 */ 8 8 9 global $is_iphone; 10 11 if ( $is_iphone ) // cannot upload files from iPhone/iPad 12 return; 13 9 14 $_GET['inline'] = 'true'; 10 15 /** Administration bootstrap */ -
trunk/wp-admin/menu.php
r19202 r19335 57 57 $submenu['upload.php'][5] = array( __('Library'), 'upload_files', 'upload.php'); 58 58 /* translators: add new file */ 59 $submenu['upload.php'][10] = array( _x('Add New', 'file'), 'upload_files', 'media-new.php'); 59 if ( !$is_iphone ) 60 $submenu['upload.php'][10] = array( _x('Add New', 'file'), 'upload_files', 'media-new.php'); 60 61 61 62 $menu[15] = array( __('Links'), 'manage_links', 'link-manager.php', '', 'menu-top menu-icon-links', 'menu-links', 'div' );
Note: See TracChangeset
for help on using the changeset viewer.