Email Log - Version 2.3.2

Version Description

Download this release

Release Info

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

Code changes from version 2.3.1 to 2.3.2

assets/css/admin/addon-list.css CHANGED
@@ -26,7 +26,7 @@
26
  }
27
  }
28
 
29
- @media screen and (min-width:990px) and (max-width:1199px) {
30
  .el-addon {
31
  float: left;
32
  width: 45%;
@@ -42,7 +42,7 @@
42
  }
43
  }
44
 
45
- @media screen and (min-width:1200px) {
46
  .el-addon {
47
  float: left;
48
  width: 30%;
@@ -72,7 +72,7 @@
72
  padding-bottom: 10px;
73
  }
74
 
75
- .bundle-license .el-license {
76
  font-size: 1.7em;
77
  }
78
 
@@ -89,10 +89,6 @@
89
  padding-top: 10px;
90
  }
91
 
92
- .individual-license .button {
93
- margin-top: -2px;
94
- }
95
-
96
  .el-expander {
97
  float: right;
98
  font-size: 40px;
26
  }
27
  }
28
 
29
+ @media screen and (min-width:990px) and (max-width:1274px) {
30
  .el-addon {
31
  float: left;
32
  width: 45%;
42
  }
43
  }
44
 
45
+ @media screen and (min-width:1275px) {
46
  .el-addon {
47
  float: left;
48
  width: 30%;
72
  padding-bottom: 10px;
73
  }
74
 
75
+ .bundle-license .el-license, .bundle-license .button {
76
  font-size: 1.7em;
77
  }
78
 
89
  padding-top: 10px;
90
  }
91
 
 
 
 
 
92
  .el-expander {
93
  float: right;
94
  font-size: 40px;
assets/css/admin/view-logs.css CHANGED
@@ -31,3 +31,20 @@
31
  #TB_ajaxContent {
32
  padding-bottom: 10px !important; /* Override the default Thickbox css values. */
33
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  #TB_ajaxContent {
32
  padding-bottom: 10px !important; /* Override the default Thickbox css values. */
33
  }
34
+
35
+ #el-pro-msg {
36
+ display: inline-block;
37
+ margin: 7px 0;
38
+ }
39
+
40
+ .column-result .dashicons {
41
+ font-size: xx-large;
42
+ }
43
+
44
+ .column-result .dashicons-yes-alt {
45
+ color: #00C853;
46
+ }
47
+
48
+ .column-result .dashicons-dismiss {
49
+ color: #E53935;
50
+ }
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.3.1
9
  * Author URI: http://sudarmuthu.com/
10
  * Text Domain: email-log
11
  * Domain Path: languages/
@@ -29,7 +29,7 @@
29
  defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
30
 
31
  // Include the stub of the old `EmailLog` class, so that old add-ons don't generate a fatal error.
32
- include_once plugin_dir_path( __FILE__ ) . 'include/compatibility/EmailLog.php';
33
 
34
  if ( version_compare( PHP_VERSION, '5.3.0', '<' ) ) {
35
  /**
@@ -74,3 +74,6 @@ if ( version_compare( PHP_VERSION, '5.3.0', '<' ) ) {
74
  // PHP is at least 5.3, so we can safely include namespace code.
75
  require_once 'load-email-log.php';
76
  load_email_log( __FILE__ );
 
 
 
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.3.2
9
  * Author URI: http://sudarmuthu.com/
10
  * Text Domain: email-log
11
  * Domain Path: languages/
29
  defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
30
 
31
  // Include the stub of the old `EmailLog` class, so that old add-ons don't generate a fatal error.
32
+ require_once plugin_dir_path( __FILE__ ) . 'include/compatibility/EmailLog.php';
33
 
34
  if ( version_compare( PHP_VERSION, '5.3.0', '<' ) ) {
35
  /**
74
  // PHP is at least 5.3, so we can safely include namespace code.
75
  require_once 'load-email-log.php';
76
  load_email_log( __FILE__ );
77
+
78
+ // Fix compatibility issues with wpmandrill plugin.
79
+ require_once plugin_dir_path( __FILE__ ) . 'include/compatibility/wpmandrill.php';
include/Addon/Addon.php CHANGED
@@ -213,7 +213,7 @@ class Addon {
213
 
214
  <div class="individual-license <?php echo sanitize_html_class( $license_wrap ); ?>">
215
  <form method="post">
216
- <input type="text" name="el-license" class="el-license" size="36"
217
  title="<?php _e( 'Email Log License Key', 'email-log' ); ?>"
218
  placeholder="<?php echo esc_attr( sprintf( __( '%s Add-on License Key', 'email-log' ), $this->name ) ); ?>"
219
  value="<?php echo esc_attr( $this->get_addon_license_key() ); ?>">
213
 
214
  <div class="individual-license <?php echo sanitize_html_class( $license_wrap ); ?>">
215
  <form method="post">
216
+ <input type="text" name="el-license" class="el-license" size="33"
217
  title="<?php _e( 'Email Log License Key', 'email-log' ); ?>"
218
  placeholder="<?php echo esc_attr( sprintf( __( '%s Add-on License Key', 'email-log' ), $this->name ) ); ?>"
219
  value="<?php echo esc_attr( $this->get_addon_license_key() ); ?>">
include/Addon/EmailLogAddon.php CHANGED
@@ -1,5 +1,7 @@
1
  <?php namespace EmailLog\Addon;
2
 
 
 
3
  defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
4
 
5
  /**
@@ -7,7 +9,7 @@ defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
7
  *
8
  * @since 2.0.0
9
  */
10
- abstract class EmailLogAddon {
11
 
12
  protected $addon_file;
13
  protected $addon_name = '';
1
  <?php namespace EmailLog\Addon;
2
 
3
+ use EmailLog\Core\Loadie;
4
+
5
  defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
6
 
7
  /**
9
  *
10
  * @since 2.0.0
11
  */
12
+ abstract class EmailLogAddon implements Loadie {
13
 
14
  protected $addon_file;
15
  protected $addon_name = '';
include/Addon/License/Licenser.php CHANGED
@@ -143,12 +143,14 @@ final class Licenser implements Loadie {
143
  placeholder="<?php _e( 'Email Log Bundle License Key', 'email-log' ); ?>"
144
  value="<?php echo esc_attr( $this->bundle_license->get_license_key() ); ?>">
145
 
146
- <input type="submit" class="button button-large <?php echo sanitize_html_class( $button_class ); ?>"
147
  value="<?php echo esc_attr( $action_text ); ?>">
148
 
149
- <p class="<?php echo esc_attr( $expiry_details_class ); ?>">
150
- <?php echo $expiry_details; ?>
151
- </p>
 
 
152
 
153
  <input type="hidden" name="el-action" value="<?php echo esc_attr( $action ); ?>">
154
 
143
  placeholder="<?php _e( 'Email Log Bundle License Key', 'email-log' ); ?>"
144
  value="<?php echo esc_attr( $this->bundle_license->get_license_key() ); ?>">
145
 
146
+ <input type="submit" class="button <?php echo sanitize_html_class( $button_class ); ?>"
147
  value="<?php echo esc_attr( $action_text ); ?>">
148
 
149
+ <?php if ( ! empty( $expiry_details ) ) : ?>
150
+ <p class="<?php echo esc_attr( $expiry_details_class ); ?>">
151
+ <?php echo $expiry_details; ?>
152
+ </p>
153
+ <?php endif; ?>
154
 
155
  <input type="hidden" name="el-action" value="<?php echo esc_attr( $action ); ?>">
156
 
include/Core/DB/TableManager.php CHANGED
@@ -353,22 +353,21 @@ class TableManager implements Loadie {
353
  }
354
 
355
  /**
356
- * Fetches the log item by the item data.
357
  *
358
- * Use this method to get the log item when the error instance only returns the log item data.
359
  *
360
- * @param array $data Array of Email information. {
 
 
 
 
 
 
361
  *
362
- * @type array|string to
363
- * @type string subject
364
- * @type string message
365
- * @type array|string headers
366
- * @type array|string attachments
367
- * }
368
- *
369
- * @return int
370
  */
371
- public function fetch_log_item_by_item_data( $data ) {
372
  if ( empty( $data ) || ! is_array( $data ) ) {
373
  return 0;
374
  }
@@ -383,7 +382,7 @@ class TableManager implements Loadie {
383
  // Execute the following `if` conditions only when $data is array.
384
  if ( array_key_exists( 'to', $data ) ) {
385
  // Since the value is stored as CSV in DB, convert the values from error data to CSV to compare.
386
- $to_email = Util\join_array_elements_with_delimiter( $data['to'] );
387
 
388
  $to_email = trim( esc_sql( $to_email ) );
389
  $where[] = "to_email = '$to_email'";
@@ -424,7 +423,7 @@ class TableManager implements Loadie {
424
  *
425
  * @param int $log_item_id ID of the log item whose email sent status should be set to failed.
426
  */
427
- public function set_log_item_fail_status_by_id( $log_item_id ) {
428
  global $wpdb;
429
  $table_name = $this->get_log_table_name();
430
 
@@ -445,11 +444,7 @@ class TableManager implements Loadie {
445
  * @since 2.3.0
446
  */
447
  private function update_table_if_needed() {
448
- $existing_db_version = get_option( self::DB_OPTION_NAME, false );
449
- $updated_db_version = self::DB_VERSION;
450
-
451
- // Bail out when the DB version is `0.1` or equals to self::DB_VERSION
452
- if ( ! $existing_db_version || $existing_db_version !== '0.1' || $existing_db_version === $updated_db_version ) {
453
  return;
454
  }
455
 
@@ -536,7 +531,7 @@ class TableManager implements Loadie {
536
  // Execute the following `if` conditions only when $data is array.
537
  if ( array_key_exists( 'to', $columns ) ) {
538
  // Since the value is stored as CSV in DB, convert the values from error data to CSV to compare.
539
- $to_email = Util\join_array_elements_with_delimiter( $columns['to'] );
540
 
541
  $to_email = trim( esc_sql( $to_email ) );
542
  $where[] = "to_email = '$to_email'";
353
  }
354
 
355
  /**
356
+ * Fetches the log id by item data.
357
  *
358
+ * Use this method to get the log item id when the error instance only returns the log item data.
359
  *
360
+ * @param array $data Array of Email information {
361
+ * @type array|string to
362
+ * @type string subject
363
+ * @type string message
364
+ * @type array|string headers
365
+ * @type array|string attachments
366
+ * }
367
  *
368
+ * @return int Log item id.
 
 
 
 
 
 
 
369
  */
370
+ public function fetch_log_id_by_data( $data ) {
371
  if ( empty( $data ) || ! is_array( $data ) ) {
372
  return 0;
373
  }
382
  // Execute the following `if` conditions only when $data is array.
383
  if ( array_key_exists( 'to', $data ) ) {
384
  // Since the value is stored as CSV in DB, convert the values from error data to CSV to compare.
385
+ $to_email = Util\stringify( $data['to'] );
386
 
387
  $to_email = trim( esc_sql( $to_email ) );
388
  $where[] = "to_email = '$to_email'";
423
  *
424
  * @param int $log_item_id ID of the log item whose email sent status should be set to failed.
425
  */
426
+ public function mark_log_as_failed( $log_item_id ) {
427
  global $wpdb;
428
  $table_name = $this->get_log_table_name();
429
 
444
  * @since 2.3.0
445
  */
446
  private function update_table_if_needed() {
447
+ if ( get_option( self::DB_OPTION_NAME, false ) === self::DB_VERSION ) {
 
 
 
 
448
  return;
449
  }
450
 
531
  // Execute the following `if` conditions only when $data is array.
532
  if ( array_key_exists( 'to', $columns ) ) {
533
  // Since the value is stored as CSV in DB, convert the values from error data to CSV to compare.
534
+ $to_email = Util\stringify( $columns['to'] );
535
 
536
  $to_email = trim( esc_sql( $to_email ) );
537
  $where[] = "to_email = '$to_email'";
include/Core/EmailLog.php CHANGED
@@ -17,7 +17,7 @@ class EmailLog {
17
  *
18
  * @var string
19
  */
20
- const VERSION = '2.3.1';
21
 
22
  /**
23
  * Email Log Store URL.
17
  *
18
  * @var string
19
  */
20
+ const VERSION = '2.3.2';
21
 
22
  /**
23
  * Email Log Store URL.
include/Core/EmailLogger.php CHANGED
@@ -13,101 +13,109 @@ class EmailLogger implements Loadie {
13
  */
14
  public function load() {
15
  add_filter( 'wp_mail', array( $this, 'log_email' ) );
16
- add_action( 'wp_mail_failed', array( $this, 'update_email_fail_status' ) );
 
 
 
 
 
 
 
 
 
 
 
17
  }
18
 
19
  /**
20
  * Logs email to database.
21
  *
22
- * @param array $mail_info Information about email.
23
  *
24
  * @return array Information about email.
25
  */
26
- public function log_email( $mail_info ) {
27
- $email_log = email_log();
28
  /**
29
  * Hook to modify wp_mail contents before Email Log plugin logs.
30
  *
31
- * @since Genesis
32
- *
33
- * @param array $mail_info {
34
  * @type string|array $to
35
  * @type string $subject
36
  * @type string $message
37
- * @type string $headers
38
- * @type string $attachment
39
  * @type string|array $headers
40
  * @type string|array $attachment
41
  * }
 
 
42
  */
43
- $mail_info = apply_filters( 'el_wp_mail_log', $mail_info );
44
 
45
  // Sometimes the array passed to the `wp_mail` filter may not contain all the required keys.
46
  // See https://wordpress.org/support/topic/illegal-string-offset-attachments/.
47
- $cleaned_mail_info = wp_parse_args(
48
- $mail_info,
49
  array(
50
- 'attachments' => array(),
51
  'to' => '',
52
  'subject' => '',
 
53
  'headers' => '',
 
54
  )
55
  );
56
 
57
- // ! empty() check on attachments handles both empty string and empty array.
58
- $data = array(
59
- 'attachments' => ( ! empty( $cleaned_mail_info['attachments'] ) ) ? 'true' : 'false',
60
- 'subject' => $cleaned_mail_info['subject'],
61
- 'headers' => is_array( $cleaned_mail_info['headers'] ) ? implode( "\n", $cleaned_mail_info['headers'] ) : $cleaned_mail_info['headers'],
 
62
  'sent_date' => current_time( 'mysql' ),
63
- 'attachment_name' => implode( ',', $cleaned_mail_info['attachments'] ),
64
- // TODO: Improve the Client's IP using https://www.virendrachandak.com/techtalk/getting-real-client-ip-address-in-php-2/.
65
  'ip_address' => $_SERVER['REMOTE_ADDR'],
66
  'result' => 1,
67
  );
68
 
69
- $to = '';
70
- if ( empty( $cleaned_mail_info['to'] ) ) {
71
- $to = '';
72
- } elseif ( is_array( $cleaned_mail_info['to'] ) ) {
73
- $to = implode( ',', $cleaned_mail_info['to'] );
74
  } else {
75
- $to = $cleaned_mail_info['to'];
76
  }
77
 
78
- $data['to_email'] = $to;
79
-
80
- $message = '';
81
-
82
- if ( isset( $cleaned_mail_info['message'] ) ) {
83
- $message = $cleaned_mail_info['message'];
84
- } else {
85
- // wpmandrill plugin is changing "message" key to "html". See https://github.com/sudar/email-log/issues/20
86
- // Ideally this should be fixed in wpmandrill, but I am including this hack here till it is fixed by them.
87
- if ( isset( $cleaned_mail_info['html'] ) ) {
88
- $message = $cleaned_mail_info['html'];
89
- }
90
- }
91
-
92
- $data['message'] = $message;
93
 
94
- $email_log->table_manager->insert_log( $data );
 
95
 
96
  /**
97
  * Fires the `el_email_log_inserted` action right after the log is inserted in to DB.
98
  *
99
- * @param array $data {
 
 
100
  * @type string $to
101
  * @type string $subject
102
  * @type string $message
103
  * @type string $headers
104
  * @type string $attachments
 
105
  * @type string $sent_date
 
 
106
  * }
107
  */
108
- do_action( 'el_email_log_inserted', $data );
109
 
110
- return $mail_info;
111
  }
112
 
113
  /**
@@ -117,26 +125,72 @@ class EmailLogger implements Loadie {
117
  *
118
  * @param \WP_Error $wp_error The error instance.
119
  */
120
- public function update_email_fail_status( $wp_error ) {
121
  if ( ! ( $wp_error instanceof \WP_Error ) ) {
122
  return;
123
  }
124
 
125
- $email_log = email_log();
126
  $mail_error_data = $wp_error->get_error_data( 'wp_mail_failed' );
127
 
128
- // $mail_error_data can be of type mixed.
129
- if ( ! is_array( $mail_error_data ) ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
130
  return;
131
  }
132
 
133
- // @see wp-includes/pluggable.php#484
134
- $log_item_id = $email_log->table_manager->fetch_log_item_by_item_data( $mail_error_data );
135
- // Empty will handle 0 and return FALSE.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
136
  if ( empty( $log_item_id ) ) {
137
  return;
138
  }
139
 
140
- $email_log->table_manager->set_log_item_fail_status_by_id( $log_item_id );
141
  }
142
  }
13
  */
14
  public function load() {
15
  add_filter( 'wp_mail', array( $this, 'log_email' ) );
16
+ add_action( 'wp_mail_failed', array( $this, 'on_email_failed' ) );
17
+
18
+ /**
19
+ * These actions are required for logging BuddyPress emails, since BuddyPress does
20
+ * not use wp_mail for sending emails.
21
+ *
22
+ * Support for BuddyPress was added in v2.3.2
23
+ *
24
+ * @link https://github.com/sudar/email-log/issues/249
25
+ */
26
+ add_action( 'bp_send_email_success', array( $this, 'log_buddy_press_email' ), 10, 2 );
27
+ add_action( 'bp_send_email_failure', array( $this, 'log_buddy_press_email' ), 10, 2 );
28
  }
29
 
30
  /**
31
  * Logs email to database.
32
  *
33
+ * @param array $original_mail_info Information about email.
34
  *
35
  * @return array Information about email.
36
  */
37
+ public function log_email( $original_mail_info ) {
 
38
  /**
39
  * Hook to modify wp_mail contents before Email Log plugin logs.
40
  *
41
+ * @param array $original_mail_info {
 
 
42
  * @type string|array $to
43
  * @type string $subject
44
  * @type string $message
 
 
45
  * @type string|array $headers
46
  * @type string|array $attachment
47
  * }
48
+ *
49
+ * @since 2.0.0
50
  */
51
+ $original_mail_info = apply_filters( 'el_wp_mail_log', $original_mail_info );
52
 
53
  // Sometimes the array passed to the `wp_mail` filter may not contain all the required keys.
54
  // See https://wordpress.org/support/topic/illegal-string-offset-attachments/.
55
+ $mail_info = wp_parse_args(
56
+ $original_mail_info,
57
  array(
 
58
  'to' => '',
59
  'subject' => '',
60
+ 'message' => '',
61
  'headers' => '',
62
+ 'attachments' => array(),
63
  )
64
  );
65
 
66
+ $log = array(
67
+ 'to_email' => \EmailLog\Util\stringify( $mail_info['to'] ),
68
+ 'subject' => $mail_info['subject'],
69
+ 'message' => $mail_info['message'],
70
+ 'headers' => \EmailLog\Util\stringify( $mail_info['headers'], "\n" ),
71
+ 'attachment_name' => \EmailLog\Util\stringify( $mail_info['attachments'] ),
72
  'sent_date' => current_time( 'mysql' ),
 
 
73
  'ip_address' => $_SERVER['REMOTE_ADDR'],
74
  'result' => 1,
75
  );
76
 
77
+ if ( empty( $log['attachment_name'] ) ) {
78
+ $log['attachments'] = 'false';
 
 
 
79
  } else {
80
+ $log['attachments'] = 'true';
81
  }
82
 
83
+ /**
84
+ * Filters the mail info right before inserting on the table.
85
+ *
86
+ * Masked fields would use this filter to avoid modifying the original data sent to
87
+ * `wp_mail() function`
88
+ *
89
+ * @param array $log Email Log that is about to be inserted into db.
90
+ * @param array $original_mail_info Original mail info that was passed to `wp_mail` filter.
91
+ *
92
+ * @since 2.3.2
93
+ */
94
+ $log = apply_filters( 'el_email_log_before_insert', $log, $original_mail_info );
 
 
 
95
 
96
+ $email_log = email_log();
97
+ $email_log->table_manager->insert_log( $log );
98
 
99
  /**
100
  * Fires the `el_email_log_inserted` action right after the log is inserted in to DB.
101
  *
102
+ * @since 2.3.0
103
+ *
104
+ * @param array $log {
105
  * @type string $to
106
  * @type string $subject
107
  * @type string $message
108
  * @type string $headers
109
  * @type string $attachments
110
+ * @type string $attachment_name
111
  * @type string $sent_date
112
+ * @type string $ip_address
113
+ * @type bool $result
114
  * }
115
  */
116
+ do_action( 'el_email_log_inserted', $log );
117
 
118
+ return $original_mail_info;
119
  }
120
 
121
  /**
125
  *
126
  * @param \WP_Error $wp_error The error instance.
127
  */
128
+ public function on_email_failed( $wp_error ) {
129
  if ( ! ( $wp_error instanceof \WP_Error ) ) {
130
  return;
131
  }
132
 
133
+ // @see wp-includes/pluggable.php#500
134
  $mail_error_data = $wp_error->get_error_data( 'wp_mail_failed' );
135
 
136
+ $this->mark_email_log_as_failed( $mail_error_data );
137
+ }
138
+
139
+ /**
140
+ * Prepare BuddyPress emails to log into database.
141
+ *
142
+ * @since 2.3.2
143
+ *
144
+ * @param bool $status Mail sent status.
145
+ * @param \BP_Email $bp_mail Information about email.
146
+ */
147
+ public function log_buddy_press_email( $status, $bp_mail ) {
148
+ if ( ! class_exists( '\\BP_Email' ) ) {
149
+ return;
150
+ }
151
+
152
+ if ( $bp_mail instanceof \BP_Email ) {
153
  return;
154
  }
155
 
156
+ $log = array(
157
+ 'to' => array_shift( $bp_mail->get_to() )->get_address(),
158
+ 'subject' => $bp_mail->get_subject( 'replace-tokens' ),
159
+ 'message' => $bp_mail->get_content( 'replace-tokens' ),
160
+ 'headers' => $bp_mail->get_headers( 'replace-tokens ' ),
161
+ );
162
+
163
+ $this->log_email( $log );
164
+
165
+ if ( ! $status ) {
166
+ $this->mark_email_log_as_failed( $log );
167
+ }
168
+ }
169
+
170
+ /**
171
+ * Mark email log as failed.
172
+ *
173
+ * @since 2.3.2
174
+ *
175
+ * @param array $log Email Log.
176
+ */
177
+ protected function mark_email_log_as_failed( $log ) {
178
+ if ( ! is_array( $log ) ) {
179
+ return;
180
+ }
181
+
182
+ if ( ! isset( $log['to'], $log['subject'] ) ) {
183
+ return;
184
+ }
185
+
186
+ $email_log = email_log();
187
+
188
+ $log_item_id = $email_log->table_manager->fetch_log_id_by_data( $log );
189
+
190
  if ( empty( $log_item_id ) ) {
191
  return;
192
  }
193
 
194
+ $email_log->table_manager->mark_log_as_failed( $log_item_id );
195
  }
196
  }
include/Core/Request/NonceChecker.php CHANGED
@@ -25,9 +25,13 @@ class NonceChecker implements Loadie {
25
  * Check nonce for all Email Log Requests.
26
  * All Email Log Requests will have the `el_` prefix and
27
  * nonce would be available at `el_{action_name}_nonce`.
 
 
 
 
28
  */
29
  public function check_nonce() {
30
- if ( ! isset( $_POST['el-action'] ) && ! isset( $_REQUEST['action'] ) ) {
31
  return;
32
  }
33
 
@@ -43,10 +47,18 @@ class NonceChecker implements Loadie {
43
  }
44
  }
45
 
46
- if ( isset( $_REQUEST['action'] ) ) {
47
  $action = sanitize_text_field( $_REQUEST['action'] );
48
 
49
- if ( 'el-log-list-' !== substr( $action, 0, 12 ) ) {
 
 
 
 
 
 
 
 
50
  return;
51
  }
52
 
25
  * Check nonce for all Email Log Requests.
26
  * All Email Log Requests will have the `el_` prefix and
27
  * nonce would be available at `el_{action_name}_nonce`.
28
+ *
29
+ * Bulk Action keys.
30
+ * action => Bulk actions from the top dropdown.
31
+ * action2 => Bulk actions from the bottom dropdown.
32
  */
33
  public function check_nonce() {
34
+ if ( ! isset( $_POST['el-action'] ) && ! isset( $_REQUEST['action'] ) && ! isset( $_REQUEST['action2'] ) ) {
35
  return;
36
  }
37
 
47
  }
48
  }
49
 
50
+ if ( isset( $_REQUEST['action'] ) || isset( $_REQUEST['action2'] ) ) {
51
  $action = sanitize_text_field( $_REQUEST['action'] );
52
 
53
+ if ( '-1' === $action ) {
54
+ if ( ! isset( $_REQUEST['action2'] ) ) {
55
+ return;
56
+ }
57
+
58
+ $action = sanitize_text_field( $_REQUEST['action2'] );
59
+ }
60
+
61
+ if ( strpos( $action, 'el-log-list-' ) !== 0 ) {
62
  return;
63
  }
64
 
include/Core/UI/Component/AdminUIEnhancer.php CHANGED
@@ -75,7 +75,7 @@ class AdminUIEnhancer {
75
  /**
76
  * Add link to 'View logs' page in plugin listing page.
77
  *
78
- * @since 2.4.0 Added Settings link.
79
  *
80
  * @param array $links List of links.
81
  *
75
  /**
76
  * Add link to 'View logs' page in plugin listing page.
77
  *
78
+ * @since 2.3.0 Added Settings link.
79
  *
80
  * @param array $links List of links.
81
  *
include/Core/UI/ListTable/LogListTable.php CHANGED
@@ -62,24 +62,26 @@ class LogListTable extends \WP_List_Table {
62
  * Returns the list of column and title names.
63
  *
64
  * @since 2.3.0 Retrieve Column labels using Utility methods.
 
65
  * @see WP_List_Table::single_row_columns()
66
  *
67
- * @uses \EmailLog\Util\get_column_label_by_column()
68
  *
69
  * @return array An associative array containing column information: 'slugs'=>'Visible Titles'.
70
  */
71
  public function get_columns() {
72
  $columns = array(
73
- 'cb' => '<input type="checkbox" />', // Render a checkbox instead of text.
74
- 'sent_date' => Util\get_column_label_by_db_column( 'sent_date' ),
75
- 'to' => Util\get_column_label_by_db_column( 'to' ),
76
- 'subject' => Util\get_column_label_by_db_column( 'subject' ),
77
  );
78
 
 
 
 
 
79
  /**
80
  * Filter the email log list table columns.
81
  *
82
- * @since 2.0
83
  *
84
  * @param array $columns Columns of email log list table.
85
  */
@@ -97,7 +99,7 @@ class LogListTable extends \WP_List_Table {
97
  protected function get_sortable_columns() {
98
  $sortable_columns = array(
99
  'sent_date' => array( 'sent_date', true ), // true means it's already sorted.
100
- 'to' => array( 'to_email', false ),
101
  'subject' => array( 'subject', false ),
102
  );
103
 
@@ -197,7 +199,7 @@ class LogListTable extends \WP_List_Table {
197
  *
198
  * @return string
199
  */
200
- protected function column_to( $item ) {
201
  /**
202
  * Filters the `To` field before outputting on the table.
203
  *
@@ -205,7 +207,7 @@ class LogListTable extends \WP_List_Table {
205
  *
206
  * @param string $email `To` field
207
  */
208
- $email = apply_filters( 'el_row_email', esc_html( $item->to_email ) );
209
 
210
  return $email;
211
  }
@@ -240,6 +242,31 @@ class LogListTable extends \WP_List_Table {
240
  );
241
  }
242
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
243
  /**
244
  * Specify the list of bulk actions.
245
  *
62
  * Returns the list of column and title names.
63
  *
64
  * @since 2.3.0 Retrieve Column labels using Utility methods.
65
+ * @since 2.3.2 Added `result` column.
66
  * @see WP_List_Table::single_row_columns()
67
  *
68
+ * @uses \EmailLog\Util\get_column_label()
69
  *
70
  * @return array An associative array containing column information: 'slugs'=>'Visible Titles'.
71
  */
72
  public function get_columns() {
73
  $columns = array(
74
+ 'cb' => '<input type="checkbox" />', // Render a checkbox instead of heading.
 
 
 
75
  );
76
 
77
+ foreach ( array( 'sent_date', 'result', 'to_email', 'subject' ) as $column ) {
78
+ $columns[ $column ] = Util\get_column_label( $column );
79
+ }
80
+
81
  /**
82
  * Filter the email log list table columns.
83
  *
84
+ * @since 2.0.0
85
  *
86
  * @param array $columns Columns of email log list table.
87
  */
99
  protected function get_sortable_columns() {
100
  $sortable_columns = array(
101
  'sent_date' => array( 'sent_date', true ), // true means it's already sorted.
102
+ 'to_email' => array( 'to_email', false ),
103
  'subject' => array( 'subject', false ),
104
  );
105
 
199
  *
200
  * @return string
201
  */
202
+ protected function column_to_email( $item ) {
203
  /**
204
  * Filters the `To` field before outputting on the table.
205
  *
207
  *
208
  * @param string $email `To` field
209
  */
210
+ $email = apply_filters( 'el_log_list_column_to_email', esc_html( $item->to_email ) );
211
 
212
  return $email;
213
  }
242
  );
243
  }
244
 
245
+ /**
246
+ * Markup for Status column.
247
+ *
248
+ * @since 2.3.2
249
+ *
250
+ * @access protected
251
+ *
252
+ * @param object $item Email Log item.
253
+ *
254
+ * @return string Column markup.
255
+ */
256
+ protected function column_result( $item ) {
257
+ // For older records that does not have value in the result column,
258
+ // $item->result will be null.
259
+ if ( is_null( $item->result ) ) {
260
+ return '';
261
+ }
262
+
263
+ if ( $item->result ) {
264
+ return \EmailLog\Util\get_success_icon();
265
+ }
266
+
267
+ return \EmailLog\Util\get_failure_icon();
268
+ }
269
+
270
  /**
271
  * Specify the list of bulk actions.
272
  *
include/Util/helper.php CHANGED
@@ -67,7 +67,17 @@ function sanitize_email_with_name( $string ) {
67
  function get_log_columns_to_export() {
68
 
69
  if ( is_plugin_active( 'email-log-more-fields/email-log-more-fields.php' ) ) {
70
- return array( 'id', 'sent_date', 'to_email', 'subject', 'from', 'cc', 'bcc', 'reply-to', 'attachment' );
 
 
 
 
 
 
 
 
 
 
71
  }
72
 
73
  return array( 'id', 'sent_date', 'to_email', 'subject' );
@@ -107,29 +117,58 @@ function checked_array( $values, $current ) {
107
  return;
108
  }
109
 
110
- if ( in_array( $current, $values ) ) {
111
  echo "checked='checked'";
112
  }
113
  }
114
 
115
  /**
116
- * Returns Comma separated values of the given array elements.
117
  *
118
- * Use $delimiter param to join elements other than `,`.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
  *
120
  * @since 2.3.0
 
121
  *
122
- * @param array|string $value The array whose values are to be joined.
123
- * @param string $delimiter Optional. Default is `,`.
124
  *
125
- * @return string
126
  */
127
- function join_array_elements_with_delimiter( $value, $delimiter = ',' ) {
128
- if ( is_array( $value ) ) {
129
- return implode( $delimiter, $value );
130
  }
131
 
132
- return is_string( $value ) ? $value : '';
133
  }
134
 
135
  /**
@@ -152,7 +191,7 @@ function get_user_defined_date_time_format() {
152
  * @used-by \EmailLog\Addon\UI\Setting\DashboardWidget
153
  * @used-by \EmailLog\Core\UI\Component\AutoDeleteLogsSetting
154
  *
155
- * @since 2.3.0
156
  */
157
  function render_auto_delete_logs_next_run_schedule() {
158
  ?>
@@ -253,47 +292,71 @@ function get_advanced_search_url() {
253
  /**
254
  * Gets the Column labels to be used in LogList table.
255
  *
 
 
256
  * @since 2.3.0
 
257
  *
258
- * @param string $db_column
259
  *
260
- * @return string
261
  */
262
  function get_column_label_by_db_column( $db_column ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
263
  $labels = array(
264
  'id' => __( 'ID', 'email-log' ),
265
- 'sent_date' => __( 'Sent at', 'email-log' ),
266
- 'to' => __( 'To', 'email-log' ), // EmailLog\Core\UI\ListTable::get_columns() uses `to`
267
  'to_email' => __( 'To', 'email-log' ),
268
  'subject' => __( 'Subject', 'email-log' ),
269
  'message' => __( 'Message', 'email-log' ),
 
 
270
  'from' => __( 'From', 'email-log' ),
271
  'cc' => __( 'CC', 'email-log' ),
272
  'bcc' => __( 'BCC', 'email-log' ),
273
- 'reply-to' => __( 'Reply To', 'email-log' ),
274
- 'attachments' => __( 'Attachment', 'email-log' ),
275
- 'attachment' => __( 'Attachment', 'email-log' ),
276
  );
277
 
278
  /**
279
  * Filters the Labels used through out the Email Log plugin.
280
  *
281
- * @since 2.3.0
282
  *
283
- * @param array $labels {
284
- * List of DB Columns and its respective labels.
285
- *
286
- * Example:
287
- * 'id' => __( 'ID', 'email-log' ),
288
- *
289
- * @type string $key DB Column or any key for which a Label would be required. Accepts a internationalized string as Label.
290
- * }
291
  */
292
- $labels = apply_filters( 'el_db_column_labels', $labels );
293
-
294
- if ( array_key_exists( $db_column, $labels ) ) {
295
- return $labels[ $db_column ];
296
- }
297
-
298
- return $db_column;
299
  }
67
  function get_log_columns_to_export() {
68
 
69
  if ( is_plugin_active( 'email-log-more-fields/email-log-more-fields.php' ) ) {
70
+ return array(
71
+ 'id',
72
+ 'sent_date',
73
+ 'to_email',
74
+ 'subject',
75
+ 'from',
76
+ 'cc',
77
+ 'bcc',
78
+ 'reply-to',
79
+ 'attachment',
80
+ );
81
  }
82
 
83
  return array( 'id', 'sent_date', 'to_email', 'subject' );
117
  return;
118
  }
119
 
120
+ if ( in_array( $current, $values, true ) ) {
121
  echo "checked='checked'";
122
  }
123
  }
124
 
125
  /**
126
+ * Return failure icon.
127
  *
128
+ * @since 2.3.2
129
+ *
130
+ * @return string Failure icon markup.
131
+ */
132
+ function get_failure_icon() {
133
+ return <<<EOT
134
+ <span class="dashicons dashicons-dismiss"></span>
135
+ EOT;
136
+ }
137
+
138
+ /**
139
+ * Return success icon.
140
+ *
141
+ * @since 2.3.2
142
+ *
143
+ * @return string Success icon markup.
144
+ */
145
+ function get_success_icon() {
146
+ return <<<EOT
147
+ <span class="dashicons dashicons-yes-alt"></span>
148
+ EOT;
149
+
150
+ }
151
+
152
+ /**
153
+ * Stringify arrays.
154
+ *
155
+ * If the parameter is an array, then return delimiter separated values of the array.
156
+ * Otherwise return the parameter.
157
  *
158
  * @since 2.3.0
159
+ * @since 2.3.2 Renamed name to `Stringify`.
160
  *
161
+ * @param array|string $may_be_array The array whose values are to be converted to string.
162
+ * @param string $delimiter Optional. Default is `,`.
163
  *
164
+ * @return string Stringified value.
165
  */
166
+ function stringify( $may_be_array, $delimiter = ',' ) {
167
+ if ( ! is_array( $may_be_array ) ) {
168
+ return (string) $may_be_array;
169
  }
170
 
171
+ return implode( $delimiter, $may_be_array );
172
  }
173
 
174
  /**
191
  * @used-by \EmailLog\Addon\UI\Setting\DashboardWidget
192
  * @used-by \EmailLog\Core\UI\Component\AutoDeleteLogsSetting
193
  *
194
+ * @since 2.3.0
195
  */
196
  function render_auto_delete_logs_next_run_schedule() {
197
  ?>
292
  /**
293
  * Gets the Column labels to be used in LogList table.
294
  *
295
+ * Deprecated. This is currently used by Email Log - Export Logs add-on v1.2.1 and will eventually be removed.
296
+ *
297
  * @since 2.3.0
298
+ * @since 2.3.2 Deprecated.
299
  *
300
+ * @param string $db_column Column ID.
301
  *
302
+ * @return string Column label.
303
  */
304
  function get_column_label_by_db_column( $db_column ) {
305
+ return get_column_label( $db_column );
306
+ }
307
+
308
+ /**
309
+ * Get Column label based on column name.
310
+ *
311
+ * @since 2.3.2
312
+ *
313
+ * @param string $column_name Column name.
314
+ *
315
+ * @return string Column label.
316
+ */
317
+ function get_column_label( $column_name ) {
318
+ $labels = get_column_label_map();
319
+
320
+ if ( ! array_key_exists( $column_name, $labels ) ) {
321
+ return $column_name;
322
+ }
323
+
324
+ return $labels[ $column_name ];
325
+ }
326
+
327
+ /**
328
+ * Returns an array of Email Log columns.
329
+ *
330
+ * Keys are the column names in the DB.
331
+ * This holds true except for CC, BCC & Reply To as they are put under one column `headers`.
332
+ *
333
+ * @since 2.3.2
334
+ *
335
+ * @return array Key value pair of Email Log columns.
336
+ */
337
+ function get_column_label_map() {
338
  $labels = array(
339
  'id' => __( 'ID', 'email-log' ),
 
 
340
  'to_email' => __( 'To', 'email-log' ),
341
  'subject' => __( 'Subject', 'email-log' ),
342
  'message' => __( 'Message', 'email-log' ),
343
+ 'attachments' => __( 'Attachment', 'email-log' ),
344
+ 'sent_date' => __( 'Sent at', 'email-log' ),
345
  'from' => __( 'From', 'email-log' ),
346
  'cc' => __( 'CC', 'email-log' ),
347
  'bcc' => __( 'BCC', 'email-log' ),
348
+ 'reply_to' => __( 'Reply To', 'email-log' ),
349
+ 'ip_address' => __( 'IP Address', 'email-log' ),
350
+ 'result' => __( 'Sent Status', 'email-log' ),
351
  );
352
 
353
  /**
354
  * Filters the Labels used through out the Email Log plugin.
355
  *
356
+ * @since 2.3.2
357
  *
358
+ * @param array $labels List of DB Columns and its respective labels which are internationalized string.
359
+ * Example: 'id' => __( 'ID', 'email-log' ),
 
 
 
 
 
 
360
  */
361
+ return apply_filters( 'el_db_column_labels', $labels );
 
 
 
 
 
 
362
  }
include/compatibility/wpmandrill.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fixes compatibility issues with wpmandrill plugin.
4
+ *
5
+ * The wpmandrill plugin is changing "message" key to "html".
6
+ *
7
+ * @see https://github.com/sudar/email-log/issues/20
8
+ *
9
+ * Ideally this should be fixed in wpmandrill, but I am including this hack here till it is fixed by them.
10
+ * This will be eventually removed once it is fixed in the original plugin.
11
+ * @since 2.3.2
12
+ */
13
+ defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
14
+
15
+ /**
16
+ * Fix compatiblity issue with wpmandrill plguin.
17
+ * The wpmandrill plugin is changing "message" key to "html".
18
+ *
19
+ * @since 2.3.2
20
+ *
21
+ * @param array $log Log that is going to be inserted.
22
+ * @param array $mail_info Original mail info that was sent.
23
+ *
24
+ * @return array Modified log.
25
+ */
26
+ function el_fix_compatibility_with_wpmandrill( $log, $mail_info ) {
27
+ if ( ! empty( $log['message'] ) ) {
28
+ return $log;
29
+ }
30
+
31
+ if ( isset( $mail_info['html'] ) && ! empty( $mail_info['html'] ) ) {
32
+ $log['message'] = $mail_info['html'];
33
+ }
34
+
35
+ return $log;
36
+ }
37
+ add_filter( 'el_email_log_before_insert', 'el_fix_compatibility_with_wpmandrill', 10, 2 );
languages/email-log.pot CHANGED
@@ -1,14 +1,14 @@
1
- # Copyright (C) 2019 Email Log
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.3.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/email-log\n"
7
- "POT-Creation-Date: 2019-04-11 11:03:17+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
- "PO-Revision-Date: 2019-MO-DA HO:MI+ZONE\n"
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
@@ -183,63 +183,62 @@ msgid "Email Log Bundle License Key"
183
  msgstr ""
184
 
185
  #: dist/include/Addon/License/Licenser.php:168
186
- #: include/Addon/License/Licenser.php:168
187
  msgid "Additional fields are available through More Fields add-on. "
188
  msgstr ""
189
 
190
  #: dist/include/Addon/License/Licenser.php:172
191
- #: include/Addon/License/Licenser.php:172
192
  msgid "Install it"
193
  msgstr ""
194
 
195
  #: dist/include/Addon/License/Licenser.php:176
196
- #: include/Addon/License/Licenser.php:176
197
  msgid "Buy Now"
198
  msgstr ""
199
 
200
  #: dist/include/Addon/License/Licenser.php:195
201
- #: include/Addon/License/Licenser.php:195
202
  msgid ""
203
  "Your license has been activated. You can now install add-ons, will receive "
204
  "automatic updates and access to email support."
205
  msgstr ""
206
 
207
  #: dist/include/Addon/License/Licenser.php:211
208
- #: include/Addon/License/Licenser.php:211
209
  msgid ""
210
  "Your license has been deactivated. You will not receive automatic updates."
211
  msgstr ""
212
 
213
  #: dist/include/Addon/License/Licenser.php:254
214
- #: include/Addon/License/Licenser.php:254
215
  msgid ""
216
  "Your license for %s has been activated. You will receive automatic updates "
217
  "and access to email support."
218
  msgstr ""
219
 
220
  #: dist/include/Addon/License/Licenser.php:281
221
- #: include/Addon/License/Licenser.php:281
222
  msgid ""
223
  "Your license for %s has been deactivated. You will not receive automatic "
224
  "updates."
225
  msgstr ""
226
 
227
  #: dist/include/Core/Request/LogListAction.php:50
228
- #: dist/include/Util/helper.php:265 include/Core/Request/LogListAction.php:50
229
- #: include/Util/helper.php:265
230
  msgid "Sent at"
231
  msgstr ""
232
 
233
  #: dist/include/Core/Request/LogListAction.php:54
234
- #: dist/include/Util/helper.php:266 dist/include/Util/helper.php:267
235
- #: include/Core/Request/LogListAction.php:54 include/Util/helper.php:266
236
- #: include/Util/helper.php:267
237
  msgid "To"
238
  msgstr ""
239
 
240
  #: dist/include/Core/Request/LogListAction.php:58
241
- #: dist/include/Util/helper.php:268 include/Core/Request/LogListAction.php:58
242
- #: include/Util/helper.php:268
243
  msgid "Subject"
244
  msgstr ""
245
 
@@ -334,44 +333,44 @@ msgid "<a href=\"%s\">Addons</a>"
334
  msgstr ""
335
 
336
  #: dist/include/Core/UI/ListTable/LogListTable.php:138
337
- #: include/Core/UI/ListTable/LogListTable.php:138
338
  msgid "%s @ %s"
339
  msgstr ""
340
 
341
  #: dist/include/Core/UI/ListTable/LogListTable.php:156
342
- #: include/Core/UI/ListTable/LogListTable.php:156
343
  msgid "Email Content"
344
  msgstr ""
345
 
346
  #: dist/include/Core/UI/ListTable/LogListTable.php:157
347
- #: include/Core/UI/ListTable/LogListTable.php:157
348
  msgid "View Content"
349
  msgstr ""
350
 
351
  #: dist/include/Core/UI/ListTable/LogListTable.php:171
352
  #: dist/include/Core/UI/ListTable/LogListTable.php:252
353
- #: include/Core/UI/ListTable/LogListTable.php:171
354
- #: include/Core/UI/ListTable/LogListTable.php:252
355
  msgid "Delete"
356
  msgstr ""
357
 
358
  #: dist/include/Core/UI/ListTable/LogListTable.php:253
359
- #: include/Core/UI/ListTable/LogListTable.php:253
360
  msgid "Delete All Logs"
361
  msgstr ""
362
 
363
  #: dist/include/Core/UI/ListTable/LogListTable.php:286
364
- #: include/Core/UI/ListTable/LogListTable.php:286
365
  msgid "Your email log is empty"
366
  msgstr ""
367
 
368
  #: dist/include/Core/UI/ListTable/LogListTable.php:313
369
- #: include/Core/UI/ListTable/LogListTable.php:313
370
  msgid "Search by date"
371
  msgstr ""
372
 
373
  #: dist/include/Core/UI/ListTable/LogListTable.php:314
374
- #: include/Core/UI/ListTable/LogListTable.php:314
375
  msgid "Search by term"
376
  msgstr ""
377
 
@@ -450,7 +449,7 @@ msgstr ""
450
  msgid "Support"
451
  msgstr ""
452
 
453
- #. #-#-#-#-# email-log.pot (Email Log 2.3.0) #-#-#-#-#
454
  #. Plugin Name of the plugin/theme
455
  #: dist/include/Core/UI/Page/LogListPage.php:57
456
  #: dist/include/Core/UI/Page/LogListPage.php:58
@@ -617,36 +616,37 @@ msgid_plural " email logs"
617
  msgstr[0] ""
618
  msgstr[1] ""
619
 
620
- #: dist/include/Util/helper.php:161 include/Util/helper.php:161
621
  msgid "Auto delete logs cron will be triggered next at"
622
  msgstr ""
623
 
624
- #: dist/include/Util/helper.php:264 include/Util/helper.php:264
 
625
  msgid "ID"
626
  msgstr ""
627
 
628
- #: dist/include/Util/helper.php:269 include/Util/helper.php:269
629
  msgid "Message"
630
  msgstr ""
631
 
632
- #: dist/include/Util/helper.php:270 include/Util/helper.php:270
633
  msgid "From"
634
  msgstr ""
635
 
636
- #: dist/include/Util/helper.php:271 include/Util/helper.php:271
637
  msgid "CC"
638
  msgstr ""
639
 
640
- #: dist/include/Util/helper.php:272 include/Util/helper.php:272
641
  msgid "BCC"
642
  msgstr ""
643
 
644
- #: dist/include/Util/helper.php:273 include/Util/helper.php:273
645
  msgid "Reply To"
646
  msgstr ""
647
 
648
- #: dist/include/Util/helper.php:274 dist/include/Util/helper.php:275
649
- #: include/Util/helper.php:274 include/Util/helper.php:275
650
  msgid "Attachment"
651
  msgstr ""
652
 
@@ -673,6 +673,21 @@ msgstr ""
673
  msgid "Error"
674
  msgstr ""
675
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
676
  #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/parsers.php:42
677
  #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/parsers.php:72
678
  #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/parsers.php:80
@@ -884,12 +899,6 @@ msgid ""
884
  "strong> from a WordPress export file."
885
  msgstr ""
886
 
887
- #: vendor/sudar/wp-system-info/src/SystemInfo.php:78
888
- msgid ""
889
- "To copy the system info, click below then press Ctrl + C (PC) or Cmd + C "
890
- "(Mac)."
891
- msgstr ""
892
-
893
  #. Plugin URI of the plugin/theme
894
  msgid "https://wpemaillog.com"
895
  msgstr ""
1
+ # Copyright (C) 2020 Email Log
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.3.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/email-log\n"
7
+ "POT-Creation-Date: 2020-03-03 10:57:48+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2020-MO-DA HO:MI+ZONE\n"
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
183
  msgstr ""
184
 
185
  #: dist/include/Addon/License/Licenser.php:168
186
+ #: include/Addon/License/Licenser.php:170
187
  msgid "Additional fields are available through More Fields add-on. "
188
  msgstr ""
189
 
190
  #: dist/include/Addon/License/Licenser.php:172
191
+ #: include/Addon/License/Licenser.php:174
192
  msgid "Install it"
193
  msgstr ""
194
 
195
  #: dist/include/Addon/License/Licenser.php:176
196
+ #: include/Addon/License/Licenser.php:178
197
  msgid "Buy Now"
198
  msgstr ""
199
 
200
  #: dist/include/Addon/License/Licenser.php:195
201
+ #: include/Addon/License/Licenser.php:197
202
  msgid ""
203
  "Your license has been activated. You can now install add-ons, will receive "
204
  "automatic updates and access to email support."
205
  msgstr ""
206
 
207
  #: dist/include/Addon/License/Licenser.php:211
208
+ #: include/Addon/License/Licenser.php:213
209
  msgid ""
210
  "Your license has been deactivated. You will not receive automatic updates."
211
  msgstr ""
212
 
213
  #: dist/include/Addon/License/Licenser.php:254
214
+ #: include/Addon/License/Licenser.php:256
215
  msgid ""
216
  "Your license for %s has been activated. You will receive automatic updates "
217
  "and access to email support."
218
  msgstr ""
219
 
220
  #: dist/include/Addon/License/Licenser.php:281
221
+ #: include/Addon/License/Licenser.php:283
222
  msgid ""
223
  "Your license for %s has been deactivated. You will not receive automatic "
224
  "updates."
225
  msgstr ""
226
 
227
  #: dist/include/Core/Request/LogListAction.php:50
228
+ #: dist/include/Util/helper.php:266 include/Core/Request/LogListAction.php:50
229
+ #: include/Util/helper.php:344
230
  msgid "Sent at"
231
  msgstr ""
232
 
233
  #: dist/include/Core/Request/LogListAction.php:54
234
+ #: dist/include/Util/helper.php:267 dist/include/Util/helper.php:268
235
+ #: include/Core/Request/LogListAction.php:54 include/Util/helper.php:340
 
236
  msgid "To"
237
  msgstr ""
238
 
239
  #: dist/include/Core/Request/LogListAction.php:58
240
+ #: dist/include/Util/helper.php:269 include/Core/Request/LogListAction.php:58
241
+ #: include/Util/helper.php:341
242
  msgid "Subject"
243
  msgstr ""
244
 
333
  msgstr ""
334
 
335
  #: dist/include/Core/UI/ListTable/LogListTable.php:138
336
+ #: include/Core/UI/ListTable/LogListTable.php:140
337
  msgid "%s @ %s"
338
  msgstr ""
339
 
340
  #: dist/include/Core/UI/ListTable/LogListTable.php:156
341
+ #: include/Core/UI/ListTable/LogListTable.php:158
342
  msgid "Email Content"
343
  msgstr ""
344
 
345
  #: dist/include/Core/UI/ListTable/LogListTable.php:157
346
+ #: include/Core/UI/ListTable/LogListTable.php:159
347
  msgid "View Content"
348
  msgstr ""
349
 
350
  #: dist/include/Core/UI/ListTable/LogListTable.php:171
351
  #: dist/include/Core/UI/ListTable/LogListTable.php:252
352
+ #: include/Core/UI/ListTable/LogListTable.php:173
353
+ #: include/Core/UI/ListTable/LogListTable.php:279
354
  msgid "Delete"
355
  msgstr ""
356
 
357
  #: dist/include/Core/UI/ListTable/LogListTable.php:253
358
+ #: include/Core/UI/ListTable/LogListTable.php:280
359
  msgid "Delete All Logs"
360
  msgstr ""
361
 
362
  #: dist/include/Core/UI/ListTable/LogListTable.php:286
363
+ #: include/Core/UI/ListTable/LogListTable.php:313
364
  msgid "Your email log is empty"
365
  msgstr ""
366
 
367
  #: dist/include/Core/UI/ListTable/LogListTable.php:313
368
+ #: include/Core/UI/ListTable/LogListTable.php:340
369
  msgid "Search by date"
370
  msgstr ""
371
 
372
  #: dist/include/Core/UI/ListTable/LogListTable.php:314
373
+ #: include/Core/UI/ListTable/LogListTable.php:341
374
  msgid "Search by term"
375
  msgstr ""
376
 
449
  msgid "Support"
450
  msgstr ""
451
 
452
+ #. #-#-#-#-# email-log.pot (Email Log 2.3.2) #-#-#-#-#
453
  #. Plugin Name of the plugin/theme
454
  #: dist/include/Core/UI/Page/LogListPage.php:57
455
  #: dist/include/Core/UI/Page/LogListPage.php:58
616
  msgstr[0] ""
617
  msgstr[1] ""
618
 
619
+ #: dist/include/Util/helper.php:161 include/Util/helper.php:200
620
  msgid "Auto delete logs cron will be triggered next at"
621
  msgstr ""
622
 
623
+ #: dist/include/Util/helper.php:264 dist/include/Util/helper.php:265
624
+ #: include/Util/helper.php:339
625
  msgid "ID"
626
  msgstr ""
627
 
628
+ #: dist/include/Util/helper.php:270 include/Util/helper.php:342
629
  msgid "Message"
630
  msgstr ""
631
 
632
+ #: dist/include/Util/helper.php:271 include/Util/helper.php:345
633
  msgid "From"
634
  msgstr ""
635
 
636
+ #: dist/include/Util/helper.php:272 include/Util/helper.php:346
637
  msgid "CC"
638
  msgstr ""
639
 
640
+ #: dist/include/Util/helper.php:273 include/Util/helper.php:347
641
  msgid "BCC"
642
  msgstr ""
643
 
644
+ #: dist/include/Util/helper.php:274 include/Util/helper.php:348
645
  msgid "Reply To"
646
  msgstr ""
647
 
648
+ #: dist/include/Util/helper.php:275 dist/include/Util/helper.php:276
649
+ #: include/Util/helper.php:343
650
  msgid "Attachment"
651
  msgstr ""
652
 
673
  msgid "Error"
674
  msgstr ""
675
 
676
+ #: dist/vendor/sudar/wp-system-info/src/SystemInfo.php:78
677
+ #: vendor/sudar/wp-system-info/src/SystemInfo.php:79
678
+ msgid ""
679
+ "To copy the system info, click below then press Ctrl + C (PC) or Cmd + C "
680
+ "(Mac)."
681
+ msgstr ""
682
+
683
+ #: include/Util/helper.php:349
684
+ msgid "IP Address"
685
+ msgstr ""
686
+
687
+ #: include/Util/helper.php:350
688
+ msgid "Sent Status"
689
+ msgstr ""
690
+
691
  #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/parsers.php:42
692
  #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/parsers.php:72
693
  #: vendor/lucatume/wp-browser/src/data/plugins/wordpress-importer/parsers.php:80
899
  "strong> from a WordPress export file."
900
  msgstr ""
901
 
 
 
 
 
 
 
902
  #. Plugin URI of the plugin/theme
903
  msgid "https://wpemaillog.com"
904
  msgstr ""
readme.txt CHANGED
@@ -1,16 +1,17 @@
1
  === Email Log ===
2
  Contributors: sudar
3
  Tags: email, log, log email, resend email, multisite
4
- Requires PHP: 5.3
5
  Requires at least: 4.0
6
- Tested up to: 5.1
7
- Stable tag: 2.3.1
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
  This would be very useful for debugging email related problems in your WordPress site or for storing sent emails for auditing purposes.
15
 
16
  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,17 +19,20 @@ You can perform advanced actions like re-sending email, automatically forwarding
18
  ### Viewing logged emails
19
 
20
  The logged emails will be stored in a separate table and can be viewed from the admin interface.
 
21
  While viewing the logs, the emails can be filtered or sorted based on the date, email, subject etc.
22
 
23
  ### Deleting logged emails
24
 
25
  In the admin interface, all the logged emails can be delete in bulk or can also be selectively deleted based on date, email and subject.
 
26
  If you want to automatically delete the email logs after some days, then you can use the [Auto Delete Logs](https://wpemaillog.com/addons/auto-delete-logs/?utm_campaign=Upsell&utm_medium=wporg&utm_source=readme&utm_content=dl) add-on.
27
 
28
  ### Resend email (Pro addon)
29
 
30
  You can [buy the Resend email pro add-on](https://wpemaillog.com/addons/resend-email/?utm_campaign=Upsell&utm_medium=wporg&utm_source=readme&utm_content=re),
31
  which allows you to resend the email directly from the email log.
 
32
  The add-on allows you to modify the different fields of the email before resending it.
33
 
34
  ### More Fields (Pro addon)
@@ -46,7 +50,9 @@ which shows additional fields in the email log page. The following are the addit
46
 
47
  You can [buy the Forward email pro add-on](https://wpemaillog.com/addons/more-fields/?utm_campaign=Upsell&utm_medium=wporg&utm_source=readme&utm_content=fe),
48
  which allows you to send a copy of all the emails send from WordPress to another email address.
 
49
  The addon allows you to choose whether you want to forward through to, cc or bcc fields.
 
50
  This can be extremely useful when you want to debug by analyzing the emails that are sent from WordPress.
51
 
52
  ### Export email logs (Pro addon)
@@ -57,7 +63,7 @@ You can buy the [Export Email Logs add-on](https://wpemaillog.com/addons/export-
57
 
58
  As [recommended by Ozh][1], the Plugin has an uninstall hook which will clean up the database and options when the Plugin is uninstalled.
59
 
60
- [1]: http://sudarmuthu.com/blog/2009/10/07/lessons-from-wordpress-plugin-competition.html
61
 
62
  ### Documentation
63
 
@@ -66,6 +72,7 @@ You can find fully searchable documentation about using the plugin in the [doc s
66
  ### Development
67
 
68
  The development of the Plugin happens over at [github](http://github.com/sudar/email-log).
 
69
  If you want to contribute to the Plugin, [fork the project at github](http://github.com/sudar/email-log) and send me a pull request.
70
 
71
  If you are not familiar with either git or Github then refer to this [guide to see how fork and send pull request](http://sudarmuthu.com/blog/contributing-to-project-hosted-in-github).
@@ -85,7 +92,9 @@ The Plugin currently has translations for the following languages.
85
  * Dutch (Thanks Zjan Preijde)
86
 
87
  The pot file is available with the Plugin.
 
88
  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.
 
89
  I will add it to the Plugin after giving credit to you.
90
 
91
  == Installation ==
@@ -99,8 +108,11 @@ Extract the zip file and just drop the contents in the wp-content/plugins/ direc
99
  ### The content of the email is not getting logged when I am using wpmandrill plugin
100
 
101
  wpmandrill plugin has a bug that prevents this plugin from logging the content of the email.
 
102
  More details about the bug is available at http://wordpress.org/support/topic/mandrill-is-changing-the-names-of-args-in-the-filter?replies=1.
 
103
  I have asked the author of the plugin to fix it and it might get fixed it the next release.
 
104
  Meanwhile, I have added a hack to handle this condition in v1.7.3 of my plugin. So if the content is not getting logged, then upgrade to v1.7.3.
105
 
106
  == Screenshots ==
@@ -120,10 +132,17 @@ Meanwhile, I have added a hack to handle this condition in v1.7.3 of my plugin.
120
  This Readme file was generated using <a href = 'http://sudarmuthu.com/wordpress/wp-readme'>wp-readme</a>, which generates readme files for WordPress Plugins.
121
  == Changelog ==
122
 
123
- = v2.3.1 - (2019-04-11) =
 
 
 
 
 
 
 
124
  - Fix: Added a missing file that broke v2.3.1 release for some installations.
125
 
126
- = v2.3.1 - (2019-04-11) =
127
 
128
  - New: The 'To' and 'Subject' fields now supports text upto 500 characters.
129
  - New: Store the name of the attachment file if present.
@@ -312,7 +331,7 @@ This Readme file was generated using <a href = 'http://sudarmuthu.com/wordpress/
312
 
313
  == Upgrade Notice ==
314
 
315
- = 2.3.1 =
316
  The 'To' and 'Subject' fields now supports text upto 500 characters.
317
 
318
  = 2.2.5 =
1
  === Email Log ===
2
  Contributors: sudar
3
  Tags: email, log, log email, resend email, multisite
4
+ Requires PHP: 5.6
5
  Requires at least: 4.0
6
+ Tested up to: 5.4
7
+ Stable tag: 2.3.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).
19
  ### Viewing logged emails
20
 
21
  The logged emails will be stored in a separate table and can be viewed from the admin interface.
22
+
23
  While viewing the logs, the emails can be filtered or sorted based on the date, email, subject etc.
24
 
25
  ### Deleting logged emails
26
 
27
  In the admin interface, all the logged emails can be delete in bulk or can also be selectively deleted based on date, email and subject.
28
+
29
  If you want to automatically delete the email logs after some days, then you can use the [Auto Delete Logs](https://wpemaillog.com/addons/auto-delete-logs/?utm_campaign=Upsell&utm_medium=wporg&utm_source=readme&utm_content=dl) add-on.
30
 
31
  ### Resend email (Pro addon)
32
 
33
  You can [buy the Resend email pro add-on](https://wpemaillog.com/addons/resend-email/?utm_campaign=Upsell&utm_medium=wporg&utm_source=readme&utm_content=re),
34
  which allows you to resend the email directly from the email log.
35
+
36
  The add-on allows you to modify the different fields of the email before resending it.
37
 
38
  ### More Fields (Pro addon)
50
 
51
  You can [buy the Forward email pro add-on](https://wpemaillog.com/addons/more-fields/?utm_campaign=Upsell&utm_medium=wporg&utm_source=readme&utm_content=fe),
52
  which allows you to send a copy of all the emails send from WordPress to another email address.
53
+
54
  The addon allows you to choose whether you want to forward through to, cc or bcc fields.
55
+
56
  This can be extremely useful when you want to debug by analyzing the emails that are sent from WordPress.
57
 
58
  ### Export email logs (Pro addon)
63
 
64
  As [recommended by Ozh][1], the Plugin has an uninstall hook which will clean up the database and options when the Plugin is uninstalled.
65
 
66
+ [1]: https://sudarmuthu.com/blog/lessons-from-wordpress-plugin-competition/
67
 
68
  ### Documentation
69
 
72
  ### Development
73
 
74
  The development of the Plugin happens over at [github](http://github.com/sudar/email-log).
75
+
76
  If you want to contribute to the Plugin, [fork the project at github](http://github.com/sudar/email-log) and send me a pull request.
77
 
78
  If you are not familiar with either git or Github then refer to this [guide to see how fork and send pull request](http://sudarmuthu.com/blog/contributing-to-project-hosted-in-github).
92
  * Dutch (Thanks Zjan Preijde)
93
 
94
  The pot file is available with the Plugin.
95
+
96
  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.
97
+
98
  I will add it to the Plugin after giving credit to you.
99
 
100
  == Installation ==
108
  ### The content of the email is not getting logged when I am using wpmandrill plugin
109
 
110
  wpmandrill plugin has a bug that prevents this plugin from logging the content of the email.
111
+
112
  More details about the bug is available at http://wordpress.org/support/topic/mandrill-is-changing-the-names-of-args-in-the-filter?replies=1.
113
+
114
  I have asked the author of the plugin to fix it and it might get fixed it the next release.
115
+
116
  Meanwhile, I have added a hack to handle this condition in v1.7.3 of my plugin. So if the content is not getting logged, then upgrade to v1.7.3.
117
 
118
  == Screenshots ==
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.3.2 (2020-03-03) =
136
+ - New: Added the ability to log BuddyPress emails which don't use wp_mail function.
137
+ - New: Supports PHP 5.6 to PHP 7.4
138
+ - Tweak: Design tweaks for WordPress 5.3
139
+ - Fix: Don't throw a warning if wrong data is passed to wp_mail function.
140
+ - Fix: Bulk Actions that were performed from the bottom dropdown in the Log List page was not working.
141
+
142
+ = v2.3.1 – (2019-04-11) =
143
  - Fix: Added a missing file that broke v2.3.1 release for some installations.
144
 
145
+ = v2.3.0 - (2019-04-11) =
146
 
147
  - New: The 'To' and 'Subject' fields now supports text upto 500 characters.
148
  - New: Store the name of the attachment file if present.
331
 
332
  == Upgrade Notice ==
333
 
334
+ = 2.3.0 =
335
  The 'To' and 'Subject' fields now supports text upto 500 characters.
336
 
337
  = 2.2.5 =
vendor/sudar/wp-system-info/src/SystemInfo.php CHANGED
@@ -60,6 +60,7 @@ class SystemInfo {
60
  'show_users' => true,
61
  'show_plugins' => true,
62
  'show_network_plugins' => true,
 
63
  );
64
  }
65
 
@@ -96,19 +97,20 @@ class SystemInfo {
96
  Site URL: <?php echo site_url() . "\n"; ?>
97
  Home URL: <?php echo home_url() . "\n"; ?>
98
  Multisite: <?php echo is_multisite() ? 'Yes' . "\n" : 'No' . "\n"; ?>
 
99
 
100
  -- WordPress Configuration --
101
 
102
  Version: <?php echo get_bloginfo( 'version' ) . "\n"; ?>
103
  Language: <?php echo get_locale() . "\n"; ?>
104
  Permalink Structure: <?php echo get_option( 'permalink_structure' ) . "\n"; ?>
 
105
  GMT Offset: <?php echo esc_html( get_option( 'gmt_offset' ) ), "\n"; ?>
106
  Memory Limit: <?php echo WP_MEMORY_LIMIT; ?><?php echo "\n"; ?>
107
  Memory Max Limit: <?php echo WP_MAX_MEMORY_LIMIT; ?><?php echo "\n"; ?>
108
- Active Theme: <?php echo $this->get_current_theme_name() . "\n"; ?>
109
  ABSPATH: <?php echo ABSPATH . "\n"; ?>
110
- WP Table Prefix: <?php echo $wpdb->prefix, "\n"; ?>
111
  WP_DEBUG: <?php echo defined( 'WP_DEBUG' ) ? WP_DEBUG ? 'Enabled' . "\n" : 'Disabled' . "\n" : 'Not set' . "\n"; ?>
 
112
  SAVEQUERIES: <?php echo defined( 'SAVEQUERIES' ) ? SAVEQUERIES ? 'Enabled' . "\n" : 'Disabled' . "\n" : 'Not set' . "\n"; ?>
113
  WP_SCRIPT_DEBUG: <?php echo defined( 'WP_SCRIPT_DEBUG' ) ? WP_SCRIPT_DEBUG ? 'Enabled' . "\n" : 'Disabled' . "\n" : 'Not set' . "\n"; ?>
114
  DISABLE_WP_CRON: <?php echo defined( 'DISABLE_WP_CRON' ) ? DISABLE_WP_CRON ? 'Yes' . "\n" : 'No' . "\n" : 'Not set' . "\n"; ?>
@@ -121,7 +123,7 @@ EMPTY_TRASH_DAYS: <?php echo defined( 'EMPTY_TRASH_DAYS' ) ? EMPTY_TRASH
121
  $this->print_user_roles();
122
  $this->print_current_plugins();
123
  $this->print_network_active_plugins();
124
- $host = $this->print_web_host_details();
125
  ?>
126
  -- User Browser --
127
 
@@ -154,16 +156,9 @@ cURL: <?php echo ( function_exists( 'curl_init' ) ) ? 'Your
154
  SOAP Client: <?php echo ( class_exists( 'SoapClient' ) ) ? 'Your server has the SOAP Client enabled.' : 'Your server does not have the SOAP Client enabled.'; ?><?php echo "\n"; ?>
155
  SUHOSIN: <?php echo ( extension_loaded( 'suhosin' ) ) ? 'Your server has SUHOSIN installed.' : 'Your server does not have SUHOSIN installed.'; ?><?php echo "\n"; ?>
156
 
157
- -- Session Configuration --
158
-
159
- Session: <?php echo isset( $_SESSION ) ? 'Enabled' : 'Disabled'; ?><?php echo "\n"; ?>
160
- Session Name: <?php echo esc_html( ini_get( 'session.name' ) ); ?><?php echo "\n"; ?>
161
- Cookie Path: <?php echo esc_html( ini_get( 'session.cookie_path' ) ); ?><?php echo "\n"; ?>
162
- Save Path: <?php echo esc_html( ini_get( 'session.save_path' ) ); ?><?php echo "\n"; ?>
163
- Use Cookies: <?php echo ini_get( 'session.use_cookies' ) ? 'On' : 'Off'; ?><?php echo "\n"; ?>
164
- Use Only Cookies: <?php echo ini_get( 'session.use_only_cookies' ) ? 'On' : 'Off'; ?><?php echo "\n"; ?>
165
-
166
  <?php
 
 
167
  /**
168
  * Runs after displaying system info.
169
  *
@@ -372,6 +367,25 @@ Use Only Cookies: <?php echo ini_get( 'session.use_only_cookies' ) ? 'On
372
  echo "\n";
373
  }
374
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
375
  /**
376
  * Get the number of users present in a role.
377
  *
60
  'show_users' => true,
61
  'show_plugins' => true,
62
  'show_network_plugins' => true,
63
+ 'show_session_details' => false,
64
  );
65
  }
66
 
97
  Site URL: <?php echo site_url() . "\n"; ?>
98
  Home URL: <?php echo home_url() . "\n"; ?>
99
  Multisite: <?php echo is_multisite() ? 'Yes' . "\n" : 'No' . "\n"; ?>
100
+ Active Theme: <?php echo $this->get_current_theme_name() . "\n"; ?>
101
 
102
  -- WordPress Configuration --
103
 
104
  Version: <?php echo get_bloginfo( 'version' ) . "\n"; ?>
105
  Language: <?php echo get_locale() . "\n"; ?>
106
  Permalink Structure: <?php echo get_option( 'permalink_structure' ) . "\n"; ?>
107
+ WP Table Prefix: <?php echo $wpdb->prefix, "\n"; ?>
108
  GMT Offset: <?php echo esc_html( get_option( 'gmt_offset' ) ), "\n"; ?>
109
  Memory Limit: <?php echo WP_MEMORY_LIMIT; ?><?php echo "\n"; ?>
110
  Memory Max Limit: <?php echo WP_MAX_MEMORY_LIMIT; ?><?php echo "\n"; ?>
 
111
  ABSPATH: <?php echo ABSPATH . "\n"; ?>
 
112
  WP_DEBUG: <?php echo defined( 'WP_DEBUG' ) ? WP_DEBUG ? 'Enabled' . "\n" : 'Disabled' . "\n" : 'Not set' . "\n"; ?>
113
+ WP_DEBUG_LOG: <?php echo defined( 'WP_DEBUG_LOG' ) ? WP_DEBUG_LOG ? 'Enabled' . "\n" : 'Disabled' . "\n" : 'Not set' . "\n"; ?>
114
  SAVEQUERIES: <?php echo defined( 'SAVEQUERIES' ) ? SAVEQUERIES ? 'Enabled' . "\n" : 'Disabled' . "\n" : 'Not set' . "\n"; ?>
115
  WP_SCRIPT_DEBUG: <?php echo defined( 'WP_SCRIPT_DEBUG' ) ? WP_SCRIPT_DEBUG ? 'Enabled' . "\n" : 'Disabled' . "\n" : 'Not set' . "\n"; ?>
116
  DISABLE_WP_CRON: <?php echo defined( 'DISABLE_WP_CRON' ) ? DISABLE_WP_CRON ? 'Yes' . "\n" : 'No' . "\n" : 'Not set' . "\n"; ?>
123
  $this->print_user_roles();
124
  $this->print_current_plugins();
125
  $this->print_network_active_plugins();
126
+ $this->print_web_host_details();
127
  ?>
128
  -- User Browser --
129
 
156
  SOAP Client: <?php echo ( class_exists( 'SoapClient' ) ) ? 'Your server has the SOAP Client enabled.' : 'Your server does not have the SOAP Client enabled.'; ?><?php echo "\n"; ?>
157
  SUHOSIN: <?php echo ( extension_loaded( 'suhosin' ) ) ? 'Your server has SUHOSIN installed.' : 'Your server does not have SUHOSIN installed.'; ?><?php echo "\n"; ?>
158
 
 
 
 
 
 
 
 
 
 
159
  <?php
160
+ $this->print_session_information();
161
+
162
  /**
163
  * Runs after displaying system info.
164
  *
367
  echo "\n";
368
  }
369
 
370
+ /**
371
+ * Print session information.
372
+ */
373
+ protected function print_session_information() {
374
+ if ( ! $this->config['show_session_details'] ) {
375
+ return;
376
+ }
377
+ ?>
378
+ -- Session Configuration --
379
+
380
+ Session: <?php echo isset( $_SESSION ) ? 'Enabled' : 'Disabled'; ?><?php echo "\n"; ?>
381
+ Session Name: <?php echo esc_html( ini_get( 'session.name' ) ); ?><?php echo "\n"; ?>
382
+ Cookie Path: <?php echo esc_html( ini_get( 'session.cookie_path' ) ); ?><?php echo "\n"; ?>
383
+ Save Path: <?php echo esc_html( ini_get( 'session.save_path' ) ); ?><?php echo "\n"; ?>
384
+ Use Cookies: <?php echo ini_get( 'session.use_cookies' ) ? 'On' : 'Off'; ?><?php echo "\n"; ?>
385
+ Use Only Cookies: <?php echo ini_get( 'session.use_only_cookies' ) ? 'On' : 'Off'; ?><?php echo "\n"; ?>
386
+ <?php
387
+ }
388
+
389
  /**
390
  * Get the number of users present in a role.
391
  *