Email Log - Version 1.9

Version Description

  • Fixed issues with pagination.
Download this release

Release Info

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

Code changes from version 1.8.2 to 1.9

AUTHORS.md ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ Contributors in the order of first contribution
2
+
3
+ - [Sudar Muthu](https://github.com/sudar)
4
+ - [samuelaguilera](https://github.com/samuelaguilera)
5
+ - [ChuckMac](https://github.com/ChuckMac)
6
+ - [Maria Daniel Deepak](https://github.com/mariadanieldeepak)
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: 1.8.2
9
  * Author URI: http://sudarmuthu.com/
10
  * Text Domain: email-log
11
  * Domain Path: languages/
@@ -36,21 +36,78 @@ if ( ! defined( 'EMAIL_LOG_PLUGIN_FILE' ) ) {
36
  define( 'EMAIL_LOG_PLUGIN_FILE', __FILE__ );
37
  }
38
 
39
- // handle installation and table creation
 
 
40
  require_once plugin_dir_path( __FILE__ ) . 'include/install.php';
41
 
42
  /**
43
- * The main Plugin class
 
 
 
 
 
 
 
44
  */
45
  class EmailLog {
 
 
 
 
 
 
 
46
  public $include_path;
47
 
 
 
 
 
 
 
 
48
  private $admin_screen;
49
 
50
- const VERSION = '1.8.2';
 
 
 
 
 
 
 
 
 
 
 
 
 
51
  const FILTER_NAME = 'wp_mail_log';
 
 
 
 
 
 
 
52
  const PAGE_SLUG = 'email-log';
 
 
 
 
 
 
 
53
  const DELETE_LOG_NONCE_FIELD = 'sm-delete-email-log-nonce';
 
 
 
 
 
 
 
54
  const DELETE_LOG_ACTION = 'sm-delete-email-log';
55
 
56
  // DB stuff
@@ -66,19 +123,19 @@ class EmailLog {
66
  const HOOK_LOG_DISPLAY_COLUMNS = 'email_log_display_log_columns';
67
 
68
  /**
69
- * Initialize the plugin by registering the hooks
70
  */
71
  function __construct() {
72
  $this->include_path = plugin_dir_path( __FILE__ );
73
 
74
- // Load localization domain
75
  $this->translations = dirname( plugin_basename( __FILE__ ) ) . '/languages/' ;
76
  load_plugin_textdomain( 'email-log', false, $this->translations );
77
 
78
- // Register hooks
79
  add_action( 'admin_menu', array( $this, 'register_settings_page' ) );
80
 
81
- // Register Filter
82
  add_filter( 'wp_mail', array( $this, 'log_email' ) );
83
  add_filter( 'set-screen-option', array( $this, 'save_screen_options' ), 10, 3 );
84
  add_filter( 'plugin_row_meta', array( $this, 'add_plugin_links' ), 10, 2 );
@@ -86,18 +143,23 @@ class EmailLog {
86
  $plugin = plugin_basename( __FILE__ );
87
  add_filter( "plugin_action_links_$plugin", array( $this, 'add_action_links' ) );
88
 
89
- //Add our ajax call
90
  add_action( 'wp_ajax_display_content', array( $this, 'display_content_callback' ) );
91
  }
92
 
93
  /**
94
- * Adds additional links in the Plugin listing. Based on http://zourbuth.com/archives/751/creating-additional-wordpress-plugin-links-row-meta/
 
 
95
  *
96
- * @param unknown $links
97
- * @param unknown $file
98
- * @return unknown
 
 
 
99
  */
100
- function add_plugin_links( $links, $file ) {
101
  $plugin = plugin_basename( __FILE__ );
102
 
103
  if ( $file == $plugin ) {
@@ -110,19 +172,23 @@ class EmailLog {
110
  }
111
 
112
  /**
113
- * Register the settings page
 
 
114
  */
115
- function register_settings_page() {
116
- //Save the handle to your admin page - you'll need it to create a WP_Screen object
117
  $this->admin_page = add_submenu_page( 'tools.php', __( 'Email Log', 'email-log' ), __( 'Email Log', 'email-log' ), 'manage_options', self::PAGE_SLUG , array( $this, 'display_logs' ) );
118
 
119
  add_action( "load-{$this->admin_page}", array( $this, 'create_settings_panel' ) );
120
  }
121
 
122
  /**
123
- * Display email logs
 
 
124
  */
125
- function display_logs() {
126
  add_thickbox();
127
 
128
  $this->logs_table->prepare_items( $this->get_per_page() );
@@ -169,9 +235,11 @@ class EmailLog {
169
  }
170
 
171
  /**
172
- * Add settings Panel
 
 
173
  */
174
- function create_settings_panel() {
175
 
176
  /**
177
  * Create the WP_Screen object against your admin page handle
@@ -222,11 +290,11 @@ class EmailLog {
222
  }
223
 
224
  /**
225
- * AJAX callback for displaying email content
226
  *
227
  * @since 1.6
228
  */
229
- function display_content_callback() {
230
  global $wpdb;
231
 
232
  $table_name = $wpdb->prefix . self::TABLE_NAME;
@@ -241,12 +309,14 @@ class EmailLog {
241
  }
242
 
243
  /**
244
- * Save Screen option.
 
 
245
  *
246
- * @param unknown $status
247
- * @param unknown $option
248
- * @param unknown $value
249
- * @return unknown
250
  */
251
  function save_screen_options( $status, $option, $value ) {
252
  if ( 'per_page' == $option ) {
@@ -257,12 +327,11 @@ class EmailLog {
257
  }
258
 
259
  /**
260
- * Get the per page option
261
  *
262
- * @static
263
- * @access public
264
  *
265
- * @return int $per_page Number of logs a user wanted to be displayed in a page
266
  */
267
  public static function get_per_page() {
268
  $screen = get_current_screen();
@@ -278,12 +347,14 @@ class EmailLog {
278
  }
279
 
280
  /**
281
- * hook to add action links
 
 
282
  *
283
- * @param <type> $links
284
- * @return <type>
285
  */
286
- function add_action_links( $links ) {
287
  // Add a link to this plugin's settings page
288
  $settings_link = '<a href="tools.php?page=email-log">' . __( 'Log', 'email-log' ) . '</a>';
289
  array_unshift( $links, $settings_link );
@@ -291,21 +362,29 @@ class EmailLog {
291
  }
292
 
293
  /**
294
- * Adds Footer links. Based on http://striderweb.com/nerdaphernalia/2008/06/give-your-wordpress-plugin-credit/
 
 
 
 
 
295
  */
296
- function add_footer_links() {
297
  $plugin_data = get_plugin_data( __FILE__ );
298
  printf( '%1$s ' . __( 'plugin', 'email-log' ) . ' | ' . __( 'Version', 'email-log' ) . ' %2$s | ' . __( 'by', 'email-log' ) . ' %3$s<br />', $plugin_data['Title'], $plugin_data['Version'], $plugin_data['Author'] );
299
  }
300
 
301
  /**
302
- * Log email to database
 
 
303
  *
304
  * @global object $wpdb
305
- * @param array $mail_info Information about email
306
- * @return array Information about email
 
307
  */
308
- function log_email( $mail_info ) {
309
  global $wpdb;
310
 
311
  $attachment_present = ( count( $mail_info['attachments'] ) > 0 ) ? 'true' : 'false';
@@ -338,24 +417,15 @@ class EmailLog {
338
 
339
  return $mail_info;
340
  }
341
-
342
- /**
343
- * Check whether a key is present.
344
- *
345
- * If present returns the value, else returns the default value
346
- *
347
- * @param array $array Array whose key has to be checked
348
- * @param string $key Key that has to be checked
349
- * @param string $default The default value that has to be used, if the key is not found (optional)
350
- * @return mixed If present returns the value, else returns the default value
351
- */
352
- private function array_get( $array, $key, $default = null ) {
353
- return isset( $array[ $key ] ) ? $array[ $key ] : $default;
354
- }
355
  }
356
 
357
  /**
358
- * Start this plugin once all other plugins are fully loaded
 
 
 
 
 
359
  */
360
  function email_log() {
361
  global $EmailLog;
5
  * Description: Logs every email sent through WordPress
6
  * Donate Link: http://sudarmuthu.com/if-you-wanna-thank-me
7
  * Author: Sudar
8
+ * Version: 1.9
9
  * Author URI: http://sudarmuthu.com/
10
  * Text Domain: email-log
11
  * Domain Path: languages/
36
  define( 'EMAIL_LOG_PLUGIN_FILE', __FILE__ );
37
  }
38
 
39
+ /**
40
+ * Handles installation and table creation.
41
+ */
42
  require_once plugin_dir_path( __FILE__ ) . 'include/install.php';
43
 
44
  /**
45
+ * Helper functions.
46
+ */
47
+ require_once plugin_dir_path( __FILE__ ) . 'include/util/helper.php';
48
+
49
+ /**
50
+ * The main plugin class.
51
+ *
52
+ * @since Genesis
53
  */
54
  class EmailLog {
55
+
56
+ /**
57
+ * Filesystem directory path with trailing slash.
58
+ *
59
+ * @since Genesis
60
+ * @var string $include_path
61
+ */
62
  public $include_path;
63
 
64
+ /**
65
+ * Admin screen object.
66
+ *
67
+ * @since Genesis
68
+ * @access private
69
+ * @var string $include_path
70
+ */
71
  private $admin_screen;
72
 
73
+ /**
74
+ * Version number.
75
+ *
76
+ * @since Genesis
77
+ * @var const VERSION
78
+ */
79
+ const VERSION = '1.9';
80
+
81
+ /**
82
+ * Filter name.
83
+ *
84
+ * @since Genesis
85
+ * @var const FILTER_NAME
86
+ */
87
  const FILTER_NAME = 'wp_mail_log';
88
+
89
+ /**
90
+ * Page slug to be used in admin dashboard hyperlinks.
91
+ *
92
+ * @since Genesis
93
+ * @var const PAGE_SLUG
94
+ */
95
  const PAGE_SLUG = 'email-log';
96
+
97
+ /**
98
+ * String value to generate nonce.
99
+ *
100
+ * @since Genesis
101
+ * @var const DELETE_LOG_NONCE_FIELD
102
+ */
103
  const DELETE_LOG_NONCE_FIELD = 'sm-delete-email-log-nonce';
104
+
105
+ /**
106
+ * String value to generate nonce.
107
+ *
108
+ * @since Genesis
109
+ * @var const DELETE_LOG_ACTION
110
+ */
111
  const DELETE_LOG_ACTION = 'sm-delete-email-log';
112
 
113
  // DB stuff
123
  const HOOK_LOG_DISPLAY_COLUMNS = 'email_log_display_log_columns';
124
 
125
  /**
126
+ * Initialize the plugin by registering the hooks.
127
  */
128
  function __construct() {
129
  $this->include_path = plugin_dir_path( __FILE__ );
130
 
131
+ // Load localization domain.
132
  $this->translations = dirname( plugin_basename( __FILE__ ) ) . '/languages/' ;
133
  load_plugin_textdomain( 'email-log', false, $this->translations );
134
 
135
+ // Register hooks.
136
  add_action( 'admin_menu', array( $this, 'register_settings_page' ) );
137
 
138
+ // Register Filter.
139
  add_filter( 'wp_mail', array( $this, 'log_email' ) );
140
  add_filter( 'set-screen-option', array( $this, 'save_screen_options' ), 10, 3 );
141
  add_filter( 'plugin_row_meta', array( $this, 'add_plugin_links' ), 10, 2 );
143
  $plugin = plugin_basename( __FILE__ );
144
  add_filter( "plugin_action_links_$plugin", array( $this, 'add_action_links' ) );
145
 
146
+ // Add our ajax call.
147
  add_action( 'wp_ajax_display_content', array( $this, 'display_content_callback' ) );
148
  }
149
 
150
  /**
151
+ * Adds additional links in the plugin listing page.
152
+ *
153
+ * @since Genesis
154
  *
155
+ * @see Additional links in the Plugin listing is based on
156
+ * @link http://zourbuth.com/archives/751/creating-additional-wordpress-plugin-links-row-meta/
157
+ *
158
+ * @param array $links Array with default links to display in plugins page.
159
+ * @param string $file The name of the plugin file.
160
+ * @return array Array with links to display in plugins page.
161
  */
162
+ public function add_plugin_links( $links, $file ) {
163
  $plugin = plugin_basename( __FILE__ );
164
 
165
  if ( $file == $plugin ) {
172
  }
173
 
174
  /**
175
+ * Registers the settings page.
176
+ *
177
+ * @since Genesis
178
  */
179
+ public function register_settings_page() {
180
+ // Save the handle to your admin page - you'll need it to create a WP_Screen object
181
  $this->admin_page = add_submenu_page( 'tools.php', __( 'Email Log', 'email-log' ), __( 'Email Log', 'email-log' ), 'manage_options', self::PAGE_SLUG , array( $this, 'display_logs' ) );
182
 
183
  add_action( "load-{$this->admin_page}", array( $this, 'create_settings_panel' ) );
184
  }
185
 
186
  /**
187
+ * Displays the stored email log.
188
+ *
189
+ * @since Genesis
190
  */
191
+ public function display_logs() {
192
  add_thickbox();
193
 
194
  $this->logs_table->prepare_items( $this->get_per_page() );
235
  }
236
 
237
  /**
238
+ * Adds settings panel for the plugin.
239
+ *
240
+ * @since Genesis
241
  */
242
+ public function create_settings_panel() {
243
 
244
  /**
245
  * Create the WP_Screen object against your admin page handle
290
  }
291
 
292
  /**
293
+ * AJAX callback for displaying email content.
294
  *
295
  * @since 1.6
296
  */
297
+ public function display_content_callback() {
298
  global $wpdb;
299
 
300
  $table_name = $wpdb->prefix . self::TABLE_NAME;
309
  }
310
 
311
  /**
312
+ * Saves Screen options.
313
+ *
314
+ * @since Genesis
315
  *
316
+ * @param bool|int $status Screen option value. Default false to skip.
317
+ * @param string $option The option name.
318
+ * @param int $value The number of rows to use.
319
+ * @return bool|int
320
  */
321
  function save_screen_options( $status, $option, $value ) {
322
  if ( 'per_page' == $option ) {
327
  }
328
 
329
  /**
330
+ * Gets the per page option.
331
  *
332
+ * @since Genesis
 
333
  *
334
+ * @return int Number of logs a user wanted to be displayed in a page.
335
  */
336
  public static function get_per_page() {
337
  $screen = get_current_screen();
347
  }
348
 
349
  /**
350
+ * Adds additional links.
351
+ *
352
+ * @since Genesis
353
  *
354
+ * @param array $links
355
+ * @return array
356
  */
357
+ public function add_action_links( $links ) {
358
  // Add a link to this plugin's settings page
359
  $settings_link = '<a href="tools.php?page=email-log">' . __( 'Log', 'email-log' ) . '</a>';
360
  array_unshift( $links, $settings_link );
362
  }
363
 
364
  /**
365
+ * Adds Footer links.
366
+ *
367
+ * @since Genesis
368
+ *
369
+ * @see Function relied on
370
+ * @link http://striderweb.com/nerdaphernalia/2008/06/give-your-wordpress-plugin-credit/
371
  */
372
+ public function add_footer_links() {
373
  $plugin_data = get_plugin_data( __FILE__ );
374
  printf( '%1$s ' . __( 'plugin', 'email-log' ) . ' | ' . __( 'Version', 'email-log' ) . ' %2$s | ' . __( 'by', 'email-log' ) . ' %3$s<br />', $plugin_data['Title'], $plugin_data['Version'], $plugin_data['Author'] );
375
  }
376
 
377
  /**
378
+ * Logs email to database.
379
+ *
380
+ * @since Genesis
381
  *
382
  * @global object $wpdb
383
+ *
384
+ * @param array $mail_info Information about email.
385
+ * @return array Information about email.
386
  */
387
+ public function log_email( $mail_info ) {
388
  global $wpdb;
389
 
390
  $attachment_present = ( count( $mail_info['attachments'] ) > 0 ) ? 'true' : 'false';
417
 
418
  return $mail_info;
419
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
420
  }
421
 
422
  /**
423
+ * Instantiates the plugin class
424
+ *
425
+ * @since Genesis
426
+ *
427
+ * @see Class `EmailLog`
428
+ * @global EmailLog $EmailLog
429
  */
430
  function email_log() {
431
  global $EmailLog;
include/class-email-header-parser.php CHANGED
@@ -52,7 +52,7 @@ class Email_Header_Parser {
52
  /**
53
  * Return parsed headers.
54
  *
55
- * @param string $headers Headers to parse
56
  * @return array Parsed Headers.
57
  */
58
  public function parse_headers( $headers ) {
@@ -65,7 +65,7 @@ class Email_Header_Parser {
65
  * @access private
66
  *
67
  * @param string $headers Headers to be parsed.
68
- * @return array Parsed headers
69
  */
70
  private function parse( $headers ) {
71
  $data = array();
@@ -108,8 +108,9 @@ class Email_Header_Parser {
108
  *
109
  * @since 1.0
110
  * @access private
111
- * @param array $header Header line to be parsed
112
- * @return string Parsed value
 
113
  */
114
  private function parse_header_line( $header ) {
115
  $value = '';
52
  /**
53
  * Return parsed headers.
54
  *
55
+ * @param string $headers Headers to parse.
56
  * @return array Parsed Headers.
57
  */
58
  public function parse_headers( $headers ) {
65
  * @access private
66
  *
67
  * @param string $headers Headers to be parsed.
68
+ * @return array Parsed headers.
69
  */
70
  private function parse( $headers ) {
71
  $data = array();
108
  *
109
  * @since 1.0
110
  * @access private
111
+ *
112
+ * @param array $header Header line to be parsed.
113
+ * @return string Parsed value.
114
  */
115
  private function parse_header_line( $header ) {
116
  $value = '';
include/class-email-log-list-table.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Table to display Email Logs.
4
  *
5
- * Based on Custom List Table Example by Matt Van Andel
6
  *
7
  * @author Sudar
8
  * @package Email Log
@@ -11,24 +11,27 @@ class Email_Log_List_Table extends WP_List_Table {
11
 
12
  /**
13
  * Set up a constructor that references the parent constructor.
 
14
  * We use the parent reference to set some default configs.
15
  */
16
- function __construct() {
17
  parent::__construct( array(
18
- 'singular' => 'email-log', //singular name of the listed records
19
- 'plural' => 'email-logs', //plural name of the listed records
20
- 'ajax' => false, //does this table support ajax?
21
- ) );
22
  }
23
 
24
  /**
25
- * Add extra markup in the toolbars before or after the list
 
 
26
  *
27
- * @param string $which Add the markup after (bottom) or before (top) the list
28
  */
29
- function extra_tablenav( $which ) {
30
  if ( 'top' == $which ) {
31
- //The code that goes before the table is here
32
  echo '<span id = "el-pro-msg">';
33
  _e( 'More fields are available in Pro addon. ', 'email-log' );
34
  echo '<a href = "http://sudarmuthu.com/out/buy-email-log-more-fields-addon" style = "color:red">';
@@ -38,7 +41,7 @@ class Email_Log_List_Table extends WP_List_Table {
38
  }
39
 
40
  if ( 'bottom' == $which ) {
41
- //The code that goes after the table is there
42
  echo '<p>&nbsp;</p>';
43
  echo '<p>&nbsp;</p>';
44
 
@@ -74,12 +77,13 @@ class Email_Log_List_Table extends WP_List_Table {
74
  }
75
 
76
  /**
77
- * Return the list of column and title names.
78
  *
79
  * @see WP_List_Table::::single_row_columns()
80
- * @return array An associative array containing column information: 'slugs'=>'Visible Titles'
 
81
  */
82
- function get_columns() {
83
  $columns = array(
84
  'cb' => '<input type="checkbox" />', //Render a checkbox instead of text
85
  'sent_date' => __( 'Sent at', 'email-log' ),
@@ -91,11 +95,13 @@ class Email_Log_List_Table extends WP_List_Table {
91
  }
92
 
93
  /**
94
- * Return the list of columns
95
  *
96
- * @return array An associative array containing all the columns that should be sortable: 'slugs'=>array('data_values',bool)
 
 
97
  */
98
- function get_sortable_columns() {
99
  $sortable_columns = array(
100
  'sent_date' => array( 'sent_date', true ), //true means it's already sorted
101
  'to' => array( 'to_email', false ),
@@ -105,22 +111,26 @@ class Email_Log_List_Table extends WP_List_Table {
105
  }
106
 
107
  /**
108
- * Return values for default columns
 
 
109
  *
110
- * @param unknown $item
111
- * @param unknown $column_name
112
  */
113
- function column_default( $item, $column_name ) {
114
  do_action( EmailLog::HOOK_LOG_DISPLAY_COLUMNS, $column_name, $item );
115
  }
116
 
117
  /**
118
  * Display sent date column.
119
  *
120
- * @param object $item Current item object
121
- * @return string Markup to be displayed for the column
 
 
122
  */
123
- function column_sent_date( $item ) {
124
  $email_date = mysql2date(
125
  sprintf( __( '%s @ %s', 'email-log' ), get_option( 'date_format', 'F j, Y' ), get_option( 'time_format', 'g:i A' ) ),
126
  $item->sent_date
@@ -163,6 +173,7 @@ class Email_Log_List_Table extends WP_List_Table {
163
  * This filter can be used to modify the list of row actions that are displayed.
164
  *
165
  * @since 1.8
 
166
  * @param array $actions List of actions.
167
  * @param object $item The current log item.
168
  */
@@ -176,32 +187,38 @@ class Email_Log_List_Table extends WP_List_Table {
176
  }
177
 
178
  /**
179
- * To field
 
 
180
  *
181
- * @param unknown $item
182
- * @return unknown
183
  */
184
- function column_to( $item ) {
185
- return stripslashes( $item->to_email );
186
  }
187
 
188
  /**
189
- * Subject field
 
 
190
  *
191
- * @param unknown $item
192
- * @return unknown
193
  */
194
- function column_subject( $item ) {
195
- return stripslashes( $item->subject );
196
  }
197
 
198
  /**
199
- * Markup for action column
200
  *
201
- * @param unknown $item
202
- * @return unknown
 
 
203
  */
204
- function column_cb( $item ) {
205
  return sprintf(
206
  '<input type="checkbox" name="%1$s[]" value="%2$s" />',
207
  /*$1%s*/ $this->_args['singular'],
@@ -210,11 +227,13 @@ class Email_Log_List_Table extends WP_List_Table {
210
  }
211
 
212
  /**
213
- * Specify the list of bulk actions
 
 
214
  *
215
- * @return array An associative array containing all the bulk actions: 'slugs'=>'Visible Titles'
216
  */
217
- function get_bulk_actions() {
218
  $actions = array(
219
  'delete' => __( 'Delete', 'email-log' ),
220
  'delete-all' => __( 'Delete All Logs', 'email-log' ),
@@ -223,16 +242,16 @@ class Email_Log_List_Table extends WP_List_Table {
223
  }
224
 
225
  /**
226
- * Handle bulk actions
227
  *
228
  * @see $this->prepare_items()
229
  */
230
- function process_bulk_action() {
231
  global $wpdb;
232
- global $EmailLog;
233
 
234
  if ( 'delete' === $this->current_action() ) {
235
- // delete a list of logs by id
236
 
237
  $nonce = $_REQUEST[ EmailLog::DELETE_LOG_NONCE_FIELD ];
238
  if ( wp_verify_nonce( $nonce, EmailLog::DELETE_LOG_ACTION ) ) {
@@ -251,16 +270,16 @@ class Email_Log_List_Table extends WP_List_Table {
251
  $selected_ids = esc_sql( $selected_ids );
252
 
253
  $table_name = $wpdb->prefix . EmailLog::TABLE_NAME;
254
- $EmailLog->logs_deleted = $wpdb->query( "DELETE FROM $table_name where id IN ( $selected_ids )" );
255
  } else {
256
  wp_die( 'Cheating, Huh? ' );
257
  }
258
- } else if ( 'delete-all' === $this->current_action() ) {
259
- // delete all logs
260
  $nonce = $_REQUEST[ EmailLog::DELETE_LOG_NONCE_FIELD ];
261
  if ( wp_verify_nonce( $nonce, EmailLog::DELETE_LOG_ACTION ) ) {
262
  $table_name = $wpdb->prefix . EmailLog::TABLE_NAME;
263
- $EmailLog->logs_deleted = $wpdb->query( "DELETE FROM $table_name" );
264
  } else {
265
  wp_die( 'Cheating, Huh? ' );
266
  }
@@ -270,20 +289,20 @@ class Email_Log_List_Table extends WP_List_Table {
270
  /**
271
  * Prepare data for display.
272
  */
273
- function prepare_items() {
274
  global $wpdb;
275
 
276
  $table_name = $wpdb->prefix . EmailLog::TABLE_NAME;
277
  $this->_column_headers = $this->get_column_info();
278
 
279
- // Handle bulk actions
280
  $this->process_bulk_action();
281
 
282
- // get current page number
283
  $current_page = $this->get_pagenum();
284
 
285
  $query = 'SELECT * FROM ' . $table_name;
286
- $count_query = 'SELECT * FROM ' . $table_name;
287
  $query_cond = '';
288
 
289
  if ( isset( $_GET['s'] ) ) {
@@ -291,7 +310,7 @@ class Email_Log_List_Table extends WP_List_Table {
291
  $query_cond .= " WHERE to_email LIKE '%$search_term%' OR subject LIKE '%$search_term%' ";
292
  }
293
 
294
- // Ordering parameters
295
  $orderby = ! empty( $_GET['orderby'] ) ? esc_sql( $_GET['orderby'] ) : 'sent_date';
296
  $order = ! empty( $_GET['order'] ) ? esc_sql( $_GET['order'] ) : 'DESC';
297
 
@@ -299,33 +318,33 @@ class Email_Log_List_Table extends WP_List_Table {
299
  $query_cond .= ' ORDER BY ' . $orderby . ' ' . $order;
300
  }
301
 
302
- // find total number of items
303
  $count_query = $count_query . $query_cond;
304
  $total_items = $wpdb->get_var( $count_query );
305
 
306
- // adjust the query to take pagination into account
307
  $per_page = EmailLog::get_per_page();
308
  if ( ! empty( $current_page ) && ! empty( $per_page ) ) {
309
  $offset = ( $current_page - 1 ) * $per_page;
310
  $query_cond .= ' LIMIT ' . (int) $offset . ',' . (int) $per_page;
311
  }
312
 
313
- // Fetch the items
314
  $query = $query . $query_cond;
315
  $this->items = $wpdb->get_results( $query );
316
 
317
- // register pagination options & calculations.
318
  $this->set_pagination_args( array(
319
- 'total_items' => $total_items,
320
- 'per_page' => $per_page,
321
- 'total_pages' => ceil( $total_items / $per_page ),
322
- ) );
323
  }
324
 
325
  /**
326
- * If no items are found
327
  */
328
- function no_items() {
329
  _e( 'Your email log is empty', 'email-log' );
330
  }
331
  }
2
  /**
3
  * Table to display Email Logs.
4
  *
5
+ * Based on Custom List Table Example by Matt Van Andel.
6
  *
7
  * @author Sudar
8
  * @package Email Log
11
 
12
  /**
13
  * Set up a constructor that references the parent constructor.
14
+ *
15
  * We use the parent reference to set some default configs.
16
  */
17
+ public function __construct() {
18
  parent::__construct( array(
19
+ 'singular' => 'email-log', //singular name of the listed records
20
+ 'plural' => 'email-logs', //plural name of the listed records
21
+ 'ajax' => false, //does this table support ajax?
22
+ ) );
23
  }
24
 
25
  /**
26
+ * Adds extra markup in the toolbars before or after the list.
27
+ *
28
+ * @access protected
29
  *
30
+ * @param string $which Add the markup after (bottom) or before (top) the list.
31
  */
32
+ protected function extra_tablenav( $which ) {
33
  if ( 'top' == $which ) {
34
+ // The code that goes before the table is here.
35
  echo '<span id = "el-pro-msg">';
36
  _e( 'More fields are available in Pro addon. ', 'email-log' );
37
  echo '<a href = "http://sudarmuthu.com/out/buy-email-log-more-fields-addon" style = "color:red">';
41
  }
42
 
43
  if ( 'bottom' == $which ) {
44
+ // The code that goes after the table is here.
45
  echo '<p>&nbsp;</p>';
46
  echo '<p>&nbsp;</p>';
47
 
77
  }
78
 
79
  /**
80
+ * Returns the list of column and title names.
81
  *
82
  * @see WP_List_Table::::single_row_columns()
83
+ *
84
+ * @return array An associative array containing column information: 'slugs'=>'Visible Titles'.
85
  */
86
+ public function get_columns() {
87
  $columns = array(
88
  'cb' => '<input type="checkbox" />', //Render a checkbox instead of text
89
  'sent_date' => __( 'Sent at', 'email-log' ),
95
  }
96
 
97
  /**
98
+ * Returns the list of columns.
99
  *
100
+ * @access protected
101
+ *
102
+ * @return array An associative array containing all the columns that should be sortable: 'slugs'=>array('data_values',bool).
103
  */
104
+ protected function get_sortable_columns() {
105
  $sortable_columns = array(
106
  'sent_date' => array( 'sent_date', true ), //true means it's already sorted
107
  'to' => array( 'to_email', false ),
111
  }
112
 
113
  /**
114
+ * Returns value for default columns.
115
+ *
116
+ * @access protected
117
  *
118
+ * @param object $item
119
+ * @param string $column_name
120
  */
121
+ protected function column_default( $item, $column_name ) {
122
  do_action( EmailLog::HOOK_LOG_DISPLAY_COLUMNS, $column_name, $item );
123
  }
124
 
125
  /**
126
  * Display sent date column.
127
  *
128
+ * @access protected
129
+ *
130
+ * @param object $item Current item object.
131
+ * @return string Markup to be displayed for the column.
132
  */
133
+ protected function column_sent_date( $item ) {
134
  $email_date = mysql2date(
135
  sprintf( __( '%s @ %s', 'email-log' ), get_option( 'date_format', 'F j, Y' ), get_option( 'time_format', 'g:i A' ) ),
136
  $item->sent_date
173
  * This filter can be used to modify the list of row actions that are displayed.
174
  *
175
  * @since 1.8
176
+ *
177
  * @param array $actions List of actions.
178
  * @param object $item The current log item.
179
  */
187
  }
188
 
189
  /**
190
+ * To field.
191
+ *
192
+ * @access protected
193
  *
194
+ * @param object $item
195
+ * @return string
196
  */
197
+ protected function column_to( $item ) {
198
+ return esc_html( $item->to_email );
199
  }
200
 
201
  /**
202
+ * Subject field.
203
+ *
204
+ * @access protected
205
  *
206
+ * @param object $item
207
+ * @return string
208
  */
209
+ protected function column_subject( $item ) {
210
+ return esc_html( $item->subject );
211
  }
212
 
213
  /**
214
+ * Markup for action column.
215
  *
216
+ * @access protected
217
+ *
218
+ * @param object $item
219
+ * @return string
220
  */
221
+ protected function column_cb( $item ) {
222
  return sprintf(
223
  '<input type="checkbox" name="%1$s[]" value="%2$s" />',
224
  /*$1%s*/ $this->_args['singular'],
227
  }
228
 
229
  /**
230
+ * Specify the list of bulk actions.
231
+ *
232
+ * @access protected
233
  *
234
+ * @return array An associative array containing all the bulk actions: 'slugs'=>'Visible Titles'.
235
  */
236
+ protected function get_bulk_actions() {
237
  $actions = array(
238
  'delete' => __( 'Delete', 'email-log' ),
239
  'delete-all' => __( 'Delete All Logs', 'email-log' ),
242
  }
243
 
244
  /**
245
+ * Handles bulk actions.
246
  *
247
  * @see $this->prepare_items()
248
  */
249
+ public function process_bulk_action() {
250
  global $wpdb;
251
+ global $EmailLog; //@codingStandardsIgnoreLine
252
 
253
  if ( 'delete' === $this->current_action() ) {
254
+ // Delete a list of logs by id.
255
 
256
  $nonce = $_REQUEST[ EmailLog::DELETE_LOG_NONCE_FIELD ];
257
  if ( wp_verify_nonce( $nonce, EmailLog::DELETE_LOG_ACTION ) ) {
270
  $selected_ids = esc_sql( $selected_ids );
271
 
272
  $table_name = $wpdb->prefix . EmailLog::TABLE_NAME;
273
+ $EmailLog->logs_deleted = $wpdb->query( "DELETE FROM $table_name where id IN ( $selected_ids )" ); //@codingStandardsIgnoreLine
274
  } else {
275
  wp_die( 'Cheating, Huh? ' );
276
  }
277
+ } elseif ( 'delete-all' === $this->current_action() ) {
278
+ // Delete all logs.
279
  $nonce = $_REQUEST[ EmailLog::DELETE_LOG_NONCE_FIELD ];
280
  if ( wp_verify_nonce( $nonce, EmailLog::DELETE_LOG_ACTION ) ) {
281
  $table_name = $wpdb->prefix . EmailLog::TABLE_NAME;
282
+ $EmailLog->logs_deleted = $wpdb->query( "DELETE FROM $table_name" ); //@codingStandardsIgnoreLine
283
  } else {
284
  wp_die( 'Cheating, Huh? ' );
285
  }
289
  /**
290
  * Prepare data for display.
291
  */
292
+ public function prepare_items() {
293
  global $wpdb;
294
 
295
  $table_name = $wpdb->prefix . EmailLog::TABLE_NAME;
296
  $this->_column_headers = $this->get_column_info();
297
 
298
+ // Handle bulk actions.
299
  $this->process_bulk_action();
300
 
301
+ // Get current page number.
302
  $current_page = $this->get_pagenum();
303
 
304
  $query = 'SELECT * FROM ' . $table_name;
305
+ $count_query = 'SELECT count(*) FROM ' . $table_name;
306
  $query_cond = '';
307
 
308
  if ( isset( $_GET['s'] ) ) {
310
  $query_cond .= " WHERE to_email LIKE '%$search_term%' OR subject LIKE '%$search_term%' ";
311
  }
312
 
313
+ // Ordering parameters.
314
  $orderby = ! empty( $_GET['orderby'] ) ? esc_sql( $_GET['orderby'] ) : 'sent_date';
315
  $order = ! empty( $_GET['order'] ) ? esc_sql( $_GET['order'] ) : 'DESC';
316
 
318
  $query_cond .= ' ORDER BY ' . $orderby . ' ' . $order;
319
  }
320
 
321
+ // Find total number of items.
322
  $count_query = $count_query . $query_cond;
323
  $total_items = $wpdb->get_var( $count_query );
324
 
325
+ // Adjust the query to take pagination into account.
326
  $per_page = EmailLog::get_per_page();
327
  if ( ! empty( $current_page ) && ! empty( $per_page ) ) {
328
  $offset = ( $current_page - 1 ) * $per_page;
329
  $query_cond .= ' LIMIT ' . (int) $offset . ',' . (int) $per_page;
330
  }
331
 
332
+ // Fetch the items.
333
  $query = $query . $query_cond;
334
  $this->items = $wpdb->get_results( $query );
335
 
336
+ // Register pagination options & calculations.
337
  $this->set_pagination_args( array(
338
+ 'total_items' => $total_items,
339
+ 'per_page' => $per_page,
340
+ 'total_pages' => ceil( $total_items / $per_page ),
341
+ ) );
342
  }
343
 
344
  /**
345
+ * Displays default message when no items are found.
346
  */
347
+ public function no_items() {
348
  _e( 'Your email log is empty', 'email-log' );
349
  }
350
  }
include/util/helper.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Email Log Helper functions.
4
+ * Some of these functions would be used the addons.
5
+ */
6
+
7
+ /**
8
+ * Perform additional sanitation of emails.
9
+ *
10
+ * @since 1.9
11
+ *
12
+ * @param string $email Email string to be sanitized.
13
+ * @param bool $multiple (Optional) Should multiple emails be allowed. True by default.
14
+ *
15
+ * @return string Sanitized email.
16
+ */
17
+ function el_sanitize_email( $email, $multiple = true ) {
18
+ $emails = explode( ',', $email );
19
+ if ( ! $multiple ) {
20
+ $emails = array_slice( $emails, 0, 1 );
21
+ }
22
+
23
+ $cleaned_emails = array_map( 'el_sanitize_email_with_name', $emails );
24
+
25
+ return implode( ', ', $cleaned_emails );
26
+ }
27
+
28
+ /**
29
+ * Sanitize email with name.
30
+ *
31
+ * @since 1.9
32
+ *
33
+ * @param $string $email Email string to be sanitized.
34
+ *
35
+ * @return string Sanitized email.
36
+ */
37
+ function el_sanitize_email_with_name( $string ) {
38
+ $string = trim( $string );
39
+
40
+ $bracket_pos = strpos( $string, '<' );
41
+ if ( $bracket_pos !== false ) {
42
+ // Text before the bracketed email is the name.
43
+ if ( $bracket_pos > 0 ) {
44
+ $name = substr( $string, 0, $bracket_pos );
45
+ $name = str_replace( '"', '', $name );
46
+ $name = trim( $name );
47
+
48
+ $email = substr( $string, $bracket_pos + 1 );
49
+ $email = str_replace( '>', '', $email );
50
+
51
+ return sanitize_text_field( $name ) . ' <' . sanitize_email( $email ) . '>';
52
+ }
53
+ }
54
+
55
+ return sanitize_email( $string );
56
+ }
languages/email-log.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the same license as the Email Log package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Email Log 1.8.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/email-log\n"
7
- "POT-Creation-Date: 2016-04-20 11:54:31+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,168 +12,199 @@ msgstr ""
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
15
- #: email-log.php:106
16
  msgid "Buy Addons"
17
  msgstr ""
18
 
19
- #. #-#-#-#-# email-log.pot (Email Log 1.8.2) #-#-#-#-#
20
  #. Plugin Name of the plugin/theme
21
- #: email-log.php:117
22
  msgid "Email Log"
23
  msgstr ""
24
 
25
- #: email-log.php:131
26
  msgid "Email Logs"
27
  msgstr ""
28
 
29
- #: email-log.php:137
30
  msgid "1 email log deleted."
31
  msgid_plural "%s email logs deleted"
32
  msgstr[0] ""
33
  msgstr[1] ""
34
 
35
- #: email-log.php:139
36
  msgid "There was some problem in deleting the email logs"
37
  msgstr ""
38
 
39
- #: email-log.php:147
40
  msgid "Search Logs"
41
  msgstr ""
42
 
43
- #: email-log.php:187 tmp_addon/email-log-forward-email.php:152
 
44
  msgid "About Plugin"
45
  msgstr ""
46
 
47
- #: email-log.php:189 tmp_addon/email-log-forward-email.php:154
 
48
  msgid ""
49
  "Email Log WordPress Plugin, allows you to log all emails that are sent "
50
  "through WordPress."
51
  msgstr ""
52
 
53
- #: email-log.php:196 tmp_addon/email-log-forward-email.php:162
 
54
  msgid "More information"
55
  msgstr ""
56
 
57
- #: email-log.php:197 tmp_addon/email-log-forward-email.php:163
 
58
  msgid "Plugin Homepage/support"
59
  msgstr ""
60
 
61
- #: email-log.php:198 tmp_addon/email-log-forward-email.php:164
 
62
  msgid "Plugin author's blog"
63
  msgstr ""
64
 
65
- #: email-log.php:199 tmp_addon/email-log-forward-email.php:165
 
66
  msgid "Other Plugin's by Author"
67
  msgstr ""
68
 
69
- #: email-log.php:206
70
  msgid "Entries per page"
71
  msgstr ""
72
 
73
- #: email-log.php:288
74
  msgid "Log"
75
  msgstr ""
76
 
77
- #: email-log.php:298
78
  msgid "plugin"
79
  msgstr ""
80
 
81
- #: email-log.php:298
82
  msgid "Version"
83
  msgstr ""
84
 
85
- #: email-log.php:298
86
  msgid "by"
87
  msgstr ""
88
 
89
- #: include/class-email-log-list-table.php:33
 
90
  msgid "More fields are available in Pro addon. "
91
  msgstr ""
92
 
93
- #: include/class-email-log-list-table.php:35
 
94
  msgid "Buy Now"
95
  msgstr ""
96
 
97
- #: include/class-email-log-list-table.php:46
 
98
  msgid ""
99
  "The following are the list of pro addons that are currently available for "
100
  "purchase."
101
  msgstr ""
102
 
103
- #: include/class-email-log-list-table.php:52
 
104
  msgid "Email Log - Resend Email"
105
  msgstr ""
106
 
107
- #: include/class-email-log-list-table.php:53
 
108
  msgid "Adds the ability to resend email from logs."
109
  msgstr ""
110
 
111
- #: include/class-email-log-list-table.php:54
112
- #: include/class-email-log-list-table.php:61
113
- #: include/class-email-log-list-table.php:68
 
 
 
114
  msgid "More Info"
115
  msgstr ""
116
 
117
- #: include/class-email-log-list-table.php:55
118
- #: include/class-email-log-list-table.php:62
119
- #: include/class-email-log-list-table.php:69
 
 
 
120
  msgid "Buy now"
121
  msgstr ""
122
 
123
- #: include/class-email-log-list-table.php:59
 
124
  msgid "Email Log - More fields"
125
  msgstr ""
126
 
127
- #: include/class-email-log-list-table.php:60
 
128
  msgid ""
129
  "Adds more fields (From, CC, BCC, Reply To, Attachment) to the logs page."
130
  msgstr ""
131
 
132
- #: include/class-email-log-list-table.php:66
 
133
  msgid "Email Log - Forward Email"
134
  msgstr ""
135
 
136
- #: include/class-email-log-list-table.php:67
 
137
  msgid ""
138
  "This addon allows you to send a copy of all emails send from WordPress to "
139
  "another email address"
140
  msgstr ""
141
 
142
- #: include/class-email-log-list-table.php:85
 
143
  msgid "Sent at"
144
  msgstr ""
145
 
146
- #: include/class-email-log-list-table.php:86
 
147
  #: tmp_addon/email-log-forward-email.php:180
148
  msgid "To"
149
  msgstr ""
150
 
151
- #: include/class-email-log-list-table.php:87
 
152
  msgid "Subject"
153
  msgstr ""
154
 
155
- #: include/class-email-log-list-table.php:125
 
156
  msgid "%s @ %s"
157
  msgstr ""
158
 
159
- #: include/class-email-log-list-table.php:144
 
160
  msgid "Email Content"
161
  msgstr ""
162
 
163
- #: include/class-email-log-list-table.php:145
 
164
  msgid "View Content"
165
  msgstr ""
166
 
167
- #: include/class-email-log-list-table.php:159
168
- #: include/class-email-log-list-table.php:219
 
 
169
  msgid "Delete"
170
  msgstr ""
171
 
172
- #: include/class-email-log-list-table.php:220
 
173
  msgid "Delete All Logs"
174
  msgstr ""
175
 
176
- #: include/class-email-log-list-table.php:329
 
177
  msgid "Your email log is empty"
178
  msgstr ""
179
 
@@ -192,13 +223,13 @@ msgstr ""
192
 
193
  #: tmp_addon/email-log-forward-email.php:181
194
  #: tmp_addon/email-log-more-fields.php:81
195
- #: tmp_addon/email-log-resend-email.php:50
196
  msgid "CC"
197
  msgstr ""
198
 
199
  #: tmp_addon/email-log-forward-email.php:182
200
  #: tmp_addon/email-log-more-fields.php:82
201
- #: tmp_addon/email-log-resend-email.php:54
202
  msgid "BCC"
203
  msgstr ""
204
 
@@ -214,7 +245,7 @@ msgid "From"
214
  msgstr ""
215
 
216
  #: tmp_addon/email-log-more-fields.php:83
217
- #: tmp_addon/email-log-resend-email.php:58
218
  msgid "Reply To"
219
  msgstr ""
220
 
@@ -230,20 +261,20 @@ msgstr ""
230
  msgid "Additional Details"
231
  msgstr ""
232
 
233
- #: tmp_addon/email-log-resend-email.php:62
234
  msgid "Content Type"
235
  msgstr ""
236
 
237
- #: tmp_addon/email-log-resend-email.php:66
238
- #: tmp_addon/email-log-resend-email.php:85
239
  msgid "Resend Email"
240
  msgstr ""
241
 
242
- #: tmp_addon/email-log-resend-email.php:182
243
  msgid "Email was successfully resent"
244
  msgstr ""
245
 
246
- #: tmp_addon/email-log-resend-email.php:184
247
  msgid "There was some problem in sending the email"
248
  msgstr ""
249
 
2
  # This file is distributed under the same license as the Email Log package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Email Log 1.9\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/email-log\n"
7
+ "POT-Creation-Date: 2016-06-19 07:00:18+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:168 email-log.php:168
16
  msgid "Buy Addons"
17
  msgstr ""
18
 
19
+ #. #-#-#-#-# email-log.pot (Email Log 1.9) #-#-#-#-#
20
  #. Plugin Name of the plugin/theme
21
+ #: dist/email-log.php:181 email-log.php:181
22
  msgid "Email Log"
23
  msgstr ""
24
 
25
+ #: dist/email-log.php:197 email-log.php:197
26
  msgid "Email Logs"
27
  msgstr ""
28
 
29
+ #: dist/email-log.php:203 email-log.php:203
30
  msgid "1 email log deleted."
31
  msgid_plural "%s email logs deleted"
32
  msgstr[0] ""
33
  msgstr[1] ""
34
 
35
+ #: dist/email-log.php:205 email-log.php:205
36
  msgid "There was some problem in deleting the email logs"
37
  msgstr ""
38
 
39
+ #: dist/email-log.php:213 email-log.php:213
40
  msgid "Search Logs"
41
  msgstr ""
42
 
43
+ #: dist/email-log.php:255 email-log.php:255
44
+ #: tmp_addon/email-log-forward-email.php:152
45
  msgid "About Plugin"
46
  msgstr ""
47
 
48
+ #: dist/email-log.php:257 email-log.php:257
49
+ #: tmp_addon/email-log-forward-email.php:154
50
  msgid ""
51
  "Email Log WordPress Plugin, allows you to log all emails that are sent "
52
  "through WordPress."
53
  msgstr ""
54
 
55
+ #: dist/email-log.php:264 email-log.php:264
56
+ #: tmp_addon/email-log-forward-email.php:162
57
  msgid "More information"
58
  msgstr ""
59
 
60
+ #: dist/email-log.php:265 email-log.php:265
61
+ #: tmp_addon/email-log-forward-email.php:163
62
  msgid "Plugin Homepage/support"
63
  msgstr ""
64
 
65
+ #: dist/email-log.php:266 email-log.php:266
66
+ #: tmp_addon/email-log-forward-email.php:164
67
  msgid "Plugin author's blog"
68
  msgstr ""
69
 
70
+ #: dist/email-log.php:267 email-log.php:267
71
+ #: tmp_addon/email-log-forward-email.php:165
72
  msgid "Other Plugin's by Author"
73
  msgstr ""
74
 
75
+ #: dist/email-log.php:274 email-log.php:274
76
  msgid "Entries per page"
77
  msgstr ""
78
 
79
+ #: dist/email-log.php:359 email-log.php:359
80
  msgid "Log"
81
  msgstr ""
82
 
83
+ #: dist/email-log.php:374 email-log.php:374
84
  msgid "plugin"
85
  msgstr ""
86
 
87
+ #: dist/email-log.php:374 email-log.php:374
88
  msgid "Version"
89
  msgstr ""
90
 
91
+ #: dist/email-log.php:374 email-log.php:374
92
  msgid "by"
93
  msgstr ""
94
 
95
+ #: dist/include/class-email-log-list-table.php:36
96
+ #: include/class-email-log-list-table.php:36
97
  msgid "More fields are available in Pro addon. "
98
  msgstr ""
99
 
100
+ #: dist/include/class-email-log-list-table.php:38
101
+ #: include/class-email-log-list-table.php:38
102
  msgid "Buy Now"
103
  msgstr ""
104
 
105
+ #: dist/include/class-email-log-list-table.php:49
106
+ #: include/class-email-log-list-table.php:49
107
  msgid ""
108
  "The following are the list of pro addons that are currently available for "
109
  "purchase."
110
  msgstr ""
111
 
112
+ #: dist/include/class-email-log-list-table.php:55
113
+ #: include/class-email-log-list-table.php:55
114
  msgid "Email Log - Resend Email"
115
  msgstr ""
116
 
117
+ #: dist/include/class-email-log-list-table.php:56
118
+ #: include/class-email-log-list-table.php:56
119
  msgid "Adds the ability to resend email from logs."
120
  msgstr ""
121
 
122
+ #: dist/include/class-email-log-list-table.php:57
123
+ #: dist/include/class-email-log-list-table.php:64
124
+ #: dist/include/class-email-log-list-table.php:71
125
+ #: include/class-email-log-list-table.php:57
126
+ #: include/class-email-log-list-table.php:64
127
+ #: include/class-email-log-list-table.php:71
128
  msgid "More Info"
129
  msgstr ""
130
 
131
+ #: dist/include/class-email-log-list-table.php:58
132
+ #: dist/include/class-email-log-list-table.php:65
133
+ #: dist/include/class-email-log-list-table.php:72
134
+ #: include/class-email-log-list-table.php:58
135
+ #: include/class-email-log-list-table.php:65
136
+ #: include/class-email-log-list-table.php:72
137
  msgid "Buy now"
138
  msgstr ""
139
 
140
+ #: dist/include/class-email-log-list-table.php:62
141
+ #: include/class-email-log-list-table.php:62
142
  msgid "Email Log - More fields"
143
  msgstr ""
144
 
145
+ #: dist/include/class-email-log-list-table.php:63
146
+ #: include/class-email-log-list-table.php:63
147
  msgid ""
148
  "Adds more fields (From, CC, BCC, Reply To, Attachment) to the logs page."
149
  msgstr ""
150
 
151
+ #: dist/include/class-email-log-list-table.php:69
152
+ #: include/class-email-log-list-table.php:69
153
  msgid "Email Log - Forward Email"
154
  msgstr ""
155
 
156
+ #: dist/include/class-email-log-list-table.php:70
157
+ #: include/class-email-log-list-table.php:70
158
  msgid ""
159
  "This addon allows you to send a copy of all emails send from WordPress to "
160
  "another email address"
161
  msgstr ""
162
 
163
+ #: dist/include/class-email-log-list-table.php:89
164
+ #: include/class-email-log-list-table.php:89
165
  msgid "Sent at"
166
  msgstr ""
167
 
168
+ #: dist/include/class-email-log-list-table.php:90
169
+ #: include/class-email-log-list-table.php:90
170
  #: tmp_addon/email-log-forward-email.php:180
171
  msgid "To"
172
  msgstr ""
173
 
174
+ #: dist/include/class-email-log-list-table.php:91
175
+ #: include/class-email-log-list-table.php:91
176
  msgid "Subject"
177
  msgstr ""
178
 
179
+ #: dist/include/class-email-log-list-table.php:135
180
+ #: include/class-email-log-list-table.php:135
181
  msgid "%s @ %s"
182
  msgstr ""
183
 
184
+ #: dist/include/class-email-log-list-table.php:154
185
+ #: include/class-email-log-list-table.php:154
186
  msgid "Email Content"
187
  msgstr ""
188
 
189
+ #: dist/include/class-email-log-list-table.php:155
190
+ #: include/class-email-log-list-table.php:155
191
  msgid "View Content"
192
  msgstr ""
193
 
194
+ #: dist/include/class-email-log-list-table.php:169
195
+ #: dist/include/class-email-log-list-table.php:238
196
+ #: include/class-email-log-list-table.php:169
197
+ #: include/class-email-log-list-table.php:238
198
  msgid "Delete"
199
  msgstr ""
200
 
201
+ #: dist/include/class-email-log-list-table.php:239
202
+ #: include/class-email-log-list-table.php:239
203
  msgid "Delete All Logs"
204
  msgstr ""
205
 
206
+ #: dist/include/class-email-log-list-table.php:348
207
+ #: include/class-email-log-list-table.php:348
208
  msgid "Your email log is empty"
209
  msgstr ""
210
 
223
 
224
  #: tmp_addon/email-log-forward-email.php:181
225
  #: tmp_addon/email-log-more-fields.php:81
226
+ #: tmp_addon/email-log-resend-email.php:51
227
  msgid "CC"
228
  msgstr ""
229
 
230
  #: tmp_addon/email-log-forward-email.php:182
231
  #: tmp_addon/email-log-more-fields.php:82
232
+ #: tmp_addon/email-log-resend-email.php:55
233
  msgid "BCC"
234
  msgstr ""
235
 
245
  msgstr ""
246
 
247
  #: tmp_addon/email-log-more-fields.php:83
248
+ #: tmp_addon/email-log-resend-email.php:60
249
  msgid "Reply To"
250
  msgstr ""
251
 
261
  msgid "Additional Details"
262
  msgstr ""
263
 
264
+ #: tmp_addon/email-log-resend-email.php:65
265
  msgid "Content Type"
266
  msgstr ""
267
 
268
+ #: tmp_addon/email-log-resend-email.php:70
269
+ #: tmp_addon/email-log-resend-email.php:92
270
  msgid "Resend Email"
271
  msgstr ""
272
 
273
+ #: tmp_addon/email-log-resend-email.php:195
274
  msgid "Email was successfully resent"
275
  msgstr ""
276
 
277
+ #: tmp_addon/email-log-resend-email.php:197
278
  msgid "There was some problem in sending the email"
279
  msgstr ""
280
 
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: sudar
3
  Tags: email, log, multisite
4
  Requires at least: 3.3
5
- Tested up to: 4.5
6
- Stable tag: 1.8.2
7
 
8
  Logs every email sent through WordPress. Works with WordPress Multisite as well
9
 
@@ -58,7 +58,8 @@ If you are looking for ideas, then you can start with one of the following TODO
58
  The following are the features that I am thinking of adding to the Plugin, when I get some free time. If you have any feature request or want to increase the priority of a particular feature, then let me know.
59
 
60
  - Add option to automatically delete the logs periodically
61
- - Add the ability to resend the emails
 
62
  - <strike>Make it MU compatible</strike>. Done in v1.7
63
 
64
  ### Support
@@ -121,6 +122,13 @@ wpmandrill plugin has a bug that prevents this plugin from logging the content o
121
  This Readme file was generated using <a href = 'http://sudarmuthu.com/wordpress/wp-readme'>wp-readme</a>, which generates readme files for WordPress Plugins.
122
  == Changelog ==
123
 
 
 
 
 
 
 
 
124
  = v1.8.2 (2016-04-20) - (Dev time: 1 hour) =
125
  - Tweak: Log all emails from the TO field. Earlier the plugin was logging only the first email
126
  - Fix: Fixed issues in parsing reply-to and content-type headers
@@ -244,6 +252,9 @@ This Readme file was generated using <a href = 'http://sudarmuthu.com/wordpress/
244
 
245
  == Upgrade Notice ==
246
 
 
 
 
247
  = 1.8.2 =
248
  Added the ability to log all emails in the TO field instead of just the first one
249
 
2
  Contributors: sudar
3
  Tags: email, log, multisite
4
  Requires at least: 3.3
5
+ Tested up to: 4.5.2
6
+ Stable tag: 1.9
7
 
8
  Logs every email sent through WordPress. Works with WordPress Multisite as well
9
 
58
  The following are the features that I am thinking of adding to the Plugin, when I get some free time. If you have any feature request or want to increase the priority of a particular feature, then let me know.
59
 
60
  - Add option to automatically delete the logs periodically
61
+ - Add an option to export logs as csv file
62
+ - <strike>Add the ability to resend the emails</strike>. Done in Resend Email Add-on
63
  - <strike>Make it MU compatible</strike>. Done in v1.7
64
 
65
  ### Support
122
  This Readme file was generated using <a href = 'http://sudarmuthu.com/wordpress/wp-readme'>wp-readme</a>, which generates readme files for WordPress Plugins.
123
  == Changelog ==
124
 
125
+ = v1.9 - (2016-06-19) - (Dev time: 6 hour) =
126
+ - Fix: Improve the performance of count query (issue #33)
127
+ - Docs: Added access modifiers to class methods
128
+ - Docs: Removed unused array_get() method
129
+ - Docs: Inline documentation added
130
+ - Tests: Added Unit tests
131
+
132
  = v1.8.2 (2016-04-20) - (Dev time: 1 hour) =
133
  - Tweak: Log all emails from the TO field. Earlier the plugin was logging only the first email
134
  - Fix: Fixed issues in parsing reply-to and content-type headers
252
 
253
  == Upgrade Notice ==
254
 
255
+ = 1.9 =
256
+ - Fixed issues with pagination.
257
+
258
  = 1.8.2 =
259
  Added the ability to log all emails in the TO field instead of just the first one
260