Provide proper label associations and descriptions throughout the network admin

* Add labels previously missing for many inputs throughout the network admin screen.
* Add proper `aria-describedby` attributes to provide better descriptions.
* Wrap grouped inputs with `fieldset` elements.
* Remove now unneeded `title` attributes when appropriate.

Props cfoellmann, afercia, rianrietveld.

Fixes #38406.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31498 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Jeremy Felt 2015-02-23 02:29:26 +00:00
parent 754636aaf1
commit 7644e68119
11 changed files with 99 additions and 68 deletions

View File

@ -385,7 +385,7 @@ class WP_Users_List_Table extends WP_List_Table {
$edit .= $this->row_actions( $actions );
// Set up the checkbox ( because the user is editable, otherwise it's empty )
$checkbox = '<label class="screen-reader-text" for="cb-select-' . $user_object->ID . '">' . sprintf( __( 'Select %s' ), $user_object->user_login ) . '</label>'
$checkbox = '<label class="screen-reader-text" for="user_' . $user_object->ID . '">' . sprintf( __( 'Select %s' ), $user_object->user_login ) . '</label>'
. "<input type='checkbox' name='users[]' id='user_{$user_object->ID}' class='$role' value='{$user_object->ID}' />";
} else {

View File

@ -379,14 +379,16 @@ function wp_network_dashboard_right_now() {
<form action="<?php echo network_admin_url('users.php'); ?>" method="get">
<p>
<input type="search" name="s" value="" size="30" autocomplete="off" />
<label class="screen-reader-text" for="search-users"><?php _e( 'Search Users' ); ?></label>
<input type="search" name="s" value="" size="30" autocomplete="off" id="search-users"/>
<?php submit_button( __( 'Search Users' ), 'button', 'submit', false, array( 'id' => 'submit_users' ) ); ?>
</p>
</form>
<form action="<?php echo network_admin_url('sites.php'); ?>" method="get">
<p>
<input type="search" name="s" value="" size="30" autocomplete="off" />
<label class="screen-reader-text" for="search-sites"><?php _e( 'Search Sites' ); ?></label>
<input type="search" name="s" value="" size="30" autocomplete="off" id="search-sites"/>
<?php submit_button( __( 'Search Sites' ), 'button', 'submit', false, array( 'id' => 'submit_sites' ) ); ?>
</p>
</form>

View File

@ -476,8 +476,11 @@ function upload_space_setting( $id ) {
?>
<tr>
<th><?php _e( 'Site Upload Space Quota '); ?></th>
<td><input type="number" step="1" min="0" style="width: 100px" name="option[blog_upload_space]" value="<?php echo $quota; ?>" /> <?php _e( 'MB (Leave blank for network default)' ); ?></td>
<th><label for="blog-upload-space-number"><?php _e( 'Site Upload Space Quota' ); ?></label></th>
<td>
<input type="number" step="1" min="0" style="width: 100px" name="option[blog_upload_space]" id="blog-upload-space-number" aria-describedby="blog-upload-space-desc" value="<?php echo $quota; ?>" />
<span id="blog-upload-space-desc"><span class="screen-reader-text"><?php _e( 'Size in megabytes' ); ?></span> <?php _e( 'MB (Leave blank for network default)' ); ?></span>
</td>
</tr>
<?php
}
@ -784,7 +787,7 @@ function choose_primary_blog() {
<table class="form-table">
<tr>
<?php /* translators: My sites label */ ?>
<th scope="row"><?php _e( 'Primary Site' ); ?></th>
<th scope="row"><label for="primary_blog"><?php _e( 'Primary Site' ); ?></label></th>
<td>
<?php
$all_blogs = get_blogs_of_user( get_current_user_id() );
@ -792,7 +795,7 @@ function choose_primary_blog() {
if ( count( $all_blogs ) > 1 ) {
$found = false;
?>
<select name="primary_blog">
<select name="primary_blog" id="primary_blog">
<?php foreach( (array) $all_blogs as $blog ) {
if ( $primary_blog == $blog->userblog_id )
$found = true;

View File

@ -134,8 +134,8 @@ if ( isset( $_GET['updated'] ) ) {
<tr>
<th scope="row"><label for="admin_email"><?php _e( 'Network Admin Email' ) ?></label></th>
<td>
<input name="admin_email" type="email" id="admin_email" class="regular-text" value="<?php echo esc_attr( get_site_option( 'admin_email' ) ) ?>" />
<p class="description">
<input name="admin_email" type="email" id="admin_email" aria-describedby="admin-email-desc" class="regular-text" value="<?php echo esc_attr( get_site_option( 'admin_email' ) ) ?>" />
<p class="description" id="admin-email-desc">
<?php _e( 'This email address will receive notifications. Registration and support emails will also come from this address.' ); ?>
</p>
</td>
@ -151,15 +151,16 @@ if ( isset( $_GET['updated'] ) ) {
$reg = get_site_option( 'registration' );
?>
<td>
<fieldset>
<legend class="screen-reader-text"><?php _e( 'New registrations settings' ) ?></legend>
<label><input name="registration" type="radio" id="registration1" value="none"<?php checked( $reg, 'none') ?> /> <?php _e( 'Registration is disabled.' ); ?></label><br />
<label><input name="registration" type="radio" id="registration2" value="user"<?php checked( $reg, 'user') ?> /> <?php _e( 'User accounts may be registered.' ); ?></label><br />
<label><input name="registration" type="radio" id="registration3" value="blog"<?php checked( $reg, 'blog') ?> /> <?php _e( 'Logged in users may register new sites.' ); ?></label><br />
<label><input name="registration" type="radio" id="registration4" value="all"<?php checked( $reg, 'all') ?> /> <?php _e( 'Both sites and user accounts can be registered.' ); ?></label>
<p class="description">
<?php if ( is_subdomain_install() )
_e( 'If registration is disabled, please set <code>NOBLOGREDIRECT</code> in <code>wp-config.php</code> to a URL you will redirect visitors to if they visit a non-existent site.' );
?>
</p>
<?php if ( is_subdomain_install() ) {
echo '<p class="description">' . __( 'If registration is disabled, please set <code>NOBLOGREDIRECT</code> in <code>wp-config.php</code> to a URL you will redirect visitors to if they visit a non-existent site.' ) . '</p>';
} ?>
</fieldset>
</td>
</tr>
@ -184,8 +185,8 @@ if ( isset( $_GET['updated'] ) ) {
<tr>
<th scope="row"><label for="illegal_names"><?php _e( 'Banned Names' ) ?></label></th>
<td>
<input name="illegal_names" type="text" id="illegal_names" class="large-text" value="<?php echo esc_attr( implode( " ", (array) get_site_option( 'illegal_names' ) ) ); ?>" size="45" />
<p class="description">
<input name="illegal_names" type="text" id="illegal_names" aria-describedby="illegal-names-desc" class="large-text" value="<?php echo esc_attr( implode( " ", (array) get_site_option( 'illegal_names' ) ) ); ?>" size="45" />
<p class="description" id="illegal-names-desc">
<?php _e( 'Users are not allowed to register these sites. Separate names by spaces.' ) ?>
</p>
</td>
@ -196,9 +197,9 @@ if ( isset( $_GET['updated'] ) ) {
<td>
<?php $limited_email_domains = get_site_option( 'limited_email_domains' );
$limited_email_domains = str_replace( ' ', "\n", $limited_email_domains ); ?>
<textarea name="limited_email_domains" id="limited_email_domains" cols="45" rows="5">
<textarea name="limited_email_domains" id="limited_email_domains" aria-describedby="limited-email-domains-desc" cols="45" rows="5">
<?php echo esc_textarea( $limited_email_domains == '' ? '' : implode( "\n", (array) $limited_email_domains ) ); ?></textarea>
<p class="description">
<p class="description" id="limited-email-domains-desc">
<?php _e( 'If you want to limit site registrations to certain domains. One domain per line.' ) ?>
</p>
</td>
@ -207,9 +208,9 @@ if ( isset( $_GET['updated'] ) ) {
<tr>
<th scope="row"><label for="banned_email_domains"><?php _e('Banned Email Domains') ?></label></th>
<td>
<textarea name="banned_email_domains" id="banned_email_domains" cols="45" rows="5">
<textarea name="banned_email_domains" id="banned_email_domains" aria-describedby="banned-email-domains-desc" cols="45" rows="5">
<?php echo esc_textarea( get_site_option( 'banned_email_domains' ) == '' ? '' : implode( "\n", (array) get_site_option( 'banned_email_domains' ) ) ); ?></textarea>
<p class="description">
<p class="description" id="banned-email-domains-desc">
<?php _e( 'If you want to ban domains from site registrations. One domain per line.' ) ?>
</p>
</td>
@ -222,9 +223,9 @@ if ( isset( $_GET['updated'] ) ) {
<tr>
<th scope="row"><label for="welcome_email"><?php _e( 'Welcome Email' ) ?></label></th>
<td>
<textarea name="welcome_email" id="welcome_email" rows="5" cols="45" class="large-text">
<textarea name="welcome_email" id="welcome_email" aria-describedby="welcome-email-desc" rows="5" cols="45" class="large-text">
<?php echo esc_textarea( get_site_option( 'welcome_email' ) ) ?></textarea>
<p class="description">
<p class="description" id="welcome-email-desc">
<?php _e( 'The welcome email sent to new site owners.' ) ?>
</p>
</td>
@ -232,9 +233,9 @@ if ( isset( $_GET['updated'] ) ) {
<tr>
<th scope="row"><label for="welcome_user_email"><?php _e( 'Welcome User Email' ) ?></label></th>
<td>
<textarea name="welcome_user_email" id="welcome_user_email" rows="5" cols="45" class="large-text">
<textarea name="welcome_user_email" id="welcome_user_email" aria-describedby="welcome-user-email-desc" rows="5" cols="45" class="large-text">
<?php echo esc_textarea( get_site_option( 'welcome_user_email' ) ) ?></textarea>
<p class="description">
<p class="description" id="welcome-user-email-desc">
<?php _e( 'The welcome email sent to new users.' ) ?>
</p>
</td>
@ -242,9 +243,9 @@ if ( isset( $_GET['updated'] ) ) {
<tr>
<th scope="row"><label for="first_post"><?php _e( 'First Post' ) ?></label></th>
<td>
<textarea name="first_post" id="first_post" rows="5" cols="45" class="large-text">
<textarea name="first_post" id="first_post" aria-describedby="first-post-desc" rows="5" cols="45" class="large-text">
<?php echo esc_textarea( get_site_option( 'first_post' ) ) ?></textarea>
<p class="description">
<p class="description" id="first-post-desc">
<?php _e( 'The first post on a new site.' ) ?>
</p>
</td>
@ -252,9 +253,9 @@ if ( isset( $_GET['updated'] ) ) {
<tr>
<th scope="row"><label for="first_page"><?php _e( 'First Page' ) ?></label></th>
<td>
<textarea name="first_page" id="first_page" rows="5" cols="45" class="large-text">
<textarea name="first_page" id="first_page" aria-describedby="first-page-desc" rows="5" cols="45" class="large-text">
<?php echo esc_textarea( get_site_option( 'first_page' ) ) ?></textarea>
<p class="description">
<p class="description" id="first-page-desc">
<?php _e( 'The first page on a new site.' ) ?>
</p>
</td>
@ -262,9 +263,9 @@ if ( isset( $_GET['updated'] ) ) {
<tr>
<th scope="row"><label for="first_comment"><?php _e( 'First Comment' ) ?></label></th>
<td>
<textarea name="first_comment" id="first_comment" rows="5" cols="45" class="large-text">
<textarea name="first_comment" id="first_comment" aria-describedby="first-comment-desc" rows="5" cols="45" class="large-text">
<?php echo esc_textarea( get_site_option( 'first_comment' ) ) ?></textarea>
<p class="description">
<p class="description" id="first-comment-desc">
<?php _e( 'The first comment on a new site.' ) ?>
</p>
</td>
@ -272,8 +273,8 @@ if ( isset( $_GET['updated'] ) ) {
<tr>
<th scope="row"><label for="first_comment_author"><?php _e( 'First Comment Author' ) ?></label></th>
<td>
<input type="text" size="40" name="first_comment_author" id="first_comment_author" value="<?php echo get_site_option('first_comment_author') ?>" />
<p class="description">
<input type="text" size="40" name="first_comment_author" id="first_comment_author" aria-describedby="first-comment-author-desc" value="<?php echo get_site_option('first_comment_author') ?>" />
<p class="description" id="first-comment-author-desc">
<?php _e( 'The author of the first comment on a new site.' ) ?>
</p>
</td>
@ -281,8 +282,8 @@ if ( isset( $_GET['updated'] ) ) {
<tr>
<th scope="row"><label for="first_comment_url"><?php _e( 'First Comment URL' ) ?></label></th>
<td>
<input type="text" size="40" name="first_comment_url" id="first_comment_url" value="<?php echo esc_attr( get_site_option( 'first_comment_url' ) ) ?>" />
<p class="description">
<input type="text" size="40" name="first_comment_url" id="first_comment_url" aria-describedby="first-comment-url-desc" value="<?php echo esc_attr( get_site_option( 'first_comment_url' ) ) ?>" />
<p class="description" id="first-comment-url-desc">
<?php _e( 'The URL for the first comment on a new site.' ) ?>
</p>
</td>
@ -293,18 +294,31 @@ if ( isset( $_GET['updated'] ) ) {
<tr>
<th scope="row"><?php _e( 'Site upload space' ) ?></th>
<td>
<label><input type="checkbox" id="upload_space_check_disabled" name="upload_space_check_disabled" value="0"<?php checked( get_site_option( 'upload_space_check_disabled' ), 0 ) ?>/> <?php printf( __( 'Limit total size of files uploaded to %s MB' ), '</label><label><input name="blog_upload_space" type="number" min="0" style="width: 100px" id="blog_upload_space" value="' . esc_attr( get_site_option('blog_upload_space', 100) ) . '" />' ); ?></label><br />
<label><input type="checkbox" id="upload_space_check_disabled" name="upload_space_check_disabled" value="0"<?php checked( get_site_option( 'upload_space_check_disabled' ), 0 ) ?>/> <?php printf( __( 'Limit total size of files uploaded to %s MB' ), '</label><label><input name="blog_upload_space" type="number" min="0" style="width: 100px" id="blog_upload_space" aria-describedby="blog-upload-space-desc" value="' . esc_attr( get_site_option('blog_upload_space', 100) ) . '" />' ); ?></label><br />
<p class="screen-reader-text" id="blog-upload-space-desc">
<?php _e( 'Size in megabytes' ) ?>
</p>
</td>
</tr>
<tr>
<th scope="row"><label for="upload_filetypes"><?php _e( 'Upload file types' ) ?></label></th>
<td><input name="upload_filetypes" type="text" id="upload_filetypes" class="large-text" value="<?php echo esc_attr( get_site_option( 'upload_filetypes', 'jpg jpeg png gif' ) ) ?>" size="45" /></td>
<td>
<input name="upload_filetypes" type="text" id="upload_filetypes" aria-describedby="upload-filetypes-desc" class="large-text" value="<?php echo esc_attr( get_site_option( 'upload_filetypes', 'jpg jpeg png gif' ) ) ?>" size="45" />
<p class="description" id="upload-filetypes-desc">
<?php _e( 'Allowed file types. Separate types by spaces.' ) ?>
</p>
</td>
</tr>
<tr>
<th scope="row"><label for="fileupload_maxk"><?php _e( 'Max upload file size' ) ?></label></th>
<td><?php printf( _x( '%s KB', 'File size in kilobytes' ), '<input name="fileupload_maxk" type="number" min="0" style="width: 100px" id="fileupload_maxk" value="' . esc_attr( get_site_option( 'fileupload_maxk', 300 ) ) . '" />' ); ?></td>
<td>
<?php printf( _x( '%s KB', 'File size in kilobytes' ), '<input name="fileupload_maxk" type="number" min="0" style="width: 100px" id="fileupload_maxk" aria-describedby="fileupload-maxk-desc" value="' . esc_attr( get_site_option( 'fileupload_maxk', 300 ) ) . '" />' ); ?>
<p class="screen-reader-text" id="fileupload-maxk-desc">
<?php _e( 'Size in kilobytes' ) ?>
</p>
</td>
</tr>
</table>
@ -363,9 +377,15 @@ if ( isset( $_GET['updated'] ) ) {
* @param array $admin_menus The menu items available.
*/
$menu_items = apply_filters( 'mu_menu_items', array( 'plugins' => __( 'Plugins' ) ) );
$fieldset_end = '';
if ( count( (array) $menu_items ) > 1 ) {
echo '<fieldset><legend class="screen-reader-text">' . __( 'Enable menus' ) . '</legend>';
$fieldset_end = '</fieldset>';
}
foreach ( (array) $menu_items as $key => $val ) {
echo "<label><input type='checkbox' name='menu_items[" . $key . "]' value='1'" . ( isset( $menu_perms[$key] ) ? checked( $menu_perms[$key], '1', false ) : '' ) . " /> " . esc_html( $val ) . "</label><br/>";
}
echo $fieldset_end;
?>
</td>
</tr>

View File

@ -124,35 +124,37 @@ if ( ! empty( $messages ) ) {
<input type="hidden" name="id" value="<?php echo esc_attr( $id ) ?>" />
<table class="form-table">
<tr class="form-field form-required">
<th scope="row"><?php _e( 'Domain' ) ?></th>
<?php if ( $is_main_site ) { ?>
<th scope="row"><?php _e( 'Domain' ) ?></th>
<td><code><?php echo $parsed['scheme'] . '://' . esc_attr( $details->domain ) ?></code></td>
<?php } else { ?>
<th scope="row"><label for="domain"><?php _e( 'Domain' ) ?></label></th>
<td><?php echo $parsed['scheme'] . '://'; ?><input name="blog[domain]" type="text" id="domain" value="<?php echo esc_attr( $details->domain ) ?>" /></td>
<?php } ?>
</tr>
<tr class="form-field form-required">
<th scope="row"><?php _e( 'Path' ) ?></th>
<?php if ( $is_main_site ) { ?>
<th scope="row"><?php _e( 'Path' ) ?></th>
<td><code><?php echo esc_attr( $details->path ) ?></code></td>
<?php
} else {
switch_to_blog( $id );
?>
<th scope="row"><label for="path"><?php _e( 'Path' ) ?></label></th>
<td>
<input name="blog[path]" type="text" id="path" value="<?php echo esc_attr( $details->path ) ?>" /><br />
<label><input type="checkbox" name="update_home_url" value="update" <?php if ( get_option( 'siteurl' ) == untrailingslashit( get_blogaddress_by_id ($id ) ) || get_option( 'home' ) == untrailingslashit( get_blogaddress_by_id( $id ) ) ) echo 'checked="checked"'; ?> /> <?php _e( 'Update <code>siteurl</code> and <code>home</code> as well.' ); ?></label>
<input type="checkbox" name="update_home_url" id="update_home_url" value="update" <?php if ( get_option( 'siteurl' ) == untrailingslashit( get_blogaddress_by_id ($id ) ) || get_option( 'home' ) == untrailingslashit( get_blogaddress_by_id( $id ) ) ) echo 'checked="checked"'; ?> /> <label for="update_home_url"><?php _e( 'Update <code>siteurl</code> and <code>home</code> as well.' ); ?></label>
</td>
<?php
restore_current_blog();
} ?>
</tr>
<tr class="form-field">
<th scope="row"><?php _ex( 'Registered', 'site' ) ?></th>
<th scope="row"><label for="blog_registered"><?php _ex( 'Registered', 'site' ) ?></label></th>
<td><input name="blog[registered]" type="text" id="blog_registered" value="<?php echo esc_attr( $details->registered ) ?>" /></td>
</tr>
<tr class="form-field">
<th scope="row"><?php _e( 'Last Updated' ); ?></th>
<th scope="row"><label for="blog_last_updated"><?php _e( 'Last Updated' ); ?></label></th>
<td><input name="blog[last_updated]" type="text" id="blog_last_updated" value="<?php echo esc_attr( $details->last_updated ) ?>" /></td>
</tr>
<?php
@ -167,10 +169,13 @@ if ( ! empty( $messages ) ) {
<tr>
<th scope="row"><?php _e( 'Attributes' ); ?></th>
<td>
<fieldset>
<legend class="screen-reader-text"><?php _e( 'Set site attributes' ) ?></legend>
<?php foreach ( $attribute_fields as $field_key => $field_label ) : ?>
<label><input type="checkbox" name="blog[<?php echo $field_key; ?>]" value="1" <?php checked( (bool) $details->$field_key, true ); disabled( ! in_array( $details->$field_key, array( 0, 1 ) ) ); ?> />
<?php echo $field_label; ?></label><br/>
<?php endforeach; ?>
<fieldset>
</td>
</tr>
</table>

View File

@ -127,24 +127,24 @@ if ( ! empty( $messages ) ) {
<?php wp_nonce_field( 'add-blog', '_wpnonce_add-blog' ) ?>
<table class="form-table">
<tr class="form-field form-required">
<th scope="row"><?php _e( 'Site Address' ) ?></th>
<th scope="row"><label for="site-address"><?php _e( 'Site Address' ) ?></label></th>
<td>
<?php if ( is_subdomain_install() ) { ?>
<input name="blog[domain]" type="text" class="regular-text" id="site-address" title="<?php esc_attr_e( 'Domain' ) ?>"/><span class="no-break">.<?php echo preg_replace( '|^www\.|', '', $current_site->domain ); ?></span>
<input name="blog[domain]" type="text" class="regular-text" id="site-address" aria-describedby="site-address-desc" /><span class="no-break">.<?php echo preg_replace( '|^www\.|', '', $current_site->domain ); ?></span>
<?php } else {
echo $current_site->domain . $current_site->path ?><input name="blog[domain]" class="regular-text" id="site-address" type="text" title="<?php esc_attr_e( 'Domain' ) ?>"/>
echo $current_site->domain . $current_site->path ?><input name="blog[domain]" type="text" class="regular-text" id="site-address" aria-describedby="site-address-desc" />
<?php }
echo '<p>' . __( 'Only lowercase letters (a-z) and numbers are allowed.' ) . '</p>';
echo '<p id="site-address-desc">' . __( 'Only lowercase letters (a-z) and numbers are allowed.' ) . '</p>';
?>
</td>
</tr>
<tr class="form-field form-required">
<th scope="row"><?php _e( 'Site Title' ) ?></th>
<td><input name="blog[title]" type="text" class="regular-text" id="site-title" title="<?php esc_attr_e( 'Title' ) ?>"/></td>
<th scope="row"><label for="site-title"><?php _e( 'Site Title' ) ?></label></th>
<td><input name="blog[title]" type="text" class="regular-text" id="site-title" /></td>
</tr>
<tr class="form-field form-required">
<th scope="row"><?php _e( 'Admin Email' ) ?></th>
<td><input name="blog[email]" type="email" class="regular-text wp-suggest-user" id="admin-email" data-autocomplete-type="search" data-autocomplete-field="user_email" title="<?php esc_attr_e( 'Email' ) ?>"/></td>
<th scope="row"><label for="admin-email"><?php _e( 'Admin Email' ) ?></label></td>
<td><input name="blog[email]" type="email" class="regular-text wp-suggest-user" id="admin-email" data-autocomplete-type="search" data-autocomplete-field="user_email" /></td>
</tr>
<tr class="form-field">
<td colspan="2"><?php _e( 'A new user will be created if the above email address is not in the database.' ) ?><br /><?php _e( 'The username and password will be mailed to this email address.' ) ?></td>

View File

@ -138,14 +138,14 @@ if ( ! empty( $messages ) ) {
if ( strpos( $option->option_value, "\n" ) !== false ) {
?>
<tr class="form-field">
<th scope="row"><?php echo ucwords( str_replace( "_", " ", $option->option_name ) ) ?></th>
<th scope="row"><label for="<?php echo esc_attr( $option->option_name ) ?>"><?php echo ucwords( str_replace( "_", " ", $option->option_name ) ) ?></label></th>
<td><textarea class="<?php echo $class; ?>" rows="5" cols="40" name="option[<?php echo esc_attr( $option->option_name ) ?>]" id="<?php echo esc_attr( $option->option_name ) ?>"<?php disabled( $disabled ) ?>><?php echo esc_textarea( $option->option_value ) ?></textarea></td>
</tr>
<?php
} else {
?>
<tr class="form-field">
<th scope="row"><?php echo esc_html( ucwords( str_replace( "_", " ", $option->option_name ) ) ); ?></th>
<th scope="row"><label for="<?php echo esc_attr( $option->option_name ) ?>"><?php echo esc_html( ucwords( str_replace( "_", " ", $option->option_name ) ) ); ?></label></th>
<?php if ( $is_main_site && in_array( $option->option_name, array( 'siteurl', 'home' ) ) ) { ?>
<td><code><?php echo esc_html( $option->option_value ) ?></code></td>
<?php } else { ?>

View File

@ -262,12 +262,12 @@ if ( current_user_can( 'promote_users' ) && apply_filters( 'show_network_site_us
<input type="hidden" name="id" value="<?php echo esc_attr( $id ) ?>" />
<table class="form-table">
<tr>
<th scope="row"><?php _e( 'Username' ); ?></th>
<th scope="row"><label for="newuser"><?php _e( 'Username' ); ?></label></th>
<td><input type="text" class="regular-text wp-suggest-user" name="newuser" id="newuser" /></td>
</tr>
<tr>
<th scope="row"><?php _e( 'Role' ); ?></th>
<td><select name="new_role" id="new_role_0">
<th scope="row"><label for="new_role_adduser"><?php _e( 'Role' ); ?></label></th>
<td><select name="new_role" id="new_role_adduser">
<?php wp_dropdown_roles( get_option( 'default_role' ) ); ?>
</select></td>
</tr>
@ -291,16 +291,16 @@ if ( current_user_can( 'create_users' ) && apply_filters( 'show_network_site_use
<input type="hidden" name="id" value="<?php echo esc_attr( $id ) ?>" />
<table class="form-table">
<tr>
<th scope="row"><?php _e( 'Username' ) ?></th>
<td><input type="text" class="regular-text" name="user[username]" /></td>
<th scope="row"><label for="user_username"><?php _e( 'Username' ) ?></label></th>
<td><input type="text" class="regular-text" name="user[username]" id="user_username" /></td>
</tr>
<tr>
<th scope="row"><?php _e( 'Email' ) ?></th>
<td><input type="text" class="regular-text" name="user[email]" /></td>
<th scope="row"><label for="user_email"><?php _e( 'Email' ) ?></label></th>
<td><input type="text" class="regular-text" name="user[email]" id="user_email" /></td>
</tr>
<tr>
<th scope="row"><?php _e( 'Role' ); ?></th>
<td><select name="new_role" id="new_role_0">
<th scope="row"><label for="new_role_newuser"><?php _e( 'Role' ); ?></label></th>
<td><select name="new_role" id="new_role_newuser">
<?php wp_dropdown_roles( get_option( 'default_role' ) ); ?>
</select></td>
</tr>

View File

@ -87,12 +87,12 @@ if ( isset( $add_user_errors ) && is_wp_error( $add_user_errors ) ) { ?>
<form action="<?php echo network_admin_url('user-new.php?action=add-user'); ?>" id="adduser" method="post">
<table class="form-table">
<tr class="form-field form-required">
<th scope="row"><?php _e( 'Username' ) ?></th>
<td><input type="text" class="regular-text" name="user[username]" /></td>
<th scope="row"><label for="username"><?php _e( 'Username' ) ?></label></th>
<td><input type="text" class="regular-text" name="user[username]" id="username" /></td>
</tr>
<tr class="form-field form-required">
<th scope="row"><?php _e( 'Email' ) ?></th>
<td><input type="text" class="regular-text" name="user[email]" /></td>
<th scope="row"><label for="email"><?php _e( 'Email' ) ?></label></th>
<td><input type="text" class="regular-text" name="user[email]" id="email"/></td>
</tr>
<tr class="form-field">
<td colspan="2"><?php _e( 'Username and password will be mailed to the above email address.' ) ?></td>

View File

@ -51,7 +51,8 @@ function confirm_delete_users( $users ) {
$blog_users = get_users( array( 'blog_id' => $details->userblog_id, 'fields' => array( 'ID', 'user_login' ) ) );
if ( is_array( $blog_users ) && !empty( $blog_users ) ) {
$user_site = "<a href='" . esc_url( get_home_url( $details->userblog_id ) ) . "'>{$details->blogname}</a>";
$user_dropdown = "<select name='blog[$user_id][$key]'>";
$user_dropdown = '<label for="reassign_user" class="screen-reader-text">' . __( 'Select a user' ) . '</label>';
$user_dropdown .= "<select name='blog[$user_id][$key]' id='reassign_user'>";
$user_list = '';
foreach ( $blog_users as $user ) {
if ( ! in_array( $user->ID, $allusers ) )
@ -67,7 +68,7 @@ function confirm_delete_users( $users ) {
<li><label><input type="radio" id="delete_option0" name="delete[<?php echo $details->userblog_id . '][' . $delete_user->ID ?>]" value="delete" checked="checked" />
<?php _e( 'Delete all content.' ); ?></label></li>
<li><label><input type="radio" id="delete_option1" name="delete[<?php echo $details->userblog_id . '][' . $delete_user->ID ?>]" value="reassign" />
<?php echo __( 'Attribute all content to:' ) . '</label>' . $user_dropdown; ?></li>
<?php echo __( 'Attribute all content to:' ) . "</label>\n" . $user_dropdown; ?></li>
</ul>
<?php
}

View File

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