Email Log - Version 2.4.3

Version Description

Download this release

Release Info

Developer sudar
Plugin Icon 128x128 Email Log
Version 2.4.3
Comparing to
See all releases

Code changes from version 2.4.2 to 2.4.3

email-log.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: Logs every email sent through WordPress
6
  * Donate Link: http://sudarmuthu.com/if-you-wanna-thank-me
7
  * Author: Sudar
8
- * Version: 2.4.2
9
  * Author URI: http://sudarmuthu.com/
10
  * Text Domain: email-log
11
  * Domain Path: languages/
5
  * Description: Logs every email sent through WordPress
6
  * Donate Link: http://sudarmuthu.com/if-you-wanna-thank-me
7
  * Author: Sudar
8
+ * Version: 2.4.3
9
  * Author URI: http://sudarmuthu.com/
10
  * Text Domain: email-log
11
  * Domain Path: languages/
include/Core/EmailLog.php CHANGED
@@ -17,7 +17,7 @@ class EmailLog {
17
  *
18
  * @var string
19
  */
20
- const VERSION = '2.4.2';
21
 
22
  /**
23
  * Email Log Store URL.
17
  *
18
  * @var string
19
  */
20
+ const VERSION = '2.4.3';
21
 
22
  /**
23
  * Email Log Store URL.
include/Core/Request/NonceChecker.php CHANGED
@@ -58,16 +58,28 @@ class NonceChecker implements Loadie {
58
  $action = sanitize_text_field( $_REQUEST['action2'] );
59
  }
60
 
61
- if ( strpos( $action, 'el-log-list-' ) !== 0 ) {
62
  return;
63
  }
64
 
65
- if ( ! isset( $_REQUEST[ LogListPage::LOG_LIST_ACTION_NONCE_FIELD ] ) ) {
66
- return;
 
 
 
 
 
 
67
  }
68
 
69
- if ( ! wp_verify_nonce( $_REQUEST[ LogListPage::LOG_LIST_ACTION_NONCE_FIELD ], LogListPage::LOG_LIST_ACTION_NONCE ) ) {
70
- return;
 
 
 
 
 
 
71
  }
72
  }
73
 
58
  $action = sanitize_text_field( $_REQUEST['action2'] );
59
  }
60
 
61
+ if ( strpos( $action, 'el-log-list-' ) !== 0 && strpos( $action, 'el-cron-' ) !== 0 ) {
62
  return;
63
  }
64
 
65
+ if ( strpos( $action, 'el-log-list-' ) === 0 ) {
66
+ if ( ! isset( $_REQUEST[ LogListPage::LOG_LIST_ACTION_NONCE_FIELD ] ) ) {
67
+ return;
68
+ }
69
+
70
+ if ( ! wp_verify_nonce( $_REQUEST[ LogListPage::LOG_LIST_ACTION_NONCE_FIELD ], LogListPage::LOG_LIST_ACTION_NONCE ) ) {
71
+ return;
72
+ }
73
  }
74
 
75
+ if ( strpos( $action, 'el-cron-' ) === 0 ) {
76
+ if ( ! isset( $_REQUEST[ $action . '-nonce-field' ] ) ) {
77
+ return;
78
+ }
79
+
80
+ if ( ! wp_verify_nonce( $_REQUEST[ $action . '-nonce-field' ], $action . '-nonce' ) ) {
81
+ return;
82
+ }
83
  }
84
  }
85
 
include/Core/UI/ListTable/LogListTable.php CHANGED
@@ -1,6 +1,7 @@
1
  <?php namespace EmailLog\Core\UI\ListTable;
2
 
3
  use EmailLog\Util;
 
4
 
5
  if ( ! class_exists( 'WP_List_Table' ) ) {
6
  require_once ABSPATH . WPINC . '/class-wp-list-table.php';
@@ -141,7 +142,12 @@ class LogListTable extends \WP_List_Table {
141
  */
142
  protected function column_sent_date( $item ) {
143
  $email_date = mysql2date(
144
- sprintf( __( '%s @ %s', 'email-log' ), get_option( 'date_format', 'F j, Y' ), 'g:i:s a' ),
 
 
 
 
 
145
  $item->sent_date
146
  );
147
 
1
  <?php namespace EmailLog\Core\UI\ListTable;
2
 
3
  use EmailLog\Util;
4
+ use function EmailLog\Util\get_display_format_for_log_time;
5
 
6
  if ( ! class_exists( 'WP_List_Table' ) ) {
7
  require_once ABSPATH . WPINC . '/class-wp-list-table.php';
142
  */
143
  protected function column_sent_date( $item ) {
144
  $email_date = mysql2date(
145
+ sprintf(
146
+ /* translators: 1 Date of the log, 2 Time of the log */
147
+ __( '%1$s @ %2$s', 'email-log' ),
148
+ get_option( 'date_format', 'F j, Y' ),
149
+ get_display_format_for_log_time()
150
+ ),
151
  $item->sent_date
152
  );
153
 
include/Util/helper.php CHANGED
@@ -184,6 +184,31 @@ function get_user_defined_date_time_format() {
184
  return sprintf( '%1$s %2$s', get_option( 'date_format', 'Y-m-d' ), get_option( 'time_format', 'g:i a' ) );
185
  }
186
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
187
  /**
188
  * Gets the value by key from the array.
189
  *
184
  return sprintf( '%1$s %2$s', get_option( 'date_format', 'Y-m-d' ), get_option( 'time_format', 'g:i a' ) );
185
  }
186
 
187
+ /**
188
+ * Get the display format for displaying the email log time.
189
+ *
190
+ * @since 2.4.3
191
+ *
192
+ * @return string Email log time display format.
193
+ */
194
+ function get_display_format_for_log_time() {
195
+ $default_time_format = get_option( 'time_format', 'g:i:s a' );
196
+
197
+ if ( false === stripos( $default_time_format, 's' ) ) {
198
+ /* translators: Email Log time display format, see http://php.net/date */
199
+ $default_time_format = __( 'g:i:s a', 'email-log' );
200
+ }
201
+
202
+ /**
203
+ * Filter the time format string for displaying log time.
204
+ *
205
+ * @since 2.4.3
206
+ *
207
+ * @param string $default_time_format Default time format.
208
+ */
209
+ return apply_filters( 'el_log_time_display_format', $default_time_format );
210
+ }
211
+
212
  /**
213
  * Gets the value by key from the array.
214
  *
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 2.4.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/email-log\n"
7
- "POT-Creation-Date: 2020-07-07 13:45:01+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -195,15 +195,15 @@ msgid ""
195
  "our %1s add-on."
196
  msgstr ""
197
 
198
- #: include/Core/Request/LogListAction.php:64 include/Util/helper.php:323
199
  msgid "Sent at"
200
  msgstr ""
201
 
202
- #: include/Core/Request/LogListAction.php:68 include/Util/helper.php:319
203
  msgid "To"
204
  msgstr ""
205
 
206
- #: include/Core/Request/LogListAction.php:72 include/Util/helper.php:320
207
  msgid "Subject"
208
  msgstr ""
209
 
@@ -277,36 +277,37 @@ msgstr ""
277
  msgid "<a href=\"%s\">Addons</a>"
278
  msgstr ""
279
 
280
- #: include/Core/UI/ListTable/LogListTable.php:144
281
- msgid "%s @ %s"
 
282
  msgstr ""
283
 
284
- #: include/Core/UI/ListTable/LogListTable.php:162
285
  msgid "Email Content"
286
  msgstr ""
287
 
288
- #: include/Core/UI/ListTable/LogListTable.php:163
289
  msgid "View Content"
290
  msgstr ""
291
 
292
- #: include/Core/UI/ListTable/LogListTable.php:177
293
- #: include/Core/UI/ListTable/LogListTable.php:292
294
  msgid "Delete"
295
  msgstr ""
296
 
297
- #: include/Core/UI/ListTable/LogListTable.php:293
298
  msgid "Delete All Logs"
299
  msgstr ""
300
 
301
- #: include/Core/UI/ListTable/LogListTable.php:326
302
  msgid "Your email log is empty"
303
  msgstr ""
304
 
305
- #: include/Core/UI/ListTable/LogListTable.php:353
306
  msgid "Search by date"
307
  msgstr ""
308
 
309
- #: include/Core/UI/ListTable/LogListTable.php:354
310
  msgid "Search by term"
311
  msgstr ""
312
 
@@ -504,39 +505,44 @@ msgid_plural " email logs"
504
  msgstr[0] ""
505
  msgstr[1] ""
506
 
507
- #: include/Util/helper.php:318
 
 
 
 
 
508
  msgid "ID"
509
  msgstr ""
510
 
511
- #: include/Util/helper.php:321
512
  msgid "Message"
513
  msgstr ""
514
 
515
- #: include/Util/helper.php:322
516
  msgid "Attachment"
517
  msgstr ""
518
 
519
- #: include/Util/helper.php:324
520
  msgid "From"
521
  msgstr ""
522
 
523
- #: include/Util/helper.php:325
524
  msgid "CC"
525
  msgstr ""
526
 
527
- #: include/Util/helper.php:326
528
  msgid "BCC"
529
  msgstr ""
530
 
531
- #: include/Util/helper.php:327
532
  msgid "Reply To"
533
  msgstr ""
534
 
535
- #: include/Util/helper.php:328
536
  msgid "IP Address"
537
  msgstr ""
538
 
539
- #: include/Util/helper.php:329
540
  msgid "Sent Status"
541
  msgstr ""
542
 
2
  # This file is distributed under the same license as the Email Log package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Email Log 2.4.3\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/email-log\n"
7
+ "POT-Creation-Date: 2020-10-09 06:19:12+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
195
  "our %1s add-on."
196
  msgstr ""
197
 
198
+ #: include/Core/Request/LogListAction.php:64 include/Util/helper.php:348
199
  msgid "Sent at"
200
  msgstr ""
201
 
202
+ #: include/Core/Request/LogListAction.php:68 include/Util/helper.php:344
203
  msgid "To"
204
  msgstr ""
205
 
206
+ #: include/Core/Request/LogListAction.php:72 include/Util/helper.php:345
207
  msgid "Subject"
208
  msgstr ""
209
 
277
  msgid "<a href=\"%s\">Addons</a>"
278
  msgstr ""
279
 
280
+ #: include/Core/UI/ListTable/LogListTable.php:147
281
+ #. translators: 1 Date of the log, 2 Time of the log
282
+ msgid "%1$s @ %2$s"
283
  msgstr ""
284
 
285
+ #: include/Core/UI/ListTable/LogListTable.php:168
286
  msgid "Email Content"
287
  msgstr ""
288
 
289
+ #: include/Core/UI/ListTable/LogListTable.php:169
290
  msgid "View Content"
291
  msgstr ""
292
 
293
+ #: include/Core/UI/ListTable/LogListTable.php:183
294
+ #: include/Core/UI/ListTable/LogListTable.php:298
295
  msgid "Delete"
296
  msgstr ""
297
 
298
+ #: include/Core/UI/ListTable/LogListTable.php:299
299
  msgid "Delete All Logs"
300
  msgstr ""
301
 
302
+ #: include/Core/UI/ListTable/LogListTable.php:332
303
  msgid "Your email log is empty"
304
  msgstr ""
305
 
306
+ #: include/Core/UI/ListTable/LogListTable.php:359
307
  msgid "Search by date"
308
  msgstr ""
309
 
310
+ #: include/Core/UI/ListTable/LogListTable.php:360
311
  msgid "Search by term"
312
  msgstr ""
313
 
505
  msgstr[0] ""
506
  msgstr[1] ""
507
 
508
+ #: include/Util/helper.php:199
509
+ #. translators: Email Log time display format, see http:php.net/date
510
+ msgid "g:i:s a"
511
+ msgstr ""
512
+
513
+ #: include/Util/helper.php:343
514
  msgid "ID"
515
  msgstr ""
516
 
517
+ #: include/Util/helper.php:346
518
  msgid "Message"
519
  msgstr ""
520
 
521
+ #: include/Util/helper.php:347
522
  msgid "Attachment"
523
  msgstr ""
524
 
525
+ #: include/Util/helper.php:349
526
  msgid "From"
527
  msgstr ""
528
 
529
+ #: include/Util/helper.php:350
530
  msgid "CC"
531
  msgstr ""
532
 
533
+ #: include/Util/helper.php:351
534
  msgid "BCC"
535
  msgstr ""
536
 
537
+ #: include/Util/helper.php:352
538
  msgid "Reply To"
539
  msgstr ""
540
 
541
+ #: include/Util/helper.php:353
542
  msgid "IP Address"
543
  msgstr ""
544
 
545
+ #: include/Util/helper.php:354
546
  msgid "Sent Status"
547
  msgstr ""
548
 
readme.txt CHANGED
@@ -4,18 +4,19 @@ Tags: email, log, log email, resend email, multisite
4
  Requires PHP: 5.6
5
  Requires at least: 4.0
6
  Tested up to: 5.5
7
- Stable tag: 2.4.2
8
 
9
- Log and view all outgoing emails from WordPress. Works with WordPress Multisite as well.
10
 
11
  == Description ==
12
 
13
- Email Log is a WordPress plugin that allows you to easily log and view all emails sent from WordPress.
14
 
15
- This would be very useful for debugging email related problems in your WordPress site or for storing sent emails for auditing purposes.
16
 
17
  You can perform advanced actions like re-sending email, automatically forwarding emails or export logs with our [premium add-ons](https://wpemaillog.com/store/?utm_campaign=Upsell&utm_medium=wporg&utm_source=readme&utm_content=store).
18
 
 
19
  ### Viewing logged emails
20
 
21
  The logged emails will be stored in a separate table and can be viewed from the admin interface.
@@ -132,6 +133,11 @@ Meanwhile, I have added a hack to handle this condition in v1.7.3 of my plugin.
132
  This Readme file was generated using <a href = 'http://sudarmuthu.com/wordpress/wp-readme'>wp-readme</a>, which generates readme files for WordPress Plugins.
133
  == Changelog ==
134
 
 
 
 
 
 
135
  = v2.4.2 – (2020-07-07) =
136
  - Fix: Fixed issues with email preview tab switcher that occurred in some installations.
137
  - Tweak: Enhanced the UI for lifetime license activation.
4
  Requires PHP: 5.6
5
  Requires at least: 4.0
6
  Tested up to: 5.5
7
+ Stable tag: 2.4.3
8
 
9
+ Log and view all outgoing emails from WordPress. Very useful if you have to debug email related problems or have to store sent emails for auditing.
10
 
11
  == Description ==
12
 
13
+ Email Log is a WordPress plugin that allows you to easily log and view all emails that were sent from WordPress.
14
 
15
+ This would be very useful for debugging email related problems in your WordPress site or for storing sent emails for auditing purposes, especially on ecommerce sites that are setup with either WooCommerce or Easy Digital Downloads.
16
 
17
  You can perform advanced actions like re-sending email, automatically forwarding emails or export logs with our [premium add-ons](https://wpemaillog.com/store/?utm_campaign=Upsell&utm_medium=wporg&utm_source=readme&utm_content=store).
18
 
19
+ Works with WordPress Multisite as well.
20
  ### Viewing logged emails
21
 
22
  The logged emails will be stored in a separate table and can be viewed from the admin interface.
133
  This Readme file was generated using <a href = 'http://sudarmuthu.com/wordpress/wp-readme'>wp-readme</a>, which generates readme files for WordPress Plugins.
134
  == Changelog ==
135
 
136
+ = v2.4.3 – (2020-10-09) =
137
+ - New: Added `el_log_time_display_format` filter to change the email log display time.
138
+ - New: Provide an option for translators to override the email log display time.
139
+ - Tweak: Enhanced the nonce check.
140
+
141
  = v2.4.2 – (2020-07-07) =
142
  - Fix: Fixed issues with email preview tab switcher that occurred in some installations.
143
  - Tweak: Enhanced the UI for lifetime license activation.