| @@ -1,20 +1,15 @@ | ||
| 1 | -<?php | |
| 2 | -ob_start(); // Start output buffering | |
| 3 | -?> | |
| 1 | +<?php if (!defined('ABSPATH')) exit; // if accessed directly exit | |
| 2 | +/** | |
| 3 | + * Comment, reply and mention emails. Renders through the shared notification card. | |
| 4 | + * | |
| 5 | + * Senders that predate the structured payload pass only $body, $comment and $comment_link; | |
| 6 | + * map the link to the primary action so those emails keep their button. | |
| 7 | + */ | |
| 8 | +if (empty($cta) && !empty($comment_link)) { | |
| 9 | + $cta = [ | |
| 10 | + 'label' => __('Go to comment', 'fluent-boards'), | |
| 11 | + 'url' => $comment_link, | |
| 12 | + ]; | |
| 13 | +} | |
| 4 | 14 | |
| 5 | -<!--Start you code here --> | |
| 6 | -<div class="fbs_email_content_left"> | |
| 7 | - <img src="<?php echo esc_url($userData['photo']);?>" alt="<?php echo esc_attr($userData['display_name']); ?>" class="fbs-avatar"> | |
| 8 | -</div> | |
| 9 | -<div class="fbs_email_content_right"> | |
| 10 | - <p class="fbs_user_name"><?php echo esc_html($userData['display_name']); ?></p> | |
| 11 | - <p class="fbs_email_details"><?php echo wp_kses_post($body); ?></p> | |
| 12 | - <div class="fbs_email_comment"><?php echo wp_kses_post($comment); ?></div> | |
| 13 | -</div> | |
| 14 | - | |
| 15 | - | |
| 16 | -<!--end your code here --> | |
| 17 | -<?php | |
| 18 | -$content = ob_get_clean(); // Get the content and clean the buffer | |
| 19 | -// Include the template and pass the content | |
| 20 | -include 'template.php'; | |
| 15 | +include __DIR__ . '/notification.php'; | |