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
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;"> </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;"> </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;"> </td>
</tr>
</tbody>
</table>
<div class="spacer" style="font-size: 30px; line-height: 30px; height: 30px;"> </div>
<?php
$output = str_replace( array( "\r", "\n" ), '', ob_get_clean() );
return $output;
}
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.