wpseo_notification_capability_check

Filter capability check to enable all or any capabilities.

Description

(string) apply_filters( 'wpseo_notification_capability_check', (string) $this_options_capability_check, (Yoast_Notification) $instance ); 

Returns (string)

self::MATCH_ALL or self::MATCH_ANY.

Parameters (2)

0. $this_options_capability_check (string)
The type of check that will be used to determine if an capability is present.
1. $instance (Yoast_Notification)
The notification object.

Usage

To run the hook, copy the example below.
  1. $this_options_capability_check = apply_filters( 'wpseo_notification_capability_check', $this_options_capability_check, $instance ); 
  2.  
  3. if ( !empty( $this_options_capability_check ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the wpseo_notification_capability_check callback 
  2. function filter_wpseo_notification_capability_check( $this_options_capability_check, $instance ) { 
  3. // make filter magic happen here... 
  4. return $this_options_capability_check
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'wpseo_notification_capability_check', 'filter_wpseo_notification_capability_check', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'wpseo_notification_capability_check', 'filter_wpseo_notification_capability_check', 10, 2 ); 

Defined (1)

The filter is defined in the following location(s).

/admin/class-yoast-notification.php  
  1. $capability_check = apply_filters( 'wpseo_notification_capability_check', $this->options['capability_check'], $this );