Ticket #6896: 6896.patch
| File 6896.patch, 6.0 KB (added by , 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..aa120d0 100644
function bp_nav_menu( $args = array() ) { 3682 3682 return $nav_menu; 3683 3683 } 3684 3684 } 3685 3686 /** 3687 * Prints the Site name. 3688 * 3689 * @since 2.5.0 3690 * 3691 * @param array $settings Email Settings. 3692 */ 3693 function bp_email_the_site_name( $settings = array() ) { 3694 echo bp_email_get_site_name( $settings ); 3695 } 3696 3697 /** 3698 * Gets the Site name. 3699 * 3700 * @since 2.5.0 3701 * 3702 * @param array $settings Email Settings. 3703 * @return string The site name. 3704 */ 3705 function bp_email_get_site_name( $settings = array() ) { 3706 /** 3707 * Filters the Site Name inside the Email Template. 3708 * 3709 * @since 2.5.0 3710 * 3711 * @param string $value The Site Name. 3712 * @param array $settings Email Settings. 3713 */ 3714 return apply_filters( 'bp_email_get_site_name', bp_get_option( 'blogname' ), $settings ); 3715 } 3716 3717 /** 3718 * Prints the Recipient Salutation. 3719 * 3720 * @since 2.5.0 3721 * 3722 * @param array $settings Email Settings. 3723 */ 3724 function bp_email_the_salutation( $settings = array() ) { 3725 echo bp_email_get_salutation( $settings ); 3726 } 3727 3728 /** 3729 * Gets the Recipient Salutation. 3730 * 3731 * @since 2.5.0 3732 * 3733 * @param array $settings Email Settings. 3734 * @return string The Recipient Salutation. 3735 */ 3736 function bp_email_get_salutation( $settings = array() ) { 3737 $token = '{{recipient.name}}'; 3738 3739 /** 3740 * Filters The Recipient Salutation inside the Email Template. 3741 * 3742 * @since 2.5.0 3743 * 3744 * @param string $value The Recipient Salutation. 3745 * @param array $settings Email Settings. 3746 * @param string $token The Recipient token. 3747 */ 3748 return apply_filters( 'bp_email_get_salutation', sprintf( _x( 'Hi %s,', 'recipient salutation', 'buddypress' ), $token ), $settings, $token ); 3749 } 3750 3751 /** 3752 * Prints the Unsubscribe mention. 3753 * 3754 * @since 2.5.0 3755 * 3756 * @param array $settings Email Settings. 3757 */ 3758 function bp_email_the_unsubsribe_mention( $settings = array() ) { 3759 echo bp_email_get_unsubsribe_mention( $settings ); 3760 } 3761 3762 /** 3763 * Gets the Unsubscribe mention. 3764 * 3765 * @since 2.5.0 3766 * 3767 * @param array $settings Email Settings. 3768 * @return string The Unsubscribe mention. 3769 */ 3770 function bp_email_get_unsubsribe_mention( $settings = array() ) { 3771 /** 3772 * Filters The Unsubscribe mention inside the Email Template. 3773 * 3774 * @since 2.5.0 3775 * 3776 * @param string $value The Unsubscribe mention. 3777 * @param array $settings Email Settings. 3778 */ 3779 return apply_filters( 'bp_email_get_unsubsribe_mention', _x( 'unsubscribe', 'email', 'buddypress' ), $settings ); 3780 } -
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 d1e7e7c..e33490f 100644
$settings = bp_email_get_appearance_settings(); 114 114 color: inherit !important; 115 115 text-decoration: underline !important; 116 116 } 117 118 <?php if ( function_exists( 'is_customize_preview' ) && is_customize_preview() ) : ?> 119 120 body.wp-customizer-unloading { 121 opacity: 0.25; 122 cursor: progress !important; 123 -webkit-transition: opacity 0.5s; 124 transition: opacity 0.5s; 125 } 126 body.wp-customizer-unloading * { 127 pointer-events: none !important; 128 } 129 130 <?php endif; ?> 117 131 </style> 118 132 119 133 </head> … … $settings = bp_email_get_appearance_settings(); 138 152 <table cellspacing="0" cellpadding="0" border="0" align="center" width="100%" style="max-width: 600px; border-top: 7px solid <?php echo esc_attr( $settings['highlight_color'] ); ?>" class="header_bg"> 139 153 <tr> 140 154 <td style="text-align: center; padding: 15px 0; font-family: sans-serif; mso-height-rule: exactly; font-weight: bold; color: <?php echo esc_attr( $settings['header_text_color'] ); ?>; font-size: <?php echo esc_attr( $settings['header_text_size'] . 'px' ); ?>" class="header_text_color header_text_size"> 141 <?php echo bp_get_option( 'blogname'); ?>155 <?php bp_email_the_site_name( $settings ); ?> 142 156 </td> 143 157 </tr> 144 158 </table> … … $settings = bp_email_get_appearance_settings(); 153 167 <table cellspacing="0" cellpadding="0" border="0" width="100%"> 154 168 <tr> 155 169 <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"> 156 <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>170 <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> 157 171 <hr color="<?php echo esc_attr( $settings['email_bg'] ); ?>"><br> 158 172 {{{content}}} 159 173 </td> … … $settings = bp_email_get_appearance_settings(); 173 187 <td style="padding: 20px; width: 100%; font-size: <?php echo esc_attr( $settings['footer_text_size'] . 'px' ); ?>; font-family: sans-serif; mso-height-rule: exactly; line-height: <?php echo esc_attr( floor( $settings['footer_text_size'] * 1.618 ) . 'px' ) ?>; text-align: left; color: <?php echo esc_attr( $settings['footer_text_color'] ); ?>;" class="footer_text_color footer_text_size"> 174 188 <span class="footer_text"><?php echo nl2br( stripslashes( $settings['footer_text'] ) ); ?></span> 175 189 <br><br> 176 <a href="{{{unsubscribe}}}" style="text-decoration: underline;"><?php _ex( 'unsubscribe', 'email', 'buddypress'); ?></a>190 <a href="{{{unsubscribe}}}" style="text-decoration: underline;"><?php bp_email_the_unsubsribe_mention( $settings ); ?></a> 177 191 </td> 178 192 </tr> 179 193 </table>