Skip to:
Content

BuddyPress.org

Changeset 11786


Ignore:
Timestamp:
01/02/2018 05:22:48 PM (6 years ago)
Author:
djpaul
Message:

Emails: RTL support.

Fixes #7606

Location:
trunk/src
Files:
3 edited

Legend:

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

    r11763 r11786  
    32253225 *
    32263226 * @since 2.5.0
     3227 * @since 3.0.0 Added "direction" parameter for LTR/RTL email support.
    32273228 *
    32283229 * @return array
     
    32413242        'header_text_color' => '#000000',
    32423243        'header_text_size'  => 30,
     3244        'direction'         => is_rtl() ? 'right' : 'left',
    32433245
    32443246        'footer_text' => sprintf(
  • trunk/src/bp-templates/bp-legacy/buddypress/assets/emails/single-bp-email.php

    r11785 r11786  
    138138<body class="email_bg" width="100%" bgcolor="<?php echo esc_attr( $settings['email_bg'] ); ?>" style="margin: 0; mso-line-height-rule: exactly;">
    139139<table cellpadding="0" cellspacing="0" border="0" height="100%" width="100%" bgcolor="<?php echo esc_attr( $settings['email_bg'] ); ?>" style="border-collapse:collapse;" class="email_bg"><tr><td valign="top">
    140     <center style="width: 100%; text-align: left;">
     140    <center style="width: 100%; text-align: <?php echo esc_attr( $settings['direction'] ); ?>;">
    141141
    142142        <!-- Visually Hidden Preheader Text : BEGIN -->
     
    203203            <!-- Email Footer : BEGIN -->
    204204            <br>
    205             <table role="presentation" cellspacing="0" cellpadding="0" border="0" align="left" width="100%" style="max-width: 600px; border-radius: 5px;" bgcolor="<?php echo esc_attr( $settings['footer_bg'] ); ?>" class="footer_bg">
     205            <table role="presentation" cellspacing="0" cellpadding="0" border="0" align="<?php echo esc_attr( $settings['direction'] ); ?>" width="100%" style="max-width: 600px; border-radius: 5px;" bgcolor="<?php echo esc_attr( $settings['footer_bg'] ); ?>" class="footer_bg">
    206206                <tr>
    207                     <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">
     207                    <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: <?php echo esc_attr( $settings['direction'] ); ?>; color: <?php echo esc_attr( $settings['footer_text_color'] ); ?>;" class="footer_text_color footer_text_size">
    208208                        <?php
    209209                        /**
  • trunk/src/bp-templates/bp-nouveau/buddypress/assets/emails/single-bp-email.php

    r11785 r11786  
    138138<body class="email_bg" width="100%" bgcolor="<?php echo esc_attr( $settings['email_bg'] ); ?>" style="margin: 0; mso-line-height-rule: exactly;">
    139139<table cellpadding="0" cellspacing="0" border="0" height="100%" width="100%" bgcolor="<?php echo esc_attr( $settings['email_bg'] ); ?>" style="border-collapse:collapse;" class="email_bg"><tr><td valign="top">
    140     <center style="width: 100%; text-align: left;">
     140    <center style="width: 100%; text-align: <?php echo esc_attr( $settings['direction'] ); ?>;">
    141141
    142142        <!-- Visually Hidden Preheader Text : BEGIN -->
     
    203203            <!-- Email Footer : BEGIN -->
    204204            <br>
    205             <table role="presentation" cellspacing="0" cellpadding="0" border="0" align="left" width="100%" style="max-width: 600px; border-radius: 5px;" bgcolor="<?php echo esc_attr( $settings['footer_bg'] ); ?>" class="footer_bg">
     205            <table role="presentation" cellspacing="0" cellpadding="0" border="0" align="<?php echo esc_attr( $settings['direction'] ); ?>" width="100%" style="max-width: 600px; border-radius: 5px;" bgcolor="<?php echo esc_attr( $settings['footer_bg'] ); ?>" class="footer_bg">
    206206                <tr>
    207                     <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">
     207                    <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: <?php echo esc_attr( $settings['direction'] ); ?>; color: <?php echo esc_attr( $settings['footer_text_color'] ); ?>;" class="footer_text_color footer_text_size">
    208208                        <?php
    209209                        /**
Note: See TracChangeset for help on using the changeset viewer.