Accessibility: Remove inappropriate content from the Menus screen heading.

See #26601.


git-svn-id: https://develop.svn.wordpress.org/trunk@39543 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrea Fercia 2016-12-07 23:46:22 +00:00
parent 2b2f5a5105
commit d3aa41cf19
1 changed files with 17 additions and 15 deletions

View File

@ -576,21 +576,23 @@ get_current_screen()->set_help_sidebar(
require_once( ABSPATH . 'wp-admin/admin-header.php' );
?>
<div class="wrap">
<h1><?php echo esc_html( __( 'Menus' ) ); ?>
<?php
if ( current_user_can( 'customize' ) ) :
$focus = $locations_screen ? array( 'section' => 'menu_locations' ) : array( 'panel' => 'nav_menus' );
printf(
' <a class="page-title-action hide-if-no-customize" href="%1$s">%2$s</a>',
esc_url( add_query_arg( array(
array( 'autofocus' => $focus ),
'return' => urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ),
), admin_url( 'customize.php' ) ) ),
__( 'Manage with Live Preview' )
);
endif;
?>
</h1>
<h1 class="wp-heading-inline"><?php echo esc_html( __( 'Menus' ) ); ?></h1>
<?php
if ( current_user_can( 'customize' ) ) :
$focus = $locations_screen ? array( 'section' => 'menu_locations' ) : array( 'panel' => 'nav_menus' );
printf(
' <a class="page-title-action hide-if-no-customize" href="%1$s">%2$s</a>',
esc_url( add_query_arg( array(
array( 'autofocus' => $focus ),
'return' => urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ),
), admin_url( 'customize.php' ) ) ),
__( 'Manage with Live Preview' )
);
endif;
?>
<hr class="wp-header-end">
<h2 class="nav-tab-wrapper wp-clearfix">
<a href="<?php echo admin_url( 'nav-menus.php' ); ?>" class="nav-tab<?php if ( ! isset( $_GET['action'] ) || isset( $_GET['action'] ) && 'locations' != $_GET['action'] ) echo ' nav-tab-active'; ?>"><?php esc_html_e( 'Edit Menus' ); ?></a>
<?php if ( $num_locations && $menu_count ) : ?>