Make WordPress Core


Ignore:
Timestamp:
04/12/2012 12:16:37 AM (14 years ago)
Author:
azaozz
Message:

Don't hide links to the upload form and show an error for mobile devices that cannot upload, see #20410

File:
1 edited

Legend:

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

    r20417 r20449  
    6565        global $redir_tab;
    6666        $tabs = media_upload_tabs();
    67 
    68         if ( wp_is_mobile() ) {
    69                 unset($tabs['type']);
    70                 $default = 'type_url';
    71         } else {
    72                 $default = 'type';
    73         }
     67        $default = 'type';
    7468
    7569        if ( !empty($tabs) ) {
     
    599593        }
    600594
    601         if ( wp_is_mobile() )
    602                 return wp_iframe( 'media_upload_type_url_form', 'image', $errors, $id );
    603         else
    604                 return wp_iframe( 'media_upload_type_form', 'image', $errors, $id );
     595        return wp_iframe( 'media_upload_type_form', 'image', $errors, $id );
    605596}
    606597
     
    13071298        global $type, $tab, $pagenow, $is_IE, $is_opera;
    13081299
    1309         if ( wp_is_mobile() )
     1300        if ( ! _device_can_upload() ) {
     1301                echo '<p>' . __('The web browser on your device cannot be used to upload files. You may be able to use the <a href=" http://wordpress.org/extend/mobile/">native app for your device</a> instead.') . '</p>';
    13101302                return;
     1303        }
    13111304
    13121305        $upload_action_url = admin_url('async-upload.php');
     
    14391432 */
    14401433function media_upload_type_form($type = 'file', $errors = null, $id = null) {
    1441         if ( wp_is_mobile() )
    1442                 return;
    14431434
    14441435        media_upload_header();
Note: See TracChangeset for help on using the changeset viewer.