ms_helper_membership_get_admin_messages

Helper for the Membership class.

Description

apply_filters( 'ms_helper_membership_get_admin_messages', (array) $array ); 

Parameters (1)

0. $array — Optional. (array) => array( self::SETTINGS_MSG_ADDED => __( 'Setting added.', 'membership2' ), self::SETTINGS_MSG_DELETED => __( 'Setting deleted.', 'membership2' ), self::SETTINGS_MSG_UPDATED => __( 'Setting updated.', 'membership2' ), self::SETTINGS_MSG_ACTIVATION_TOGGLED => __( 'Setting activation toggled.', 'membership2' ), self::SETTINGS_MSG_STATUS_TOGGLED => __( 'Setting status toggled.', 'membership2' ), self::SETTINGS_MSG_BULK_UPDATED => __( 'Bulk settings updated.', 'membership2' ), self::SETTINGS_MSG_SITE_UPDATED => __( 'Changed the network site that hosts Membership pages. Remember to check your Pages and change them if needed!', 'membership2' ),self::SETTINGS_MSG_NOT_ADDED => __( 'Setting not added.', 'membership2' ), self::SETTINGS_MSG_NOT_DELETED => __( 'Setting not deleted.', 'membership2' ), self::SETTINGS_MSG_NOT_UPDATED => __( 'Setting not updated.', 'membership2' ), self::SETTINGS_MSG_ACTIVATION_NOT_TOGGLED => __( 'Setting activation not toggled.', 'membership2' ), self::SETTINGS_MSG_STATUS_NOT_TOGGLED => __( 'Setting status not toggled.', 'membership2' ), self::SETTINGS_MSG_BULK_NOT_UPDATED => __( 'Bulk settings not updated.', 'membership2' ), )
The array.

Usage

To run the hook, copy the example below.
  1. $array = apply_filters( 'ms_helper_membership_get_admin_messages', $array ); 
  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_helper_membership_get_admin_messages callback 
  2. function filter_ms_helper_membership_get_admin_messages( $array ) { 
  3. // make filter magic happen here... 
  4. return $array
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'ms_helper_membership_get_admin_messages', 'filter_ms_helper_membership_get_admin_messages', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'ms_helper_membership_get_admin_messages', 'filter_ms_helper_membership_get_admin_messages', 10, 1 ); 

Defined (2)

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

/app/helper/class-ms-helper-settings.php  
  1. $Messages = apply_filters( 
/app/helper/class-ms-helper-membership.php  
  1. $messages = apply_filters(