PluginProbe
Send Users Email – Email Subscribers, Email Marketing Newsletter / trunk
Send Users Email – Email Subscribers, Email Marketing Newsletter vtrunk
2.0.3 2.0.2 2.0.1 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.1.0 1.1.1 1.1.2 1.2.0 1.2.1 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 All 51 releases
send-users-email / admin / partials / users-email.php

users-email.php in Send Users Email – Email Subscribers, Email Marketing Newsletter trunk, at admin/partials/users-email.php

359 lines 15.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <div class="sue-pro-wrap sue-users-email-page">
2
3 <div class="sue-pro-header">
4 <h2><?php
5 esc_html_e( 'Send Email to Selected Users', 'send-users-email' );
6 ?></h2>
7 <p><?php
8 esc_html_e( 'Compose one message and send it directly to specific users in your site.', 'send-users-email' );
9 ?></p>
10 </div>
11
12 <div class="sue-settings-layout sue-users-email-layout">
13
14 <div class="sue-settings-main">
15 <div class="sue-log-card">
16 <div class="sue-log-card-header">
17 <span class="sue-log-card-icon">✉️</span>
18 <h3><?php
19 esc_html_e( 'Compose Message', 'send-users-email' );
20 ?></h3>
21 </div>
22 <div class="sue-log-card-body">
23
24 <?php
25 ?>
26
27 <?php
28 if ( $total_users > 6000 ) {
29 ?>
30 <div class="sue-notice sue-notice-warning" role="alert">
31 <div class="sue-notice-icon">⚠️</div>
32 <div class="sue-notice-body">
33 <p class="sue-notice-title"><?php
34 esc_html_e( 'Large user list detected', 'send-users-email' );
35 ?></p>
36 <p><?php
37 esc_html_e( 'You have a high number of users in the system, so loading this page may take longer. Please consider using Role Email instead.', 'send-users-email' );
38 ?></p>
39 </div>
40 </div>
41 <?php
42 }
43 ?>
44
45 <form action="javascript:void(0)" id="sue-users-email-form" method="post">
46
47 <div class="sue-field-row">
48 <div class="sue-field-label"></div>
49 <div class="sue-field-input">
50 <?php
51 $subject_hint = __( 'Add a clear subject so recipients immediately understand the purpose of the message.', 'send-users-email' );
52 ?>
53 <div class="sue-input-label-row">
54 <label for="subject"><?php
55 esc_html_e( 'Email Subject', 'send-users-email' );
56 ?></label>
57 <button type="button" class="sue-field-tooltip" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="<?php
58 echo esc_attr( $subject_hint );
59 ?>" title="<?php
60 echo esc_attr( $subject_hint );
61 ?>" aria-label="<?php
62 esc_attr_e( 'Field description', 'send-users-email' );
63 ?>">
64 <span class="dashicons dashicons-editor-help"></span>
65 </button>
66 </div>
67 <input type="text" class="sue-input subject" id="subject" name="subject" maxlength="200"
68 placeholder="<?php
69 esc_attr_e( 'Email subject here.', 'send-users-email' );
70 ?> <?php
71 ?>">
72 </div>
73 </div>
74
75 <?php
76 if ( $allowed_title_tagline && sue_fs()->is__premium_only() && sue_fs()->can_use_premium_code() ) {
77 ?>
78
79 <div class="sue-field-row">
80 <div class="sue-field-label"></div>
81 <div class="sue-field-input">
82 <div class="sue-input-label-row">
83 <label for="title"><?php
84 esc_html_e( 'Email Title', 'send-users-email' );
85 ?></label>
86 <button type="button" class="sue-field-tooltip" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="<?php
87 esc_attr_e( 'Shown as the main heading inside the email template. You can use placeholders on title.', 'send-users-email' );
88 ?>" title="<?php
89 esc_attr_e( 'Shown as the main heading inside the email template. You can use placeholders on title.', 'send-users-email' );
90 ?>" aria-label="<?php
91 esc_attr_e( 'Field description', 'send-users-email' );
92 ?>">
93 <span class="dashicons dashicons-editor-help"></span>
94 </button>
95 </div>
96 <input type="text" class="sue-input title" id="title" name="title" maxlength="100" value="<?php
97 echo esc_attr( $title );
98 ?>"
99 placeholder="<?php
100 esc_attr_e( 'Email title here.', 'send-users-email' );
101 ?> <?php
102 ?>">
103 </div>
104 </div>
105
106 <div class="sue-field-row">
107 <div class="sue-field-label"></div>
108 <div class="sue-field-input">
109 <div class="sue-input-label-row">
110 <label for="tagline"><?php
111 esc_html_e( 'Email Tagline', 'send-users-email' );
112 ?></label>
113 <button type="button" class="sue-field-tooltip" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="<?php
114 esc_attr_e( 'Optional short subtitle shown below the email title. You can use placeholders on tagline.', 'send-users-email' );
115 ?>" title="<?php
116 esc_attr_e( 'Optional short subtitle shown below the email title. You can use placeholders on tagline.', 'send-users-email' );
117 ?>" aria-label="<?php
118 esc_attr_e( 'Field description', 'send-users-email' );
119 ?>">
120 <span class="dashicons dashicons-editor-help"></span>
121 </button>
122 </div>
123 <input type="text" class="sue-input tagline" id="tagline" name="tagline" maxlength="100" value="<?php
124 echo esc_attr( $tagline );
125 ?>"
126 placeholder="<?php
127 esc_attr_e( 'Email tagline here.', 'send-users-email' );
128 ?> <?php
129 ?>">
130 </div>
131 </div>
132
133 <?php
134 }
135 ?>
136
137 <div class="sue-field-row sue-users-email-table-row">
138 <div class="sue-field-label"></div>
139 <div class="sue-field-input">
140 <div class="sue-input-label-row">
141 <label for="sue_users"><?php
142 esc_html_e( 'Select Users', 'send-users-email' );
143 ?></label>
144 <button type="button" class="sue-field-tooltip" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="<?php
145 esc_attr_e( 'Use the ID range filter and table selection to target recipients.', 'send-users-email' );
146 ?>" title="<?php
147 esc_attr_e( 'Use the ID range filter and table selection to target recipients.', 'send-users-email' );
148 ?>" aria-label="<?php
149 esc_attr_e( 'Field description', 'send-users-email' );
150 ?>">
151 <span class="dashicons dashicons-editor-help"></span>
152 </button>
153 </div>
154 <div class="sue-user-email-datatable-wrapper">
155 <div class="sue-user-email-datatable sue-users-email-datatable-box">
156 <div class="sue-users-filter-bar">
157 <p class="sue-users-filter-title"><?php
158 esc_html_e( 'Filter users using user ID range', 'send-users-email' );
159 ?></p>
160 <div class="sue-users-filter-input-group">
161 <label for="minID"><?php
162 esc_html_e( 'Minimum ID', 'send-users-email' );
163 ?></label>
164 <input class="sue-input" type="text" id="minID" name="minID">
165 </div>
166 <div class="sue-users-filter-input-group">
167 <label for="maxID"><?php
168 esc_html_e( 'Maximum ID', 'send-users-email' );
169 ?></label>
170 <input class="sue-input" type="text" id="maxID" name="maxID">
171 </div>
172 </div>
173
174 <div class="sue-users-email-table-wrap">
175 <table id="sue-user-email-tbl" class="table table-striped table-sm sue-table">
176 <thead>
177 <tr>
178 <th><input type="checkbox" id="sueSelectAllUsers"></th>
179 <th><?php
180 esc_html_e( 'ID', 'send-users-email' );
181 ?></th>
182 <th><?php
183 esc_html_e( 'Username', 'send-users-email' );
184 ?></th>
185 <th><?php
186 esc_html_e( 'Email', 'send-users-email' );
187 ?></th>
188 <th><?php
189 esc_html_e( 'Display Name', 'send-users-email' );
190 ?></th>
191 </tr>
192 </thead>
193 <tbody>
194 <?php
195 foreach ( $blog_users as $user ) {
196 ?>
197 <tr>
198 <td><input type="checkbox" class="sueUserCheck" name="users[]" value="<?php
199 echo esc_html( $user->ID );
200 ?>"></td>
201 <td><?php
202 echo esc_html( $user->ID );
203 ?></td>
204 <td><?php
205 echo esc_html( $user->user_login );
206 ?></td>
207 <td><?php
208 echo esc_html( $user->user_email );
209 ?></td>
210 <td><?php
211 echo esc_html( $user->display_name );
212 ?></td>
213 </tr>
214 <?php
215 }
216 ?>
217 </tbody>
218 </table>
219 </div>
220 </div>
221 </div>
222 </div>
223 </div>
224
225 <div class="sue-field-row sue-field-row-editor">
226 <div class="sue-field-label"></div>
227 <div class="sue-field-input">
228 <div class="sue-input-label-row">
229 <label for="sue_user_email_message"><?php
230 esc_html_e( 'Email Message', 'send-users-email' );
231 ?></label>
232 <button type="button" class="sue-field-tooltip" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="<?php
233 esc_attr_e( 'Write the full message body. You can use placeholders where supported.', 'send-users-email' );
234 ?>" title="<?php
235 esc_attr_e( 'Write the full message body. You can use placeholders where supported.', 'send-users-email' );
236 ?>" aria-label="<?php
237 esc_attr_e( 'Field description', 'send-users-email' );
238 ?>">
239 <span class="dashicons dashicons-editor-help"></span>
240 </button>
241 </div>
242 <?php
243 // Initialize RTE
244 wp_editor( '', 'sue_user_email_message', [
245 'textarea_rows' => 15,
246 ] );
247 ?>
248 <div class="message"></div>
249 </div>
250 </div>
251
252 <input type="hidden" id="_wpnonce" name="_wpnonce" value="<?php
253 echo esc_attr( wp_create_nonce( 'sue-email-user' ) );
254 ?>"/>
255
256 <?php
257 ?>
258
259 <?php
260 ?>
261
262 <div class="sue-field-row sue-field-row-actions">
263 <div class="sue-field-label"></div>
264 <div class="sue-field-input">
265 <div class="sue-users-email-actions">
266 <button type="submit" id="sue-user-email-btn" class="sue-btn sue-btn-primary">
267 <span class="dashicons dashicons-email"></span>
268 <?php
269 esc_html_e( 'Send Message', 'send-users-email' );
270 ?>
271 </button>
272 <div class="spinner-border text-info sue-spinner" role="status">
273 <span class="visually-hidden"><?php
274 esc_html_e( 'Loading...', 'send-users-email' );
275 ?></span>
276 </div>
277 </div>
278 <div class="progress sue-users-email-progress" style="height: 20px; display: none;">
279 <div class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">0%</div>
280 </div>
281 </div>
282 </div>
283
284 </form>
285
286 </div>
287 </div>
288 </div>
289
290 <div class="sue-settings-sidebar sue-users-email-sidebar">
291
292 <?php
293 require_once SEND_USERS_EMAIL_PLUGIN_BASE_PATH . '/partials/donate.php';
294 ?>
295
296 <?php
297 require_once SEND_USERS_EMAIL_PLUGIN_BASE_PATH . '/partials/warnings.php';
298 ?>
299
300 <div class="sue-sidebar-card">
301 <div class="sue-sidebar-card-header">
302 <span class="sue-sidebar-card-icon">🔲</span>
303 <div>
304 <p class="sue-sidebar-card-title"><?php
305 esc_html_e( 'Hide columns', 'send-users-email' );
306 ?></p>
307 <p class="sue-sidebar-card-desc"><?php
308 esc_html_e( 'Toggle which columns are visible in the user table.', 'send-users-email' );
309 ?></p>
310 </div>
311 </div>
312 <?php
313 $columns = [
314 1 => 'id',
315 2 => 'username',
316 3 => 'email',
317 4 => 'display_name',
318 ];
319 ?>
320 <ul class="sue-checkbox-list">
321 <?php
322 foreach ( $columns as $i => $column ) {
323 ?>
324 <li>
325 <label class="sue-checkbox-item" for="<?php
326 echo esc_attr( $i . $column );
327 ?>">
328 <input data-column="<?php
329 echo esc_attr( $i );
330 ?>" class="hideUserColumn" type="checkbox" value="<?php
331 echo esc_attr( $i );
332 ?>" id="<?php
333 echo esc_attr( $i . $column );
334 ?>">
335 <span><?php
336 echo esc_html( ucwords( str_replace( '_', ' ', $column ) ) );
337 ?></span>
338 </label>
339 </li>
340 <?php
341 }
342 ?>
343 </ul>
344 </div>
345
346 <?php
347 // Include placeholder instructions
348 require plugin_dir_path( __FILE__ ) . 'templates/placeholder-instruction.php';
349 ?>
350
351 </div>
352
353 </div>
354
355 <?php
356 require_once SEND_USERS_EMAIL_PLUGIN_BASE_PATH . '/partials/toast.php';
357 ?>
358
359 </div>