Skip to:
Content

BuddyPress.org

Changeset 11891


Ignore:
Timestamp:
03/05/2018 05:34:01 PM (7 years ago)
Author:
djpaul
Message:

Emails: add support for changing email text link colour.

Adds a link_text_color option to bp_email_get_appearance_settings(),
which allows a developer to filter the email text link colour. This new
colour option is not exposed in the Customiser; that continues to use the
"highlight" colour for email text links.

Fixes #7646

Location:
trunk/src/bp-core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-filters.php

    r11863 r11891  
    965965
    966966    $settings    = bp_email_get_appearance_settings();
    967     $replacement = 'style="color: ' . esc_attr( $settings['highlight_color'] ) . ';';
     967    $replacement = 'style="color: ' . esc_attr( $settings['link_text_color'] ) . ';';
    968968
    969969    // Find all links.
  • trunk/src/bp-core/bp-core-functions.php

    r11882 r11891  
    32293229 *
    32303230 * @since 2.5.0
    3231  * @since 3.0.0 Added "direction" parameter for LTR/RTL email support.
     3231 * @since 3.0.0 Added "direction" parameter for LTR/RTL email support, and
     3232 *              "link_text_color" to override that in the email body.
    32323233 *
    32333234 * @return array
     
    32563257    );
    32573258
    3258     return bp_parse_args(
     3259    $options = bp_parse_args(
    32593260        bp_get_option( 'bp_email_options', array() ),
    32603261        $default_args,
    32613262        'email_appearance_settings'
    32623263    );
     3264
     3265    // Link text colour defaults to the highlight colour.
     3266    if ( ! isset( $options['link_text_color'] ) ) {
     3267        $options['link_text_color'] = $options['highlight_color'];
     3268    }
     3269
     3270    return $options;
    32633271}
    32643272
Note: See TracChangeset for help on using the changeset viewer.