Skip to content
Docs
Get RestroPress

Filter

rpress_admin_notices_capability

Updated
On this page

Filters the capability needed to see the admin notification bell.

Checked for the admin bar bell, the notification panel, the problem count on the RestroPress menu item and the Dashboard suggestion card. Each notice is still checked against its own capability, and the problem banner depends only on that per-notice check.

Available since RestroPress 3.5.1.

Parameters#

ParameterTypeDescription
$capabilitystringCapability name. Default 'manage_shop_settings'.

Return value#

string. Capability name.

Example#

add_filter( 'rpress_admin_notices_capability', 'my_notices_capability', 10, 1 );
function my_notices_capability( $capability ) {
	return 'manage_options';
}

Source#

Applied in:

  • includes/features/admin-notices/loader.php (line 158), in rpress_admin_notices_enabled()

See also#

Was this page helpful?