Skip to content

Commit

Permalink
Add Privacy Policy link to default email footer text.
Browse files Browse the repository at this point in the history
See #7866.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@12258 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
  • Loading branch information
boonebgorges committed Oct 20, 2018
1 parent b865ddb commit aa8d539
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/bp-core/admin/js/customizer-receiver-emails.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@

wp.customize( 'bp_email_options[footer_text]', function( value ) {
value.bind(function( newval ) {
$( '.footer_text' ).text( newval );
$( '.footer_text' ).html( newval );
});
});
})( jQuery );
25 changes: 19 additions & 6 deletions src/bp-core/bp-core-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -3234,6 +3234,24 @@ function bp_send_email( $email_type, $to, $args = array() ) {
* @return array
*/
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' )
)
);

$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',
Expand All @@ -3248,12 +3266,7 @@ function bp_email_get_appearance_settings() {
'header_text_size' => 30,
'direction' => is_rtl() ? 'right' : 'left',

'footer_text' => sprintf(
/* translators: email disclaimer, e.g. "© 2016 Site Name". */
_x( '&copy; %s %s', 'email', 'buddypress' ),
date_i18n( 'Y' ),
bp_get_option( 'blogname' )
),
'footer_text' => implode( ' &middot; ', $footer_text ),
);

$options = bp_parse_args(
Expand Down

0 comments on commit aa8d539

Please sign in to comment.