| | |
| | | } |
| | | |
| | | // Add footer content |
| | | $content .= '<div class="divider"></div>'; |
| | | $content .= sprintf( |
| | | '<p>You\'re receiving this %s digest because you follow artists on edmonton.ink. ' . |
| | | 'You can <a href="%s" class="text-link">adjust your notification settings</a> at any time.</p>', |
| | | $frequency, |
| | | esc_url(add_query_arg([ |
| | | $content .= JVB()->email()->divider(); |
| | | $settings_url = add_query_arg([ |
| | | 'utm_source' => 'email', |
| | | 'utm_medium' => 'digest', |
| | | 'utm_campaign' => $this->campaign |
| | | ], site_url('/dash/settings/'))) |
| | | ], site_url('/dash/settings/')); |
| | | |
| | | $content .= sprintf( |
| | | '<p>You\'re receiving this %s digest because you follow artists on edmonton.ink. You can %s at any time.</p>', |
| | | $frequency, |
| | | '<a href="' . esc_url($settings_url) . '">adjust your notification settings</a>' |
| | | ); |
| | | |
| | | return $content; |
| | |
| | | return ''; |
| | | } |
| | | |
| | | $content = '<h3>Other Updates</h3>'; |
| | | $content .= '<ul style="padding-left: 20px;">'; |
| | | $items = []; |
| | | |
| | | // Group notifications by type |
| | | $by_type = []; |
| | |
| | | |
| | | // Process each type |
| | | foreach ($by_type as $type => $type_notifications) { |
| | | $config = $this->notification_types[ $type ] ?? []; |
| | | $icon = $config['icon'] ?? 'info'; |
| | | |
| | | foreach ($type_notifications as $notification) { |
| | | $message = $notification->message; |
| | | if (empty($message)) { |
| | |
| | | } |
| | | |
| | | if (!empty($message)) { |
| | | $content .= sprintf('<li>%s</li>', $message); |
| | | $items[] = ['label' => '', 'value' => $message]; |
| | | } |
| | | } |
| | | } |
| | | |
| | | $content .= '</ul>'; |
| | | $content .= '<div class="divider"></div>'; |
| | | |
| | | return $content; |
| | | return JVB()->email()->table($items, 'Other Updates'); |
| | | } |
| | | |
| | | /** |