BP_Email_Tokens::token__reply_content( BP_Email $bp_email, array $formatted_tokens, array $tokens )
Generate the output for token reply_content
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
1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 | public function token__reply_content( $bp_email , $formatted_tokens , $tokens ) { $output = '' ; if ( empty ( $formatted_tokens [ 'reply.content' ] ) || empty ( $formatted_tokens [ 'reply.id' ] ) ) { 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%" > <tr> <td align= "center" > <table cellpadding= "0" cellspacing= "0" border= "0" width= "100%" > <tbody> <tr> <td valign= "middle" width= "65px" style= "vertical-align: middle;" > <a style= "display: block; width: 47px;" href= "<?php echo esc_attr( bp_core_get_user_domain( bbp_get_reply_author_id( $formatted_tokens['reply.id'] ) ) ); ?>" target= "_blank" rel= "nofollow" > <?php $avatar_url = bp_core_fetch_avatar( array ( 'item_id' => bbp_get_reply_author_id( $formatted_tokens [ 'reply.id' ] ), 'width' => 100, 'height' => 100, 'type' => 'full' , 'html' => false, ) ); ?> <img src= "<?php echo esc_attr( $avatar_url ); ?>" width= "47" height= "47" border= "0" style= "margin:0; padding:0; border:none; display:block; max-width: 47px; border-radius: 50%;" /> </a> </td> <td width= "88%" style= "vertical-align: middle;" > <div style= "color: <?php echo esc_attr( $settings['body_secondary_text_color'] ); ?>; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: <?php echo esc_attr( $settings['body_text_size'] . 'px' ); ?>; line-height: <?php echo esc_attr( $settings['body_text_size'] . 'px' ); ?>; letter-spacing: -0.24px;" ><?php echo bbp_get_reply_author_display_name( $formatted_tokens [ 'reply.id' ] ); ?></div> </td> </tr> </tbody> </table> </td> </tr> <tr> <td height= "24px" style= "font-size: 24px; line-height: 24px;" > </td> </tr> <tr> <td> <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 [ 'reply.content' ] ); ?> </div> </td> </tr> </tbody> </table> </td> </tr> <tr> <td height= "5px" style= "font-size: 5px; line-height: 5px;" > </td> </tr> </tbody> </table> </td> </tr> </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.