From 5de5c9a64da5c6b978134fcfbd397a487d387487 Mon Sep 17 00:00:00 2001 From: azaozz Date: Tue, 10 Apr 2012 03:18:48 +0000 Subject: [PATCH] Consistently remove links to media-new.php for mobile devices, props SergeyBiryukov, see #20405 git-svn-id: http://svn.automattic.com/wordpress/trunk@20422 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/media.php | 2 +- wp-admin/upload.php | 7 ++++++- wp-includes/admin-bar.php | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/wp-admin/media.php b/wp-admin/media.php index 5381865c2a..ccbb1401ee 100644 --- a/wp-admin/media.php +++ b/wp-admin/media.php @@ -106,7 +106,7 @@ case 'edit' :

+if ( current_user_can( 'upload_files' ) && ! wp_is_mobile() ) { ?>

diff --git a/wp-admin/upload.php b/wp-admin/upload.php index 63771a83aa..f092ed61e3 100644 --- a/wp-admin/upload.php +++ b/wp-admin/upload.php @@ -176,7 +176,12 @@ require_once('./admin-header.php');
-

+ + ' . __('Search results for “%s”') . '', get_search_query() ); ?>

diff --git a/wp-includes/admin-bar.php b/wp-includes/admin-bar.php index 800f533da0..a11309a51a 100644 --- a/wp-includes/admin-bar.php +++ b/wp-includes/admin-bar.php @@ -489,7 +489,7 @@ function wp_admin_bar_new_content_menu( $wp_admin_bar ) { unset( $cpts['post'] ); } - if ( current_user_can( 'upload_files' ) ) + if ( current_user_can( 'upload_files' ) && ! wp_is_mobile() ) $actions[ 'media-new.php' ] = array( _x( 'Media', 'add new from admin bar' ), 'new-media' ); if ( current_user_can( 'manage_links' ) )