show_network_site_users_add_new_form
Filters whether to show the Add New User form on the Multisite Users screen.
Note: While WordPress is moving towards simplifying labels by removing "New" from "Add New X" labels, we keep "Add New User" here to maintain a clear distinction from the "Add Existing User" section above.
Использование
add_filter( 'show_network_site_users_add_new_form', 'wp_kama_show_network_site_users_add_new_form_filter' );
/**
* Function for `show_network_site_users_add_new_form` filter-hook.
*
* @param bool $bool Whether to show the Add New User form.
*
* @return bool
*/
function wp_kama_show_network_site_users_add_new_form_filter( $bool ){
// filter...
return $bool;
}
- $bool(true|false)
- Whether to show the Add New User form.
По умолчанию: true
Список изменений
| С версии 3.1.0 | Введена. |
Где вызывается хук
В файле: /wp-admin/network/site-users.php
show_network_site_users_add_new_form
wp-admin/network/site-users.php 371
if ( current_user_can( 'create_users' ) && apply_filters( 'show_network_site_users_add_new_form', true ) ) :