ms_view_membership_protectedcontent_header

The Membership 2 ms view membership protectedcontent header hook.

Description

apply_filters( 'ms_view_membership_protectedcontent_header', (callback) $array, $ms_rule_url_rule_id, (unknown) $instance ); 

Parameters (3)

0. $array — Optional. (callback) => array( 'title' => __( 'URL Restriction', 'membership2' ), 'desc' => array( __( 'Specify URLs that you want to protect.', 'membership2' ), __( 'e.g. example.com/protectme/ will protect all URLs that contain example.com/protectme/, including any child page.', 'membership2' ), ), 'class' => '', )
The array.
1. $ms_rule_url_rule_id
The ms rule url rule id.
2. $instance (unknown)
The this.

Usage

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

Defined (14)

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

/app/rule/url/class-ms-rule-url-view.php  
  1. $header_data = apply_filters( 
/app/rule/special/class-ms-rule-special-view.php  
  1. $header_data = apply_filters( 
/app/rule/shortcode/class-ms-rule-shortcode-view.php  
  1. $header_data = apply_filters( 
/app/rule/replacemenu/class-ms-rule-replacemenu-view.php  
  1. $header_data = apply_filters( 
/app/rule/replacelocation/class-ms-rule-replacelocation-view.php  
  1. $header_data = apply_filters( 
/app/rule/post/class-ms-rule-post-view.php  
  1. $header_data = apply_filters( 
/app/rule/page/class-ms-rule-page-view.php  
  1. $header_data = apply_filters( 
/app/rule/menuitem/class-ms-rule-menuitem-view.php  
  1. $header_data = apply_filters( 
/app/rule/memberroles/class-ms-rule-memberroles-view.php  
  1. $header_data = apply_filters( 
/app/rule/membercaps/class-ms-rule-membercaps-view.php  
  1. $header_data = apply_filters( 
/app/rule/content/class-ms-rule-content-view.php  
  1. $header_data = apply_filters( 
/app/rule/category/class-ms-rule-category-view.php  
  1. $header_data = apply_filters( 
/app/addon/buddypress/rule/class-ms-addon-buddypress-rule-view.php  
  1. $header_data = apply_filters( 
/app/addon/bbpress/rule/class-ms-addon-bbpress-rule-view.php  
  1. $header_data = apply_filters(