BP_Email_Tokens::token__group_invite_message( BP_Email $bp_email, array $formatted_tokens, array $tokens )

Generate the output for token group.invite_message

Description

Parameters

$bp_email

(Required)

$formatted_tokens

(Required)

$tokens

(Required)

Return

(string) html for the output

Source

File: bp-core/classes/class-bp-email-tokens.php

1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
public function token__group_invite_message( $bp_email, $formatted_tokens, $tokens ) {
    $output = '';
 
    if ( ! bp_is_active( 'groups' ) ) {
        return '';
    }
 
    if ( empty( $formatted_tokens['invites.message'] ) ) {
        return $output;
    }
 
    $settings = bp_email_get_appearance_settings();
 
    ob_start();
    ?>
    <div class="spacer" style="font-size: 5px; line-height: 5px; height: 5px;">&nbsp;</div>
    <table cellspacing="0" cellpadding="0" border="0" width="100%"
           style="background: <?php echo esc_attr( $settings['quote_bg'] ); ?>; border: 1px solid <?php echo esc_attr( $settings['body_border_color'] ); ?>; border-radius: 4px; border-collapse: separate !important">
        <tbody>
        <tr>
            <td height="5px" style="font-size: 5px; line-height: 5px;">&nbsp;</td>
        </tr>
        <tr>
            <td align="center">
                <table cellpadding="0" cellspacing="0" border="0" width="88%" style="width: 88%;">
                    <tbody>
                    <tr>
                        <td>
                            <div style="color: <?php echo esc_attr( $settings['body_text_color'] ); ?>; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: <?php echo esc_attr( $settings['body_text_size'] . 'px' ); ?>; letter-spacing: -0.24px; line-height: <?php echo esc_attr( floor( $settings['body_text_size'] * 1.625 ) . 'px' ) ?>;">
                                <?php echo wpautop( $formatted_tokens['invites.message'] ); ?>
                            </div>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </td>
        </tr>
        <tr>
            <td height="5px" style="font-size: 5px; line-height: 5px;">&nbsp;</td>
        </tr>
        </tbody>
    </table>
    <div class="spacer" style="font-size: 30px; line-height: 30px; height: 30px;">&nbsp;</div>
    <?php
    $output = str_replace( array( "\r", "\n" ), '', ob_get_clean() );
 
    return $output;
}

Changelog

Changelog
Version Description
BuddyBoss 1.0.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.