enable_edit_any_user_configuration
Filters whether to allow administrators on Multisite to edit every user.
Enabling the user editing form via this filter also hinges on the user holding the 'manage_network_users' cap, and the logged-in user not matching the user profile open for editing.
The filter was introduced to replace the EDIT_ANY_USER constant.
Использование
add_filter( 'enable_edit_any_user_configuration', 'wp_kama_enable_edit_any_user_configuration_filter' );
/**
* Function for `enable_edit_any_user_configuration` filter-hook.
*
* @param bool $allow Whether to allow editing of any user.
*
* @return bool
*/
function wp_kama_enable_edit_any_user_configuration_filter( $allow ){
// filter...
return $allow;
}
- $allow(true|false)
- Whether to allow editing of any user.
По умолчанию: true
Список изменений
| С версии 3.0.0 | Введена. |
Где вызывается хук
В файле: /wp-admin/user-edit.php
enable_edit_any_user_configuration
wp-admin/user-edit.php 102
&& ! apply_filters( 'enable_edit_any_user_configuration', true )
Где используется хук в WordPress
wp-includes/ms-default-filters.php 115
add_filter( 'enable_edit_any_user_configuration', '__return_false' );