wp/wp-admin/includes/ms.php
changeset 22 8c2e4d02f4ef
parent 21 48c4eec2b7e6
equal deleted inserted replaced
21:48c4eec2b7e6 22:8c2e4d02f4ef
  1170 function get_site_screen_help_sidebar_content() {
  1170 function get_site_screen_help_sidebar_content() {
  1171 	return '<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
  1171 	return '<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
  1172 		'<p>' . __( '<a href="https://developer.wordpress.org/advanced-administration/multisite/admin/#network-admin-sites-screen">Documentation on Site Management</a>' ) . '</p>' .
  1172 		'<p>' . __( '<a href="https://developer.wordpress.org/advanced-administration/multisite/admin/#network-admin-sites-screen">Documentation on Site Management</a>' ) . '</p>' .
  1173 		'<p>' . __( '<a href="https://wordpress.org/support/forum/multisite/">Support forums</a>' ) . '</p>';
  1173 		'<p>' . __( '<a href="https://wordpress.org/support/forum/multisite/">Support forums</a>' ) . '</p>';
  1174 }
  1174 }
       
  1175 
       
  1176 /**
       
  1177  * Stop execution if the role can not be assigned by the current user.
       
  1178  *
       
  1179  * @since 6.8.0
       
  1180  *
       
  1181  * @param string $role Role the user is attempting to assign.
       
  1182  */
       
  1183 function wp_ensure_editable_role( $role ) {
       
  1184 	$roles = get_editable_roles();
       
  1185 	if ( ! isset( $roles[ $role ] ) ) {
       
  1186 		wp_die( __( 'Sorry, you are not allowed to give users that role.' ), 403 );
       
  1187 	}
       
  1188 }