Accessibility: Remove inappropriate content from the Widgets screen heading.

See #26601.

Built from https://develop.svn.wordpress.org/trunk@39541


git-svn-id: http://core.svn.wordpress.org/trunk@39481 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrea Fercia 2016-12-07 22:18:40 +00:00
parent da4cc4d9e2
commit 2d76e0dfb2
2 changed files with 20 additions and 17 deletions

View File

@ -344,24 +344,27 @@ $errors = array(
require_once( ABSPATH . 'wp-admin/admin-header.php' ); ?> require_once( ABSPATH . 'wp-admin/admin-header.php' ); ?>
<div class="wrap"> <div class="wrap">
<h1> <h1 class="wp-heading-inline"><?php
echo esc_html( $title );
?></h1>
<?php <?php
echo esc_html( $title ); if ( current_user_can( 'customize' ) ) {
if ( current_user_can( 'customize' ) ) { printf(
printf( ' <a class="page-title-action hide-if-no-customize" href="%1$s">%2$s</a>',
' <a class="page-title-action hide-if-no-customize" href="%1$s">%2$s</a>', esc_url( add_query_arg(
esc_url( add_query_arg( array(
array( array( 'autofocus' => array( 'panel' => 'widgets' ) ),
array( 'autofocus' => array( 'panel' => 'widgets' ) ), 'return' => urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) )
'return' => urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ) ),
), admin_url( 'customize.php' )
admin_url( 'customize.php' ) ) ),
) ), __( 'Manage with Live Preview' )
__( 'Manage with Live Preview' ) );
); }
}
?> ?>
</h1>
<hr class="wp-header-end">
<?php if ( isset($_GET['message']) && isset($messages[$_GET['message']]) ) { ?> <?php if ( isset($_GET['message']) && isset($messages[$_GET['message']]) ) { ?>
<div id="message" class="updated notice is-dismissible"><p><?php echo $messages[$_GET['message']]; ?></p></div> <div id="message" class="updated notice is-dismissible"><p><?php echo $messages[$_GET['message']]; ?></p></div>

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.8-alpha-39540'; $wp_version = '4.8-alpha-39541';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.