| @@ -1,15 +1,23 @@ | ||
| 1 | -<div class="fbs_email_notification_head"> | |
| 1 | +<?php if (!defined('ABSPATH')) exit; // if accessed directly exit ?> | |
| 2 | +<div class="fbs_email_notification_head" style="padding: 0 4px 20px;"> | |
| 2 | 3 | <?php |
| 3 | - $email_header = ''; | |
| 4 | + $fluent_boards_site_title = isset($site_title) ? (string) $site_title : get_bloginfo('name'); | |
| 5 | + $fluent_boards_site_logo = isset($site_logo) ? $site_logo : ''; | |
| 4 | 6 | |
| 5 | - if ($site_logo) { | |
| 6 | - $email_header .= '<img src="' . esc_url($site_logo) . '" width="100px" alt="' . esc_attr($site_title) . '">'; | |
| 7 | + if ($fluent_boards_site_logo) { | |
| 8 | + $fluent_boards_email_header = '<img src="' . esc_url($fluent_boards_site_logo) . '" height="32" alt="' . esc_attr($fluent_boards_site_title) . '" style="display: block; height: 32px; width: auto; max-width: 200px;">'; | |
| 9 | + } else { | |
| 10 | + // No logo: a solid initial tile keeps the brand row visible when clients invert colors. | |
| 11 | + $fluent_boards_initial = function_exists('mb_substr') ? mb_substr($fluent_boards_site_title, 0, 1) : substr($fluent_boards_site_title, 0, 1); | |
| 12 | + $fluent_boards_email_header = '<table role="presentation" cellpadding="0" cellspacing="0" border="0"><tr>' | |
| 13 | + . '<td class="fbs_email_logo_tile" width="28" height="28" align="center" style="width: 28px; height: 28px; border-radius: 7px; background: #222530; color: #FFFFFF; font-size: 14px; font-weight: 700; line-height: 28px; text-align: center;">' . esc_html(strtoupper($fluent_boards_initial)) . '</td>' | |
| 14 | + . '<td class="fbs_email_text" style="padding-left: 10px; color: #0E121B; font-size: 15px; font-weight: 600; line-height: 20px;">' . esc_html($fluent_boards_site_title) . '</td>' | |
| 15 | + . '</tr></table>'; | |
| 7 | 16 | } |
| 8 | 17 | |
| 9 | - $email_header .= '<div class="fbs_head_text">' . esc_html($site_title) . '</div>'; | |
| 10 | 18 | // Apply the filter to the email header |
| 11 | - $email_header = apply_filters('fluent_boards/email_header', $email_header); | |
| 12 | - // Output the final email header | |
| 13 | - echo $email_header; | |
| 19 | + $fluent_boards_email_header = apply_filters('fluent_boards/email_header', $fluent_boards_email_header); | |
| 20 | + // Output the final email header (allow safe HTML) | |
| 21 | + echo wp_kses_post($fluent_boards_email_header); | |
| 14 | 22 | ?> |
| 15 | -</div> | |
| 23 | +</div> | |