From 3760639b2c5728e2fda66bf6eb50e3b29f7273a7 Mon Sep 17 00:00:00 2001 From: Andrea Fercia Date: Wed, 7 Dec 2016 22:17:23 +0000 Subject: [PATCH] Accessibility: Remove inappropriate content from the Widgets screen heading. See #26601. git-svn-id: https://develop.svn.wordpress.org/trunk@39541 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/widgets.php | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/src/wp-admin/widgets.php b/src/wp-admin/widgets.php index e1ae09132f..4a34b58c8b 100644 --- a/src/wp-admin/widgets.php +++ b/src/wp-admin/widgets.php @@ -344,24 +344,27 @@ $errors = array( require_once( ABSPATH . 'wp-admin/admin-header.php' ); ?>
-

+

+ %2$s', - esc_url( add_query_arg( - array( - array( 'autofocus' => array( 'panel' => 'widgets' ) ), - 'return' => urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ) - ), - admin_url( 'customize.php' ) - ) ), - __( 'Manage with Live Preview' ) - ); - } +if ( current_user_can( 'customize' ) ) { + printf( + ' %2$s', + esc_url( add_query_arg( + array( + array( 'autofocus' => array( 'panel' => 'widgets' ) ), + 'return' => urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ) + ), + admin_url( 'customize.php' ) + ) ), + __( 'Manage with Live Preview' ) + ); +} ?> - + +