bp_email_get_customizer_settings

Filter Customizer settings for emails.

Description

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

Parameters (1)

0. $array — Optional. (callback) => array( 'bp_email_options[email_bg]' => array( 'capability' => 'bp_moderate', 'default' => $defaults['email_bg'], 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', 'type' => 'option', ), 'bp_email_options[header_bg]' => array( 'capability' => 'bp_moderate', 'default' => $defaults['header_bg'], 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', 'type' => 'option', ), 'bp_email_options[header_text_size]' => array( 'capability' => 'bp_moderate', 'default' => $defaults['header_text_size'], 'sanitize_callback' => 'absint', 'transport' => 'postMessage', 'type' => 'option', ), 'bp_email_options[header_text_color]' => array( 'capability' => 'bp_moderate', 'default' => $defaults['header_text_color'], 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', 'type' => 'option', ), 'bp_email_options[highlight_color]' => array( 'capability' => 'bp_moderate', 'default' => $defaults['highlight_color'], 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', 'type' => 'option', ), 'bp_email_options[body_bg]' => array( 'capability' => 'bp_moderate', 'default' => $defaults['body_bg'], 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', 'type' => 'option', ), 'bp_email_options[body_text_size]' => array( 'capability' => 'bp_moderate', 'default' => $defaults['body_text_size'], 'sanitize_callback' => 'absint', 'transport' => 'postMessage', 'type' => 'option', ), 'bp_email_options[body_text_color]' => array( 'capability' => 'bp_moderate', 'default' => $defaults['body_text_color'], 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', 'type' => 'option', ), 'bp_email_options[footer_text]' => array( 'capability' => 'bp_moderate', 'default' => $defaults['footer_text'], 'sanitize_callback' => 'wp_filter_post_kses', 'transport' => 'postMessage', 'type' => 'option', ), 'bp_email_options[footer_bg]' => array( 'capability' => 'bp_moderate', 'default' => $defaults['footer_bg'], 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', 'type' => 'option', ), 'bp_email_options[footer_text_size]' => array( 'capability' => 'bp_moderate', 'default' => $defaults['footer_text_size'], 'sanitize_callback' => 'absint', 'transport' => 'postMessage', 'type' => 'option', ), 'bp_email_options[footer_text_color]' => array( 'capability' => 'bp_moderate', 'default' => $defaults['footer_text_color'], 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', 'type' => 'option', ), )
Email Customizer settings to add.

Usage

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

Defined (1)

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

/bp-core/bp-core-customizer-email.php  
  1. return apply_filters( 'bp_email_get_customizer_settings', array(