Make WordPress Core


Ignore:
Timestamp:
04/10/2012 01:19:30 AM (14 years ago)
Author:
azaozz
Message:

Introduce wp_is_mobile() and use it instead of $is_iphone global, see #20014

File:
1 edited

Legend:

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

    r20382 r20417  
    6363 */
    6464function the_media_upload_tabs() {
    65         global $redir_tab, $is_iphone;
     65        global $redir_tab;
    6666        $tabs = media_upload_tabs();
    6767
    68         if ( $is_iphone ) {
     68        if ( wp_is_mobile() ) {
    6969                unset($tabs['type']);
    7070                $default = 'type_url';
     
    529529 */
    530530function wp_media_upload_handler() {
    531         global $is_iphone;
    532 
    533531        $errors = array();
    534532        $id = 0;
     
    601599        }
    602600
    603         if ( $is_iphone )
     601        if ( wp_is_mobile() )
    604602                return wp_iframe( 'media_upload_type_url_form', 'image', $errors, $id );
    605603        else
     
    13071305 */
    13081306function media_upload_form( $errors = null ) {
    1309         global $type, $tab, $pagenow, $is_IE, $is_opera, $is_iphone;
    1310 
    1311         if ( $is_iphone )
     1307        global $type, $tab, $pagenow, $is_IE, $is_opera;
     1308
     1309        if ( wp_is_mobile() )
    13121310                return;
    13131311
     
    14411439 */
    14421440function media_upload_type_form($type = 'file', $errors = null, $id = null) {
    1443         global $is_iphone;
    1444 
    1445         if ( $is_iphone )
     1441        if ( wp_is_mobile() )
    14461442                return;
    14471443
Note: See TracChangeset for help on using the changeset viewer.