bp_email_get_appearance_settings()

Return email appearance settings.


Description Description


Return Return

(array)


Top ↑

Source Source

File: bp-core/bp-core-functions.php

function bp_email_get_appearance_settings() {
	/* translators: This is the copyright text for email footers. 1. Copyright year, 2. Site name */
	$footer_text = array(
		sprintf(
			_x( '© %1$s %2$s', 'email', 'buddypress' ),
			date_i18n( 'Y' ),
			bp_get_option( 'blogname' )
		)
	);

	if ( version_compare( $GLOBALS['wp_version'], '4.9.6', '>=' ) ) {
		$privacy_policy_url = get_privacy_policy_url();
		if ( $privacy_policy_url ) {
			$footer_text[] = sprintf(
				'<a href="%s">%s</a>',
				esc_url( $privacy_policy_url ),
				esc_html__( 'Privacy Policy', 'buddypress' )
			);
		}
	}

	$default_args = array(
		'body_bg'           => '#FFFFFF',
		'body_text_color'   => '#555555',
		'body_text_size'    => 15,
		'email_bg'          => '#F7F3F0',
		'footer_bg'         => '#F7F3F0',
		'footer_text_color' => '#525252',
		'footer_text_size'  => 12,
		'header_bg'         => '#F7F3F0',
		'highlight_color'   => '#D84800',
		'header_text_color' => '#000000',
		'header_text_size'  => 30,
		'direction'         => is_rtl() ? 'right' : 'left',

		'footer_text' => implode( ' &middot; ', $footer_text ),
	);

	$options = bp_parse_args(
		bp_get_option( 'bp_email_options', array() ),
		$default_args,
		'email_appearance_settings'
	);

	// Link text colour defaults to the highlight colour.
	if ( ! isset( $options['link_text_color'] ) ) {
		$options['link_text_color'] = $options['highlight_color'];
	}

	return $options;
}

Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Added "direction" parameter for LTR/RTL email support, and "link_text_color" to override that in the email body.
2.5.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.