bp_get_email_post_type_labels

Filters email post type labels.

Description

apply_filters( 'bp_get_email_post_type_labels', (callback) $array ); 

Parameters (1)

0. $array — Optional. (callback) => array( 'add_new' => _x( 'Add New', 'email post type label', 'buddypress' ), 'add_new_item' => _x( 'Add a New Email', 'email post type label', 'buddypress' ), 'all_items' => _x( 'All Emails', 'email post type label', 'buddypress' ), 'edit_item' => _x( 'Edit Email', 'email post type label', 'buddypress' ), 'filter_items_list' => _x( 'Filter email list', 'email post type label', 'buddypress' ), 'items_list' => _x( 'Email list', 'email post type label', 'buddypress' ), 'items_list_navigation' => _x( 'Email list navigation', 'email post type label', 'buddypress' ), 'menu_name' => _x( 'Emails', 'email post type name', 'buddypress' ), 'name' => _x( 'BuddyPress Emails', 'email post type label', 'buddypress' ), 'new_item' => _x( 'New Email', 'email post type label', 'buddypress' ), 'not_found' => _x( 'No emails found', 'email post type label', 'buddypress' ), 'not_found_in_trash' => _x( 'No emails found in Trash', 'email post type label', 'buddypress' ), 'search_items' => _x( 'Search Emails', 'email post type label', 'buddypress' ), 'singular_name' => _x( 'Email', 'email post type singular name', 'buddypress' ), 'uploaded_to_this_item' => _x( 'Uploaded to this email', 'email post type label', 'buddypress' ), 'view_item' => _x( 'View Email', 'email post type label', 'buddypress' ), )
Associative array (name => label).

Usage

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

Defined (1)

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

/bp-core/bp-core-functions.php  
  1. return apply_filters( 'bp_get_email_post_type_labels', array(