bp_email_get_customizer_controls()

Get Customizer controls for emails.

Description

Return

(array)

Source

File: bp-core/bp-core-customizer-email.php

function bp_email_get_customizer_controls() {

	/**
	 * Filter Customizer controls for emails.
	 *
	 * @since BuddyPress 2.5.0
	 *
	 * @param array $controls Email Customizer controls to add.
	 */
	return apply_filters( 'bp_email_get_customizer_controls', array(
		'bp_mailtpl_logo' => array(
			'class'    => 'WP_Customize_Cropped_Image_Control',
			'label'    => __( 'Upload Logo', 'buddyboss' ),
			'section'  => 'section_bp_mailtpl_header',
			'settings' => 'bp_email_options[logo]',
			'width'		=> 180,
			'height'	=> 41,
		),
        
        'bp_mailtpl_site_title_logo_size' => array(
			'class'    => 'BP_Customizer_Control_Range',
			'label'    => __( 'Site Title logo size', 'buddyboss' ),
			'description' => __( 'Used when logo is set.', 'buddyboss' ),
			'section'  => 'section_bp_mailtpl_header',
			'settings' => 'bp_email_options[site_title_logo_size]',

			'input_attrs' => array(
				'max'  => 300,
				'min'  => 65,
				'step' => 1,
			),
		),

		'bp_mailtpl_site_title_text_color' => array(
			'class'    => 'WP_Customize_Color_Control',
			'label'    => __( 'Site Title color', 'buddyboss' ),
			'description' => __( 'Used when logo is not set.', 'buddyboss' ),
			'section'  => 'section_bp_mailtpl_header',
			'settings' => 'bp_email_options[site_title_text_color]',
		),

		'bp_mailtpl_site_title_text_size' => array(
			'class'    => 'BP_Customizer_Control_Range',
			'label'    => __( 'Site Title text size', 'buddyboss' ),
			'description' => __( 'Used when logo is not set.', 'buddyboss' ),
			'section'  => 'section_bp_mailtpl_header',
			'settings' => 'bp_email_options[site_title_text_size]',

			'input_attrs' => array(
				'max'  => 100,
				'min'  => 1,
				'step' => 1,
			),
		),

		'bp_mailtpl_recipient_text_color' => array(
			'class'    => 'WP_Customize_Color_Control',
			'label'    => __( 'Recipient Color', 'buddyboss' ),
			'section'  => 'section_bp_mailtpl_header',
			'settings' => 'bp_email_options[recipient_text_color]',
		),

		'bp_mailtpl_recipient_text_size' => array(
			'class'    => 'BP_Customizer_Control_Range',
			'label'    => __( 'Recipient Text Size', 'buddyboss' ),
			'section'  => 'section_bp_mailtpl_header',
			'settings' => 'bp_email_options[recipient_text_size]',

			'input_attrs' => array(
				'max'  => 100,
				'min'  => 1,
				'step' => 1,
			),
		),

		'bp_mailtpl_email_bg' => array(
			'class'    => 'WP_Customize_Color_Control',
			'label'    => __( 'Email Background Color', 'buddyboss' ),
			'section'  => 'section_bp_mailtpl_body',
			'settings' => 'bp_email_options[email_bg]',
		),

		'bp_mailtpl_body_bg' => array(
			'class'    => 'WP_Customize_Color_Control',
			'label'    => __( 'Body Background Color', 'buddyboss' ),
			'section'  => 'section_bp_mailtpl_body',
			'settings' => 'bp_email_options[body_bg]',
		),

		'bp_mailtpl_body_border_color' => array(
			'class'    => 'WP_Customize_Color_Control',
			'label'    => __( 'Body Border Color', 'buddyboss' ),
			'section'  => 'section_bp_mailtpl_body',
			'settings' => 'bp_email_options[body_border_color]',
		),

		'bp_mailtpl_body_text_color' => array(
			'class'    => 'WP_Customize_Color_Control',
			'label'    => __( 'Body Primary Text Color', 'buddyboss' ),
			'section'  => 'section_bp_mailtpl_body',
			'settings' => 'bp_email_options[body_text_color]',
		),

		'bp_mailtpl_body_secondary_text_color' => array(
			'class'    => 'WP_Customize_Color_Control',
			'label'    => __( 'Body Secondary Text Color', 'buddyboss' ),
			'section'  => 'section_bp_mailtpl_body',
			'settings' => 'bp_email_options[body_secondary_text_color]',
		),

		'bp_mailtpl_body_text_size' => array(
			'class'    => 'BP_Customizer_Control_Range',
			'label'    => __( 'Body Text Size', 'buddyboss' ),
			'section'  => 'section_bp_mailtpl_body',
			'settings' => 'bp_email_options[body_text_size]',

			'input_attrs' => array(
				'max'  => 24,
				'min'  => 8,
				'step' => 1,
			),
		),

		'bp_mailtpl_quote_bg' => array(
			'class'    => 'WP_Customize_Color_Control',
			'label'    => __( 'Quote Background Color', 'buddyboss' ),
			'section'  => 'section_bp_mailtpl_body',
			'settings' => 'bp_email_options[quote_bg]',
		),

		'bp_mailtpl_highlight_color' => array(
			'class'       => 'WP_Customize_Color_Control',
			'label'       => __( 'Links and Buttons Color', 'buddyboss' ),
			'section'     => 'section_bp_mailtpl_body',
			'settings'    => 'bp_email_options[highlight_color]',
		),

		'bp_mailtpl_footer_text' => array(
			'class'       => 'WP_Customize_Control',
			'description' => __('Change the email footer content.', 'buddyboss' ),
			'label'       => __( 'Footer Text', 'buddyboss' ),
			'section'     => 'section_bp_mailtpl_footer',
			'settings'    => 'bp_email_options[footer_text]',
			'type'        => 'textarea',
		),

		'bp_mailtpl_footer_text_color' => array(
			'class'    => 'WP_Customize_Color_Control',
			'label'    => __( 'Footer Text Color', 'buddyboss' ),
			'section'  => 'section_bp_mailtpl_footer',
			'settings' => 'bp_email_options[footer_text_color]',
		),

		'bp_mailtpl_footer_text_size' => array(
			'class'    => 'BP_Customizer_Control_Range',
			'label'    => __( 'Footer Text Size', 'buddyboss' ),
			'section'  => 'section_bp_mailtpl_footer',
			'settings' => 'bp_email_options[footer_text_size]',

			'input_attrs' => array(
				'max'  => 24,
				'min'  => 8,
				'step' => 1,
			),
		),
	) );
}

Changelog

Changelog
Version Description
BuddyPress 2.5.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.