bp_email_get_customizer_controls

Filter Customizer controls for emails.

Description

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

Parameters (1)

0. $array — Optional. (callback) => array( 'bp_mailtpl_email_bg' => array( 'class' => 'WP_Customize_Color_Control', 'label' => __( 'Email background color', 'buddypress' ), 'section' => 'section_bp_mailtpl_header', 'settings' => 'bp_email_options[email_bg]', ),'bp_mailtpl_header_bg' => array( 'class' => 'WP_Customize_Color_Control', 'label' => __( 'Header background color', 'buddypress' ), 'section' => 'section_bp_mailtpl_header', 'settings' => 'bp_email_options[header_bg]', ),'bp_mailtpl_highlight_color' => array( 'class' => 'WP_Customize_Color_Control', 'description' => __( 'Applied to links and other decorative areas.', 'buddypress' ), 'label' => __( 'Highlight color', 'buddypress' ), 'section' => 'section_bp_mailtpl_header', 'settings' => 'bp_email_options[highlight_color]', ),'bp_mailtpl_header_text_color' => array( 'class' => 'WP_Customize_Color_Control', 'label' => __( 'Text color', 'buddypress' ), 'section' => 'section_bp_mailtpl_header', 'settings' => 'bp_email_options[header_text_color]', ),'bp_mailtpl_header_text_size' => array( 'class' => 'BP_Customizer_Control_Range', 'label' => __( 'Text size', 'buddypress' ), 'section' => 'section_bp_mailtpl_header', 'settings' => 'bp_email_options[header_text_size]','input_attrs' => array( 'max' => 100, 'min' => 1, 'step' => 1, ), ),'bp_mailtpl_body_bg' => array( 'class' => 'WP_Customize_Color_Control', 'label' => __( 'Background color', 'buddypress' ), 'section' => 'section_bp_mailtpl_body', 'settings' => 'bp_email_options[body_bg]', ),'bp_mailtpl_body_text_color' => array( 'class' => 'WP_Customize_Color_Control', 'label' => __( 'Text color', 'buddypress' ), 'section' => 'section_bp_mailtpl_body', 'settings' => 'bp_email_options[body_text_color]', ),'bp_mailtpl_body_text_size' => array( 'class' => 'BP_Customizer_Control_Range', 'label' => __( 'Text size', 'buddypress' ), 'section' => 'section_bp_mailtpl_body', 'settings' => 'bp_email_options[body_text_size]','input_attrs' => array( 'max' => 24, 'min' => 8, 'step' => 1, ), ),'bp_mailtpl_footer_text' => array( 'class' => 'WP_Customize_Control', 'description' => __('Change the email footer here', 'buddypress' ), 'label' => __( 'Footer text', 'buddypress' ), 'section' => 'section_bp_mailtpl_footer', 'settings' => 'bp_email_options[footer_text]', 'type' => 'textarea', ),'bp_mailtpl_footer_bg' => array( 'class' => 'WP_Customize_Color_Control', 'label' => __( 'Background color', 'buddypress' ), 'section' => 'section_bp_mailtpl_footer', 'settings' => 'bp_email_options[footer_bg]', ),'bp_mailtpl_footer_text_color' => array( 'class' => 'WP_Customize_Color_Control', 'label' => __( 'Text color', 'buddypress' ), 'section' => 'section_bp_mailtpl_footer', 'settings' => 'bp_email_options[footer_text_color]', ),'bp_mailtpl_footer_text_size' => array( 'class' => 'BP_Customizer_Control_Range', 'label' => __( 'Text size', 'buddypress' ), 'section' => 'section_bp_mailtpl_footer', 'settings' => 'bp_email_options[footer_text_size]','input_attrs' => array( 'max' => 24, 'min' => 8, 'step' => 1, ), ), )
Email Customizer controls to add.

Usage

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