Changeset 12932 for trunk/src/bp-core/bp-core-template.php
- Timestamp:
- 04/29/2021 01:28:50 PM (5 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-core/bp-core-template.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-template.php
r12919 r12932 3801 3801 * 3802 3802 * @since 2.5.0 3803 * @since 8.0.0 Checks current BP Email type schema to eventually use the unnamed salutation. 3803 3804 * 3804 3805 * @param array $settings Email Settings. … … 3806 3807 */ 3807 3808 function bp_email_get_salutation( $settings = array() ) { 3808 $token = '{{recipient.name}}'; 3809 3810 /** 3811 * Filters The Recipient Salutation inside the Email Template. 3812 * 3813 * @since 2.5.0 3814 * 3815 * @param string $value The Recipient Salutation. 3816 * @param array $settings Email Settings. 3817 * @param string $token The Recipient token. 3818 */ 3819 return apply_filters( 3820 'bp_email_get_salutation', 3821 sprintf( 3822 /* translators: %s: the email token for the recipient name */ 3823 _x( 'Hi %s,', 'recipient salutation', 'buddypress' ), 3809 $email_type = bp_email_get_type(); 3810 $saluation = ''; 3811 3812 if ( $email_type ) { 3813 $types_schema = bp_email_get_type_schema( 'named_salutation' ); 3814 3815 if ( isset( $types_schema[ $email_type ] ) && false === $types_schema[ $email_type ] ) { 3816 /** 3817 * Filters The Recipient Unnamed Salutation inside the Email Template. 3818 * 3819 * @since 8.0.0 3820 * 3821 * @param string $value The Recipient Salutation. 3822 * @param array $settings Email Settings. 3823 */ 3824 $saluation = apply_filters( 3825 'bp_email_get_unnamed_salutation', 3826 _x( 'Hi,', 'Unnamed recipient salutation', 'buddypress' ), 3827 $settings 3828 ); 3829 } 3830 } 3831 3832 // Named salutations are default. 3833 if ( ! $saluation ) { 3834 $token = '{{recipient.name}}'; 3835 3836 /** 3837 * Filters The Recipient Named Salutation inside the Email Template. 3838 * 3839 * @since 2.5.0 3840 * 3841 * @param string $value The Recipient Salutation. 3842 * @param array $settings Email Settings. 3843 * @param string $token The Recipient token. 3844 */ 3845 $saluation = apply_filters( 3846 'bp_email_get_salutation', 3847 sprintf( 3848 /* translators: %s: the email token for the recipient name */ 3849 _x( 'Hi %s,', 'Named recipient salutation', 'buddypress' ), 3850 $token 3851 ), 3852 $settings, 3824 3853 $token 3825 ) ,3826 $settings,3827 $token 3828 );3829 } 3854 ); 3855 } 3856 3857 return $saluation; 3858 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)