Skip to:
Content

BuddyPress.org

Ticket #6896: 6896.salutation.patch

File 6896.salutation.patch, 2.5 KB (added by imath, 10 years ago)
  • src/bp-core/bp-core-template.php

    diff --git src/bp-core/bp-core-template.php src/bp-core/bp-core-template.php
    index c413a68..1f2c5e9 100644
    function bp_nav_menu( $args = array() ) { 
    36823682                return $nav_menu;
    36833683        }
    36843684}
     3685
     3686/**
     3687 * Prints the Recipient Salutation.
     3688 *
     3689 * @since  2.5.0
     3690 *
     3691 * @param  array $settings Email Settings.
     3692 */
     3693function bp_email_the_salutation( $settings = array() ) {
     3694        echo bp_email_get_salutation( $settings );
     3695}
     3696
     3697        /**
     3698         * Gets the Recipient Salutation.
     3699         *
     3700         * @since  2.5.0
     3701         *
     3702         * @param  array  $settings Email Settings.
     3703         * @return string The Recipient Salutation.
     3704         */
     3705        function bp_email_get_salutation( $settings = array() ) {
     3706                $token = '{{recipient.name}}';
     3707
     3708                /**
     3709                 * Filters The Recipient Salutation inside the Email Template.
     3710                 *
     3711                 * @since  2.5.0
     3712                 *
     3713                 * @param string $value    The Recipient Salutation.
     3714                 * @param array  $settings Email Settings.
     3715                 * @param string $token    The Recipient token.
     3716                 */
     3717                return apply_filters( 'bp_email_get_salutation', sprintf( _x( 'Hi %s,', 'recipient salutation', 'buddypress' ), $token ), $settings, $token );
     3718        }
  • src/bp-templates/bp-legacy/buddypress/assets/emails/single-bp-email.php

    diff --git src/bp-templates/bp-legacy/buddypress/assets/emails/single-bp-email.php src/bp-templates/bp-legacy/buddypress/assets/emails/single-bp-email.php
    index 41986da..36c3c85 100644
    $settings = bp_email_get_appearance_settings(); 
    170170                                                <table cellspacing="0" cellpadding="0" border="0" width="100%">
    171171                                                  <tr>
    172172                                                                <td style="padding: 20px; font-family: sans-serif; mso-height-rule: exactly; line-height: <?php echo esc_attr( floor( $settings['body_text_size'] * 1.618 ) . 'px' ) ?>; color: <?php echo esc_attr( $settings['body_text_color'] ); ?>; font-size: <?php echo esc_attr( $settings['body_text_size'] . 'px' ); ?>" class="body_text_color body_text_size">
    173                                                                         <span style="font-weight: bold; font-size: <?php echo esc_attr( floor( $settings['body_text_size'] * 1.35 ) . 'px' ); ?>" class="welcome">Hi {{recipient.name}},</span>
     173                                                                        <span style="font-weight: bold; font-size: <?php echo esc_attr( floor( $settings['body_text_size'] * 1.35 ) . 'px' ); ?>" class="welcome"><?php bp_email_the_salutation( $settings ); ?></span>
    174174                                                                        <hr color="<?php echo esc_attr( $settings['email_bg'] ); ?>"><br>
    175175                                                                        {{{content}}}
    176176                                                                </td>