Email Log - Version 2.2.1

Version Description

Improved the UX of the view email content screen.

Download this release

Release Info

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

Code changes from version 2.2.0 to 2.2.1

assets/css/admin/view-logs.css CHANGED
@@ -13,24 +13,14 @@
13
  width: 100%;
14
  }
15
 
16
- #tabs-1,
17
- #tabs-2 {
18
  height: 335px;
19
  overflow: auto;
20
  }
21
 
22
- #view-message-footer {
23
- padding: 10px 0 0 0;
24
- }
25
-
26
  #thickbox-footer-close {
27
- display: block;
28
- height: 20px;
29
- text-align: center;
30
- text-decoration: none;
31
- background: #f1f1f1;
32
- padding: 5px 0;
33
- color: #c4c4c4;
34
  }
35
 
36
  #thickbox-footer-close:hover {
@@ -41,4 +31,4 @@
41
  #TB_ajaxContent {
42
  padding-bottom: 10px !important; /* Override the default Thickbox css values. */
43
  overflow: hidden !important; /* Override the default Thickbox css values. */
44
- }
13
  width: 100%;
14
  }
15
 
16
+ #tabs-preview,
17
+ #tabs-text {
18
  height: 335px;
19
  overflow: auto;
20
  }
21
 
 
 
 
 
22
  #thickbox-footer-close {
23
+ margin-top: 10px;
 
 
 
 
 
 
24
  }
25
 
26
  #thickbox-footer-close:hover {
31
  #TB_ajaxContent {
32
  padding-bottom: 10px !important; /* Override the default Thickbox css values. */
33
  overflow: hidden !important; /* Override the default Thickbox css values. */
34
+ }
email-log.php CHANGED
@@ -5,12 +5,12 @@
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.2.0
9
  * Author URI: http://sudarmuthu.com/
10
  * Text Domain: email-log
11
  * Domain Path: languages/
12
  * === RELEASE NOTES ===
13
- * Check readme file for full release notes
14
  */
15
 
16
  /**
@@ -24,9 +24,8 @@
24
  * GNU General Public License for more details.
25
  * You should have received a copy of the GNU General Public License
26
  * along with this program; if not, write to the Free Software
27
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28
  */
29
-
30
  defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
31
 
32
  // Include the stub of the old `EmailLog` class, so that old add-ons don't generate a fatal error.
@@ -39,7 +38,6 @@ if ( version_compare( PHP_VERSION, '5.3.0', '<' ) ) {
39
  * But note that some add-ons may not work.
40
  *
41
  * @see http://sudarmuthu.com/blog/why-i-am-dropping-support-for-php-5-2-in-my-wordpress-plugins/
42
- *
43
  * @since 2.0
44
  */
45
  function email_log_compatibility_notice() {
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.2.1
9
  * Author URI: http://sudarmuthu.com/
10
  * Text Domain: email-log
11
  * Domain Path: languages/
12
  * === RELEASE NOTES ===
13
+ * Check readme file for full release notes.
14
  */
15
 
16
  /**
24
  * GNU General Public License for more details.
25
  * You should have received a copy of the GNU General Public License
26
  * along with this program; if not, write to the Free Software
27
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
28
  */
 
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.
38
  * But note that some add-ons may not work.
39
  *
40
  * @see http://sudarmuthu.com/blog/why-i-am-dropping-support-for-php-5-2-in-my-wordpress-plugins/
 
41
  * @since 2.0
42
  */
43
  function email_log_compatibility_notice() {
include/Addon/API/EDDAPI.php CHANGED
@@ -3,7 +3,7 @@
3
  defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
4
 
5
  /**
6
- * Wrapper for EDD API
7
  *
8
  * @since 2.0.0
9
  */
@@ -94,10 +94,11 @@ class EDDAPI {
94
  *
95
  * @param array $params Parameters for request.
96
  *
97
- * @return object API Response in JSON.
98
  * @throws \Exception If there is any error while making the request.
99
  *
100
  * TODO: Make the errors more user friendly and provide links to support.
 
 
101
  */
102
  protected function call_edd_api( $params ) {
103
  $response = wp_remote_post( $this->store_url, array(
3
  defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
4
 
5
  /**
6
+ * Wrapper for EDD API.
7
  *
8
  * @since 2.0.0
9
  */
94
  *
95
  * @param array $params Parameters for request.
96
  *
 
97
  * @throws \Exception If there is any error while making the request.
98
  *
99
  * TODO: Make the errors more user friendly and provide links to support.
100
+ *
101
+ * @return object API Response in JSON.
102
  */
103
  protected function call_edd_api( $params ) {
104
  $response = wp_remote_post( $this->store_url, array(
include/Addon/API/EDDUpdater.php CHANGED
@@ -26,9 +26,9 @@ class EDDUpdater extends \EDD_SL_Plugin_Updater {
26
  /**
27
  * Extract add-on slug alone and then pass everything to parent.
28
  *
29
- * @param string $_api_url The URL pointing to the custom API endpoint.
30
  * @param string $_plugin_file Path to the plugin file.
31
- * @param array|null $_api_data Optional data to send with API calls.
32
  */
33
  public function __construct( $_api_url, $_plugin_file, $_api_data = null ) {
34
  $this->addon_slug = basename( $_plugin_file, '.php' );
@@ -72,7 +72,7 @@ class EDDUpdater extends \EDD_SL_Plugin_Updater {
72
  * @return string Download url.
73
  */
74
  public function get_download_url() {
75
- $args = new \stdClass();
76
  $args->slug = $this->addon_slug;
77
 
78
  $response = $this->plugins_api_filter( null, 'plugin_information', $args );
26
  /**
27
  * Extract add-on slug alone and then pass everything to parent.
28
  *
29
+ * @param string $_api_url The URL pointing to the custom API endpoint.
30
  * @param string $_plugin_file Path to the plugin file.
31
+ * @param array|null $_api_data Optional data to send with API calls.
32
  */
33
  public function __construct( $_api_url, $_plugin_file, $_api_data = null ) {
34
  $this->addon_slug = basename( $_plugin_file, '.php' );
72
  * @return string Download url.
73
  */
74
  public function get_download_url() {
75
+ $args = new \stdClass();
76
  $args->slug = $this->addon_slug;
77
 
78
  $response = $this->plugins_api_filter( null, 'plugin_information', $args );
include/Addon/Addon.php CHANGED
@@ -107,6 +107,7 @@ class Addon {
107
  protected function print_actions() {
108
  if ( $this->has_valid_bundle_license() ) {
109
  $this->print_valid_actions();
 
110
  return;
111
  }
112
 
@@ -166,7 +167,7 @@ class Addon {
166
  $button_class = 'button-primary';
167
  $dashicon = 'down';
168
  $license_wrap = 'hidden';
169
- $expires = '';
170
 
171
  if ( $this->has_valid_addon_license() ) {
172
  $action = 'el_license_deactivate';
@@ -176,7 +177,7 @@ class Addon {
176
  $license_wrap = '';
177
 
178
  $expiry_date = date( 'F d, Y', strtotime( $this->get_license()->get_expiry_date() ) );
179
- $expires = sprintf( __( 'Your license expires on %s', 'email-log' ), $expiry_date );
180
  }
181
  ?>
182
 
107
  protected function print_actions() {
108
  if ( $this->has_valid_bundle_license() ) {
109
  $this->print_valid_actions();
110
+
111
  return;
112
  }
113
 
167
  $button_class = 'button-primary';
168
  $dashicon = 'down';
169
  $license_wrap = 'hidden';
170
+ $expires = '';
171
 
172
  if ( $this->has_valid_addon_license() ) {
173
  $action = 'el_license_deactivate';
177
  $license_wrap = '';
178
 
179
  $expiry_date = date( 'F d, Y', strtotime( $this->get_license()->get_expiry_date() ) );
180
+ $expires = sprintf( __( 'Your license expires on %s', 'email-log' ), $expiry_date );
181
  }
182
  ?>
183
 
include/Addon/AddonList.php CHANGED
@@ -10,7 +10,7 @@ defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
10
  class AddonList {
11
 
12
  const CACHE_EXPIRY_IN_HRS = 12;
13
- const CACHE_KEY = 'el_addon_data';
14
 
15
  /**
16
  * Add-on list.
@@ -146,7 +146,7 @@ class AddonList {
146
  $addons = array();
147
 
148
  foreach ( $products as $product ) {
149
- $addon = new Addon( $product );
150
  $addons[ $addon->name ] = $addon;
151
  }
152
 
10
  class AddonList {
11
 
12
  const CACHE_EXPIRY_IN_HRS = 12;
13
+ const CACHE_KEY = 'el_addon_data';
14
 
15
  /**
16
  * Add-on list.
146
  $addons = array();
147
 
148
  foreach ( $products as $product ) {
149
+ $addon = new Addon( $product );
150
  $addons[ $addon->name ] = $addon;
151
  }
152
 
include/Addon/AddonUpdater.php CHANGED
@@ -52,7 +52,7 @@ class AddonUpdater {
52
  */
53
  public function setup_updater() {
54
  $email_log = email_log();
55
- $licenser = $email_log->get_licenser();
56
 
57
  if ( is_null( $licenser ) ) {
58
  return;
52
  */
53
  public function setup_updater() {
54
  $email_log = email_log();
55
+ $licenser = $email_log->get_licenser();
56
 
57
  if ( is_null( $licenser ) ) {
58
  return;
include/Addon/DependencyEnforcer.php CHANGED
@@ -61,6 +61,7 @@ class DependencyEnforcer implements Loadie {
61
  * Deactivate outdated active add-ons.
62
  *
63
  * @access private
 
64
  * @return array List of add-ons (name and version) that got deactivated.
65
  */
66
  private function deactivate_outdated_active_addons() {
@@ -79,6 +80,7 @@ class DependencyEnforcer implements Loadie {
79
  * Get the list of add-ons that are outdated and are active.
80
  *
81
  * @access private
 
82
  * @return array List of outdated and active add-ons.
83
  */
84
  private function get_outdated_active_addons() {
61
  * Deactivate outdated active add-ons.
62
  *
63
  * @access private
64
+ *
65
  * @return array List of add-ons (name and version) that got deactivated.
66
  */
67
  private function deactivate_outdated_active_addons() {
80
  * Get the list of add-ons that are outdated and are active.
81
  *
82
  * @access private
83
+ *
84
  * @return array List of outdated and active add-ons.
85
  */
86
  private function get_outdated_active_addons() {
include/Addon/EmailLogAddon.php CHANGED
@@ -10,9 +10,9 @@ defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
10
  abstract class EmailLogAddon {
11
 
12
  protected $addon_file;
13
- protected $addon_name = '';
14
  protected $addon_version = '';
15
- protected $addon_author = 'Sudar Muthu';
16
 
17
  /**
18
  * Addon Updater.
@@ -25,6 +25,7 @@ abstract class EmailLogAddon {
25
  * Initialize add-on data.
26
  *
27
  * @access protected
 
28
  * @return void
29
  */
30
  abstract protected function initialize();
@@ -45,7 +46,7 @@ abstract class EmailLogAddon {
45
  /**
46
  * Load the add-on and setup hooks.
47
  *
48
- * @inheritdoc
49
  */
50
  public function load() {
51
  if ( is_null( $this->updater ) ) {
10
  abstract class EmailLogAddon {
11
 
12
  protected $addon_file;
13
+ protected $addon_name = '';
14
  protected $addon_version = '';
15
+ protected $addon_author = 'Sudar Muthu';
16
 
17
  /**
18
  * Addon Updater.
25
  * Initialize add-on data.
26
  *
27
  * @access protected
28
+ *
29
  * @return void
30
  */
31
  abstract protected function initialize();
46
  /**
47
  * Load the add-on and setup hooks.
48
  *
49
+ *
50
  */
51
  public function load() {
52
  if ( is_null( $this->updater ) ) {
include/Addon/License/BaseLicense.php CHANGED
@@ -89,7 +89,7 @@ abstract class BaseLicense {
89
  /**
90
  * Get the expiry date of the license.
91
  *
92
- * @return string|false Expiry date in `yyyy-mm-dd hh:mm:ss` format if license is valid, False otherwise.
93
  */
94
  public function get_expiry_date() {
95
  if ( ! empty( $this->license_data ) && isset( $this->license_data->expires ) ) {
@@ -103,8 +103,9 @@ abstract class BaseLicense {
103
  * Activate License by calling EDD API.
104
  * The license data returned by API is stored in an option.
105
  *
106
- * @return object API Response JSON Object.
107
  * @throws \Exception In case of communication errors or License Issues.
 
 
108
  */
109
  public function activate() {
110
  $response = $this->edd_api->activate_license( $this->get_license_key(), $this->get_addon_name() );
@@ -113,6 +114,7 @@ abstract class BaseLicense {
113
  $response->license_key = $this->get_license_key();
114
 
115
  $this->store( $response );
 
116
  return $response;
117
  }
118
 
@@ -157,14 +159,16 @@ abstract class BaseLicense {
157
  * Deactivate the license by calling EDD API.
158
  * The stored license data will be cleared.
159
  *
160
- * @return object API Response JSON object.
161
  * @throws \Exception In case of communication errors.
 
 
162
  */
163
  public function deactivate() {
164
  $response = $this->edd_api->deactivate_license( $this->get_license_key(), $this->get_addon_name() );
165
 
166
  if ( $response->success && 'deactivated' === $response->license ) {
167
  $this->clear();
 
168
  return $response;
169
  }
170
 
@@ -181,8 +185,9 @@ abstract class BaseLicense {
181
  * Get version information by calling EDD API.
182
  * // TODO: Currently not used. Will be removed eventually.
183
  *
184
- * @return object API Response JSON Object.
185
  * @throws \Exception In case of communication errors.
 
 
186
  */
187
  public function get_version() {
188
  $response = $this->edd_api->get_version( $this->get_license_key(), $this->get_addon_name() );
@@ -192,6 +197,7 @@ abstract class BaseLicense {
192
  }
193
 
194
  $message = __( 'An error occurred, please try again', 'email-log' ) . $response->error;
 
195
  throw new \Exception( $message );
196
  }
197
 
@@ -221,7 +227,7 @@ abstract class BaseLicense {
221
  */
222
  protected function clear() {
223
  $this->license_data = null;
224
- $this->license_key = null;
225
  delete_option( $this->get_option_name() );
226
  }
227
  }
89
  /**
90
  * Get the expiry date of the license.
91
  *
92
+ * @return false|string Expiry date in `yyyy-mm-dd hh:mm:ss` format if license is valid, False otherwise.
93
  */
94
  public function get_expiry_date() {
95
  if ( ! empty( $this->license_data ) && isset( $this->license_data->expires ) ) {
103
  * Activate License by calling EDD API.
104
  * The license data returned by API is stored in an option.
105
  *
 
106
  * @throws \Exception In case of communication errors or License Issues.
107
+ *
108
+ * @return object API Response JSON Object.
109
  */
110
  public function activate() {
111
  $response = $this->edd_api->activate_license( $this->get_license_key(), $this->get_addon_name() );
114
  $response->license_key = $this->get_license_key();
115
 
116
  $this->store( $response );
117
+
118
  return $response;
119
  }
120
 
159
  * Deactivate the license by calling EDD API.
160
  * The stored license data will be cleared.
161
  *
 
162
  * @throws \Exception In case of communication errors.
163
+ *
164
+ * @return object API Response JSON object.
165
  */
166
  public function deactivate() {
167
  $response = $this->edd_api->deactivate_license( $this->get_license_key(), $this->get_addon_name() );
168
 
169
  if ( $response->success && 'deactivated' === $response->license ) {
170
  $this->clear();
171
+
172
  return $response;
173
  }
174
 
185
  * Get version information by calling EDD API.
186
  * // TODO: Currently not used. Will be removed eventually.
187
  *
 
188
  * @throws \Exception In case of communication errors.
189
+ *
190
+ * @return object API Response JSON Object.
191
  */
192
  public function get_version() {
193
  $response = $this->edd_api->get_version( $this->get_license_key(), $this->get_addon_name() );
197
  }
198
 
199
  $message = __( 'An error occurred, please try again', 'email-log' ) . $response->error;
200
+
201
  throw new \Exception( $message );
202
  }
203
 
227
  */
228
  protected function clear() {
229
  $this->license_data = null;
230
+ $this->license_key = null;
231
  delete_option( $this->get_option_name() );
232
  }
233
  }
include/Addon/License/Licenser.php CHANGED
@@ -42,8 +42,8 @@ final class Licenser implements Loadie {
42
  * If the bundle_license object is not passed a new object is created.
43
  * If the addon_list object is not passed a new object is created.
44
  *
45
- * @param null|\EmailLog\Addon\License\BundleLicense $bundle_license Optional. Bundle License.
46
- * @param null|\EmailLog\Addon\AddonList $addon_list Optional. Add-on List.
47
  */
48
  public function __construct( $bundle_license = null, $addon_list = null ) {
49
  if ( ! $bundle_license instanceof BundleLicense ) {
@@ -55,7 +55,7 @@ final class Licenser implements Loadie {
55
  }
56
 
57
  $this->bundle_license = $bundle_license;
58
- $this->addon_list = $addon_list;
59
  }
60
 
61
  /**
@@ -102,14 +102,14 @@ final class Licenser implements Loadie {
102
  $action = 'el_bundle_license_activate';
103
  $action_text = __( 'Activate', 'email-log' );
104
  $button_class = 'button-primary';
105
- $expires = '';
106
 
107
  if ( $this->is_bundle_license_valid() ) {
108
  $action = 'el_bundle_license_deactivate';
109
  $action_text = __( 'Deactivate', 'email-log' );
110
  $button_class = '';
111
- $expiry_date = date( 'F d, Y', strtotime( $this->get_bundle_license_expiry_date() ) );
112
- $expires = sprintf( __( 'Your license expires on %s', 'email-log' ), $expiry_date );
113
  }
114
  ?>
115
 
@@ -194,7 +194,7 @@ final class Licenser implements Loadie {
194
  /**
195
  * Get the expiry date of the Bundle License.
196
  *
197
- * @return string|false Expiry date, False if license is not valid.
198
  */
199
  protected function get_bundle_license_expiry_date() {
200
  return $this->bundle_license->get_expiry_date();
@@ -218,7 +218,7 @@ final class Licenser implements Loadie {
218
  __( 'Your license for %s has been activated. You will receive automatic updates and access to email support.', 'email-log' ),
219
  $addon_name
220
  );
221
- $type = 'updated';
222
  } catch ( \Exception $e ) {
223
  $message = $e->getMessage();
224
  $type = 'error';
@@ -245,7 +245,7 @@ final class Licenser implements Loadie {
245
  __( 'Your license for %s has been deactivated. You will not receive automatic updates.', 'email-log' ),
246
  $addon_name
247
  );
248
- $type = 'updated';
249
  } catch ( \Exception $e ) {
250
  $message = $e->getMessage();
251
  $type = 'error';
42
  * If the bundle_license object is not passed a new object is created.
43
  * If the addon_list object is not passed a new object is created.
44
  *
45
+ * @param \EmailLog\Addon\License\BundleLicense|null $bundle_license Optional. Bundle License.
46
+ * @param \EmailLog\Addon\AddonList|null $addon_list Optional. Add-on List.
47
  */
48
  public function __construct( $bundle_license = null, $addon_list = null ) {
49
  if ( ! $bundle_license instanceof BundleLicense ) {
55
  }
56
 
57
  $this->bundle_license = $bundle_license;
58
+ $this->addon_list = $addon_list;
59
  }
60
 
61
  /**
102
  $action = 'el_bundle_license_activate';
103
  $action_text = __( 'Activate', 'email-log' );
104
  $button_class = 'button-primary';
105
+ $expires = '';
106
 
107
  if ( $this->is_bundle_license_valid() ) {
108
  $action = 'el_bundle_license_deactivate';
109
  $action_text = __( 'Deactivate', 'email-log' );
110
  $button_class = '';
111
+ $expiry_date = date( 'F d, Y', strtotime( $this->get_bundle_license_expiry_date() ) );
112
+ $expires = sprintf( __( 'Your license expires on %s', 'email-log' ), $expiry_date );
113
  }
114
  ?>
115
 
194
  /**
195
  * Get the expiry date of the Bundle License.
196
  *
197
+ * @return false|string Expiry date, False if license is not valid.
198
  */
199
  protected function get_bundle_license_expiry_date() {
200
  return $this->bundle_license->get_expiry_date();
218
  __( 'Your license for %s has been activated. You will receive automatic updates and access to email support.', 'email-log' ),
219
  $addon_name
220
  );
221
+ $type = 'updated';
222
  } catch ( \Exception $e ) {
223
  $message = $e->getMessage();
224
  $type = 'error';
245
  __( 'Your license for %s has been deactivated. You will not receive automatic updates.', 'email-log' ),
246
  $addon_name
247
  );
248
+ $type = 'updated';
249
  } catch ( \Exception $e ) {
250
  $message = $e->getMessage();
251
  $type = 'error';
include/Addon/addon-helper.php CHANGED
@@ -5,6 +5,7 @@
5
  *
6
  * @since 2.0
7
  */
 
8
 
9
  /**
10
  * Load an Email Log add-on.
5
  *
6
  * @since 2.0
7
  */
8
+ defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
9
 
10
  /**
11
  * Load an Email Log add-on.
include/Core/DB/TableManager.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php namespace EmailLog\Core\DB;
 
2
  /**
3
- * Handle installation and db table creation
4
  */
5
-
6
  use EmailLog\Core\Loadie;
7
 
8
  defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
@@ -70,9 +70,9 @@ class TableManager implements Loadie {
70
  /**
71
  * Add email log table to the list of tables deleted when a blog is deleted.
72
  *
73
- * @param array $tables List of tables to be deleted.
74
  *
75
- * @return string[] $tables Modified list of tables to be deleted.
76
  */
77
  public function delete_table_from_deleted_blog( $tables ) {
78
  $tables[] = $this->get_log_table_name();
@@ -137,7 +137,7 @@ class TableManager implements Loadie {
137
  /**
138
  * Deletes Email Logs older than the specified interval.
139
  *
140
- * @param int $interval_in_days No. of days beyond which logs are to be deleted.
141
  *
142
  * @return int $deleted_rows_count Count of rows deleted.
143
  */
@@ -156,7 +156,7 @@ class TableManager implements Loadie {
156
  *
157
  * @param array $ids Optional. Array of IDs of the log items to be retrieved.
158
  *
159
- * @return array Log item(s).
160
  */
161
  public function fetch_log_items_by_id( $ids = array() ) {
162
  global $wpdb;
@@ -195,7 +195,7 @@ class TableManager implements Loadie {
195
 
196
  if ( isset( $request['s'] ) && $request['s'] !== '' ) {
197
  $search_term = trim( esc_sql( $request['s'] ) );
198
- $query_cond .= " WHERE ( to_email LIKE '%$search_term%' OR subject LIKE '%$search_term%' ) ";
199
  }
200
 
201
  if ( isset( $request['d'] ) && $request['d'] !== '' ) {
@@ -221,7 +221,7 @@ class TableManager implements Loadie {
221
 
222
  // Adjust the query to take pagination into account.
223
  if ( ! empty( $current_page_no ) && ! empty( $per_page ) ) {
224
- $offset = ( $current_page_no - 1 ) * $per_page;
225
  $query_cond .= ' LIMIT ' . (int) $offset . ',' . (int) $per_page;
226
  }
227
 
@@ -258,7 +258,7 @@ class TableManager implements Loadie {
258
  PRIMARY KEY (id)
259
  ) ' . $charset_collate . ' ;';
260
 
261
- require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
262
  dbDelta( $sql );
263
 
264
  add_option( self::DB_OPTION_NAME, self::DB_VERSION );
1
  <?php namespace EmailLog\Core\DB;
2
+
3
  /**
4
+ * Handle installation and db table creation.
5
  */
 
6
  use EmailLog\Core\Loadie;
7
 
8
  defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
70
  /**
71
  * Add email log table to the list of tables deleted when a blog is deleted.
72
  *
73
+ * @param array $tables List of tables to be deleted.
74
  *
75
+ * @return string[] $tables Modified list of tables to be deleted.
76
  */
77
  public function delete_table_from_deleted_blog( $tables ) {
78
  $tables[] = $this->get_log_table_name();
137
  /**
138
  * Deletes Email Logs older than the specified interval.
139
  *
140
+ * @param int $interval_in_days No. of days beyond which logs are to be deleted.
141
  *
142
  * @return int $deleted_rows_count Count of rows deleted.
143
  */
156
  *
157
  * @param array $ids Optional. Array of IDs of the log items to be retrieved.
158
  *
159
+ * @return array Log item(s).
160
  */
161
  public function fetch_log_items_by_id( $ids = array() ) {
162
  global $wpdb;
195
 
196
  if ( isset( $request['s'] ) && $request['s'] !== '' ) {
197
  $search_term = trim( esc_sql( $request['s'] ) );
198
+ $query_cond .= " WHERE ( to_email LIKE '%$search_term%' OR subject LIKE '%$search_term%' ) ";
199
  }
200
 
201
  if ( isset( $request['d'] ) && $request['d'] !== '' ) {
221
 
222
  // Adjust the query to take pagination into account.
223
  if ( ! empty( $current_page_no ) && ! empty( $per_page ) ) {
224
+ $offset = ( $current_page_no - 1 ) * $per_page;
225
  $query_cond .= ' LIMIT ' . (int) $offset . ',' . (int) $per_page;
226
  }
227
 
258
  PRIMARY KEY (id)
259
  ) ' . $charset_collate . ' ;';
260
 
261
+ require_once ABSPATH . 'wp-admin/includes/upgrade.php';
262
  dbDelta( $sql );
263
 
264
  add_option( self::DB_OPTION_NAME, self::DB_VERSION );
include/Core/EmailLog.php CHANGED
@@ -14,9 +14,10 @@ class EmailLog {
14
  * Plugin Version number.
15
  *
16
  * @since Genesis
 
17
  * @var string
18
  */
19
- const VERSION = '2.2.0';
20
 
21
  /**
22
  * Email Log Store URL.
@@ -28,6 +29,7 @@ class EmailLog {
28
  *
29
  * @since 2.0
30
  * @access private
 
31
  * @var bool
32
  */
33
  private $loaded = false;
@@ -37,6 +39,7 @@ class EmailLog {
37
  *
38
  * @since 2.0
39
  * @access private
 
40
  * @var string
41
  */
42
  private $plugin_file;
@@ -45,6 +48,7 @@ class EmailLog {
45
  * Filesystem directory path where translations are stored.
46
  *
47
  * @since 2.0
 
48
  * @var string
49
  */
50
  public $translations_path;
@@ -60,6 +64,7 @@ class EmailLog {
60
  * Database Table Manager.
61
  *
62
  * @since 2.0
 
63
  * @var \EmailLog\Core\DB\TableManager
64
  */
65
  public $table_manager;
@@ -69,6 +74,7 @@ class EmailLog {
69
  * For non-admin requests it will not be set.
70
  *
71
  * @since 2.0
 
72
  * @var \EmailLog\Addon\License\Licenser
73
  */
74
  private $licenser = null;
@@ -88,8 +94,8 @@ class EmailLog {
88
  * @param TableManager $table_manager Table Manager.
89
  */
90
  public function __construct( $file, $loader, $table_manager ) {
91
- $this->plugin_file = $file;
92
- $this->loader = $loader;
93
  $this->table_manager = $table_manager;
94
 
95
  $this->add_loadie( $table_manager );
@@ -111,7 +117,7 @@ class EmailLog {
111
  /**
112
  * Get Licenser.
113
  *
114
- * @return null|\EmailLog\Addon\License\Licenser
115
  */
116
  public function get_licenser() {
117
  return $this->licenser;
14
  * Plugin Version number.
15
  *
16
  * @since Genesis
17
+ *
18
  * @var string
19
  */
20
+ const VERSION = '2.2.1';
21
 
22
  /**
23
  * Email Log Store URL.
29
  *
30
  * @since 2.0
31
  * @access private
32
+ *
33
  * @var bool
34
  */
35
  private $loaded = false;
39
  *
40
  * @since 2.0
41
  * @access private
42
+ *
43
  * @var string
44
  */
45
  private $plugin_file;
48
  * Filesystem directory path where translations are stored.
49
  *
50
  * @since 2.0
51
+ *
52
  * @var string
53
  */
54
  public $translations_path;
64
  * Database Table Manager.
65
  *
66
  * @since 2.0
67
+ *
68
  * @var \EmailLog\Core\DB\TableManager
69
  */
70
  public $table_manager;
74
  * For non-admin requests it will not be set.
75
  *
76
  * @since 2.0
77
+ *
78
  * @var \EmailLog\Addon\License\Licenser
79
  */
80
  private $licenser = null;
94
  * @param TableManager $table_manager Table Manager.
95
  */
96
  public function __construct( $file, $loader, $table_manager ) {
97
+ $this->plugin_file = $file;
98
+ $this->loader = $loader;
99
  $this->table_manager = $table_manager;
100
 
101
  $this->add_loadie( $table_manager );
117
  /**
118
  * Get Licenser.
119
  *
120
+ * @return \EmailLog\Addon\License\Licenser|null
121
  */
122
  public function get_licenser() {
123
  return $this->licenser;
include/Core/Request/LogListAction.php CHANGED
@@ -60,14 +60,14 @@ class LogListAction implements Loadie {
60
  </tr>
61
 
62
  <?php
63
- /**
64
- * After the headers are displayed in the View Message thickbox.
65
- * This action can be used to add additional headers.
66
- *
67
- * @since 2.0.0
68
- *
69
- * @param array $log_item Log item that is getting rendered.
70
- */
71
  do_action( 'el_view_log_after_headers', $log_item );
72
  ?>
73
 
@@ -75,19 +75,21 @@ class LogListAction implements Loadie {
75
 
76
  <div id="tabs">
77
  <ul>
78
- <li><a href="#tabs-1"><?php _e( 'HTML', 'email-log' ); ?></a></li>
79
- <li><a href="#tabs-2"><?php _e( 'Text', 'email-log' ); ?></a></li>
80
  </ul>
81
- <div id="tabs-1">
82
- <?php echo $log_item['message']; ?>
83
- </div>
84
- <div id="tabs-2">
85
  <textarea class="tabs-text-textarea"><?php echo esc_textarea( $log_item['message'] ); ?></textarea>
86
  </div>
 
 
 
 
87
  </div>
88
 
89
  <div id="view-message-footer">
90
- <a href="#" id="thickbox-footer-close"><?php _e( 'Close', 'email-log' ); ?></a>
91
  </div>
92
 
93
  <?php
@@ -110,7 +112,7 @@ class LogListAction implements Loadie {
110
  $ids = array( $ids );
111
  }
112
 
113
- $ids = array_map( 'absint', $ids );
114
  $id_list = implode( ',', $ids );
115
 
116
  $logs_deleted = $this->get_table_manager()->delete_logs( $id_list );
@@ -156,7 +158,7 @@ class LogListAction implements Loadie {
156
  /**
157
  * Render Logs deleted notice.
158
  *
159
- * @param int|False $logs_deleted Number of entries deleted, False otherwise.
160
  */
161
  protected function render_log_deleted_notice( $logs_deleted ) {
162
  $message = __( 'There was some problem in deleting the email logs', 'email-log' );
60
  </tr>
61
 
62
  <?php
63
+ /**
64
+ * After the headers are displayed in the View Message thickbox.
65
+ * This action can be used to add additional headers.
66
+ *
67
+ * @since 2.0.0
68
+ *
69
+ * @param array $log_item Log item that is getting rendered.
70
+ */
71
  do_action( 'el_view_log_after_headers', $log_item );
72
  ?>
73
 
75
 
76
  <div id="tabs">
77
  <ul>
78
+ <li><a href="#tabs-text"><?php _e( 'Raw Email Content', 'email-log' ); ?></a></li>
79
+ <li><a href="#tabs-preview"><?php _e( 'Preview Content as HTML', 'email-log' ); ?></a></li>
80
  </ul>
81
+
82
+ <div id="tabs-text">
 
 
83
  <textarea class="tabs-text-textarea"><?php echo esc_textarea( $log_item['message'] ); ?></textarea>
84
  </div>
85
+
86
+ <div id="tabs-preview">
87
+ <?php echo $log_item['message']; ?>
88
+ </div>
89
  </div>
90
 
91
  <div id="view-message-footer">
92
+ <a href="#" class="button action" id="thickbox-footer-close"><?php _e( 'Close', 'email-log' ); ?></a>
93
  </div>
94
 
95
  <?php
112
  $ids = array( $ids );
113
  }
114
 
115
+ $ids = array_map( 'absint', $ids );
116
  $id_list = implode( ',', $ids );
117
 
118
  $logs_deleted = $this->get_table_manager()->delete_logs( $id_list );
158
  /**
159
  * Render Logs deleted notice.
160
  *
161
+ * @param false|int $logs_deleted Number of entries deleted, False otherwise.
162
  */
163
  protected function render_log_deleted_notice( $logs_deleted ) {
164
  $message = __( 'There was some problem in deleting the email logs', 'email-log' );
include/Core/Request/OverridePluginAPI.php CHANGED
@@ -30,7 +30,7 @@ class OverridePluginAPI implements Loadie {
30
  */
31
  public function setup_updaters_for_inactive_addons() {
32
  $email_log = email_log();
33
- $licenser = $email_log->get_licenser();
34
 
35
  if ( is_null( $licenser ) ) {
36
  return;
@@ -64,9 +64,9 @@ class OverridePluginAPI implements Loadie {
64
  *
65
  * @since 2.1.0
66
  *
67
- * @param object $response API Response.
68
- * @param string $action Action name.
69
- * @param array $args Arguments for the function.
70
  *
71
  * @return object Modified API response.
72
  */
30
  */
31
  public function setup_updaters_for_inactive_addons() {
32
  $email_log = email_log();
33
+ $licenser = $email_log->get_licenser();
34
 
35
  if ( is_null( $licenser ) ) {
36
  return;
64
  *
65
  * @since 2.1.0
66
  *
67
+ * @param object $response API Response.
68
+ * @param string $action Action name.
69
+ * @param array $args Arguments for the function.
70
  *
71
  * @return object Modified API response.
72
  */
include/Core/UI/Component/AdminUIEnhancer.php CHANGED
@@ -33,7 +33,7 @@ class AdminUIEnhancer {
33
  public function __construct( $file = null ) {
34
  if ( null === $file ) {
35
  $email_log = email_log();
36
- $file = $email_log->get_plugin_file();
37
  }
38
 
39
  $this->plugin_file = $file;
@@ -43,7 +43,7 @@ class AdminUIEnhancer {
43
  /**
44
  * Setup hooks.
45
  *
46
- * @inheritdoc
47
  */
48
  public function load() {
49
  add_filter( 'plugin_row_meta', array( $this, 'insert_addon_store_link' ), 10, 2 );
@@ -97,7 +97,6 @@ class AdminUIEnhancer {
97
  * Adds Footer links.
98
  *
99
  * @since Genesis
100
- *
101
  * @see Function relied on
102
  * @link http://striderweb.com/nerdaphernalia/2008/06/give-your-wordpress-plugin-credit/
103
  */
33
  public function __construct( $file = null ) {
34
  if ( null === $file ) {
35
  $email_log = email_log();
36
+ $file = $email_log->get_plugin_file();
37
  }
38
 
39
  $this->plugin_file = $file;
43
  /**
44
  * Setup hooks.
45
  *
46
+ *
47
  */
48
  public function load() {
49
  add_filter( 'plugin_row_meta', array( $this, 'insert_addon_store_link' ), 10, 2 );
97
  * Adds Footer links.
98
  *
99
  * @since Genesis
 
100
  * @see Function relied on
101
  * @link http://striderweb.com/nerdaphernalia/2008/06/give-your-wordpress-plugin-credit/
102
  */
include/Core/UI/ListTable/LogListTable.php CHANGED
@@ -21,6 +21,9 @@ class LogListTable extends \WP_List_Table {
21
  * Set up a constructor that references the parent constructor.
22
  *
23
  * We use the parent reference to set some default configs.
 
 
 
24
  */
25
  public function __construct( $page, $args = array() ) {
26
  $this->page = $page;
@@ -73,6 +76,7 @@ class LogListTable extends \WP_List_Table {
73
  * Filter the email log list table columns.
74
  *
75
  * @since 2.0
 
76
  * @param array $columns Columns of email log list table.
77
  */
78
  return apply_filters( 'el_manage_log_columns', $columns );
@@ -83,15 +87,16 @@ class LogListTable extends \WP_List_Table {
83
  *
84
  * @access protected
85
  *
86
- * @return array<string,array<string|boolean>> An associative array containing all the columns
87
- * that should be sortable: 'slugs'=>array('data_values',bool).
88
  */
89
  protected function get_sortable_columns() {
90
  $sortable_columns = array(
91
- 'sent_date' => array( 'sent_date', true ), // true means it's already sorted.
92
- 'to' => array( 'to_email', false ),
93
- 'subject' => array( 'subject', false ),
94
  );
 
95
  return $sortable_columns;
96
  }
97
 
@@ -120,8 +125,9 @@ class LogListTable extends \WP_List_Table {
120
  *
121
  * @access protected
122
  *
123
- * @param object $item Current item object.
124
- * @return string Markup to be displayed for the column.
 
125
  */
126
  protected function column_sent_date( $item ) {
127
  $email_date = mysql2date(
@@ -133,10 +139,10 @@ class LogListTable extends \WP_List_Table {
133
 
134
  $content_ajax_url = add_query_arg(
135
  array(
136
- 'action' => 'el-log-list-view-message',
137
- 'log_id' => $item->id,
138
- 'width' => '800',
139
- 'height' => '550',
140
  ),
141
  'admin-ajax.php'
142
  );
@@ -166,8 +172,8 @@ class LogListTable extends \WP_List_Table {
166
  *
167
  * @since 1.8
168
  *
169
- * @param array $actions List of actions.
170
- * @param object $item The current log item.
171
  */
172
  $actions = apply_filters( 'el_row_actions', $actions, $item );
173
 
@@ -184,6 +190,7 @@ class LogListTable extends \WP_List_Table {
184
  * @access protected
185
  *
186
  * @param object $item
 
187
  * @return string
188
  */
189
  protected function column_to( $item ) {
@@ -196,6 +203,7 @@ class LogListTable extends \WP_List_Table {
196
  * @access protected
197
  *
198
  * @param object $item
 
199
  * @return string
200
  */
201
  protected function column_subject( $item ) {
@@ -208,6 +216,7 @@ class LogListTable extends \WP_List_Table {
208
  * @access protected
209
  *
210
  * @param object $item
 
211
  * @return string
212
  */
213
  protected function column_cb( $item ) {
@@ -231,6 +240,7 @@ class LogListTable extends \WP_List_Table {
231
  'el-log-list-delete-all' => __( 'Delete All Logs', 'email-log' ),
232
  );
233
  $actions = apply_filters( 'el_bulk_actions', $actions );
 
234
  return $actions;
235
  }
236
 
@@ -276,7 +286,6 @@ class LogListTable extends \WP_List_Table {
276
  $input_date_id = $input_id . '-search-date-input';
277
  $input_date_val = ( ! empty( $_REQUEST['d'] ) ) ? sanitize_text_field( $_REQUEST['d'] ) : '';
278
 
279
-
280
  if ( ! empty( $_REQUEST['orderby'] ) )
281
  echo '<input type="hidden" name="orderby" value="' . esc_attr( $_REQUEST['orderby'] ) . '" />';
282
  if ( ! empty( $_REQUEST['order'] ) )
21
  * Set up a constructor that references the parent constructor.
22
  *
23
  * We use the parent reference to set some default configs.
24
+ *
25
+ * @param \EmailLog\Core\UI\Page\LogListPage $page
26
+ * @param mixed $args
27
  */
28
  public function __construct( $page, $args = array() ) {
29
  $this->page = $page;
76
  * Filter the email log list table columns.
77
  *
78
  * @since 2.0
79
+ *
80
  * @param array $columns Columns of email log list table.
81
  */
82
  return apply_filters( 'el_manage_log_columns', $columns );
87
  *
88
  * @access protected
89
  *
90
+ * @return array<string,array<boolean|string>> An associative array containing all the columns
91
+ * that should be sortable: 'slugs'=>array('data_values',bool).
92
  */
93
  protected function get_sortable_columns() {
94
  $sortable_columns = array(
95
+ 'sent_date' => array( 'sent_date', true ), // true means it's already sorted.
96
+ 'to' => array( 'to_email', false ),
97
+ 'subject' => array( 'subject', false ),
98
  );
99
+
100
  return $sortable_columns;
101
  }
102
 
125
  *
126
  * @access protected
127
  *
128
+ * @param object $item Current item object.
129
+ *
130
+ * @return string Markup to be displayed for the column.
131
  */
132
  protected function column_sent_date( $item ) {
133
  $email_date = mysql2date(
139
 
140
  $content_ajax_url = add_query_arg(
141
  array(
142
+ 'action' => 'el-log-list-view-message',
143
+ 'log_id' => $item->id,
144
+ 'width' => '800',
145
+ 'height' => '550',
146
  ),
147
  'admin-ajax.php'
148
  );
172
  *
173
  * @since 1.8
174
  *
175
+ * @param array $actions List of actions.
176
+ * @param object $item The current log item.
177
  */
178
  $actions = apply_filters( 'el_row_actions', $actions, $item );
179
 
190
  * @access protected
191
  *
192
  * @param object $item
193
+ *
194
  * @return string
195
  */
196
  protected function column_to( $item ) {
203
  * @access protected
204
  *
205
  * @param object $item
206
+ *
207
  * @return string
208
  */
209
  protected function column_subject( $item ) {
216
  * @access protected
217
  *
218
  * @param object $item
219
+ *
220
  * @return string
221
  */
222
  protected function column_cb( $item ) {
240
  'el-log-list-delete-all' => __( 'Delete All Logs', 'email-log' ),
241
  );
242
  $actions = apply_filters( 'el_bulk_actions', $actions );
243
+
244
  return $actions;
245
  }
246
 
286
  $input_date_id = $input_id . '-search-date-input';
287
  $input_date_val = ( ! empty( $_REQUEST['d'] ) ) ? sanitize_text_field( $_REQUEST['d'] ) : '';
288
 
 
289
  if ( ! empty( $_REQUEST['orderby'] ) )
290
  echo '<input type="hidden" name="orderby" value="' . esc_attr( $_REQUEST['orderby'] ) . '" />';
291
  if ( ! empty( $_REQUEST['order'] ) )
include/Core/UI/Page/AddonListPage.php CHANGED
@@ -3,7 +3,7 @@
3
  defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
4
 
5
  /**
6
- * Addon List Page
7
  *
8
  * @since 2.0
9
  */
@@ -54,7 +54,7 @@ class AddonListPage extends BasePage {
54
  do_action( 'el_before_addon_list' );
55
 
56
  $email_log = email_log();
57
- $licenser = $email_log->get_licenser();
58
  if ( ! is_null( $licenser ) ) {
59
  $licenser->get_addon_list()->render();
60
  }
3
  defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
4
 
5
  /**
6
+ * Addon List Page.
7
  *
8
  * @since 2.0
9
  */
54
  do_action( 'el_before_addon_list' );
55
 
56
  $email_log = email_log();
57
+ $licenser = $email_log->get_licenser();
58
  if ( ! is_null( $licenser ) ) {
59
  $licenser->get_addon_list()->render();
60
  }
include/Core/UI/Page/SettingsPage.php CHANGED
@@ -72,6 +72,7 @@ class SettingsPage extends BasePage {
72
  * SectionSection to the array.
73
  *
74
  * @since 2.0.0
 
75
  * @param \EmailLog\Core\UI\Setting\SettingSection[] List of SettingSections.
76
  */
77
  return apply_filters( 'el_setting_sections', array() );
72
  * SectionSection to the array.
73
  *
74
  * @since 2.0.0
75
+ *
76
  * @param \EmailLog\Core\UI\Setting\SettingSection[] List of SettingSections.
77
  */
78
  return apply_filters( 'el_setting_sections', array() );
include/Core/UI/Setting/Setting.php CHANGED
@@ -24,8 +24,8 @@ abstract class Setting {
24
 
25
  $this->initialize();
26
 
27
- $this->section->fields = $this->get_fields();
28
- $this->section->callback = array( $this, 'render' );
29
  $this->section->sanitize_callback = array( $this, 'sanitize' );
30
  }
31
 
@@ -98,7 +98,7 @@ abstract class Setting {
98
  return array();
99
  }
100
 
101
- $values = wp_parse_args( $values, $this->section->default_value );
102
  $sanitized_values = array();
103
 
104
  foreach ( $this->section->field_labels as $field_id => $label ) {
24
 
25
  $this->initialize();
26
 
27
+ $this->section->fields = $this->get_fields();
28
+ $this->section->callback = array( $this, 'render' );
29
  $this->section->sanitize_callback = array( $this, 'sanitize' );
30
  }
31
 
98
  return array();
99
  }
100
 
101
+ $values = wp_parse_args( $values, $this->section->default_value );
102
  $sanitized_values = array();
103
 
104
  foreach ( $this->section->field_labels as $field_id => $label ) {
include/Core/UI/Setting/SettingSection.php CHANGED
@@ -7,7 +7,6 @@ defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
7
  * Ideally each add-on may have a different setting section.
8
  *
9
  * @see add_settings_section()
10
- *
11
  * @since 2.0.0
12
  */
13
  class SettingSection {
7
  * Ideally each add-on may have a different setting section.
8
  *
9
  * @see add_settings_section()
 
10
  * @since 2.0.0
11
  */
12
  class SettingSection {
include/Core/UI/UILoader.php CHANGED
@@ -53,8 +53,8 @@ class UILoader implements Loadie {
53
  */
54
  protected function initialize_components() {
55
  $this->components['admin_ui_enhancer'] = new Component\AdminUIEnhancer();
56
- $this->components['core_settings'] = new Setting\CoreSetting();
57
- $this->components['dashboard_widget'] = new Component\DashboardWidget();
58
  }
59
 
60
  /**
53
  */
54
  protected function initialize_components() {
55
  $this->components['admin_ui_enhancer'] = new Component\AdminUIEnhancer();
56
+ $this->components['core_settings'] = new Setting\CoreSetting();
57
+ $this->components['dashboard_widget'] = new Component\DashboardWidget();
58
  }
59
 
60
  /**
include/EmailLogAutoloader.php CHANGED
@@ -48,7 +48,6 @@
48
  *
49
  * <?php
50
  * new \Foo\Bar\Qux\QuuxTest;
51
- *
52
  * @since 2.0
53
  */
54
  class EmailLogAutoloader {
@@ -129,8 +128,8 @@ class EmailLogAutoloader {
129
  *
130
  * @param string $class The fully-qualified class name.
131
  *
132
- * @return string|false The mapped file name on success, or boolean false on
133
- * failure.
134
  */
135
  public function load_class( $class ) {
136
  // the current namespace prefix
@@ -168,7 +167,7 @@ class EmailLogAutoloader {
168
  * @param string $relative_class The relative class name.
169
  *
170
  * @return false|string Boolean false if no mapped file can be loaded, or the
171
- * name of the mapped file that was loaded.
172
  */
173
  protected function load_mapped_file( $prefix, $relative_class ) {
174
  // are there any base directories for this namespace prefix?
48
  *
49
  * <?php
50
  * new \Foo\Bar\Qux\QuuxTest;
 
51
  * @since 2.0
52
  */
53
  class EmailLogAutoloader {
128
  *
129
  * @param string $class The fully-qualified class name.
130
  *
131
+ * @return false|string The mapped file name on success, or boolean false on
132
+ * failure.
133
  */
134
  public function load_class( $class ) {
135
  // the current namespace prefix
167
  * @param string $relative_class The relative class name.
168
  *
169
  * @return false|string Boolean false if no mapped file can be loaded, or the
170
+ * name of the mapped file that was loaded.
171
  */
172
  protected function load_mapped_file( $prefix, $relative_class ) {
173
  // are there any base directories for this namespace prefix?
include/Util/EmailHeaderParser.php CHANGED
@@ -5,7 +5,6 @@
5
  *
6
  * @author Sudar
7
  */
8
-
9
  defined( 'ABSPATH' ) || exit; // Exit if accessed directly
10
 
11
  /**
@@ -114,7 +113,7 @@ class EmailHeaderParser {
114
  *
115
  * @param array $header Header line to be parsed.
116
  *
117
- * @return string Parsed value.
118
  */
119
  private function parse_header_line( $header ) {
120
  $value = '';
5
  *
6
  * @author Sudar
7
  */
 
8
  defined( 'ABSPATH' ) || exit; // Exit if accessed directly
9
 
10
  /**
113
  *
114
  * @param array $header Header line to be parsed.
115
  *
116
+ * @return string Parsed value.
117
  */
118
  private function parse_header_line( $header ) {
119
  $value = '';
include/Util/helper.php CHANGED
@@ -4,6 +4,7 @@
4
  * Email Log Helper functions.
5
  * Some of these functions would be used the addons.
6
  */
 
7
 
8
  /**
9
  * Perform additional sanitation of emails.
@@ -33,7 +34,7 @@ function sanitize_email( $email, $multiple = true ) {
33
  *
34
  * @param string $string Email string to be sanitized.
35
  *
36
- * @return string Sanitized email.
37
  */
38
  function sanitize_email_with_name( $string ) {
39
  $string = trim( $string );
@@ -98,7 +99,7 @@ function is_admin_non_ajax_request() {
98
  *
99
  * @since 2.1.0
100
  *
101
- * @param array $values List of all possible values.
102
  * @param string $current The current value to be checked.
103
  */
104
  function checked_array( $values, $current ) {
4
  * Email Log Helper functions.
5
  * Some of these functions would be used the addons.
6
  */
7
+ defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
8
 
9
  /**
10
  * Perform additional sanitation of emails.
34
  *
35
  * @param string $string Email string to be sanitized.
36
  *
37
+ * @return string Sanitized email.
38
  */
39
  function sanitize_email_with_name( $string ) {
40
  $string = trim( $string );
99
  *
100
  * @since 2.1.0
101
  *
102
+ * @param array $values List of all possible values.
103
  * @param string $current The current value to be checked.
104
  */
105
  function checked_array( $values, $current ) {
include/compatibility/EmailLog.php CHANGED
@@ -12,7 +12,7 @@
12
  * @deprecated 2.0
13
  */
14
  class EmailLog {
15
- const HOOK_LOG_COLUMNS = '';
16
  const HOOK_LOG_DISPLAY_COLUMNS = '';
17
- const FILTER_NAME = '';
18
  }
12
  * @deprecated 2.0
13
  */
14
  class EmailLog {
15
+ const HOOK_LOG_COLUMNS = '';
16
  const HOOK_LOG_DISPLAY_COLUMNS = '';
17
+ const FILTER_NAME = '';
18
  }
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.2.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/email-log\n"
7
- "POT-Creation-Date: 2017-10-09 14:20:46+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,87 +12,87 @@ msgstr ""
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
15
- #: dist/email-log.php:51 email-log.php:51
16
  msgid ""
17
  "Email Log requires at least PHP 5.3 to function properly. Please upgrade PHP "
18
  "or use <a href=\"%s\">v1.9.1 of Email Log</a>."
19
  msgstr ""
20
 
21
- #: dist/include/Addon/API/EDDAPI.php:114 include/Addon/API/EDDAPI.php:114
22
  msgid ""
23
  "Unknown error occurred while trying to contact Email Log store. Please try "
24
  "again after sometime. If the problem persists contact support."
25
  msgstr ""
26
 
27
- #: dist/include/Addon/API/EDDAPI.php:121 include/Addon/API/EDDAPI.php:121
28
  msgid ""
29
  "Unable to parse the response Email Log store response. Please try again "
30
  "after sometime. If the problem persists contact support."
31
  msgstr ""
32
 
33
- #: dist/include/Addon/Addon.php:127 include/Addon/Addon.php:127
34
  msgctxt "Installed on website but not activated"
35
  msgid "Installed"
36
  msgstr ""
37
 
38
- #: dist/include/Addon/Addon.php:130 include/Addon/Addon.php:130
39
  msgctxt "Installed and activated on website"
40
  msgid "Activated"
41
  msgstr ""
42
 
43
- #: dist/include/Addon/Addon.php:132 include/Addon/Addon.php:132
44
  msgctxt "Enable addon so it may be used"
45
  msgid "Activate"
46
  msgstr ""
47
 
48
- #: dist/include/Addon/Addon.php:135 include/Addon/Addon.php:135
49
  msgctxt "Download and activate addon"
50
  msgid "Install"
51
  msgstr ""
52
 
53
- #: dist/include/Addon/Addon.php:138 include/Addon/Addon.php:138
54
  msgctxt "Download to your computer"
55
  msgid "Download"
56
  msgstr ""
57
 
58
- #: dist/include/Addon/Addon.php:147 include/Addon/Addon.php:147
59
  msgctxt "Download and activate addon"
60
  msgid "Activate License to Install"
61
  msgstr ""
62
 
63
- #: dist/include/Addon/Addon.php:150 include/Addon/Addon.php:150
64
  msgctxt "Download and activate addon"
65
  msgid "Activate License to Use"
66
  msgstr ""
67
 
68
- #: dist/include/Addon/Addon.php:155 include/Addon/Addon.php:155
69
  msgid "You need an active license to install the add-on"
70
  msgstr ""
71
 
72
- #: dist/include/Addon/Addon.php:165 dist/include/Addon/License/Licenser.php:103
73
- #: include/Addon/Addon.php:165 include/Addon/License/Licenser.php:103
74
  msgid "Activate"
75
  msgstr ""
76
 
77
- #: dist/include/Addon/Addon.php:173 dist/include/Addon/License/Licenser.php:109
78
- #: include/Addon/Addon.php:173 include/Addon/License/Licenser.php:109
79
  msgid "Deactivate"
80
  msgstr ""
81
 
82
- #: dist/include/Addon/Addon.php:179 dist/include/Addon/License/Licenser.php:112
83
- #: include/Addon/Addon.php:179 include/Addon/License/Licenser.php:112
84
  msgid "Your license expires on %s"
85
  msgstr ""
86
 
87
- #: dist/include/Addon/Addon.php:184 include/Addon/Addon.php:184
88
  msgid "Individual add-on license"
89
  msgstr ""
90
 
91
- #: dist/include/Addon/Addon.php:189 include/Addon/Addon.php:189
92
  msgid "Email Log License Key"
93
  msgstr ""
94
 
95
- #: dist/include/Addon/Addon.php:190 include/Addon/Addon.php:190
96
  msgid "%s Add-on License Key"
97
  msgstr ""
98
 
@@ -114,45 +114,45 @@ msgstr ""
114
  msgid "Please get the latest version of these add-ons from add-on store."
115
  msgstr ""
116
 
117
- #: dist/include/Addon/License/BaseLicense.php:122
118
- #: include/Addon/License/BaseLicense.php:122
119
  msgid "Your license key expired on %s."
120
  msgstr ""
121
 
122
- #: dist/include/Addon/License/BaseLicense.php:128
123
- #: include/Addon/License/BaseLicense.php:128
124
  msgid "Your license key has been disabled."
125
  msgstr ""
126
 
127
- #: dist/include/Addon/License/BaseLicense.php:132
128
- #: include/Addon/License/BaseLicense.php:132
129
  msgid "Your license key is invalid."
130
  msgstr ""
131
 
132
- #: dist/include/Addon/License/BaseLicense.php:137
133
- #: include/Addon/License/BaseLicense.php:137
134
  msgid "Your license is not active for this URL."
135
  msgstr ""
136
 
137
- #: dist/include/Addon/License/BaseLicense.php:141
138
- #: include/Addon/License/BaseLicense.php:141
139
  msgid "Your license key is not valid for %s."
140
  msgstr ""
141
 
142
- #: dist/include/Addon/License/BaseLicense.php:145
143
- #: include/Addon/License/BaseLicense.php:145
144
  msgid "Your license key has reached its activation limit."
145
  msgstr ""
146
 
147
- #: dist/include/Addon/License/BaseLicense.php:149
148
- #: dist/include/Addon/License/BaseLicense.php:171
149
- #: include/Addon/License/BaseLicense.php:149
150
- #: include/Addon/License/BaseLicense.php:171
151
  msgid "An error occurred, please try again."
152
  msgstr ""
153
 
154
- #: dist/include/Addon/License/BaseLicense.php:194
155
- #: include/Addon/License/BaseLicense.php:194
156
  msgid "An error occurred, please try again"
157
  msgstr ""
158
 
@@ -198,49 +198,49 @@ msgid ""
198
  msgstr ""
199
 
200
  #: dist/include/Core/Request/LogListAction.php:50
201
- #: dist/include/Core/UI/ListTable/LogListTable.php:67
202
  #: include/Core/Request/LogListAction.php:50
203
- #: include/Core/UI/ListTable/LogListTable.php:67
204
  msgid "Sent at"
205
  msgstr ""
206
 
207
  #: dist/include/Core/Request/LogListAction.php:54
208
- #: dist/include/Core/UI/ListTable/LogListTable.php:68
209
  #: include/Core/Request/LogListAction.php:54
210
- #: include/Core/UI/ListTable/LogListTable.php:68
211
  #: tmp_addon/ForwardEmailSetting.php:32
212
  msgid "To"
213
  msgstr ""
214
 
215
  #: dist/include/Core/Request/LogListAction.php:58
216
- #: dist/include/Core/UI/ListTable/LogListTable.php:69
217
  #: include/Core/Request/LogListAction.php:58
218
- #: include/Core/UI/ListTable/LogListTable.php:69
219
  msgid "Subject"
220
  msgstr ""
221
 
222
  #: dist/include/Core/Request/LogListAction.php:78
223
  #: include/Core/Request/LogListAction.php:78
224
- msgid "HTML"
225
  msgstr ""
226
 
227
  #: dist/include/Core/Request/LogListAction.php:79
228
  #: include/Core/Request/LogListAction.php:79
229
- msgid "Text"
230
  msgstr ""
231
 
232
- #: dist/include/Core/Request/LogListAction.php:90
233
- #: include/Core/Request/LogListAction.php:90
234
  msgid "Close"
235
  msgstr ""
236
 
237
- #: dist/include/Core/Request/LogListAction.php:162
238
- #: include/Core/Request/LogListAction.php:162
239
  msgid "There was some problem in deleting the email logs"
240
  msgstr ""
241
 
242
- #: dist/include/Core/Request/LogListAction.php:166
243
- #: include/Core/Request/LogListAction.php:166
244
  msgid "1 email log deleted."
245
  msgid_plural "%s email logs deleted"
246
  msgstr[0] ""
@@ -260,18 +260,18 @@ msgstr ""
260
  msgid "View Logs"
261
  msgstr ""
262
 
263
- #: dist/include/Core/UI/Component/AdminUIEnhancer.php:107
264
- #: include/Core/UI/Component/AdminUIEnhancer.php:107
265
  msgid "plugin"
266
  msgstr ""
267
 
268
- #: dist/include/Core/UI/Component/AdminUIEnhancer.php:107
269
- #: include/Core/UI/Component/AdminUIEnhancer.php:107
270
  msgid "Version"
271
  msgstr ""
272
 
273
- #: dist/include/Core/UI/Component/AdminUIEnhancer.php:107
274
- #: include/Core/UI/Component/AdminUIEnhancer.php:107
275
  msgid "by"
276
  msgstr ""
277
 
@@ -286,58 +286,69 @@ msgid "Total number of emails logged"
286
  msgstr ""
287
 
288
  #: dist/include/Core/UI/Component/DashboardWidget.php:47
289
- msgid "<a href=\"%s\">Click here</a> to view Email Logs."
 
 
 
 
 
 
 
 
 
 
 
290
  msgstr ""
291
 
292
- #: dist/include/Core/UI/ListTable/LogListTable.php:49
293
- #: include/Core/UI/ListTable/LogListTable.php:49
294
  msgid "Additional fields are available in Pro add-on. "
295
  msgstr ""
296
 
297
- #: dist/include/Core/UI/ListTable/LogListTable.php:51
298
- #: include/Core/UI/ListTable/LogListTable.php:51
299
  msgid "Buy Now"
300
  msgstr ""
301
 
302
- #: dist/include/Core/UI/ListTable/LogListTable.php:128
303
- #: include/Core/UI/ListTable/LogListTable.php:128
304
  msgid "%s @ %s"
305
  msgstr ""
306
 
307
- #: dist/include/Core/UI/ListTable/LogListTable.php:146
308
- #: include/Core/UI/ListTable/LogListTable.php:146
309
  msgid "Email Content"
310
  msgstr ""
311
 
312
- #: dist/include/Core/UI/ListTable/LogListTable.php:147
313
- #: include/Core/UI/ListTable/LogListTable.php:147
314
  msgid "View Content"
315
  msgstr ""
316
 
317
- #: dist/include/Core/UI/ListTable/LogListTable.php:161
318
- #: dist/include/Core/UI/ListTable/LogListTable.php:230
319
- #: include/Core/UI/ListTable/LogListTable.php:161
320
- #: include/Core/UI/ListTable/LogListTable.php:230
321
  msgid "Delete"
322
  msgstr ""
323
 
324
- #: dist/include/Core/UI/ListTable/LogListTable.php:231
325
- #: include/Core/UI/ListTable/LogListTable.php:231
326
  msgid "Delete All Logs"
327
  msgstr ""
328
 
329
- #: dist/include/Core/UI/ListTable/LogListTable.php:263
330
- #: include/Core/UI/ListTable/LogListTable.php:263
331
  msgid "Your email log is empty"
332
  msgstr ""
333
 
334
- #: dist/include/Core/UI/ListTable/LogListTable.php:291
335
- #: include/Core/UI/ListTable/LogListTable.php:291
336
  msgid "Search by date"
337
  msgstr ""
338
 
339
- #: dist/include/Core/UI/ListTable/LogListTable.php:292
340
- #: include/Core/UI/ListTable/LogListTable.php:292
341
  msgid "Search by term"
342
  msgstr ""
343
 
@@ -415,7 +426,7 @@ msgstr ""
415
  msgid "Support"
416
  msgstr ""
417
 
418
- #. #-#-#-#-# email-log.pot (Email Log 2.2.0) #-#-#-#-#
419
  #. Plugin Name of the plugin/theme
420
  #: dist/include/Core/UI/Page/LogListPage.php:57
421
  #: dist/include/Core/UI/Page/LogListPage.php:58
@@ -439,20 +450,20 @@ msgstr ""
439
  msgid "Entries per page"
440
  msgstr ""
441
 
442
- #: dist/include/Core/UI/Page/SettingsPage.php:93
443
  #: dist/include/Core/UI/Page/SettingsPage.php:94
444
- #: include/Core/UI/Page/SettingsPage.php:93
445
  #: include/Core/UI/Page/SettingsPage.php:94
 
446
  msgid "Settings"
447
  msgstr ""
448
 
449
- #: dist/include/Core/UI/Page/SettingsPage.php:110
450
- #: include/Core/UI/Page/SettingsPage.php:110
451
  msgid "Email Log Settings"
452
  msgstr ""
453
 
454
- #: dist/include/Core/UI/Page/SettingsPage.php:118
455
- #: include/Core/UI/Page/SettingsPage.php:118
456
  msgid "Save"
457
  msgstr ""
458
 
@@ -524,18 +535,6 @@ msgstr ""
524
  msgid "Error"
525
  msgstr ""
526
 
527
- #: include/Core/UI/Component/DashboardWidget.php:47
528
- msgid "<a href=\"%s\">Email Logs</a>"
529
- msgstr ""
530
-
531
- #: include/Core/UI/Component/DashboardWidget.php:48
532
- msgid "<a href=\"%s\">Settings</a>"
533
- msgstr ""
534
-
535
- #: include/Core/UI/Component/DashboardWidget.php:49
536
- msgid "<a href=\"%s\">Addons</a>"
537
- msgstr ""
538
-
539
  #: tmp_addon/AutoDeleteLogsSetting.php:15
540
  msgid "Auto Delete Logs Add-on Settings"
541
  msgstr ""
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.2.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/email-log\n"
7
+ "POT-Creation-Date: 2017-11-04 02:23:00+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
+ #: dist/email-log.php:49 email-log.php:49
16
  msgid ""
17
  "Email Log requires at least PHP 5.3 to function properly. Please upgrade PHP "
18
  "or use <a href=\"%s\">v1.9.1 of Email Log</a>."
19
  msgstr ""
20
 
21
+ #: dist/include/Addon/API/EDDAPI.php:115 include/Addon/API/EDDAPI.php:115
22
  msgid ""
23
  "Unknown error occurred while trying to contact Email Log store. Please try "
24
  "again after sometime. If the problem persists contact support."
25
  msgstr ""
26
 
27
+ #: dist/include/Addon/API/EDDAPI.php:122 include/Addon/API/EDDAPI.php:122
28
  msgid ""
29
  "Unable to parse the response Email Log store response. Please try again "
30
  "after sometime. If the problem persists contact support."
31
  msgstr ""
32
 
33
+ #: dist/include/Addon/Addon.php:128 include/Addon/Addon.php:128
34
  msgctxt "Installed on website but not activated"
35
  msgid "Installed"
36
  msgstr ""
37
 
38
+ #: dist/include/Addon/Addon.php:131 include/Addon/Addon.php:131
39
  msgctxt "Installed and activated on website"
40
  msgid "Activated"
41
  msgstr ""
42
 
43
+ #: dist/include/Addon/Addon.php:133 include/Addon/Addon.php:133
44
  msgctxt "Enable addon so it may be used"
45
  msgid "Activate"
46
  msgstr ""
47
 
48
+ #: dist/include/Addon/Addon.php:136 include/Addon/Addon.php:136
49
  msgctxt "Download and activate addon"
50
  msgid "Install"
51
  msgstr ""
52
 
53
+ #: dist/include/Addon/Addon.php:139 include/Addon/Addon.php:139
54
  msgctxt "Download to your computer"
55
  msgid "Download"
56
  msgstr ""
57
 
58
+ #: dist/include/Addon/Addon.php:148 include/Addon/Addon.php:148
59
  msgctxt "Download and activate addon"
60
  msgid "Activate License to Install"
61
  msgstr ""
62
 
63
+ #: dist/include/Addon/Addon.php:151 include/Addon/Addon.php:151
64
  msgctxt "Download and activate addon"
65
  msgid "Activate License to Use"
66
  msgstr ""
67
 
68
+ #: dist/include/Addon/Addon.php:156 include/Addon/Addon.php:156
69
  msgid "You need an active license to install the add-on"
70
  msgstr ""
71
 
72
+ #: dist/include/Addon/Addon.php:166 dist/include/Addon/License/Licenser.php:103
73
+ #: include/Addon/Addon.php:166 include/Addon/License/Licenser.php:103
74
  msgid "Activate"
75
  msgstr ""
76
 
77
+ #: dist/include/Addon/Addon.php:174 dist/include/Addon/License/Licenser.php:109
78
+ #: include/Addon/Addon.php:174 include/Addon/License/Licenser.php:109
79
  msgid "Deactivate"
80
  msgstr ""
81
 
82
+ #: dist/include/Addon/Addon.php:180 dist/include/Addon/License/Licenser.php:112
83
+ #: include/Addon/Addon.php:180 include/Addon/License/Licenser.php:112
84
  msgid "Your license expires on %s"
85
  msgstr ""
86
 
87
+ #: dist/include/Addon/Addon.php:185 include/Addon/Addon.php:185
88
  msgid "Individual add-on license"
89
  msgstr ""
90
 
91
+ #: dist/include/Addon/Addon.php:190 include/Addon/Addon.php:190
92
  msgid "Email Log License Key"
93
  msgstr ""
94
 
95
+ #: dist/include/Addon/Addon.php:191 include/Addon/Addon.php:191
96
  msgid "%s Add-on License Key"
97
  msgstr ""
98
 
114
  msgid "Please get the latest version of these add-ons from add-on store."
115
  msgstr ""
116
 
117
+ #: dist/include/Addon/License/BaseLicense.php:124
118
+ #: include/Addon/License/BaseLicense.php:124
119
  msgid "Your license key expired on %s."
120
  msgstr ""
121
 
122
+ #: dist/include/Addon/License/BaseLicense.php:130
123
+ #: include/Addon/License/BaseLicense.php:130
124
  msgid "Your license key has been disabled."
125
  msgstr ""
126
 
127
+ #: dist/include/Addon/License/BaseLicense.php:134
128
+ #: include/Addon/License/BaseLicense.php:134
129
  msgid "Your license key is invalid."
130
  msgstr ""
131
 
132
+ #: dist/include/Addon/License/BaseLicense.php:139
133
+ #: include/Addon/License/BaseLicense.php:139
134
  msgid "Your license is not active for this URL."
135
  msgstr ""
136
 
137
+ #: dist/include/Addon/License/BaseLicense.php:143
138
+ #: include/Addon/License/BaseLicense.php:143
139
  msgid "Your license key is not valid for %s."
140
  msgstr ""
141
 
142
+ #: dist/include/Addon/License/BaseLicense.php:147
143
+ #: include/Addon/License/BaseLicense.php:147
144
  msgid "Your license key has reached its activation limit."
145
  msgstr ""
146
 
147
+ #: dist/include/Addon/License/BaseLicense.php:151
148
+ #: dist/include/Addon/License/BaseLicense.php:175
149
+ #: include/Addon/License/BaseLicense.php:151
150
+ #: include/Addon/License/BaseLicense.php:175
151
  msgid "An error occurred, please try again."
152
  msgstr ""
153
 
154
+ #: dist/include/Addon/License/BaseLicense.php:199
155
+ #: include/Addon/License/BaseLicense.php:199
156
  msgid "An error occurred, please try again"
157
  msgstr ""
158
 
198
  msgstr ""
199
 
200
  #: dist/include/Core/Request/LogListAction.php:50
201
+ #: dist/include/Core/UI/ListTable/LogListTable.php:70
202
  #: include/Core/Request/LogListAction.php:50
203
+ #: include/Core/UI/ListTable/LogListTable.php:70
204
  msgid "Sent at"
205
  msgstr ""
206
 
207
  #: dist/include/Core/Request/LogListAction.php:54
208
+ #: dist/include/Core/UI/ListTable/LogListTable.php:71
209
  #: include/Core/Request/LogListAction.php:54
210
+ #: include/Core/UI/ListTable/LogListTable.php:71
211
  #: tmp_addon/ForwardEmailSetting.php:32
212
  msgid "To"
213
  msgstr ""
214
 
215
  #: dist/include/Core/Request/LogListAction.php:58
216
+ #: dist/include/Core/UI/ListTable/LogListTable.php:72
217
  #: include/Core/Request/LogListAction.php:58
218
+ #: include/Core/UI/ListTable/LogListTable.php:72
219
  msgid "Subject"
220
  msgstr ""
221
 
222
  #: dist/include/Core/Request/LogListAction.php:78
223
  #: include/Core/Request/LogListAction.php:78
224
+ msgid "Raw Email Content"
225
  msgstr ""
226
 
227
  #: dist/include/Core/Request/LogListAction.php:79
228
  #: include/Core/Request/LogListAction.php:79
229
+ msgid "Preview Content as HTML"
230
  msgstr ""
231
 
232
+ #: dist/include/Core/Request/LogListAction.php:92
233
+ #: include/Core/Request/LogListAction.php:92
234
  msgid "Close"
235
  msgstr ""
236
 
237
+ #: dist/include/Core/Request/LogListAction.php:164
238
+ #: include/Core/Request/LogListAction.php:164
239
  msgid "There was some problem in deleting the email logs"
240
  msgstr ""
241
 
242
+ #: dist/include/Core/Request/LogListAction.php:168
243
+ #: include/Core/Request/LogListAction.php:168
244
  msgid "1 email log deleted."
245
  msgid_plural "%s email logs deleted"
246
  msgstr[0] ""
260
  msgid "View Logs"
261
  msgstr ""
262
 
263
+ #: dist/include/Core/UI/Component/AdminUIEnhancer.php:106
264
+ #: include/Core/UI/Component/AdminUIEnhancer.php:106
265
  msgid "plugin"
266
  msgstr ""
267
 
268
+ #: dist/include/Core/UI/Component/AdminUIEnhancer.php:106
269
+ #: include/Core/UI/Component/AdminUIEnhancer.php:106
270
  msgid "Version"
271
  msgstr ""
272
 
273
+ #: dist/include/Core/UI/Component/AdminUIEnhancer.php:106
274
+ #: include/Core/UI/Component/AdminUIEnhancer.php:106
275
  msgid "by"
276
  msgstr ""
277
 
286
  msgstr ""
287
 
288
  #: dist/include/Core/UI/Component/DashboardWidget.php:47
289
+ #: include/Core/UI/Component/DashboardWidget.php:47
290
+ msgid "<a href=\"%s\">Email Logs</a>"
291
+ msgstr ""
292
+
293
+ #: dist/include/Core/UI/Component/DashboardWidget.php:48
294
+ #: include/Core/UI/Component/DashboardWidget.php:48
295
+ msgid "<a href=\"%s\">Settings</a>"
296
+ msgstr ""
297
+
298
+ #: dist/include/Core/UI/Component/DashboardWidget.php:49
299
+ #: include/Core/UI/Component/DashboardWidget.php:49
300
+ msgid "<a href=\"%s\">Addons</a>"
301
  msgstr ""
302
 
303
+ #: dist/include/Core/UI/ListTable/LogListTable.php:52
304
+ #: include/Core/UI/ListTable/LogListTable.php:52
305
  msgid "Additional fields are available in Pro add-on. "
306
  msgstr ""
307
 
308
+ #: dist/include/Core/UI/ListTable/LogListTable.php:54
309
+ #: include/Core/UI/ListTable/LogListTable.php:54
310
  msgid "Buy Now"
311
  msgstr ""
312
 
313
+ #: dist/include/Core/UI/ListTable/LogListTable.php:134
314
+ #: include/Core/UI/ListTable/LogListTable.php:134
315
  msgid "%s @ %s"
316
  msgstr ""
317
 
318
+ #: dist/include/Core/UI/ListTable/LogListTable.php:152
319
+ #: include/Core/UI/ListTable/LogListTable.php:152
320
  msgid "Email Content"
321
  msgstr ""
322
 
323
+ #: dist/include/Core/UI/ListTable/LogListTable.php:153
324
+ #: include/Core/UI/ListTable/LogListTable.php:153
325
  msgid "View Content"
326
  msgstr ""
327
 
328
+ #: dist/include/Core/UI/ListTable/LogListTable.php:167
329
+ #: dist/include/Core/UI/ListTable/LogListTable.php:239
330
+ #: include/Core/UI/ListTable/LogListTable.php:167
331
+ #: include/Core/UI/ListTable/LogListTable.php:239
332
  msgid "Delete"
333
  msgstr ""
334
 
335
+ #: dist/include/Core/UI/ListTable/LogListTable.php:240
336
+ #: include/Core/UI/ListTable/LogListTable.php:240
337
  msgid "Delete All Logs"
338
  msgstr ""
339
 
340
+ #: dist/include/Core/UI/ListTable/LogListTable.php:273
341
+ #: include/Core/UI/ListTable/LogListTable.php:273
342
  msgid "Your email log is empty"
343
  msgstr ""
344
 
345
+ #: dist/include/Core/UI/ListTable/LogListTable.php:300
346
+ #: include/Core/UI/ListTable/LogListTable.php:300
347
  msgid "Search by date"
348
  msgstr ""
349
 
350
+ #: dist/include/Core/UI/ListTable/LogListTable.php:301
351
+ #: include/Core/UI/ListTable/LogListTable.php:301
352
  msgid "Search by term"
353
  msgstr ""
354
 
426
  msgid "Support"
427
  msgstr ""
428
 
429
+ #. #-#-#-#-# email-log.pot (Email Log 2.2.1) #-#-#-#-#
430
  #. Plugin Name of the plugin/theme
431
  #: dist/include/Core/UI/Page/LogListPage.php:57
432
  #: dist/include/Core/UI/Page/LogListPage.php:58
450
  msgid "Entries per page"
451
  msgstr ""
452
 
 
453
  #: dist/include/Core/UI/Page/SettingsPage.php:94
454
+ #: dist/include/Core/UI/Page/SettingsPage.php:95
455
  #: include/Core/UI/Page/SettingsPage.php:94
456
+ #: include/Core/UI/Page/SettingsPage.php:95
457
  msgid "Settings"
458
  msgstr ""
459
 
460
+ #: dist/include/Core/UI/Page/SettingsPage.php:111
461
+ #: include/Core/UI/Page/SettingsPage.php:111
462
  msgid "Email Log Settings"
463
  msgstr ""
464
 
465
+ #: dist/include/Core/UI/Page/SettingsPage.php:119
466
+ #: include/Core/UI/Page/SettingsPage.php:119
467
  msgid "Save"
468
  msgstr ""
469
 
535
  msgid "Error"
536
  msgstr ""
537
 
 
 
 
 
 
 
 
 
 
 
 
 
538
  #: tmp_addon/AutoDeleteLogsSetting.php:15
539
  msgid "Auto Delete Logs Add-on Settings"
540
  msgstr ""
load-email-log.php CHANGED
@@ -7,6 +7,7 @@
7
  *
8
  * @since 2.0
9
  */
 
10
 
11
  /**
12
  * Load Email Log plugin.
@@ -72,6 +73,7 @@ function load_email_log( $plugin_file ) {
72
  * @since 2.0
73
  *
74
  * @global \EmailLog\Core\EmailLog $email_log
 
75
  * @return \EmailLog\Core\EmailLog
76
  */
77
  function email_log() {
7
  *
8
  * @since 2.0
9
  */
10
+ defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
11
 
12
  /**
13
  * Load Email Log plugin.
73
  * @since 2.0
74
  *
75
  * @global \EmailLog\Core\EmailLog $email_log
76
+ *
77
  * @return \EmailLog\Core\EmailLog
78
  */
79
  function email_log() {
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: email, log, log email, resend email, multisite
4
  Requires PHP: 5.3
5
  Requires at least: 4.0
6
  Tested up to: 4.9
7
- Stable tag: 2.2.0
8
 
9
  Log and view all outgoing emails from WordPress. Works with WordPress Multisite as well.
10
 
@@ -23,12 +23,13 @@ While viewing the logs, the emails can be filtered or sorted based on the date,
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
 
27
  ### Resend email (Pro addon)
28
 
29
  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),
30
  which allows you to resend the email directly from the email log.
31
- The add-on allows you to modify the different fields before resending the email.
32
 
33
  ### More Fields (Pro addon)
34
 
@@ -44,13 +45,17 @@ which shows additional fields in the email log page. The following are the addit
44
  ### Forward email (Pro addon)
45
 
46
  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),
47
- which allows you to send a copy of all the emails send from WordPress, to another email address.
48
  The addon allows you to choose whether you want to forward through to, cc or bcc fields.
49
  This can be extremely useful when you want to debug by analyzing the emails that are sent from WordPress.
50
 
 
 
 
 
51
  ### Cleaning up db on uninstall
52
 
53
- As [recommended by Ozh][1], the Plugin has an uninstall hook which will clean up the database when the Plugin is uninstalled.
54
 
55
  [1]: http://sudarmuthu.com/blog/2009/10/07/lessons-from-wordpress-plugin-competition.html
56
 
@@ -115,6 +120,9 @@ Meanwhile, I have added a hack to handle this condition in v1.7.3 of my plugin.
115
  This Readme file was generated using <a href = 'http://sudarmuthu.com/wordpress/wp-readme'>wp-readme</a>, which generates readme files for WordPress Plugins.
116
  == Changelog ==
117
 
 
 
 
118
  = v2.2.0 - (2017-10-09) =
119
  - New: Dashboard Widget that display summary about email logs.
120
  - Tweak: Performance improvements in add-on license code.
@@ -274,6 +282,9 @@ This Readme file was generated using <a href = 'http://sudarmuthu.com/wordpress/
274
 
275
  == Upgrade Notice ==
276
 
 
 
 
277
  = 2.2.0 =
278
  Added a Dashboard Widget that display summary information about email logs.
279
 
4
  Requires PHP: 5.3
5
  Requires at least: 4.0
6
  Tested up to: 4.9
7
+ Stable tag: 2.2.1
8
 
9
  Log and view all outgoing emails from WordPress. Works with WordPress Multisite as well.
10
 
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)
35
 
45
  ### Forward email (Pro addon)
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)
53
+
54
+ You can buy the [Export Email Logs add-on](https://wpemaillog.com/addons/export-logs/?utm_campaign=Upsell&utm_medium=wporg&utm_source=readme&utm_content=el), which allows you to export the email logs as a csv file for further processing or record keeping.
55
+
56
  ### Cleaning up db on uninstall
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
 
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.2.1 - (2017-11-04) =
124
+ - Tweak: Improved the UX of the view email content screen.
125
+
126
  = v2.2.0 - (2017-10-09) =
127
  - New: Dashboard Widget that display summary about email logs.
128
  - Tweak: Performance improvements in add-on license code.
282
 
283
  == Upgrade Notice ==
284
 
285
+ = 2.2.1 =
286
+ Improved the UX of the view email content screen.
287
+
288
  = 2.2.0 =
289
  Added a Dashboard Widget that display summary information about email logs.
290