Version Description
Rewrote Admin interface using native tables
=
Download this release
Release Info
Developer | sudar |
Plugin | Email Log |
Version | 1.5 |
Comparing to | |
See all releases |
Code changes from version 1.1 to 1.5
- email-log.php +62 -438
- include/class-email-log-list-table.php +315 -0
- languages/email-log.pot +44 -195
- readme.txt +10 -7
email-log.php
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://sudarmuthu.com/wordpress/email-log
|
|
5 |
Description: Logs every email sent through WordPress. Compatible with WPMU too.
|
6 |
Donate Link: http://sudarmuthu.com/if-you-wanna-thank-me
|
7 |
Author: Sudar
|
8 |
-
Version: 1.
|
9 |
Author URI: http://sudarmuthu.com/
|
10 |
Text Domain: email-log
|
11 |
Domain Path: languages/
|
@@ -42,6 +42,8 @@ Domain Path: languages/
|
|
42 |
- Added support for buying pro addons
|
43 |
2013-04-27 - v1.1 - (Dev time: 0.5 hour)
|
44 |
- Added more documentation
|
|
|
|
|
45 |
*/
|
46 |
/* Copyright 2009 Sudar Muthu (email : sudar@sudarmuthu.com)
|
47 |
|
@@ -68,6 +70,9 @@ class EmailLog {
|
|
68 |
private $admin_screen;
|
69 |
|
70 |
const FILTER_NAME = 'wp_mail_log';
|
|
|
|
|
|
|
71 |
|
72 |
const TABLE_NAME = 'email_log'; /* Database table name */
|
73 |
const DB_OPTION_NAME = 'email-log-db'; /* Database option name */
|
@@ -86,11 +91,11 @@ class EmailLog {
|
|
86 |
|
87 |
// Register hooks
|
88 |
add_action( 'admin_menu', array(&$this, 'register_settings_page') );
|
89 |
-
add_filter( 'plugin_row_meta', array( &$this, 'add_plugin_links' ), 10, 2 );
|
90 |
|
91 |
// Register Filter
|
92 |
add_filter('wp_mail', array(&$this, 'log_email'));
|
93 |
add_filter('set-screen-option', array(&$this, 'save_screen_options'), 10, 3);
|
|
|
94 |
|
95 |
$plugin = plugin_basename(__FILE__);
|
96 |
add_filter("plugin_action_links_$plugin", array(&$this, 'add_action_links'));
|
@@ -116,11 +121,53 @@ class EmailLog {
|
|
116 |
*/
|
117 |
function register_settings_page() {
|
118 |
//Save the handle to your admin page - you'll need it to create a WP_Screen object
|
119 |
-
$this->admin_page = add_submenu_page( 'tools.php', __('Email Log', 'email-log'), __('Email Log', 'email-log'), 'manage_options',
|
120 |
|
121 |
add_action("load-{$this->admin_page}",array(&$this,'create_settings_panel'));
|
122 |
}
|
123 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
/**
|
125 |
* Add settings Panel
|
126 |
*/
|
@@ -161,6 +208,17 @@ class EmailLog {
|
|
161 |
'option' => 'per_page'
|
162 |
)
|
163 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
164 |
}
|
165 |
|
166 |
/**
|
@@ -207,440 +265,6 @@ class EmailLog {
|
|
207 |
printf('%1$s ' . __("plugin", 'email-log') .' | ' . __("Version", 'email-log') . ' %2$s | '. __('by', 'email-log') . ' %3$s<br />', $plugin_data['Title'], $plugin_data['Version'], $plugin_data['Author']);
|
208 |
}
|
209 |
|
210 |
-
/**
|
211 |
-
* Dipslay the Settings page
|
212 |
-
*
|
213 |
-
* Some parts of this function is based on the wp-rattings Plugin
|
214 |
-
* TODO: Rewrite this using this technique http://wp.smashingmagazine.com/2011/11/03/native-admin-tables-wordpress/
|
215 |
-
*/
|
216 |
-
function settings_page() {
|
217 |
-
global $wpdb;
|
218 |
-
global $text_direction;
|
219 |
-
|
220 |
-
$base_name = plugin_basename('email-log');
|
221 |
-
$base_page = 'tools.php?page='.$base_name;
|
222 |
-
|
223 |
-
$email_log_page = intval($this->array_get($_GET, 'emaillog_page'));
|
224 |
-
$emaillogs_filterid = trim(addslashes($this->array_get($_GET, 'id')));
|
225 |
-
$emaillogs_filter_to_email = trim(addslashes($this->array_get($_GET, 'to_email')));
|
226 |
-
$emaillogs_filter_subject = trim(addslashes($this->array_get($_GET, 'subject')));
|
227 |
-
$emaillog_sort_by = trim($this->array_get($_GET, 'by'));
|
228 |
-
$emaillog_sortby_text = '';
|
229 |
-
$emaillog_sortorder = trim($this->array_get($_GET, 'order'));
|
230 |
-
$emaillog_sortorder_text = '';
|
231 |
-
$email_log_perpage = intval($this->get_per_page());
|
232 |
-
$emaillog_sort_url = '';
|
233 |
-
|
234 |
-
### Form Processing
|
235 |
-
if(!empty($_POST['do'])) {
|
236 |
-
// Decide What To Do
|
237 |
-
switch($_POST['do']) {
|
238 |
-
case __('Delete Logs', 'email-log'):
|
239 |
-
$delete_datalog = intval($_POST['delete_datalog']);
|
240 |
-
switch($delete_datalog) {
|
241 |
-
case 1:
|
242 |
-
// delete selected entries
|
243 |
-
$selected_ids = implode(',', $_POST['selected_ids']);
|
244 |
-
$delete_logs = $wpdb->query("DELETE FROM $this->table_name where id IN ($selected_ids)");
|
245 |
-
|
246 |
-
if($delete_logs) {
|
247 |
-
$text = '<font color="green">' . __('The selected Email Logs have been deleted.', 'email-log') . '</font>';
|
248 |
-
} else {
|
249 |
-
$text = '<font color="red">' . __('An error has occurred while deleting the selected Email logs', 'email-log') . '</font>';
|
250 |
-
}
|
251 |
-
break;
|
252 |
-
case 2:
|
253 |
-
// Delete based on condition
|
254 |
-
$to_email = trim(addslashes( $_POST['delete_to_email']));
|
255 |
-
if ('' != $to_email) {
|
256 |
-
$delete_logs = $wpdb->query("DELETE FROM $this->table_name where to_email = '$to_email'");
|
257 |
-
if($delete_logs) {
|
258 |
-
$text = '<font color="green">'.sprintf(__('All Email Logs for email id "%s" have been deleted.', 'email-log'), $to_email).'</font>';
|
259 |
-
} else {
|
260 |
-
$text = '<font color="red">'.sprintf(__('An error has occurred while deleting all Email Logs for email id "%s".', 'email-log'), $to_email).'</font>';
|
261 |
-
}
|
262 |
-
}
|
263 |
-
|
264 |
-
$subject = trim(addslashes( $_POST['delete_subject']));
|
265 |
-
if ('' != $subject) {
|
266 |
-
$delete_logs = $wpdb->query("DELETE FROM $this->table_name where subject = '$subject'");
|
267 |
-
if($delete_logs) {
|
268 |
-
$text .= '<font color="green">'.sprintf(__('All Email Logs with subject "%s" have been deleted.', 'email-log'), $subject).'</font>';
|
269 |
-
} else {
|
270 |
-
$text .= '<font color="red">'.sprintf(__('An error has occurred while deleting all Email Logs with subject "%s".', 'email-log'), $subject).'</font>';
|
271 |
-
}
|
272 |
-
}
|
273 |
-
break;
|
274 |
-
case 3:
|
275 |
-
// Delete all
|
276 |
-
$delete_logs = $wpdb->query("DELETE FROM $this->table_name ");
|
277 |
-
if ($delete_logs) {
|
278 |
-
$text = '<font color="green">'.__('All Email Logs were deleted.', 'email-log').'</font><br />';
|
279 |
-
} else {
|
280 |
-
$text = '<font color="red">'.__('An error has occurred while deleting all Email Logs', 'email-log').'</font>';
|
281 |
-
}
|
282 |
-
break;
|
283 |
-
}
|
284 |
-
break;
|
285 |
-
}
|
286 |
-
}
|
287 |
-
|
288 |
-
### Form Sorting URL
|
289 |
-
if(!empty($emaillogs_filterid)) {
|
290 |
-
$emaillogs_filterid = intval($emaillogs_filterid);
|
291 |
-
$emaillog_sort_url .= '&id='.$emaillogs_filterid;
|
292 |
-
}
|
293 |
-
if(!empty($emaillogs_filter_to_email)) {
|
294 |
-
$emaillog_sort_url .= '&to_email='.$emaillogs_filter_to_email;
|
295 |
-
}
|
296 |
-
if(!empty($emaillogs_filter_subject)) {
|
297 |
-
$emaillog_sort_url .= '&subject='.$emaillogs_filter_subject;
|
298 |
-
}
|
299 |
-
if(!empty($emaillog_sort_by)) {
|
300 |
-
$emaillog_sort_url .= '&by='.$emaillog_sort_by;
|
301 |
-
}
|
302 |
-
if(!empty($emaillog_sortorder)) {
|
303 |
-
$emaillog_sort_url .= '&order='.$emaillog_sortorder;
|
304 |
-
}
|
305 |
-
|
306 |
-
### Get Order By
|
307 |
-
switch($emaillog_sort_by) {
|
308 |
-
case 'id':
|
309 |
-
$emaillog_sort_by = 'id';
|
310 |
-
$emaillog_sortby_text = __('ID', 'email-log');
|
311 |
-
break;
|
312 |
-
case 'to_email':
|
313 |
-
$emaillog_sort_by = 'to_email';
|
314 |
-
$emaillog_sortby_text = __('To Email', 'email-log');
|
315 |
-
break;
|
316 |
-
case 'subject':
|
317 |
-
$emaillog_sort_by = 'subject';
|
318 |
-
$emaillog_sortby_text = __('Subject', 'email-log');
|
319 |
-
break;
|
320 |
-
case 'date':
|
321 |
-
default:
|
322 |
-
$emaillog_sort_by = 'sent_date';
|
323 |
-
$emaillog_sortby_text = __('Date', 'email-log');
|
324 |
-
}
|
325 |
-
|
326 |
-
### Get Sort Order
|
327 |
-
switch($emaillog_sortorder) {
|
328 |
-
case 'asc':
|
329 |
-
$emaillog_sortorder = 'ASC';
|
330 |
-
$emaillog_sortorder_text = __('Ascending', 'email-log');
|
331 |
-
break;
|
332 |
-
case 'desc':
|
333 |
-
default:
|
334 |
-
$emaillog_sortorder = 'DESC';
|
335 |
-
$emaillog_sortorder_text = __('Descending', 'email-log');
|
336 |
-
}
|
337 |
-
|
338 |
-
// Where
|
339 |
-
$emaillog_where = '';
|
340 |
-
if(!empty($emaillogs_filterid)) {
|
341 |
-
$emaillog_where = "AND id =$emaillogs_filterid";
|
342 |
-
}
|
343 |
-
if(!empty($emaillogs_filter_to_email)) {
|
344 |
-
$emaillog_where .= " AND to_email like '%$emaillogs_filter_to_email%'";
|
345 |
-
}
|
346 |
-
if(!empty($emaillogs_filter_subject)) {
|
347 |
-
$emaillog_where .= " AND subject like '%$emaillogs_filter_subject%'";
|
348 |
-
}
|
349 |
-
|
350 |
-
// Get email Logs Data
|
351 |
-
$total_logs = $wpdb->get_var("SELECT COUNT(id) FROM $this->table_name WHERE 1=1 $emaillog_where");
|
352 |
-
|
353 |
-
// Checking $postratings_page and $offset
|
354 |
-
if(empty($email_log_page) || $email_log_page == 0) { $email_log_page = 1; }
|
355 |
-
if(empty($offset)) { $offset = 0; }
|
356 |
-
|
357 |
-
// Determin $offset
|
358 |
-
$offset = ($email_log_page-1) * $email_log_perpage;
|
359 |
-
|
360 |
-
// Determine Max Number Of Logs To Display On Page
|
361 |
-
if(($offset + $email_log_perpage) > $total_logs) {
|
362 |
-
$max_on_page = $total_logs;
|
363 |
-
} else {
|
364 |
-
$max_on_page = ($offset + $email_log_perpage);
|
365 |
-
}
|
366 |
-
|
367 |
-
// Determine Number Of Logs To Display On Page
|
368 |
-
if (($offset + 1) > ($total_logs)) {
|
369 |
-
$display_on_page = $total_logs;
|
370 |
-
} else {
|
371 |
-
$display_on_page = ($offset + 1);
|
372 |
-
}
|
373 |
-
|
374 |
-
// Determing Total Amount Of Pages
|
375 |
-
$total_pages = ceil($total_logs / $email_log_perpage);
|
376 |
-
|
377 |
-
// Get The Logs
|
378 |
-
$email_logs = $wpdb->get_results("SELECT * FROM $this->table_name WHERE 1=1 $emaillog_where ORDER BY $emaillog_sort_by $emaillog_sortorder LIMIT $offset, $email_log_perpage");
|
379 |
-
|
380 |
-
// TODO: Should move this to a seperate js file
|
381 |
-
?>
|
382 |
-
<script type = "text/javascript">
|
383 |
-
jQuery('document').ready(function() {
|
384 |
-
jQuery('.selectall').click(function (e) {
|
385 |
-
if (jQuery(e.target).is(':checked')) {
|
386 |
-
jQuery('.select_box').attr('checked', 'checked');
|
387 |
-
} else {
|
388 |
-
jQuery('.select_box').removeAttr('checked');
|
389 |
-
}
|
390 |
-
});
|
391 |
-
});
|
392 |
-
</script>
|
393 |
-
<?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?>
|
394 |
-
<div class="wrap">
|
395 |
-
<?php screen_icon(); ?>
|
396 |
-
<h2><?php _e( 'Email Log', 'email-log' ); ?></h2>
|
397 |
-
|
398 |
-
<p> </p>
|
399 |
-
|
400 |
-
<form action="<?php echo esc_url($_SERVER['PHP_SELF']); ?>" method="get">
|
401 |
-
<input type="hidden" name="page" value="<?php echo $base_name; ?>" />
|
402 |
-
<table class="widefat">
|
403 |
-
<tr>
|
404 |
-
<th><?php _e('Filter Options:', 'email-log'); ?></th>
|
405 |
-
<td>
|
406 |
-
<?php _e('ID:', 'email-log'); ?> <input type="text" name="id" value="<?php echo $emaillogs_filterid; ?>" size="5" maxlength="5" />
|
407 |
-
|
408 |
-
<?php _e('To Email:', 'email-log'); ?> <input type="text" name="to_email" value="<?php echo $emaillogs_filter_to_email; ?>" size="40" maxlength="50" />
|
409 |
-
|
410 |
-
<?php _e('Subject:', 'email-log'); ?> <input type="text" name="subject" value="<?php echo $emaillogs_filter_subject; ?>" size="40" maxlength="50" />
|
411 |
-
|
412 |
-
</td>
|
413 |
-
</tr>
|
414 |
-
<tr class="alternate">
|
415 |
-
<th><?php _e('Sort Options:', 'email-log'); ?></th>
|
416 |
-
<td>
|
417 |
-
<select name="by" size="1">
|
418 |
-
<option value="id"<?php if($emaillog_sort_by == 'id') { echo ' selected="selected"'; }?>><?php _e('ID', 'email-log'); ?></option>
|
419 |
-
<option value="to_email"<?php if($emaillog_sort_by == 'to_email') { echo ' selected="selected"'; }?>><?php _e('To Email', 'email-log'); ?></option>
|
420 |
-
<option value="subject"<?php if($emaillog_sort_by == 'subject') { echo ' selected="selected"'; }?>><?php _e('Subject', 'email-log'); ?></option>
|
421 |
-
<option value="sent_date"<?php if($emaillog_sort_by == 'sent_date') { echo ' selected="selected"'; }?>><?php _e('Date', 'email-log'); ?></option>
|
422 |
-
</select>
|
423 |
-
|
424 |
-
<select name="order" size="1">
|
425 |
-
<option value="asc"<?php if($emaillog_sortorder == 'ASC') { echo ' selected="selected"'; }?>><?php _e('Ascending', 'email-log'); ?></option>
|
426 |
-
<option value="desc"<?php if($emaillog_sortorder == 'DESC') { echo ' selected="selected"'; } ?>><?php _e('Descending', 'email-log'); ?></option>
|
427 |
-
</select>
|
428 |
-
</td>
|
429 |
-
</tr>
|
430 |
-
<tr>
|
431 |
-
<td colspan="2" align="center"><input type="submit" value="<?php _e('Filter', 'email-log'); ?>" class="button" /></td>
|
432 |
-
</tr>
|
433 |
-
</table>
|
434 |
-
</form>
|
435 |
-
|
436 |
-
<p><?php printf(__('Displaying <strong>%s</strong> to <strong>%s</strong> of <strong>%s</strong> Email log entries.', 'email-log'), number_format_i18n($display_on_page), number_format_i18n($max_on_page), number_format_i18n($total_logs)); ?></p>
|
437 |
-
<p><?php printf(__('Sorted by <strong>%s</strong> in <strong>%s</strong> order.', 'email-log'), $emaillog_sortby_text, $emaillog_sortorder_text); ?></p>
|
438 |
-
|
439 |
-
<form method="post" action="<?php echo esc_url($_SERVER['PHP_SELF']); ?>?page=<?php echo $base_name; ?>">
|
440 |
-
<?php
|
441 |
-
if($total_pages > 1) {
|
442 |
-
?>
|
443 |
-
<br />
|
444 |
-
<table class="widefat">
|
445 |
-
<tr>
|
446 |
-
<td align="<?php echo ('rtl' == $text_direction) ? 'right' : 'left'; ?>" width="40%">
|
447 |
-
<?php
|
448 |
-
if($email_log_page > 1 && ((($email_log_page*$email_log_perpage)-($email_log_perpage-1)) <= $total_logs)) {
|
449 |
-
echo '<strong>«</strong> <a href="'.$base_page.'&emaillog_page='.($email_log_page-1).$emaillog_sort_url.'" title="« '.__('Previous Page', 'email-log').'">'.__('Previous Page', 'email-log').'</a>';
|
450 |
-
} else {
|
451 |
-
echo ' ';
|
452 |
-
}
|
453 |
-
?>
|
454 |
-
</td>
|
455 |
-
<td align="center" width="20%">
|
456 |
-
<?php printf(__('Pages (%s): ', 'email-log'), number_format_i18n($total_pages)); ?>
|
457 |
-
<?php
|
458 |
-
if ($email_log_page >= 4) {
|
459 |
-
echo '<strong><a href="'.$base_page.'&emaillog_page=1'.$emaillog_sort_url.$emaillog_sort_url.'" title="'.__('Go to First Page', 'email-log').'">« '.__('First', 'email-log').'</a></strong> ... ';
|
460 |
-
}
|
461 |
-
if($email_log_page > 1) {
|
462 |
-
echo ' <strong><a href="'.$base_page.'&emaillog_page='.($email_log_page-1).$emaillog_sort_url.'" title="« '.__('Go to Page', 'email-log').' '.number_format_i18n($email_log_page-1).'">«</a></strong> ';
|
463 |
-
}
|
464 |
-
for($i = $email_log_page - 2 ; $i <= $email_log_page +2; $i++) {
|
465 |
-
if ($i >= 1 && $i <= $total_pages) {
|
466 |
-
if($i == $email_log_page) {
|
467 |
-
echo '<strong>['.number_format_i18n($i).']</strong> ';
|
468 |
-
} else {
|
469 |
-
echo '<a href="'.$base_page.'&emaillog_page='.($i).$emaillog_sort_url.'" title="'.__('Page', 'email-log').' '.number_format_i18n($i).'">'.number_format_i18n($i).'</a> ';
|
470 |
-
}
|
471 |
-
}
|
472 |
-
}
|
473 |
-
if($email_log_page < $total_pages) {
|
474 |
-
echo ' <strong><a href="'.$base_page.'&emaillog_page='.($email_log_page+1).$emaillog_sort_url.'" title="'.__('Go to Page', 'email-log').' '.number_format_i18n($email_log_page+1).' »">»</a></strong> ';
|
475 |
-
}
|
476 |
-
if (($email_log_page+2) < $total_pages) {
|
477 |
-
echo ' ... <strong><a href="'.$base_page.'&emaillog_page='.($total_pages).$emaillog_sort_url.'" title="'.__('Go to Last Page', 'email-log').'">'.__('Last', 'email-log').' »</a></strong>';
|
478 |
-
}
|
479 |
-
?>
|
480 |
-
</td>
|
481 |
-
<td align="<?php echo ('rtl' == $text_direction) ? 'left' : 'right'; ?>" width="40%">
|
482 |
-
<?php
|
483 |
-
if($email_log_page >= 1 && ((($email_log_page*$email_log_perpage)+1) <= $total_logs)) {
|
484 |
-
echo '<a href="'.$base_page.'&emaillog_page='.($email_log_page+1).$emaillog_sort_url.'" title="'.__('Next Page', 'email-log').' »">'.__('Next Page', 'email-log').'</a> <strong>»</strong>';
|
485 |
-
} else {
|
486 |
-
echo ' ';
|
487 |
-
}
|
488 |
-
?>
|
489 |
-
</td>
|
490 |
-
</tr>
|
491 |
-
</table>
|
492 |
-
<!-- </Paging> -->
|
493 |
-
<?php
|
494 |
-
}
|
495 |
-
?>
|
496 |
-
<table class="widefat">
|
497 |
-
<thead>
|
498 |
-
<tr>
|
499 |
-
<td width="5%"><input type = "checkbox" name = "selectall" class = "selectall" ></td>
|
500 |
-
<th width="5%"><?php _e('ID', 'email-log'); ?></th>
|
501 |
-
<th width="20%"><?php _e('Date / Time', 'email-log'); ?></th>
|
502 |
-
<th width="30%"><?php _e('To', 'email-log'); ?></th>
|
503 |
-
<th width="40%"><?php _e('Subject', 'email-log'); ?></th>
|
504 |
-
</tr>
|
505 |
-
</thead>
|
506 |
-
<tbody>
|
507 |
-
<?php
|
508 |
-
if($email_logs) {
|
509 |
-
$i = 0;
|
510 |
-
foreach($email_logs as $email_log) {
|
511 |
-
if($i%2 == 0) {
|
512 |
-
$style = 'class="alternate"';
|
513 |
-
} else {
|
514 |
-
$style = '';
|
515 |
-
}
|
516 |
-
$email_id = intval($email_log->id);
|
517 |
-
$email_date = mysql2date(sprintf(__('%s @ %s', 'email-log'), get_option('date_format'), get_option('time_format')), $email_log->sent_date);
|
518 |
-
$email_to = stripslashes($email_log->to_email);
|
519 |
-
$email_subject = stripslashes($email_log->subject);
|
520 |
-
echo "<tr $style>\n";
|
521 |
-
echo '<td><input type = "checkbox" class = "select_box" name = "selected_ids[]" value = "' . $email_id . '"></td>'."\n";
|
522 |
-
echo '<td>'.$email_id.'</td>'."\n";
|
523 |
-
echo "<td>$email_date</td>\n";
|
524 |
-
echo "<td>$email_to</td>\n";
|
525 |
-
echo "<td>$email_subject</td>\n";
|
526 |
-
echo '</tr>';
|
527 |
-
$i++;
|
528 |
-
}
|
529 |
-
} else {
|
530 |
-
echo '<tr><td colspan="7" align="center"><strong>'.__('No Email Logs were found', 'email-log').'</strong></td></tr>';
|
531 |
-
}
|
532 |
-
?>
|
533 |
-
</tbody>
|
534 |
-
<tfoot>
|
535 |
-
<tr>
|
536 |
-
<td width="5%"><input type = "checkbox" name = "selectall" class = "selectall" ></td>
|
537 |
-
<th width="5%"><?php _e('ID', 'email-log'); ?></th>
|
538 |
-
<th width="20%"><?php _e('Date / Time', 'email-log'); ?></th>
|
539 |
-
<th width="30%"><?php _e('To', 'email-log'); ?></th>
|
540 |
-
<th width="40%"><?php _e('Subject', 'email-log'); ?></th>
|
541 |
-
</tr>
|
542 |
-
</tfoot>
|
543 |
-
</table>
|
544 |
-
<?php
|
545 |
-
if($total_pages > 1) {
|
546 |
-
?>
|
547 |
-
<table class="widefat">
|
548 |
-
<tr>
|
549 |
-
<td align="<?php echo ('rtl' == $text_direction) ? 'right' : 'left'; ?>" width="40%">
|
550 |
-
<?php
|
551 |
-
if($email_log_page > 1 && ((($email_log_page*$email_log_perpage)-($email_log_perpage-1)) <= $total_logs)) {
|
552 |
-
echo '<strong>«</strong> <a href="'.$base_page.'&emaillog_page='.($email_log_page-1).$emaillog_sort_url.'" title="« '.__('Previous Page', 'email-log').'">'.__('Previous Page', 'email-log').'</a>';
|
553 |
-
} else {
|
554 |
-
echo ' ';
|
555 |
-
}
|
556 |
-
?>
|
557 |
-
</td>
|
558 |
-
<td align="center" width="20%">
|
559 |
-
<?php printf(__('Pages (%s): ', 'email-log'), number_format_i18n($total_pages)); ?>
|
560 |
-
<?php
|
561 |
-
if ($email_log_page >= 4) {
|
562 |
-
echo '<strong><a href="'.$base_page.'&emaillog_page=1'.$emaillog_sort_url.$emaillog_sort_url.'" title="'.__('Go to First Page', 'email-log').'">« '.__('First', 'email-log').'</a></strong> ... ';
|
563 |
-
}
|
564 |
-
if($email_log_page > 1) {
|
565 |
-
echo ' <strong><a href="'.$base_page.'&emaillog_page='.($email_log_page-1).$emaillog_sort_url.'" title="« '.__('Go to Page', 'email-log').' '.number_format_i18n($email_log_page-1).'">«</a></strong> ';
|
566 |
-
}
|
567 |
-
for($i = $email_log_page - 2 ; $i <= $email_log_page +2; $i++) {
|
568 |
-
if ($i >= 1 && $i <= $total_pages) {
|
569 |
-
if($i == $email_log_page) {
|
570 |
-
echo '<strong>['.number_format_i18n($i).']</strong> ';
|
571 |
-
} else {
|
572 |
-
echo '<a href="'.$base_page.'&emaillog_page='.($i).$emaillog_sort_url.'" title="'.__('Page', 'email-log').' '.number_format_i18n($i).'">'.number_format_i18n($i).'</a> ';
|
573 |
-
}
|
574 |
-
}
|
575 |
-
}
|
576 |
-
if($email_log_page < $total_pages) {
|
577 |
-
echo ' <strong><a href="'.$base_page.'&emaillog_page='.($email_log_page+1).$emaillog_sort_url.'" title="'.__('Go to Page', 'email-log').' '.number_format_i18n($email_log_page+1).' »">»</a></strong> ';
|
578 |
-
}
|
579 |
-
if (($email_log_page+2) < $total_pages) {
|
580 |
-
echo ' ... <strong><a href="'.$base_page.'&emaillog_page='.($total_pages).$emaillog_sort_url.'" title="'.__('Go to Last Page', 'email-log').'">'.__('Last', 'email-log').' »</a></strong>';
|
581 |
-
}
|
582 |
-
?>
|
583 |
-
</td>
|
584 |
-
<td align="<?php echo ('rtl' == $text_direction) ? 'left' : 'right'; ?>" width="40%">
|
585 |
-
<?php
|
586 |
-
if($email_log_page >= 1 && ((($email_log_page*$email_log_perpage)+1) <= $total_logs)) {
|
587 |
-
echo '<a href="'.$base_page.'&emaillog_page='.($email_log_page+1).$emaillog_sort_url.'" title="'.__('Next Page', 'email-log').' »">'.__('Next Page', 'email-log').'</a> <strong>»</strong>';
|
588 |
-
} else {
|
589 |
-
echo ' ';
|
590 |
-
}
|
591 |
-
?>
|
592 |
-
</td>
|
593 |
-
</tr>
|
594 |
-
<tr class="alternate">
|
595 |
-
</tr>
|
596 |
-
</table>
|
597 |
-
<!-- </Paging> -->
|
598 |
-
<?php
|
599 |
-
}
|
600 |
-
?>
|
601 |
-
|
602 |
-
<!-- Delete Email Logs -->
|
603 |
-
<h3><?php _e('Delete Logs', 'email-log'); ?></h3>
|
604 |
-
<div align="center">
|
605 |
-
<table class="widefat">
|
606 |
-
<tr>
|
607 |
-
<td valign="top"><b><?php _e('Delete Type : ', 'email-log'); ?></b></td>
|
608 |
-
<td valign="top">
|
609 |
-
<select size="1" name="delete_datalog">
|
610 |
-
<option value="1"><?php _e('Selected entries', 'email-log'); ?></option>
|
611 |
-
<option value="2"><?php _e('Based on', 'email-log'); ?></option>
|
612 |
-
<option value="3"><?php _e('All Logs', 'email-log'); ?></option>
|
613 |
-
</select>
|
614 |
-
</td>
|
615 |
-
</tr>
|
616 |
-
<tr>
|
617 |
-
<td valign="top"><b><?php _e('Condition:', 'email-log'); ?></b></td>
|
618 |
-
<td valign="top">
|
619 |
-
<label for ="delete_to_email"><?php _e('To Email', 'email-log');?> <input type="text" name="delete_to_email" size="20" dir="ltr" /></label>
|
620 |
-
<?php _e('or', 'email-log');?>
|
621 |
-
<label for ="delete_subject"><?php _e('Subject', 'email-log');?> <input type="text" name="delete_subject" size="20" dir="ltr" /></label>
|
622 |
-
</td>
|
623 |
-
</tr>
|
624 |
-
<tr>
|
625 |
-
<td colspan="2" align="center">
|
626 |
-
<input type="submit" name="do" value="<?php _e('Delete Logs', 'email-log'); ?>" class="button" onclick="return confirm('<?php _e('You Are About To Delete Email Logs.\nThis Action Is Not Reversible.\n\n Choose \\\'Cancel\\\' to stop, \\\'OK\\\' to delete.', 'email-log'); ?>')" />
|
627 |
-
</td>
|
628 |
-
</tr>
|
629 |
-
</table>
|
630 |
-
</div>
|
631 |
-
</form>
|
632 |
-
<?php
|
633 |
-
echo '<h3>', __('Pro Addon', 'email-log'), '</h3>';
|
634 |
-
echo '<p>';
|
635 |
-
_e('You can <a href = "http://sudarmuthu.com/out/buy-email-log-forward-email-addon">buy the Forward email pro addon</a>, which allows you to send a copy of all the emails send from WordPress, to another email address. The addon allows you to choose whether you want to forward through to, cc or bcc fields. This can be extremely useful when you want to debug by analyzing the emails that are sent from WordPress. The cost of the addon is $15.', 'email-log');
|
636 |
-
echo '</p>';
|
637 |
-
?>
|
638 |
-
</div>
|
639 |
-
<?php
|
640 |
-
// Display credits in Footer
|
641 |
-
add_action( 'in_admin_footer', array(&$this, 'add_footer_links'));
|
642 |
-
}
|
643 |
-
|
644 |
/**
|
645 |
* Log all email to database
|
646 |
*
|
@@ -712,7 +336,7 @@ class EmailLogInit {
|
|
712 |
PRIMARY KEY (id)
|
713 |
);";
|
714 |
|
715 |
-
require_once(ABSPATH . 'wp-admin/upgrade
|
716 |
dbDelta($sql);
|
717 |
|
718 |
add_option(EmailLog::DB_OPTION_NAME, EmailLog::DB_VERSION);
|
5 |
Description: Logs every email sent through WordPress. Compatible with WPMU too.
|
6 |
Donate Link: http://sudarmuthu.com/if-you-wanna-thank-me
|
7 |
Author: Sudar
|
8 |
+
Version: 1.5
|
9 |
Author URI: http://sudarmuthu.com/
|
10 |
Text Domain: email-log
|
11 |
Domain Path: languages/
|
42 |
- Added support for buying pro addons
|
43 |
2013-04-27 - v1.1 - (Dev time: 0.5 hour)
|
44 |
- Added more documentation
|
45 |
+
2013-09-09 - v1.5 - (Dev time: 10 hours)
|
46 |
+
- Rewrote Admin interface using native tables
|
47 |
*/
|
48 |
/* Copyright 2009 Sudar Muthu (email : sudar@sudarmuthu.com)
|
49 |
|
70 |
private $admin_screen;
|
71 |
|
72 |
const FILTER_NAME = 'wp_mail_log';
|
73 |
+
const PAGE_SLUG = 'email-log';
|
74 |
+
const DELETE_LOG_NONCE_FIELD = 'sm-delete-email-log-nonce';
|
75 |
+
const DELETE_LOG_ACTION = 'sm-delete-email-log';
|
76 |
|
77 |
const TABLE_NAME = 'email_log'; /* Database table name */
|
78 |
const DB_OPTION_NAME = 'email-log-db'; /* Database option name */
|
91 |
|
92 |
// Register hooks
|
93 |
add_action( 'admin_menu', array(&$this, 'register_settings_page') );
|
|
|
94 |
|
95 |
// Register Filter
|
96 |
add_filter('wp_mail', array(&$this, 'log_email'));
|
97 |
add_filter('set-screen-option', array(&$this, 'save_screen_options'), 10, 3);
|
98 |
+
add_filter( 'plugin_row_meta', array( &$this, 'add_plugin_links' ), 10, 2 );
|
99 |
|
100 |
$plugin = plugin_basename(__FILE__);
|
101 |
add_filter("plugin_action_links_$plugin", array(&$this, 'add_action_links'));
|
121 |
*/
|
122 |
function register_settings_page() {
|
123 |
//Save the handle to your admin page - you'll need it to create a WP_Screen object
|
124 |
+
$this->admin_page = add_submenu_page( 'tools.php', __('Email Log', 'email-log'), __('Email Log', 'email-log'), 'manage_options', self::PAGE_SLUG , array( &$this, 'display_logs') );
|
125 |
|
126 |
add_action("load-{$this->admin_page}",array(&$this,'create_settings_panel'));
|
127 |
}
|
128 |
|
129 |
+
/**
|
130 |
+
* Display email logs
|
131 |
+
*/
|
132 |
+
function display_logs() {
|
133 |
+
|
134 |
+
$this->logs_table->prepare_items( $this->get_per_page() );
|
135 |
+
?>
|
136 |
+
<div class="wrap">
|
137 |
+
<?php screen_icon(); ?>
|
138 |
+
<h2><?php _e('Email Logs', 'email-log');?></h2>
|
139 |
+
<?php
|
140 |
+
if ( $this->logs_deleted != '' ) {
|
141 |
+
$logs_deleted = intval( $this->logs_deleted );
|
142 |
+
|
143 |
+
if ( $logs_deleted > 0 ) {
|
144 |
+
echo "<div class = 'updated'><p>" . sprintf( _n( '1 email log deleted.', '%s email logs deleted', $logs_deleted, 'email-log' ), $logs_deleted ) . "</p></div>";
|
145 |
+
} else {
|
146 |
+
echo "<div class = 'updated'><p>" . __( 'There was some problem in deleting the email logs' , 'email-log') . "</p></div>";
|
147 |
+
}
|
148 |
+
unset($this->logs_deleted);
|
149 |
+
}
|
150 |
+
?>
|
151 |
+
<form id="email-logs-search" method="get">
|
152 |
+
<input type="hidden" name="page" value="<?php echo self::PAGE_SLUG; ?>" >
|
153 |
+
<?php
|
154 |
+
$this->logs_table->search_box( __('Search Logs', 'email-log'), 'search_id' );
|
155 |
+
?>
|
156 |
+
</form>
|
157 |
+
|
158 |
+
<form id="email-logs-filter" method="get">
|
159 |
+
<input type="hidden" name="page" value="<?php echo $_REQUEST['page'] ?>" />
|
160 |
+
<?php
|
161 |
+
wp_nonce_field( self::DELETE_LOG_ACTION, self::DELETE_LOG_NONCE_FIELD );
|
162 |
+
$this->logs_table->display();
|
163 |
+
?>
|
164 |
+
</form>
|
165 |
+
</div>
|
166 |
+
<?php
|
167 |
+
// Display credits in Footer
|
168 |
+
add_action( 'in_admin_footer', array(&$this, 'add_footer_links'));
|
169 |
+
}
|
170 |
+
|
171 |
/**
|
172 |
* Add settings Panel
|
173 |
*/
|
208 |
'option' => 'per_page'
|
209 |
)
|
210 |
);
|
211 |
+
|
212 |
+
if(!class_exists('WP_List_Table')){
|
213 |
+
require_once( ABSPATH . WPINC . '/class-wp-list-table.php' );
|
214 |
+
}
|
215 |
+
|
216 |
+
if (!class_exists( 'Email_Log_List_Table' ) ) {
|
217 |
+
require_once dirname( __FILE__ ) . '/include/class-email-log-list-table.php';
|
218 |
+
}
|
219 |
+
|
220 |
+
//Prepare Table of elements
|
221 |
+
$this->logs_table = new Email_Log_List_Table();
|
222 |
}
|
223 |
|
224 |
/**
|
265 |
printf('%1$s ' . __("plugin", 'email-log') .' | ' . __("Version", 'email-log') . ' %2$s | '. __('by', 'email-log') . ' %3$s<br />', $plugin_data['Title'], $plugin_data['Version'], $plugin_data['Author']);
|
266 |
}
|
267 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
268 |
/**
|
269 |
* Log all email to database
|
270 |
*
|
336 |
PRIMARY KEY (id)
|
337 |
);";
|
338 |
|
339 |
+
require_once( ABSPATH . 'wp-admin/upgrade.php' );
|
340 |
dbDelta($sql);
|
341 |
|
342 |
add_option(EmailLog::DB_OPTION_NAME, EmailLog::DB_VERSION);
|
include/class-email-log-list-table.php
ADDED
@@ -0,0 +1,315 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Table to display Email Logs
|
4 |
+
*
|
5 |
+
* Based on Custom List Table Example by Matt Van Andel
|
6 |
+
*
|
7 |
+
* @package Email Log
|
8 |
+
* @author Sudar
|
9 |
+
*/
|
10 |
+
class Email_Log_List_Table extends WP_List_Table {
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Set up a constructor that references the parent constructor. We
|
14 |
+
* use the parent reference to set some default configs.
|
15 |
+
*/
|
16 |
+
function __construct(){
|
17 |
+
global $status, $page;
|
18 |
+
|
19 |
+
//Set parent defaults
|
20 |
+
parent::__construct( array(
|
21 |
+
'singular' => 'email-log', //singular name of the listed records
|
22 |
+
'plural' => 'email-logs', //plural name of the listed records
|
23 |
+
'ajax' => false //does this table support ajax?
|
24 |
+
) );
|
25 |
+
}
|
26 |
+
|
27 |
+
/** ************************************************************************
|
28 |
+
* REQUIRED! This method dictates the table's columns and titles. This should
|
29 |
+
* return an array where the key is the column slug (and class) and the value
|
30 |
+
* is the column's title text. If you need a checkbox for bulk actions, refer
|
31 |
+
* to the $columns array below.
|
32 |
+
*
|
33 |
+
* The 'cb' column is treated differently than the rest. If including a checkbox
|
34 |
+
* column in your table you must create a column_cb() method. If you don't need
|
35 |
+
* bulk actions or checkboxes, simply leave the 'cb' entry out of your array.
|
36 |
+
*
|
37 |
+
* @see WP_List_Table::::single_row_columns()
|
38 |
+
* @return array An associative array containing column information: 'slugs'=>'Visible Titles'
|
39 |
+
**************************************************************************/
|
40 |
+
function get_columns(){
|
41 |
+
$columns = array(
|
42 |
+
'cb' => '<input type="checkbox" />', //Render a checkbox instead of text
|
43 |
+
'sent_date' => __('Sent at', 'email-log'),
|
44 |
+
'to' => __('To', 'email-log'),
|
45 |
+
'subject' => __('Subject', 'email-log')
|
46 |
+
);
|
47 |
+
return $columns;
|
48 |
+
}
|
49 |
+
|
50 |
+
/** ************************************************************************
|
51 |
+
* Optional. If you want one or more columns to be sortable (ASC/DESC toggle),
|
52 |
+
* you will need to register it here. This should return an array where the
|
53 |
+
* key is the column that needs to be sortable, and the value is db column to
|
54 |
+
* sort by. Often, the key and value will be the same, but this is not always
|
55 |
+
* the case (as the value is a column name from the database, not the list table).
|
56 |
+
*
|
57 |
+
* This method merely defines which columns should be sortable and makes them
|
58 |
+
* clickable - it does not handle the actual sorting. You still need to detect
|
59 |
+
* the ORDERBY and ORDER querystring variables within prepare_items() and sort
|
60 |
+
* your data accordingly (usually by modifying your query).
|
61 |
+
*
|
62 |
+
* @return array An associative array containing all the columns that should be sortable: 'slugs'=>array('data_values',bool)
|
63 |
+
**************************************************************************/
|
64 |
+
function get_sortable_columns() {
|
65 |
+
$sortable_columns = array(
|
66 |
+
'sent_date' => array('sent_date',TRUE), //true means it's already sorted
|
67 |
+
'to' => array('to_email',FALSE),
|
68 |
+
'subject' => array('subject',FALSE)
|
69 |
+
);
|
70 |
+
return $sortable_columns;
|
71 |
+
}
|
72 |
+
|
73 |
+
/** ************************************************************************
|
74 |
+
* Recommended. This method is called when the parent class can't find a method
|
75 |
+
* specifically build for a given column. Generally, it's recommended to include
|
76 |
+
* one method for each column you want to render, keeping your package class
|
77 |
+
* neat and organized. For example, if the class needs to process a column
|
78 |
+
* named 'title', it would first see if a method named $this->column_title()
|
79 |
+
* exists - if it does, that method will be used. If it doesn't, this one will
|
80 |
+
* be used. Generally, you should try to use custom column methods as much as
|
81 |
+
* possible.
|
82 |
+
*
|
83 |
+
* Since we have defined a column_title() method later on, this method doesn't
|
84 |
+
* need to concern itself with any column with a name of 'title'. Instead, it
|
85 |
+
* needs to handle everything else.
|
86 |
+
*
|
87 |
+
* For more detailed insight into how columns are handled, take a look at
|
88 |
+
* WP_List_Table::single_row_columns()
|
89 |
+
*
|
90 |
+
* @param array $item A singular item (one full row's worth of data)
|
91 |
+
* @param array $column_name The name/slug of the column to be processed
|
92 |
+
* @return string Text or HTML to be placed inside the column <td>
|
93 |
+
**************************************************************************/
|
94 |
+
function column_default($item, $column_name){
|
95 |
+
switch($column_name){
|
96 |
+
default:
|
97 |
+
return print_r($item,true); //Show the whole array for troubleshooting purposes
|
98 |
+
}
|
99 |
+
}
|
100 |
+
|
101 |
+
|
102 |
+
/** ************************************************************************
|
103 |
+
* Recommended. This is a custom column method and is responsible for what
|
104 |
+
* is rendered in any column with a name/slug of 'title'. Every time the class
|
105 |
+
* needs to render a column, it first looks for a method named
|
106 |
+
* column_{$column_title} - if it exists, that method is run. If it doesn't
|
107 |
+
* exist, column_default() is called instead.
|
108 |
+
*
|
109 |
+
* This example also illustrates how to implement rollover actions. Actions
|
110 |
+
* should be an associative array formatted as 'slug'=>'link html' - and you
|
111 |
+
* will need to generate the URLs yourself. You could even ensure the links
|
112 |
+
*
|
113 |
+
*
|
114 |
+
* @see WP_List_Table::::single_row_columns()
|
115 |
+
* @param array $item A singular item (one full row's worth of data)
|
116 |
+
* @return string Text to be placed inside the column <td>
|
117 |
+
**************************************************************************/
|
118 |
+
function column_sent_date($item){
|
119 |
+
|
120 |
+
//Build row actions
|
121 |
+
$actions = array(
|
122 |
+
'delete' => sprintf( '<a href="?page=%s&action=%s&%s=%s&%s=%s">Delete</a>',
|
123 |
+
$_REQUEST['page'],
|
124 |
+
'delete',
|
125 |
+
$this->_args['singular'],
|
126 |
+
$item->id,
|
127 |
+
EmailLog::DELETE_LOG_NONCE_FIELD,
|
128 |
+
wp_create_nonce( EmailLog::DELETE_LOG_ACTION )
|
129 |
+
),
|
130 |
+
);
|
131 |
+
|
132 |
+
$email_date = mysql2date(sprintf(__('%s @ %s', 'email-log'), get_option('date_format'), get_option('time_format')), $item->sent_date);
|
133 |
+
|
134 |
+
return sprintf('%1$s <span style="color:silver">(id:%2$s)</span>%3$s',
|
135 |
+
/*$1%s*/ $email_date,
|
136 |
+
/*$2%s*/ $item->id,
|
137 |
+
/*$3%s*/ $this->row_actions($actions)
|
138 |
+
);
|
139 |
+
}
|
140 |
+
|
141 |
+
/**
|
142 |
+
* To field
|
143 |
+
*/
|
144 |
+
function column_to( $item ) {
|
145 |
+
return stripslashes( $item->to_email );
|
146 |
+
}
|
147 |
+
|
148 |
+
/**
|
149 |
+
* Subject field
|
150 |
+
*/
|
151 |
+
function column_subject( $item ) {
|
152 |
+
return stripslashes( $item->subject );
|
153 |
+
}
|
154 |
+
|
155 |
+
/** ************************************************************************
|
156 |
+
* REQUIRED if displaying checkboxes or using bulk actions! The 'cb' column
|
157 |
+
* is given special treatment when columns are processed. It ALWAYS needs to
|
158 |
+
* have it's own method.
|
159 |
+
*
|
160 |
+
* @see WP_List_Table::::single_row_columns()
|
161 |
+
* @param array $item A singular item (one full row's worth of data)
|
162 |
+
* @return string Text to be placed inside the column <td> (movie title only)
|
163 |
+
**************************************************************************/
|
164 |
+
function column_cb($item){
|
165 |
+
return sprintf(
|
166 |
+
'<input type="checkbox" name="%1$s[]" value="%2$s" />',
|
167 |
+
/*$1%s*/ $this->_args['singular'],
|
168 |
+
/*$2%s*/ $item->id
|
169 |
+
);
|
170 |
+
}
|
171 |
+
|
172 |
+
|
173 |
+
/** ************************************************************************
|
174 |
+
* Optional. If you need to include bulk actions in your list table, this is
|
175 |
+
* the place to define them. Bulk actions are an associative array in the format
|
176 |
+
* 'slug'=>'Visible Title'
|
177 |
+
*
|
178 |
+
* If this method returns an empty value, no bulk action will be rendered. If
|
179 |
+
* you specify any bulk actions, the bulk actions box will be rendered with
|
180 |
+
* the table automatically on display().
|
181 |
+
*
|
182 |
+
* Also note that list tables are not automatically wrapped in <form> elements,
|
183 |
+
* so you will need to create those manually in order for bulk actions to function.
|
184 |
+
*
|
185 |
+
* @return array An associative array containing all the bulk actions: 'slugs'=>'Visible Titles'
|
186 |
+
**************************************************************************/
|
187 |
+
function get_bulk_actions() {
|
188 |
+
$actions = array(
|
189 |
+
'delete' => __('Delete', 'email-log')
|
190 |
+
);
|
191 |
+
return $actions;
|
192 |
+
}
|
193 |
+
|
194 |
+
|
195 |
+
/** ************************************************************************
|
196 |
+
* Optional. You can handle your bulk actions anywhere or anyhow you prefer.
|
197 |
+
* For this example package, we will handle it in the class to keep things
|
198 |
+
* clean and organized.
|
199 |
+
*
|
200 |
+
* @see $this->prepare_items()
|
201 |
+
**************************************************************************/
|
202 |
+
function process_bulk_action() {
|
203 |
+
global $EmailLog;
|
204 |
+
global $wpdb;
|
205 |
+
|
206 |
+
//Detect when a bulk action is being triggered...
|
207 |
+
if( 'delete' === $this->current_action() ) {
|
208 |
+
$nouce = $_REQUEST[EmailLog::DELETE_LOG_NONCE_FIELD ];
|
209 |
+
if ( wp_verify_nonce( $nouce, EmailLog::DELETE_LOG_ACTION ) ) {
|
210 |
+
|
211 |
+
$ids = $_GET[$this->_args['singular']];
|
212 |
+
|
213 |
+
if ( is_array( $ids ) ) {
|
214 |
+
$selected_ids = implode( ',', $ids );
|
215 |
+
} else {
|
216 |
+
$selected_ids = $ids;
|
217 |
+
}
|
218 |
+
|
219 |
+
$EmailLog->logs_deleted = $wpdb->query(
|
220 |
+
$wpdb->prepare( "DELETE FROM $EmailLog->table_name where id IN ( %s )", $selected_ids )
|
221 |
+
);
|
222 |
+
} else {
|
223 |
+
wp_die( 'Cheating, Huh? ');
|
224 |
+
}
|
225 |
+
}
|
226 |
+
}
|
227 |
+
|
228 |
+
/** ************************************************************************
|
229 |
+
* REQUIRED! This is where you prepare your data for display. This method will
|
230 |
+
* usually be used to query the database, sort and filter the data, and generally
|
231 |
+
* get it ready to be displayed. At a minimum, we should set $this->items and
|
232 |
+
* $this->set_pagination_args(), although the following properties and methods
|
233 |
+
* are frequently interacted with here...
|
234 |
+
*
|
235 |
+
* @global WPDB $wpdb
|
236 |
+
* @uses $this->_column_headers
|
237 |
+
* @uses $this->items
|
238 |
+
* @uses $this->get_columns()
|
239 |
+
* @uses $this->get_sortable_columns()
|
240 |
+
* @uses $this->get_pagenum()
|
241 |
+
* @uses $this->set_pagination_args()
|
242 |
+
**************************************************************************/
|
243 |
+
function prepare_items( $per_page ) {
|
244 |
+
global $wpdb;
|
245 |
+
global $EmailLog;
|
246 |
+
|
247 |
+
$this->_column_headers = $this->get_column_info();
|
248 |
+
|
249 |
+
/**
|
250 |
+
* Optional. You can handle your bulk actions however you see fit. In this
|
251 |
+
* case, we'll handle them within our package just to keep things clean.
|
252 |
+
*/
|
253 |
+
$this->process_bulk_action();
|
254 |
+
|
255 |
+
/**
|
256 |
+
* REQUIRED for pagination. Let's figure out what page the user is currently
|
257 |
+
* looking at. We'll need this later, so you should always include it in
|
258 |
+
* your own package classes.
|
259 |
+
*/
|
260 |
+
$current_page = $this->get_pagenum();
|
261 |
+
|
262 |
+
$query = "SELECT * FROM " . $EmailLog->table_name;
|
263 |
+
|
264 |
+
if ( isset( $_GET['s'] ) ) {
|
265 |
+
$search_term = $wpdb->escape( $_GET['s'] );
|
266 |
+
|
267 |
+
$query .= " WHERE to_email LIKE '%$search_term%' OR subject LIKE '%$search_term%' ";
|
268 |
+
}
|
269 |
+
|
270 |
+
/* -- Ordering parameters -- */
|
271 |
+
//Parameters that are going to be used to order the result
|
272 |
+
$orderby = !empty( $_GET["orderby"] ) ? $wpdb->escape( $_GET["orderby"] ) : 'sent_date';
|
273 |
+
$order = !empty( $_GET["order"] ) ? $wpdb->escape( $_GET["order"] ) : 'DESC';
|
274 |
+
|
275 |
+
if(!empty($orderby) & !empty($order)) {
|
276 |
+
$query .= ' ORDER BY ' . $orderby . ' ' . $order;
|
277 |
+
}
|
278 |
+
|
279 |
+
/* -- Pagination parameters -- */
|
280 |
+
$total_items = $wpdb->query( $query ); //return the total number of affected rows
|
281 |
+
|
282 |
+
//Which page is this?
|
283 |
+
$current_page = !empty( $_GET["paged"] ) ? $wpdb->escape( $_GET["paged"] ) : '';
|
284 |
+
//Page Number
|
285 |
+
if( empty( $current_page ) || !is_numeric( $current_page ) || $current_page <= 0 ) {
|
286 |
+
$current_page = 1;
|
287 |
+
}
|
288 |
+
|
289 |
+
//adjust the query to take pagination into account
|
290 |
+
if( !empty( $current_page ) && !empty( $per_page ) ) {
|
291 |
+
$offset = ($current_page-1) * $per_page;
|
292 |
+
$query .= ' LIMIT ' . (int)$offset . ',' . (int)$per_page;
|
293 |
+
}
|
294 |
+
|
295 |
+
/* -- Fetch the items -- */
|
296 |
+
$this->items = $wpdb->get_results( $query );
|
297 |
+
|
298 |
+
/**
|
299 |
+
* register our pagination options & calculations.
|
300 |
+
*/
|
301 |
+
$this->set_pagination_args( array(
|
302 |
+
'total_items' => $total_items,
|
303 |
+
'per_page' => $per_page,
|
304 |
+
'total_pages' => ceil( $total_items/$per_page )
|
305 |
+
) );
|
306 |
+
}
|
307 |
+
|
308 |
+
/**
|
309 |
+
* If no items are found
|
310 |
+
*/
|
311 |
+
function no_items() {
|
312 |
+
_e('Your email log is empty', 'email-log');
|
313 |
+
}
|
314 |
+
}
|
315 |
+
?>
|
languages/email-log.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the same license as the Email Log package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Email Log 1.
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/email-log\n"
|
7 |
-
"POT-Creation-Date: 2013-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -12,253 +12,102 @@ msgstr ""
|
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
|
15 |
-
#: email-log.php:
|
16 |
msgid "Buy Addons"
|
17 |
msgstr ""
|
18 |
|
19 |
-
#. #-#-#-#-# email-log.pot (Email Log 1.
|
20 |
#. Plugin Name of the plugin/theme
|
21 |
-
#: email-log.php:
|
22 |
msgid "Email Log"
|
23 |
msgstr ""
|
24 |
|
25 |
-
#: email-log.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
msgid "About Plugin"
|
27 |
msgstr ""
|
28 |
|
29 |
-
#: email-log.php:
|
30 |
msgid ""
|
31 |
"Email Log WordPress Plugin, allows you to log all emails that are sent "
|
32 |
"through WordPress."
|
33 |
msgstr ""
|
34 |
|
35 |
-
#: email-log.php:
|
36 |
msgid "More information"
|
37 |
msgstr ""
|
38 |
|
39 |
-
#: email-log.php:
|
40 |
msgid "Plugin Homepage/support"
|
41 |
msgstr ""
|
42 |
|
43 |
-
#: email-log.php:
|
44 |
msgid "Plugin author's blog"
|
45 |
msgstr ""
|
46 |
|
47 |
-
#: email-log.php:
|
48 |
msgid "Other Plugin's by Author"
|
49 |
msgstr ""
|
50 |
|
51 |
-
#: email-log.php:
|
52 |
msgid "Entries per page"
|
53 |
msgstr ""
|
54 |
|
55 |
-
#: email-log.php:
|
56 |
msgid "Log"
|
57 |
msgstr ""
|
58 |
|
59 |
-
#: email-log.php:
|
60 |
msgid "plugin"
|
61 |
msgstr ""
|
62 |
|
63 |
-
#: email-log.php:
|
64 |
msgid "Version"
|
65 |
msgstr ""
|
66 |
|
67 |
-
#: email-log.php:
|
68 |
msgid "by"
|
69 |
msgstr ""
|
70 |
|
71 |
-
#:
|
72 |
-
msgid "
|
73 |
-
msgstr ""
|
74 |
-
|
75 |
-
#: email-log.php:247
|
76 |
-
msgid "The selected Email Logs have been deleted."
|
77 |
-
msgstr ""
|
78 |
-
|
79 |
-
#: email-log.php:249
|
80 |
-
msgid "An error has occurred while deleting the selected Email logs"
|
81 |
-
msgstr ""
|
82 |
-
|
83 |
-
#: email-log.php:258
|
84 |
-
msgid "All Email Logs for email id \"%s\" have been deleted."
|
85 |
-
msgstr ""
|
86 |
-
|
87 |
-
#: email-log.php:260
|
88 |
-
msgid ""
|
89 |
-
"An error has occurred while deleting all Email Logs for email id \"%s\"."
|
90 |
-
msgstr ""
|
91 |
-
|
92 |
-
#: email-log.php:268
|
93 |
-
msgid "All Email Logs with subject \"%s\" have been deleted."
|
94 |
-
msgstr ""
|
95 |
-
|
96 |
-
#: email-log.php:270
|
97 |
-
msgid ""
|
98 |
-
"An error has occurred while deleting all Email Logs with subject \"%s\"."
|
99 |
msgstr ""
|
100 |
|
101 |
-
#: email-log.php:
|
102 |
-
msgid "
|
103 |
-
msgstr ""
|
104 |
-
|
105 |
-
#: email-log.php:280
|
106 |
-
msgid "An error has occurred while deleting all Email Logs"
|
107 |
-
msgstr ""
|
108 |
-
|
109 |
-
#: email-log.php:310 email-log.php:418 email-log.php:500 email-log.php:537
|
110 |
-
msgid "ID"
|
111 |
-
msgstr ""
|
112 |
-
|
113 |
-
#: email-log.php:314 email-log.php:419 email-log.php:619
|
114 |
-
msgid "To Email"
|
115 |
msgstr ""
|
116 |
|
117 |
-
#:
|
118 |
-
#: email-log.php:621
|
119 |
msgid "Subject"
|
120 |
msgstr ""
|
121 |
|
122 |
-
#: email-log
|
123 |
-
msgid "Date"
|
124 |
-
msgstr ""
|
125 |
-
|
126 |
-
#: email-log.php:330 email-log.php:425
|
127 |
-
msgid "Ascending"
|
128 |
-
msgstr ""
|
129 |
-
|
130 |
-
#: email-log.php:335 email-log.php:426
|
131 |
-
msgid "Descending"
|
132 |
-
msgstr ""
|
133 |
-
|
134 |
-
#: email-log.php:404
|
135 |
-
msgid "Filter Options:"
|
136 |
-
msgstr ""
|
137 |
-
|
138 |
-
#: email-log.php:406
|
139 |
-
msgid "ID:"
|
140 |
-
msgstr ""
|
141 |
-
|
142 |
-
#: email-log.php:408
|
143 |
-
msgid "To Email:"
|
144 |
-
msgstr ""
|
145 |
-
|
146 |
-
#: email-log.php:410
|
147 |
-
msgid "Subject:"
|
148 |
-
msgstr ""
|
149 |
-
|
150 |
-
#: email-log.php:415
|
151 |
-
msgid "Sort Options:"
|
152 |
-
msgstr ""
|
153 |
-
|
154 |
-
#: email-log.php:431
|
155 |
-
msgid "Filter"
|
156 |
-
msgstr ""
|
157 |
-
|
158 |
-
#: email-log.php:436
|
159 |
-
msgid ""
|
160 |
-
"Displaying <strong>%s</strong> to <strong>%s</strong> of <strong>%s</strong> "
|
161 |
-
"Email log entries."
|
162 |
-
msgstr ""
|
163 |
-
|
164 |
-
#: email-log.php:437
|
165 |
-
msgid "Sorted by <strong>%s</strong> in <strong>%s</strong> order."
|
166 |
-
msgstr ""
|
167 |
-
|
168 |
-
#: email-log.php:449 email-log.php:552
|
169 |
-
msgid "Previous Page"
|
170 |
-
msgstr ""
|
171 |
-
|
172 |
-
#: email-log.php:456 email-log.php:559
|
173 |
-
msgid "Pages (%s): "
|
174 |
-
msgstr ""
|
175 |
-
|
176 |
-
#: email-log.php:459 email-log.php:562
|
177 |
-
msgid "Go to First Page"
|
178 |
-
msgstr ""
|
179 |
-
|
180 |
-
#: email-log.php:459 email-log.php:562
|
181 |
-
msgid "First"
|
182 |
-
msgstr ""
|
183 |
-
|
184 |
-
#: email-log.php:462 email-log.php:474 email-log.php:565 email-log.php:577
|
185 |
-
msgid "Go to Page"
|
186 |
-
msgstr ""
|
187 |
-
|
188 |
-
#: email-log.php:469 email-log.php:572
|
189 |
-
msgid "Page"
|
190 |
-
msgstr ""
|
191 |
-
|
192 |
-
#: email-log.php:477 email-log.php:580
|
193 |
-
msgid "Go to Last Page"
|
194 |
-
msgstr ""
|
195 |
-
|
196 |
-
#: email-log.php:477 email-log.php:580
|
197 |
-
msgid "Last"
|
198 |
-
msgstr ""
|
199 |
-
|
200 |
-
#: email-log.php:484 email-log.php:587
|
201 |
-
msgid "Next Page"
|
202 |
-
msgstr ""
|
203 |
-
|
204 |
-
#: email-log.php:501 email-log.php:538
|
205 |
-
msgid "Date / Time"
|
206 |
-
msgstr ""
|
207 |
-
|
208 |
-
#: email-log.php:502 email-log.php:539
|
209 |
-
msgid "To"
|
210 |
-
msgstr ""
|
211 |
-
|
212 |
-
#: email-log.php:517
|
213 |
msgid "%s @ %s"
|
214 |
msgstr ""
|
215 |
|
216 |
-
#: email-log.php:
|
217 |
-
msgid "
|
218 |
-
msgstr ""
|
219 |
-
|
220 |
-
#: email-log.php:607
|
221 |
-
msgid "Delete Type : "
|
222 |
-
msgstr ""
|
223 |
-
|
224 |
-
#: email-log.php:610
|
225 |
-
msgid "Selected entries"
|
226 |
msgstr ""
|
227 |
|
228 |
-
#: email-log.php:
|
229 |
-
msgid "
|
230 |
-
msgstr ""
|
231 |
-
|
232 |
-
#: email-log.php:612
|
233 |
-
msgid "All Logs"
|
234 |
-
msgstr ""
|
235 |
-
|
236 |
-
#: email-log.php:617
|
237 |
-
msgid "Condition:"
|
238 |
-
msgstr ""
|
239 |
-
|
240 |
-
#: email-log.php:620
|
241 |
-
msgid "or"
|
242 |
-
msgstr ""
|
243 |
-
|
244 |
-
#: email-log.php:626
|
245 |
-
msgid ""
|
246 |
-
"You Are About To Delete Email Logs.\\nThis Action Is Not Reversible.\\n\\n "
|
247 |
-
"Choose \\'Cancel\\' to stop, \\'OK\\' to delete."
|
248 |
-
msgstr ""
|
249 |
-
|
250 |
-
#: email-log.php:633
|
251 |
-
msgid "Pro Addon"
|
252 |
-
msgstr ""
|
253 |
-
|
254 |
-
#: email-log.php:635
|
255 |
-
msgid ""
|
256 |
-
"You can <a href = \"http://sudarmuthu.com/out/buy-email-log-forward-email-"
|
257 |
-
"addon\">buy the Forward email pro addon</a>, which allows you to send a copy "
|
258 |
-
"of all the emails send from WordPress, to another email address. The addon "
|
259 |
-
"allows you to choose whether you want to forward through to, cc or bcc "
|
260 |
-
"fields. This can be extremely useful when you want to debug by analyzing the "
|
261 |
-
"emails that are sent from WordPress. The cost of the addon is $15."
|
262 |
msgstr ""
|
263 |
|
264 |
#. Plugin URI of the plugin/theme
|
2 |
# This file is distributed under the same license as the Email Log package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Email Log 1.5\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/email-log\n"
|
7 |
+
"POT-Creation-Date: 2013-09-09 05:38:25+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
|
15 |
+
#: email-log.php:114
|
16 |
msgid "Buy Addons"
|
17 |
msgstr ""
|
18 |
|
19 |
+
#. #-#-#-#-# email-log.pot (Email Log 1.5) #-#-#-#-#
|
20 |
#. Plugin Name of the plugin/theme
|
21 |
+
#: email-log.php:124
|
22 |
msgid "Email Log"
|
23 |
msgstr ""
|
24 |
|
25 |
+
#: email-log.php:138
|
26 |
+
msgid "Email Logs"
|
27 |
+
msgstr ""
|
28 |
+
|
29 |
+
#: email-log.php:144
|
30 |
+
msgid "1 email log deleted."
|
31 |
+
msgid_plural "%s email logs deleted"
|
32 |
+
msgstr[0] ""
|
33 |
+
msgstr[1] ""
|
34 |
+
|
35 |
+
#: email-log.php:146
|
36 |
+
msgid "There was some problem in deleting the email logs"
|
37 |
+
msgstr ""
|
38 |
+
|
39 |
+
#: email-log.php:154
|
40 |
+
msgid "Search Logs"
|
41 |
+
msgstr ""
|
42 |
+
|
43 |
+
#: email-log.php:187
|
44 |
msgid "About Plugin"
|
45 |
msgstr ""
|
46 |
|
47 |
+
#: email-log.php:189
|
48 |
msgid ""
|
49 |
"Email Log WordPress Plugin, allows you to log all emails that are sent "
|
50 |
"through WordPress."
|
51 |
msgstr ""
|
52 |
|
53 |
+
#: email-log.php:196
|
54 |
msgid "More information"
|
55 |
msgstr ""
|
56 |
|
57 |
+
#: email-log.php:197
|
58 |
msgid "Plugin Homepage/support"
|
59 |
msgstr ""
|
60 |
|
61 |
+
#: email-log.php:198
|
62 |
msgid "Plugin author's blog"
|
63 |
msgstr ""
|
64 |
|
65 |
+
#: email-log.php:199
|
66 |
msgid "Other Plugin's by Author"
|
67 |
msgstr ""
|
68 |
|
69 |
+
#: email-log.php:206
|
70 |
msgid "Entries per page"
|
71 |
msgstr ""
|
72 |
|
73 |
+
#: email-log.php:255
|
74 |
msgid "Log"
|
75 |
msgstr ""
|
76 |
|
77 |
+
#: email-log.php:265
|
78 |
msgid "plugin"
|
79 |
msgstr ""
|
80 |
|
81 |
+
#: email-log.php:265
|
82 |
msgid "Version"
|
83 |
msgstr ""
|
84 |
|
85 |
+
#: email-log.php:265
|
86 |
msgid "by"
|
87 |
msgstr ""
|
88 |
|
89 |
+
#: include/class-email-log-list-table.php:43
|
90 |
+
msgid "Sent at"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
msgstr ""
|
92 |
|
93 |
+
#: include/class-email-log-list-table.php:44
|
94 |
+
msgid "To"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
msgstr ""
|
96 |
|
97 |
+
#: include/class-email-log-list-table.php:45
|
|
|
98 |
msgid "Subject"
|
99 |
msgstr ""
|
100 |
|
101 |
+
#: include/class-email-log-list-table.php:132
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
msgid "%s @ %s"
|
103 |
msgstr ""
|
104 |
|
105 |
+
#: include/class-email-log-list-table.php:189
|
106 |
+
msgid "Delete"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
msgstr ""
|
108 |
|
109 |
+
#: include/class-email-log-list-table.php:312
|
110 |
+
msgid "Your email log is empty"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
msgstr ""
|
112 |
|
113 |
#. Plugin URI of the plugin/theme
|
readme.txt
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
=== Email Log ===
|
2 |
Contributors: sudar
|
3 |
Tags: email, wpmu, wordpress-mu, log
|
4 |
-
Requires at least:
|
5 |
-
Tested up to: 3.
|
6 |
-
Stable tag: 1.
|
7 |
|
8 |
Logs every email sent through WordPress. Compatible with WPMU too.
|
9 |
|
@@ -41,7 +41,6 @@ If you are looking for ideas, then you can start with one of the following TODO
|
|
41 |
|
42 |
The following are the features that I am thinking of adding to the Plugin, when I get some free time. If you have any feature request or want to increase the priority of a particular feature, then let me know.
|
43 |
|
44 |
-
- Revamp the Admin UI, by following [this technique](http://wp.smashingmagazine.com/2011/11/03/native-admin-tables-wordpress/)
|
45 |
- Add option to automatically delete the logs periodically
|
46 |
- Make it MU compatible
|
47 |
- Add the ability to view the entire email
|
@@ -73,13 +72,11 @@ You can also checkout some of the [other Plugins that I have released][5].
|
|
73 |
The Plugin currently has translations for the following languages.
|
74 |
|
75 |
* German (Thanks Frank)
|
76 |
-
* Lithuanian (Thanks Vincent G
|
77 |
* Dutch (Thanks Zjan Preijde)
|
78 |
|
79 |
The pot file is available with the Plugin. If you are willing to do translation for the Plugin, use the pot file to create the .po files for your language and let me know. I will add it to the Plugin after giving credit to you.
|
80 |
|
81 |
-
[6]: http://www.host1free.com
|
82 |
-
|
83 |
== Installation ==
|
84 |
|
85 |
### Normal WordPress installations
|
@@ -151,6 +148,9 @@ Extract the zip file and drop the contents in the wp-content/plugins/ directory
|
|
151 |
= v1.1 (2013-04-27) - (Dev time: 0.5 hour) =
|
152 |
* Added more documentation
|
153 |
|
|
|
|
|
|
|
154 |
== Upgrade Notice ==
|
155 |
|
156 |
= 0.9.2 =
|
@@ -159,6 +159,9 @@ Added filters for more customizing
|
|
159 |
= 1.0 =
|
160 |
Added support for buying pro addons
|
161 |
|
|
|
|
|
|
|
162 |
== Readme Generator ==
|
163 |
|
164 |
This Readme file was generated using <a href = 'http://sudarmuthu.com/wordpress/wp-readme'>wp-readme</a>, which generates readme files for WordPress Plugins.
|
1 |
=== Email Log ===
|
2 |
Contributors: sudar
|
3 |
Tags: email, wpmu, wordpress-mu, log
|
4 |
+
Requires at least: 3.3
|
5 |
+
Tested up to: 3.6
|
6 |
+
Stable tag: 1.5
|
7 |
|
8 |
Logs every email sent through WordPress. Compatible with WPMU too.
|
9 |
|
41 |
|
42 |
The following are the features that I am thinking of adding to the Plugin, when I get some free time. If you have any feature request or want to increase the priority of a particular feature, then let me know.
|
43 |
|
|
|
44 |
- Add option to automatically delete the logs periodically
|
45 |
- Make it MU compatible
|
46 |
- Add the ability to view the entire email
|
72 |
The Plugin currently has translations for the following languages.
|
73 |
|
74 |
* German (Thanks Frank)
|
75 |
+
* Lithuanian (Thanks Vincent G)
|
76 |
* Dutch (Thanks Zjan Preijde)
|
77 |
|
78 |
The pot file is available with the Plugin. If you are willing to do translation for the Plugin, use the pot file to create the .po files for your language and let me know. I will add it to the Plugin after giving credit to you.
|
79 |
|
|
|
|
|
80 |
== Installation ==
|
81 |
|
82 |
### Normal WordPress installations
|
148 |
= v1.1 (2013-04-27) - (Dev time: 0.5 hour) =
|
149 |
* Added more documentation
|
150 |
|
151 |
+
= v1.5 (2013-09-09) - (Dev time: 10 hours) =
|
152 |
+
* Rewrote Admin interface using native tables
|
153 |
+
|
154 |
== Upgrade Notice ==
|
155 |
|
156 |
= 0.9.2 =
|
159 |
= 1.0 =
|
160 |
Added support for buying pro addons
|
161 |
|
162 |
+
= 1.5 =
|
163 |
+
Rewrote Admin interface using native tables
|
164 |
+
|
165 |
== Readme Generator ==
|
166 |
|
167 |
This Readme file was generated using <a href = 'http://sudarmuthu.com/wordpress/wp-readme'>wp-readme</a>, which generates readme files for WordPress Plugins.
|