Jake Vanderwerf
2026-01-01 c06013234d16ab3889bd7fce09f6606b45fd2b9f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<?php
if (!defined('ABSPATH')) {
    exit; // Exit if accessed directly
}
/**
 * Template for notification digest emails
 * Variables available:
 * $user - WP_User object
 * $frequency - 'daily', 'weekly', or 'monthly'
 * $grouped_notifications - Array of notifications grouped by type
 */
?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <style>
        /* Email-safe styles */
        body {
            font-family: Courier, monospace;
            line-height: 1.6;
            color: #1B1B1B;
            background: #EFEFEF;
            margin: 0;
            padding: 0;
        }
        .container {
            max-width: 600px;
            margin: 0 auto;
            padding: 20px;
            background: #FFFFFF;
        }
        .header {
            text-align: center;
            margin-bottom: 30px;
            border-bottom: 2px solid #FF0080;
            padding-bottom: 20px;
        }
        .header h1 {
            font-family: Impact, Arial Black, sans-serif;
            font-size: 24px;
            color: #1B1B1B;
            text-transform: uppercase;
            margin: 0;
        }
        .intro {
            font-style: italic;
            margin-bottom: 30px;
            padding: 15px;
            background: #EFEFEF;
            border-left: 4px solid #FF0080;
        }
        .section {
            margin-bottom: 30px;
            padding: 15px;
            border: 1px solid #EFEFEF;
        }
        .section-title {
            font-family: Impact, Arial Black, sans-serif;
            text-transform: uppercase;
            color: #FF0080;
            margin: 0 0 15px 0;
            padding-bottom: 5px;
            border-bottom: 1px solid #EFEFEF;
        }
        .notification {
            margin-bottom: 15px;
            padding-left: 10px;
            border-left: 2px solid #FF0080;
        }
        .notification:last-child {
            margin-bottom: 0;
        }
        .timestamp {
            color: #666666;
            font-size: 12px;
            font-style: italic;
        }
        .cta {
            text-align: center;
            margin: 30px 0;
        }
        .button {
            display: inline-block;
            padding: 10px 20px;
            background: #FF0080;
            color: #FFFFFF;
            text-decoration: none;
            text-transform: uppercase;
            font-family: Impact, Arial Black, sans-serif;
        }
        .footer {
            margin-top: 30px;
            padding-top: 20px;
            border-top: 2px solid #FF0080;
            font-size: 12px;
            color: #666666;
            text-align: center;
        }
    </style>
</head>
<body>
<div class="container">
    <div class="header">
        <h1>
            <?php
            switch($frequency) {
                case 'daily':
                    echo "TODAY'S INK DROP";
                    break;
                case 'weekly':
                    echo "THIS WEEK'S SCENE REPORT";
                    break;
                case 'monthly':
                    echo "MONTHLY INK ROUNDUP";
                    break;
            }
            ?>
        </h1>
    </div>
 
    <div class="intro">
        Hey <?= esc_html($user->display_name) ?>,
        <?php
        switch($frequency) {
            case 'daily':
                echo "Here's what went down in the last 24 hours.";
                break;
            case 'weekly':
                echo "Your weekly dose of Edmonton's ink scene shenanigans.";
                break;
            case 'monthly':
                echo "Another month of rad art and awesome artists - let's dive in.";
                break;
        }
        ?>
    </div>
 
    <?php foreach ($grouped_notifications as $type => $notifications): ?>
        <div class="section">
            <h2 class="section-title">
                <?php
                switch($type) {
                    case 'artist_new_tattoo':
                        echo "FRESH INK ↯";
                        break;
                    case 'artist_new_artwork':
                        echo "NEW ART DROPS ⚡";
                        break;
                    case 'shop_update':
                        echo "SHOP TALK";
                        break;
                    default:
                        echo "SCENE NEWS";
                }
                ?>
            </h2>
 
            <?php foreach ($notifications as $notification): ?>
                <div class="notification">
                    <?= wp_kses_post($notification['message']) ?>
                    <div class="timestamp">
                        <?= human_time_diff(strtotime($notification['created']), current_time('timestamp')) ?> ago
                    </div>
                </div>
            <?php endforeach; ?>
        </div>
    <?php endforeach; ?>
 
    <div class="cta">
        <a href="<?= home_url('/dash/notifications') ?>" class="button">
            CHECK THE FULL STORY →
        </a>
    </div>
 
    <div class="footer">
        <p>
            You're getting this because you signed up for <?= $frequency ?> updates.
            <a href="<?= home_url('/dash/settings') ?>">Change your settings</a> if that's not your jam.
        </p>
        <p>
            Made with ♡ by your friendly neighborhood laser nerds<br>
            © <?= date('Y') ?> edmonton.ink
        </p>
        <?php if($frequency !== 'daily'): ?>
            <p><small>Miss something? We post daily too - just saying.</small></p>
        <?php endif; ?>
    </div>
</div>
</body>
</html>