Version Description
Fix a bug in the save user options function
Download this release
Release Info
Developer | sudar |
Plugin | Email Log |
Version | 1.7.5 |
Comparing to | |
See all releases |
Code changes from version 1.7.4 to 1.7.5
- email-log.php +27 -40
- include/class-email-log-list-table.php +1 -1
- include/install.php +1 -4
- js/email-log.js +24 -0
- languages/email-log.pot +19 -19
- readme.txt +11 -2
email-log.php
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://sudarmuthu.com/wordpress/email-log
|
|
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.7.
|
9 |
Author URI: http://sudarmuthu.com/
|
10 |
Text Domain: email-log
|
11 |
Domain Path: languages/
|
@@ -14,7 +14,7 @@ Domain Path: languages/
|
|
14 |
Check readme file for full release notes
|
15 |
*/
|
16 |
|
17 |
-
|
18 |
|
19 |
This program is free software; you can redistribute it and/or modify
|
20 |
it under the terms of the GNU General Public License, version 2, as
|
@@ -49,6 +49,7 @@ class EmailLog {
|
|
49 |
|
50 |
private $admin_screen;
|
51 |
|
|
|
52 |
const FILTER_NAME = 'wp_mail_log';
|
53 |
const PAGE_SLUG = 'email-log';
|
54 |
const DELETE_LOG_NONCE_FIELD = 'sm-delete-email-log-nonce';
|
@@ -59,34 +60,34 @@ class EmailLog {
|
|
59 |
const DB_OPTION_NAME = 'email-log-db'; /* Database option name */
|
60 |
const DB_VERSION = '0.1'; /* Database version */
|
61 |
|
|
|
|
|
|
|
62 |
//hooks
|
63 |
const HOOK_LOG_COLUMNS = 'email_log_manage_log_columns';
|
64 |
const HOOK_LOG_DISPLAY_COLUMNS = 'email_log_display_log_columns';
|
65 |
|
66 |
/**
|
67 |
-
*
|
68 |
*/
|
69 |
function __construct() {
|
70 |
// Load localization domain
|
71 |
$this->translations = dirname(plugin_basename(__FILE__)) . '/languages/' ;
|
72 |
-
load_plugin_textdomain( 'email-log', false, $this->translations);
|
73 |
|
74 |
// Register hooks
|
75 |
-
add_action( 'admin_menu', array(
|
76 |
|
77 |
// Register Filter
|
78 |
-
add_filter('wp_mail', array(
|
79 |
-
add_filter('set-screen-option', array(
|
80 |
-
add_filter( 'plugin_row_meta', array(
|
81 |
|
82 |
$plugin = plugin_basename(__FILE__);
|
83 |
-
add_filter("plugin_action_links_$plugin", array(
|
84 |
|
85 |
//Add our ajax call
|
86 |
-
add_action( 'wp_ajax_display_content', array(
|
87 |
-
|
88 |
-
// Add our javascript in the footer
|
89 |
-
add_action( 'admin_footer', array(&$this, 'include_js') );
|
90 |
}
|
91 |
|
92 |
/**
|
@@ -110,6 +111,9 @@ class EmailLog {
|
|
110 |
$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') );
|
111 |
|
112 |
add_action("load-{$this->admin_page}",array(&$this,'create_settings_panel'));
|
|
|
|
|
|
|
113 |
}
|
114 |
|
115 |
/**
|
@@ -207,33 +211,12 @@ class EmailLog {
|
|
207 |
}
|
208 |
|
209 |
/**
|
210 |
-
* Include JavaScript displaying email content
|
211 |
*
|
212 |
-
* @since 1.
|
213 |
*/
|
214 |
function include_js() {
|
215 |
-
|
216 |
-
?>
|
217 |
-
<script type="text/javascript">
|
218 |
-
jQuery(document).ready(function($) {
|
219 |
-
|
220 |
-
$(".email_content").click(function() {
|
221 |
-
|
222 |
-
var w = window.open('', 'newwin', 'width=650,height=500');
|
223 |
-
|
224 |
-
var email_id = $(this).attr('id').replace('email_content_','');
|
225 |
-
data = {
|
226 |
-
action: 'display_content',
|
227 |
-
email_id: email_id
|
228 |
-
};
|
229 |
-
|
230 |
-
$.post(ajaxurl, data, function (response) {
|
231 |
-
$(w.document.body).html(response);
|
232 |
-
});
|
233 |
-
});
|
234 |
-
});
|
235 |
-
</script>
|
236 |
-
<?php
|
237 |
}
|
238 |
|
239 |
/**
|
@@ -258,10 +241,14 @@ class EmailLog {
|
|
258 |
}
|
259 |
|
260 |
/**
|
261 |
-
* Save Screen option
|
262 |
*/
|
263 |
-
function save_screen_options($status, $option, $value) {
|
264 |
-
if ( 'per_page' == $option )
|
|
|
|
|
|
|
|
|
265 |
}
|
266 |
|
267 |
/**
|
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.7.5
|
9 |
Author URI: http://sudarmuthu.com/
|
10 |
Text Domain: email-log
|
11 |
Domain Path: languages/
|
14 |
Check readme file for full release notes
|
15 |
*/
|
16 |
|
17 |
+
/** Copyright 2009 Sudar Muthu (email : sudar@sudarmuthu.com)
|
18 |
|
19 |
This program is free software; you can redistribute it and/or modify
|
20 |
it under the terms of the GNU General Public License, version 2, as
|
49 |
|
50 |
private $admin_screen;
|
51 |
|
52 |
+
const VERSION = '1.7.5';
|
53 |
const FILTER_NAME = 'wp_mail_log';
|
54 |
const PAGE_SLUG = 'email-log';
|
55 |
const DELETE_LOG_NONCE_FIELD = 'sm-delete-email-log-nonce';
|
60 |
const DB_OPTION_NAME = 'email-log-db'; /* Database option name */
|
61 |
const DB_VERSION = '0.1'; /* Database version */
|
62 |
|
63 |
+
// JS Stuff
|
64 |
+
const JS_HANDLE = 'email-log';
|
65 |
+
|
66 |
//hooks
|
67 |
const HOOK_LOG_COLUMNS = 'email_log_manage_log_columns';
|
68 |
const HOOK_LOG_DISPLAY_COLUMNS = 'email_log_display_log_columns';
|
69 |
|
70 |
/**
|
71 |
+
* Initialize the plugin by registering the hooks
|
72 |
*/
|
73 |
function __construct() {
|
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 );
|
85 |
|
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 |
/**
|
111 |
$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') );
|
112 |
|
113 |
add_action("load-{$this->admin_page}",array(&$this,'create_settings_panel'));
|
114 |
+
|
115 |
+
// enqueue JavaScript
|
116 |
+
add_action( 'admin_print_scripts-' . $this->admin_page, array( $this, 'include_js' ) );
|
117 |
}
|
118 |
|
119 |
/**
|
211 |
}
|
212 |
|
213 |
/**
|
214 |
+
* Include JavaScript displaying email content.
|
215 |
*
|
216 |
+
* @since 1.7.5
|
217 |
*/
|
218 |
function include_js() {
|
219 |
+
wp_enqueue_script( self::JS_HANDLE, plugins_url( '/js/email-log.js', __FILE__ ), array( 'jquery' ), self::VERSION, TRUE );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
220 |
}
|
221 |
|
222 |
/**
|
241 |
}
|
242 |
|
243 |
/**
|
244 |
+
* Save Screen option.
|
245 |
*/
|
246 |
+
function save_screen_options( $status, $option, $value ) {
|
247 |
+
if ( 'per_page' == $option ) {
|
248 |
+
return $value;
|
249 |
+
} else {
|
250 |
+
return $status;
|
251 |
+
}
|
252 |
}
|
253 |
|
254 |
/**
|
include/class-email-log-list-table.php
CHANGED
@@ -110,7 +110,7 @@ class Email_Log_List_Table extends WP_List_Table {
|
|
110 |
/**
|
111 |
* Display sent date column
|
112 |
*/
|
113 |
-
function column_sent_date($item){
|
114 |
|
115 |
//Build row actions
|
116 |
$actions = array(
|
110 |
/**
|
111 |
* Display sent date column
|
112 |
*/
|
113 |
+
function column_sent_date($item) {
|
114 |
|
115 |
//Build row actions
|
116 |
$actions = array(
|
include/install.php
CHANGED
@@ -39,11 +39,8 @@ class Email_Log_Init {
|
|
39 |
foreach ( $blog_ids as $blog_id ) {
|
40 |
switch_to_blog( $blog_id );
|
41 |
self::create_emaillog_table();
|
|
|
42 |
}
|
43 |
-
|
44 |
-
// Switch back to the current blog
|
45 |
-
switch_to_blog( $current_blog );
|
46 |
-
|
47 |
} else {
|
48 |
self::create_emaillog_table();
|
49 |
}
|
39 |
foreach ( $blog_ids as $blog_id ) {
|
40 |
switch_to_blog( $blog_id );
|
41 |
self::create_emaillog_table();
|
42 |
+
restore_current_blog();
|
43 |
}
|
|
|
|
|
|
|
|
|
44 |
} else {
|
45 |
self::create_emaillog_table();
|
46 |
}
|
js/email-log.js
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* JavaScript for Email Log Plugin.
|
3 |
+
*
|
4 |
+
* http://sudarmuthu.com/wordpress/email-log
|
5 |
+
*
|
6 |
+
* @author: Sudar <http://sudarmuthu.com>
|
7 |
+
*/
|
8 |
+
|
9 |
+
/*jslint browser: true, devel: true*/
|
10 |
+
/*global jQuery, document*/
|
11 |
+
jQuery(document).ready(function($) {
|
12 |
+
$(".email_content").click(function() {
|
13 |
+
var w = window.open('', 'newwin', 'width=650,height=500'),
|
14 |
+
email_id = $(this).attr('id').replace('email_content_',''),
|
15 |
+
data = {
|
16 |
+
action: 'display_content',
|
17 |
+
email_id: email_id
|
18 |
+
};
|
19 |
+
|
20 |
+
$.post(ajaxurl, data, function (response) {
|
21 |
+
$(w.document.body).html(response);
|
22 |
+
});
|
23 |
+
});
|
24 |
+
});
|
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.7.
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/email-log\n"
|
7 |
-
"POT-Creation-Date: 2014-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -12,73 +12,73 @@ msgstr ""
|
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
|
15 |
-
#: email-log.php:
|
16 |
msgid "Buy Addons"
|
17 |
msgstr ""
|
18 |
|
19 |
-
#: email-log.php:
|
20 |
msgid "Email Log"
|
21 |
msgstr ""
|
22 |
|
23 |
-
#: email-log.php:
|
24 |
msgid "Email Logs"
|
25 |
msgstr ""
|
26 |
|
27 |
-
#: email-log.php:
|
28 |
msgid "1 email log deleted."
|
29 |
msgid_plural "%s email logs deleted"
|
30 |
msgstr[0] ""
|
31 |
msgstr[1] ""
|
32 |
|
33 |
-
#: email-log.php:
|
34 |
msgid "There was some problem in deleting the email logs"
|
35 |
msgstr ""
|
36 |
|
37 |
-
#: email-log.php:
|
38 |
msgid "Search Logs"
|
39 |
msgstr ""
|
40 |
|
41 |
-
#: email-log.php:
|
42 |
msgid "About Plugin"
|
43 |
msgstr ""
|
44 |
|
45 |
-
#: email-log.php:
|
46 |
msgid "Email Log WordPress Plugin, allows you to log all emails that are sent through WordPress."
|
47 |
msgstr ""
|
48 |
|
49 |
-
#: email-log.php:
|
50 |
msgid "More information"
|
51 |
msgstr ""
|
52 |
|
53 |
-
#: email-log.php:
|
54 |
msgid "Plugin Homepage/support"
|
55 |
msgstr ""
|
56 |
|
57 |
-
#: email-log.php:
|
58 |
msgid "Plugin author's blog"
|
59 |
msgstr ""
|
60 |
|
61 |
-
#: email-log.php:
|
62 |
msgid "Other Plugin's by Author"
|
63 |
msgstr ""
|
64 |
|
65 |
-
#: email-log.php:
|
66 |
msgid "Entries per page"
|
67 |
msgstr ""
|
68 |
|
69 |
-
#: email-log.php:
|
70 |
msgid "Log"
|
71 |
msgstr ""
|
72 |
|
73 |
-
#: email-log.php:
|
74 |
msgid "plugin"
|
75 |
msgstr ""
|
76 |
|
77 |
-
#: email-log.php:
|
78 |
msgid "Version"
|
79 |
msgstr ""
|
80 |
|
81 |
-
#: email-log.php:
|
82 |
msgid "by"
|
83 |
msgstr ""
|
84 |
|
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.7.5\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/email-log\n"
|
7 |
+
"POT-Creation-Date: 2014-09-24 06:48:43+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 |
+
#: email-log.php:101
|
16 |
msgid "Buy Addons"
|
17 |
msgstr ""
|
18 |
|
19 |
+
#: email-log.php:111
|
20 |
msgid "Email Log"
|
21 |
msgstr ""
|
22 |
|
23 |
+
#: email-log.php:127
|
24 |
msgid "Email Logs"
|
25 |
msgstr ""
|
26 |
|
27 |
+
#: email-log.php:133
|
28 |
msgid "1 email log deleted."
|
29 |
msgid_plural "%s email logs deleted"
|
30 |
msgstr[0] ""
|
31 |
msgstr[1] ""
|
32 |
|
33 |
+
#: email-log.php:135
|
34 |
msgid "There was some problem in deleting the email logs"
|
35 |
msgstr ""
|
36 |
|
37 |
+
#: email-log.php:143
|
38 |
msgid "Search Logs"
|
39 |
msgstr ""
|
40 |
|
41 |
+
#: email-log.php:176 tmp_addon/email-log-forward-email.php:152
|
42 |
msgid "About Plugin"
|
43 |
msgstr ""
|
44 |
|
45 |
+
#: email-log.php:178 tmp_addon/email-log-forward-email.php:154
|
46 |
msgid "Email Log WordPress Plugin, allows you to log all emails that are sent through WordPress."
|
47 |
msgstr ""
|
48 |
|
49 |
+
#: email-log.php:185 tmp_addon/email-log-forward-email.php:162
|
50 |
msgid "More information"
|
51 |
msgstr ""
|
52 |
|
53 |
+
#: email-log.php:186 tmp_addon/email-log-forward-email.php:163
|
54 |
msgid "Plugin Homepage/support"
|
55 |
msgstr ""
|
56 |
|
57 |
+
#: email-log.php:187 tmp_addon/email-log-forward-email.php:164
|
58 |
msgid "Plugin author's blog"
|
59 |
msgstr ""
|
60 |
|
61 |
+
#: email-log.php:188 tmp_addon/email-log-forward-email.php:165
|
62 |
msgid "Other Plugin's by Author"
|
63 |
msgstr ""
|
64 |
|
65 |
+
#: email-log.php:195
|
66 |
msgid "Entries per page"
|
67 |
msgstr ""
|
68 |
|
69 |
+
#: email-log.php:283
|
70 |
msgid "Log"
|
71 |
msgstr ""
|
72 |
|
73 |
+
#: email-log.php:293
|
74 |
msgid "plugin"
|
75 |
msgstr ""
|
76 |
|
77 |
+
#: email-log.php:293
|
78 |
msgid "Version"
|
79 |
msgstr ""
|
80 |
|
81 |
+
#: email-log.php:293
|
82 |
msgid "by"
|
83 |
msgstr ""
|
84 |
|
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:
|
6 |
-
Stable tag: 1.7.
|
7 |
|
8 |
Logs every email sent through WordPress. Works with WordPress Multisite as well
|
9 |
|
@@ -118,6 +118,12 @@ wpmandrill plugin has a bug that prevents this plugin from logging the content o
|
|
118 |
This Readme file was generated using <a href = 'http://sudarmuthu.com/wordpress/wp-readme'>wp-readme</a>, which generates readme files for WordPress Plugins.
|
119 |
== Changelog ==
|
120 |
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
= v1.7.4 (2014-07-24) - (Dev time: 0.5 hours) =
|
122 |
- Fix: Handle cases where `date_format` or `time_format` are empty (issue #23)
|
123 |
- Tweak: Remove excessive comments from include/class-email-log-list-table.php (issue #10)
|
@@ -219,6 +225,9 @@ This Readme file was generated using <a href = 'http://sudarmuthu.com/wordpress/
|
|
219 |
|
220 |
== Upgrade Notice ==
|
221 |
|
|
|
|
|
|
|
222 |
= 1.7.4 =
|
223 |
Handle cases where `date_format` or `time_format` are empty
|
224 |
|
2 |
Contributors: sudar
|
3 |
Tags: email, log, multisite
|
4 |
Requires at least: 3.3
|
5 |
+
Tested up to: 4.0
|
6 |
+
Stable tag: 1.7.5
|
7 |
|
8 |
Logs every email sent through WordPress. Works with WordPress Multisite as well
|
9 |
|
118 |
This Readme file was generated using <a href = 'http://sudarmuthu.com/wordpress/wp-readme'>wp-readme</a>, which generates readme files for WordPress Plugins.
|
119 |
== Changelog ==
|
120 |
|
121 |
+
= v1.7.5 (2014-09-23) - (Dev time: 1 hour) =
|
122 |
+
- Tweak: Remove PHP 4.0 compatibility code
|
123 |
+
- Tweak: Tweak the install code (issue #26)
|
124 |
+
- Fix: Include JavaScript only when needed
|
125 |
+
- Fix: Fix a bug in the save user options function (issue #27)
|
126 |
+
|
127 |
= v1.7.4 (2014-07-24) - (Dev time: 0.5 hours) =
|
128 |
- Fix: Handle cases where `date_format` or `time_format` are empty (issue #23)
|
129 |
- Tweak: Remove excessive comments from include/class-email-log-list-table.php (issue #10)
|
225 |
|
226 |
== Upgrade Notice ==
|
227 |
|
228 |
+
= 1.7.5 =
|
229 |
+
Fix a bug in the save user options function
|
230 |
+
|
231 |
= 1.7.4 =
|
232 |
Handle cases where `date_format` or `time_format` are empty
|
233 |
|