additional_capabilities_display WordPress Filter Hook

The additional_capabilities_display hook is used to add extra capabilities to a user role. This is useful for adding custom functionality to a site. For example, if you wanted to add a custom post type to a site, you would need to add the capability to the user role. The additional_capabilities_display hook allows you to do this.

apply_filters( 'additional_capabilities_display', bool $enable, WP_User $profile_user ) #

Filters whether to display additional capabilities for the user.


Description

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


Top ↑

Parameters

$enable

(bool)Whether to display the capabilities. Default true.

$profile_user

(WP_User)The current WP_User object.


Top ↑

Source

File: wp-admin/user-edit.php

View on Trac


Top ↑

Changelog

Changelog
VersionDescription
2.8.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.