additional_capabilities_display filter-hookWP 2.8.0

Filters whether to display additional capabilities for the user.

The 'Additional Capabilities' section will only be enabled if the number of the user's capabilities exceeds their number of roles.

Usage

add_filter( 'additional_capabilities_display', 'wp_kama_additional_capabilities_display_filter', 10, 2 );

/**
 * Function for `additional_capabilities_display` filter-hook.
 * 
 * @param bool    $enable       Whether to display the capabilities.
 * @param WP_User $profile_user The current WP_User object.
 *
 * @return bool
 */
function wp_kama_additional_capabilities_display_filter( $enable, $profile_user ){

	// filter...
	return $enable;
}
$enable(true|false)
Whether to display the capabilities.
Default: true
$profile_user(WP_User)
The current WP_User object.

Changelog

Since 2.8.0 Introduced.

Where the hook is called

In file: /wp-admin/user-edit.php
additional_capabilities_display
wp-admin/user-edit.php 864
$display_additional_caps = apply_filters( 'additional_capabilities_display', true, $profile_user );

Where the hook is used in WordPress

Usage not found.