enable_edit_any_user_configuration filter-hookWP 3.0.0

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.

Usage

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.
Default: true

Changelog

Since 3.0.0 Introduced.

Where the hook is called

In file: /wp-admin/user-edit.php
enable_edit_any_user_configuration
wp-admin/user-edit.php 98
&& ! apply_filters( 'enable_edit_any_user_configuration', true )

Where the hook is used in WordPress

wp-includes/ms-default-filters.php 115
add_filter( 'enable_edit_any_user_configuration', '__return_false' );