wp/wp-admin/users.php
changeset 22 8c2e4d02f4ef
parent 21 48c4eec2b7e6
equal deleted inserted replaced
21:48c4eec2b7e6 22:8c2e4d02f4ef
    31 get_current_screen()->add_help_tab(
    31 get_current_screen()->add_help_tab(
    32 	array(
    32 	array(
    33 		'id'      => 'overview',
    33 		'id'      => 'overview',
    34 		'title'   => __( 'Overview' ),
    34 		'title'   => __( 'Overview' ),
    35 		'content' => '<p>' . __( 'This screen lists all the existing users for your site. Each user has one of five defined roles as set by the site admin: Site Administrator, Editor, Author, Contributor, or Subscriber. Users with roles other than Administrator will see fewer options in the dashboard navigation when they are logged in, based on their role.' ) . '</p>' .
    35 		'content' => '<p>' . __( 'This screen lists all the existing users for your site. Each user has one of five defined roles as set by the site admin: Site Administrator, Editor, Author, Contributor, or Subscriber. Users with roles other than Administrator will see fewer options in the dashboard navigation when they are logged in, based on their role.' ) . '</p>' .
    36 		'<p>' . __( 'To add a new user for your site, click the Add New User button at the top of the screen or Add New User in the Users menu section.' ) . '</p>',
    36 		'<p>' . __( 'To add a new user for your site, click the Add User button at the top of the screen or Add User in the Users menu section.' ) . '</p>',
    37 	)
    37 	)
    38 );
    38 );
    39 
    39 
    40 get_current_screen()->add_help_tab(
    40 get_current_screen()->add_help_tab(
    41 	array(
    41 	array(
   153 			}
   153 			}
   154 
   154 
   155 			// If the user doesn't already belong to the blog, bail.
   155 			// If the user doesn't already belong to the blog, bail.
   156 			if ( is_multisite() && ! is_user_member_of_blog( $id ) ) {
   156 			if ( is_multisite() && ! is_user_member_of_blog( $id ) ) {
   157 				wp_die(
   157 				wp_die(
   158 					'<h1>' . __( 'Something went wrong.' ) . '</h1>' .
   158 					'<h1>' . __( 'An error occurred.' ) . '</h1>' .
   159 					'<p>' . __( 'One of the selected users is not a member of this site.' ) . '</p>',
   159 					'<p>' . __( 'One of the selected users is not a member of this site.' ) . '</p>',
   160 					403
   160 					403
   161 				);
   161 				);
   162 			}
   162 			}
   163 
   163 
   776 		<?php
   776 		<?php
   777 		if ( current_user_can( 'create_users' ) ) {
   777 		if ( current_user_can( 'create_users' ) ) {
   778 			printf(
   778 			printf(
   779 				'<a href="%1$s" class="page-title-action">%2$s</a>',
   779 				'<a href="%1$s" class="page-title-action">%2$s</a>',
   780 				esc_url( admin_url( 'user-new.php' ) ),
   780 				esc_url( admin_url( 'user-new.php' ) ),
   781 				esc_html__( 'Add New User' )
   781 				esc_html__( 'Add User' )
   782 			);
   782 			);
   783 		} elseif ( is_multisite() && current_user_can( 'promote_users' ) ) {
   783 		} elseif ( is_multisite() && current_user_can( 'promote_users' ) ) {
   784 			printf(
   784 			printf(
   785 				'<a href="%1$s" class="page-title-action">%2$s</a>',
   785 				'<a href="%1$s" class="page-title-action">%2$s</a>',
   786 				esc_url( admin_url( 'user-new.php' ) ),
   786 				esc_url( admin_url( 'user-new.php' ) ),