Email Log - Version 2.2.4

Version Description

Download this release

Release Info

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

Code changes from version 2.2.3 to 2.2.4

data/products.json CHANGED
@@ -174,7 +174,7 @@
174
  "slug": "export-logs",
175
  "title": "Export Logs",
176
  "create_date": "2017-03-07 11:20:12",
177
- "modified_date": "2017-07-15 09:13:51",
178
  "status": "publish",
179
  "link": "https:\/\/wpemaillog.com\/?post_type=download&p=308",
180
  "content": "Export Logs add-on allows you to export the logged email logs as a csv file. The exported logs can be used for further processing or for record keeping.\r\n<h3>Screenshots<\/h3>\r\n[gallery ids=\"965,966,967,968\"]",
@@ -205,11 +205,11 @@
205
  },
206
  "licensing": {
207
  "enabled": true,
208
- "version": "1.0.0",
209
  "exp_unit": "years",
210
  "exp_length": "1"
211
  }
212
  }
213
  ],
214
- "request_speed": 0.0049359798431396484
215
- }
174
  "slug": "export-logs",
175
  "title": "Export Logs",
176
  "create_date": "2017-03-07 11:20:12",
177
+ "modified_date": "2017-11-08 23:46:42",
178
  "status": "publish",
179
  "link": "https:\/\/wpemaillog.com\/?post_type=download&p=308",
180
  "content": "Export Logs add-on allows you to export the logged email logs as a csv file. The exported logs can be used for further processing or for record keeping.\r\n<h3>Screenshots<\/h3>\r\n[gallery ids=\"965,966,967,968\"]",
205
  },
206
  "licensing": {
207
  "enabled": true,
208
+ "version": "1.1.0",
209
  "exp_unit": "years",
210
  "exp_length": "1"
211
  }
212
  }
213
  ],
214
+ "request_speed": 0.010409116744995117
215
+ }
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.2.3
9
  * Author URI: http://sudarmuthu.com/
10
  * Text Domain: email-log
11
  * Domain Path: languages/
5
  * Description: Logs every email sent through WordPress
6
  * Donate Link: http://sudarmuthu.com/if-you-wanna-thank-me
7
  * Author: Sudar
8
+ * Version: 2.2.4
9
  * Author URI: http://sudarmuthu.com/
10
  * Text Domain: email-log
11
  * Domain Path: languages/
include/Addon/API/EDDUpdater.php CHANGED
@@ -15,7 +15,8 @@ if ( ! class_exists( 'EDD_SL_Plugin_Updater' ) ) {
15
  class EDDUpdater extends \EDD_SL_Plugin_Updater {
16
 
17
  /**
18
- * Add-on slug.
 
19
  * The base class already has a slug property but it is private.
20
  * So we have to create a duplicate to handle that.
21
  *
@@ -23,6 +24,18 @@ class EDDUpdater extends \EDD_SL_Plugin_Updater {
23
  */
24
  protected $addon_slug;
25
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  /**
27
  * Extract add-on slug alone and then pass everything to parent.
28
  *
@@ -32,6 +45,7 @@ class EDDUpdater extends \EDD_SL_Plugin_Updater {
32
  */
33
  public function __construct( $_api_url, $_plugin_file, $_api_data = null ) {
34
  $this->addon_slug = basename( $_plugin_file, '.php' );
 
35
 
36
  parent::__construct( $_api_url, $_plugin_file, $_api_data );
37
  }
@@ -48,7 +62,7 @@ class EDDUpdater extends \EDD_SL_Plugin_Updater {
48
 
49
  $installed_plugins = array_keys( get_plugins() );
50
 
51
- if ( in_array( $this->addon_slug, $installed_plugins, true ) ) {
52
  return;
53
  }
54
 
@@ -58,14 +72,30 @@ class EDDUpdater extends \EDD_SL_Plugin_Updater {
58
  /**
59
  * Get add-on slug.
60
  *
 
 
61
  * @return string Add-on slug.
62
  */
63
  public function get_slug() {
64
  return $this->addon_slug;
65
  }
66
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
  /**
68
  * Get Download URL.
 
69
  * We can't call `api_request` method directly since it is declared as private in parent class.
70
  * So we call the `plugins_api_filter` method instead.
71
  *
@@ -73,7 +103,7 @@ class EDDUpdater extends \EDD_SL_Plugin_Updater {
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 );
79
 
15
  class EDDUpdater extends \EDD_SL_Plugin_Updater {
16
 
17
  /**
18
+ * The name part of the add-on file without .php extension.
19
+ *
20
  * The base class already has a slug property but it is private.
21
  * So we have to create a duplicate to handle that.
22
  *
24
  */
25
  protected $addon_slug;
26
 
27
+ /**
28
+ * Directory and filename of the add-on.
29
+ *
30
+ * The base class already has a slug property but it is private.
31
+ * So we have to create a duplicate to handle that.
32
+ *
33
+ * @since 2.2.4
34
+ *
35
+ * @var string
36
+ */
37
+ protected $addon_name;
38
+
39
  /**
40
  * Extract add-on slug alone and then pass everything to parent.
41
  *
45
  */
46
  public function __construct( $_api_url, $_plugin_file, $_api_data = null ) {
47
  $this->addon_slug = basename( $_plugin_file, '.php' );
48
+ $this->addon_name = plugin_basename( $_plugin_file );
49
 
50
  parent::__construct( $_api_url, $_plugin_file, $_api_data );
51
  }
62
 
63
  $installed_plugins = array_keys( get_plugins() );
64
 
65
+ if ( in_array( $this->get_name(), $installed_plugins, true ) ) {
66
  return;
67
  }
68
 
72
  /**
73
  * Get add-on slug.
74
  *
75
+ * The name part of the add-on file without .php extension.
76
+ *
77
  * @return string Add-on slug.
78
  */
79
  public function get_slug() {
80
  return $this->addon_slug;
81
  }
82
 
83
+ /**
84
+ * Get the add-on name.
85
+ *
86
+ * Directory and filename of the add-on.
87
+ *
88
+ * @since 2.2.4
89
+ *
90
+ * @return string Add-on name.
91
+ */
92
+ public function get_name() {
93
+ return $this->addon_name;
94
+ }
95
+
96
  /**
97
  * Get Download URL.
98
+ *
99
  * We can't call `api_request` method directly since it is declared as private in parent class.
100
  * So we call the `plugins_api_filter` method instead.
101
  *
103
  */
104
  public function get_download_url() {
105
  $args = new \stdClass();
106
+ $args->slug = $this->get_slug();
107
 
108
  $response = $this->plugins_api_filter( null, 'plugin_information', $args );
109
 
include/Addon/Addon.php CHANGED
@@ -124,6 +124,8 @@ class Addon {
124
  * Print actions that are available when the license is valid.
125
  */
126
  protected function print_valid_actions() {
 
 
127
  if ( $this->is_installed() ) {
128
  $actions = '<a disabled class="button button-secondary">' . _x( 'Installed', 'Installed on website but not activated', 'email-log' );
129
 
@@ -132,20 +134,38 @@ class Addon {
132
  } else {
133
  $actions .= sprintf( '</a> <a class="button button-primary" href="%s">%s</a>', $this->get_activate_url(), _x( 'Activate', 'Enable addon so it may be used', 'email-log' ) );
134
  }
135
- } else {
136
- $actions = sprintf( '<a class="button button-primary" href="%s">%s</a>', $this->get_install_url(), _x( 'Install', 'Download and activate addon', 'email-log' ) );
137
  }
138
 
139
- $actions .= sprintf( ' <a class="button button-secondary" target="_blank" href="%s">%s</a>', $this->get_download_url(), _x( 'Download', 'Download to your computer', 'email-log' ) );
 
 
 
 
 
140
 
141
  echo $actions;
142
  }
143
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
144
  /**
145
  * Print actions that are available when the license is not valid.
146
  */
147
  protected function print_invalid_actions() {
148
- $label = _x( 'Activate License to Install', 'Download and activate addon', 'email-log' );
149
 
150
  if ( $this->is_installed() ) {
151
  $label = _x( 'Activate License to Use', 'Download and activate addon', 'email-log' );
@@ -153,7 +173,7 @@ class Addon {
153
 
154
  printf(
155
  '<a disabled class="button-secondary disabled" title="%s" href="#">%s</a>',
156
- __( 'You need an active license to install the add-on', 'email-log' ),
157
  $label
158
  );
159
  }
124
  * Print actions that are available when the license is valid.
125
  */
126
  protected function print_valid_actions() {
127
+ $actions = '';
128
+
129
  if ( $this->is_installed() ) {
130
  $actions = '<a disabled class="button button-secondary">' . _x( 'Installed', 'Installed on website but not activated', 'email-log' );
131
 
134
  } else {
135
  $actions .= sprintf( '</a> <a class="button button-primary" href="%s">%s</a>', $this->get_activate_url(), _x( 'Activate', 'Enable addon so it may be used', 'email-log' ) );
136
  }
 
 
137
  }
138
 
139
+ $actions .= sprintf(
140
+ ' <a class="button button-secondary" target="_blank" onclick="%s" href="%s">%s</a>',
141
+ $this->get_download_button_js(),
142
+ $this->get_download_url(),
143
+ _x( 'Download', 'Download to your computer', 'email-log' )
144
+ );
145
 
146
  echo $actions;
147
  }
148
 
149
+ /**
150
+ * Return the JavaScript that shows the message when the Download button is clicked.
151
+ *
152
+ * @since 2.2.4
153
+ *
154
+ * @return string JavaScript.
155
+ */
156
+ protected function get_download_button_js() {
157
+ ob_start();
158
+ ?>
159
+ javascript:alert( 'You will now be able to download the zip file. Once the zip file is downloaded, upload it from the plugin page to install the add-on.' );
160
+ <?php
161
+ return ob_get_clean();
162
+ }
163
+
164
  /**
165
  * Print actions that are available when the license is not valid.
166
  */
167
  protected function print_invalid_actions() {
168
+ $label = _x( 'Activate License to Download', 'Download add-on', 'email-log' );
169
 
170
  if ( $this->is_installed() ) {
171
  $label = _x( 'Activate License to Use', 'Download and activate addon', 'email-log' );
173
 
174
  printf(
175
  '<a disabled class="button-secondary disabled" title="%s" href="#">%s</a>',
176
+ __( 'You need an active license to use the add-on', 'email-log' ),
177
  $label
178
  );
179
  }
include/Addon/EmailLogAddon.php CHANGED
@@ -45,8 +45,6 @@ abstract class EmailLogAddon {
45
 
46
  /**
47
  * Load the add-on and setup hooks.
48
- *
49
- *
50
  */
51
  public function load() {
52
  if ( is_null( $this->updater ) ) {
45
 
46
  /**
47
  * Load the add-on and setup hooks.
 
 
48
  */
49
  public function load() {
50
  if ( is_null( $this->updater ) ) {
include/Addon/addon-helper.php CHANGED
@@ -25,7 +25,7 @@ function load_email_log_addon( $addon_class, $addon_file ) {
25
 
26
  $addon_updater = null;
27
 
28
- if ( ! \EmailLog\Util\is_admin_non_ajax_request() ) {
29
  $addon_updater = new \EmailLog\Addon\AddonUpdater( $addon_file );
30
  }
31
 
25
 
26
  $addon_updater = null;
27
 
28
+ if ( \EmailLog\Util\is_admin_non_ajax_request() ) {
29
  $addon_updater = new \EmailLog\Addon\AddonUpdater( $addon_file );
30
  }
31
 
include/Core/EmailLog.php CHANGED
@@ -17,7 +17,7 @@ class EmailLog {
17
  *
18
  * @var string
19
  */
20
- const VERSION = '2.2.3';
21
 
22
  /**
23
  * Email Log Store URL.
17
  *
18
  * @var string
19
  */
20
+ const VERSION = '2.2.4';
21
 
22
  /**
23
  * Email Log Store URL.
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.3\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/email-log\n"
7
- "POT-Creation-Date: 2017-11-09 17:23:02+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -30,69 +30,64 @@ msgid ""
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
 
@@ -426,7 +421,7 @@ msgstr ""
426
  msgid "Support"
427
  msgstr ""
428
 
429
- #. #-#-#-#-# email-log.pot (Email Log 2.2.3) #-#-#-#-#
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
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.4\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/email-log\n"
7
+ "POT-Creation-Date: 2017-11-24 10:18:37+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
30
  "after sometime. If the problem persists contact support."
31
  msgstr ""
32
 
33
+ #: dist/include/Addon/Addon.php:130 include/Addon/Addon.php:130
34
  msgctxt "Installed on website but not activated"
35
  msgid "Installed"
36
  msgstr ""
37
 
38
+ #: dist/include/Addon/Addon.php:133 include/Addon/Addon.php:133
39
  msgctxt "Installed and activated on website"
40
  msgid "Activated"
41
  msgstr ""
42
 
43
+ #: dist/include/Addon/Addon.php:135 include/Addon/Addon.php:135
44
  msgctxt "Enable addon so it may be used"
45
  msgid "Activate"
46
  msgstr ""
47
 
48
+ #: dist/include/Addon/Addon.php:143 include/Addon/Addon.php:143
 
 
 
 
 
49
  msgctxt "Download to your computer"
50
  msgid "Download"
51
  msgstr ""
52
 
53
+ #: dist/include/Addon/Addon.php:168 include/Addon/Addon.php:168
54
+ msgctxt "Download add-on"
55
+ msgid "Activate License to Download"
56
  msgstr ""
57
 
58
+ #: dist/include/Addon/Addon.php:171 include/Addon/Addon.php:171
59
  msgctxt "Download and activate addon"
60
  msgid "Activate License to Use"
61
  msgstr ""
62
 
63
+ #: dist/include/Addon/Addon.php:176 include/Addon/Addon.php:176
64
+ msgid "You need an active license to use the add-on"
65
  msgstr ""
66
 
67
+ #: dist/include/Addon/Addon.php:186 dist/include/Addon/License/Licenser.php:103
68
+ #: include/Addon/Addon.php:186 include/Addon/License/Licenser.php:103
69
  msgid "Activate"
70
  msgstr ""
71
 
72
+ #: dist/include/Addon/Addon.php:194 dist/include/Addon/License/Licenser.php:109
73
+ #: include/Addon/Addon.php:194 include/Addon/License/Licenser.php:109
74
  msgid "Deactivate"
75
  msgstr ""
76
 
77
+ #: dist/include/Addon/Addon.php:200 dist/include/Addon/License/Licenser.php:112
78
+ #: include/Addon/Addon.php:200 include/Addon/License/Licenser.php:112
79
  msgid "Your license expires on %s"
80
  msgstr ""
81
 
82
+ #: dist/include/Addon/Addon.php:205 include/Addon/Addon.php:205
83
  msgid "Individual add-on license"
84
  msgstr ""
85
 
86
+ #: dist/include/Addon/Addon.php:210 include/Addon/Addon.php:210
87
  msgid "Email Log License Key"
88
  msgstr ""
89
 
90
+ #: dist/include/Addon/Addon.php:211 include/Addon/Addon.php:211
91
  msgid "%s Add-on License Key"
92
  msgstr ""
93
 
421
  msgid "Support"
422
  msgstr ""
423
 
424
+ #. #-#-#-#-# email-log.pot (Email Log 2.2.4) #-#-#-#-#
425
  #. Plugin Name of the plugin/theme
426
  #: dist/include/Core/UI/Page/LogListPage.php:57
427
  #: dist/include/Core/UI/Page/LogListPage.php:58
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.3
8
 
9
  Log and view all outgoing emails from WordPress. Works with WordPress Multisite as well.
10
 
@@ -120,6 +120,9 @@ 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.2.3 - (2017-11-09) =
124
  - Fix: Escaped all the fields while displaying email details in popup.
125
 
4
  Requires PHP: 5.3
5
  Requires at least: 4.0
6
  Tested up to: 4.9
7
+ Stable tag: 2.2.4
8
 
9
  Log and view all outgoing emails from WordPress. Works with WordPress Multisite as well.
10
 
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.4 - (2017-11-23) =
124
+ - Tweak: Tweaks to how the license is handled.
125
+
126
  = v2.2.3 - (2017-11-09) =
127
  - Fix: Escaped all the fields while displaying email details in popup.
128