Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/10/2012 09:55:56 AM (12 years ago)
Author:
johnjamesjacoby
Message:

Revert r6587:

  • Introduce bp_get_email_subject() function, to handle formatting of email subjects.
  • For all components with notifications, including deprecated files.
  • Fixes #4401, better this time.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-template.php

    r6512 r6589  
    540540
    541541/**
     542 * Retrieve a client friendly version of the root blog name, plus take care of
     543 * the typical formatting bits and bobs.
     544 *
     545 * The blogname option is escaped with esc_html on the way into the database in
     546 * sanitize_option, we want to reverse this for the plain text arena of emails.
     547 *
     548 * @link http://buddypress.trac.wordpress.org/ticket/4401
     549 * @since BuddyPress (1.7)
     550 * @return string
     551 */
     552function bp_get_email_subject( $args = array() ) {
     553
     554    $r = wp_parse_args( $args, array(
     555        'before'  => '[',
     556        'after'   => ']',
     557        'default' => __( 'Community', 'buddypress' ),
     558        'text'    => ''
     559    ) );
     560
     561    $subject = $r['before'] . wp_specialchars_decode( bp_get_option( 'blogname', $default ), ENT_QUOTES ) . $r['after'] . ' ' . $r['text'];
     562
     563    return apply_filters( 'bp_get_email_subject', $subject, $r );
     564}
     565
     566/**
    542567 * Allow templates to pass parameters directly into the template loops via AJAX
    543568 *
Note: See TracChangeset for help on using the changeset viewer.