WordPress.org

Make WordPress Core

Changeset 20422


Ignore:
Timestamp:
04/10/2012 03:18:48 AM (9 years ago)
Author:
azaozz
Message:

Consistently remove links to media-new.php for mobile devices, props SergeyBiryukov, see #20405

Location:
trunk
Files:
3 edited

Legend:

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

    r19712 r20422  
    107107<?php
    108108echo esc_html( $title );
    109 if ( current_user_can( 'upload_files' ) ) { ?>
     109if ( current_user_can( 'upload_files' ) && ! wp_is_mobile() ) { ?>
    110110    <a href="media-new.php" class="add-new-h2"><?php echo esc_html_x('Add New', 'file'); ?></a>
    111111<?php } ?>
  • trunk/wp-admin/upload.php

    r19528 r20422  
    177177<div class="wrap">
    178178<?php screen_icon(); ?>
    179 <h2><?php echo esc_html( $title ); ?> <a href="media-new.php" class="add-new-h2"><?php echo esc_html_x('Add New', 'file'); ?></a> <?php
     179<h2>
     180<?php
     181echo esc_html( $title );
     182if ( current_user_can( 'upload_files' ) && ! wp_is_mobile() ) { ?>
     183    <a href="media-new.php" class="add-new-h2"><?php echo esc_html_x('Add New', 'file'); ?></a><?php
     184}
    180185if ( ! empty( $_REQUEST['s'] ) )
    181186    printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', get_search_query() ); ?>
  • trunk/wp-includes/admin-bar.php

    r20099 r20422  
    490490    }
    491491
    492     if ( current_user_can( 'upload_files' ) )
     492    if ( current_user_can( 'upload_files' ) && ! wp_is_mobile() )
    493493        $actions[ 'media-new.php' ] = array( _x( 'Media', 'add new from admin bar' ), 'new-media' );
    494494
Note: See TracChangeset for help on using the changeset viewer.