WordPress.org

Make WordPress Core

Ticket #20405: 20405.patch

File 20405.patch, 1.7 KB (added by SergeyBiryukov, 6 years ago)
  • wp-admin/media.php

     
    106106<h2>
    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 } ?>
    112112</h2>
  • wp-admin/upload.php

     
    176176
    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() ); ?>
    182187</h2>
  • wp-includes/admin-bar.php

     
    489489                unset( $cpts['post'] );
    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
    495495        if ( current_user_can( 'manage_links' ) )