Accessibility: Remove inappropriate content from the Network screens headings.

See #26601.


git-svn-id: https://develop.svn.wordpress.org/trunk@39551 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrea Fercia 2016-12-09 18:56:46 +00:00
parent 479a743307
commit c7b8c49bfc
4 changed files with 25 additions and 10 deletions

View File

@ -55,23 +55,26 @@ if ( $updated ) { ?>
<?php } ?>
<div class="wrap">
<h1><?php
<h1 class="wp-heading-inline"><?php
echo esc_html( $title );
?></h1>
<?php
if ( in_array( get_site_option( 'registration' ), array( 'all', 'blog' ) ) ) {
/** This filter is documented in wp-login.php */
$sign_up_url = apply_filters( 'wp_signup_location', network_site_url( 'wp-signup.php' ) );
printf( ' <a href="%s" class="page-title-action">%s</a>', esc_url( $sign_up_url ), esc_html_x( 'Add New', 'site' ) );
}
?></h1>
<?php
if ( empty( $blogs ) ) :
echo '<p>';
_e( 'You must be a member of at least one site to use this page.' );
echo '</p>';
else :
?>
<hr class="wp-header-end">
<form id="myblogs" method="post">
<?php
choose_primary_blog();

View File

@ -287,7 +287,7 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
?>
<div class="wrap">
<h1><?php _e( 'Sites' ); ?>
<h1 class="wp-heading-inline"><?php _e( 'Sites' ); ?></h1>
<?php if ( current_user_can( 'create_sites') ) : ?>
<a href="<?php echo network_admin_url('site-new.php'); ?>" class="page-title-action"><?php echo esc_html_x( 'Add New', 'site' ); ?></a>
@ -297,8 +297,10 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {
/* translators: %s: search keywords */
printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', esc_html( $s ) );
} ?>
</h1>
}
?>
<hr class="wp-header-end">
<?php echo $msg; ?>

View File

@ -247,13 +247,20 @@ require_once(ABSPATH . 'wp-admin/admin-header.php');
?>
<div class="wrap">
<h1><?php echo esc_html( $title ); if ( current_user_can('install_themes') ) { ?> <a href="theme-install.php" class="page-title-action"><?php echo esc_html_x('Add New', 'theme'); ?></a><?php }
<h1 class="wp-heading-inline"><?php echo esc_html( $title ); ?></h1>
<?php if ( current_user_can( 'install_themes' ) ) : ?>
<a href="theme-install.php" class="page-title-action"><?php echo esc_html_x( 'Add New', 'theme' ); ?></a>
<?php endif; ?>
<?php
if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {
/* translators: %s: search keywords */
printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', esc_html( $s ) );
}
?>
</h1>
<hr class="wp-header-end">
<?php
if ( isset( $_GET['enabled'] ) ) {

View File

@ -215,7 +215,9 @@ if ( isset( $_REQUEST['updated'] ) && $_REQUEST['updated'] == 'true' && ! empty(
}
?>
<div class="wrap">
<h1><?php esc_html_e( 'Users' );
<h1 class="wp-heading-inline"><?php esc_html_e( 'Users' ); ?></h1>
<?php
if ( current_user_can( 'create_users') ) : ?>
<a href="<?php echo network_admin_url('user-new.php'); ?>" class="page-title-action"><?php echo esc_html_x( 'Add New', 'user' ); ?></a><?php
endif;
@ -225,7 +227,8 @@ if ( isset( $_REQUEST['updated'] ) && $_REQUEST['updated'] == 'true' && ! empty(
printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', esc_html( $usersearch ) );
}
?>
</h1>
<hr class="wp-header-end">
<?php $wp_list_table->views(); ?>