Email Log - Version 0.9.1

Version Description

Download this release

Release Info

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

Code changes from version 0.9 to 0.9.1

Files changed (2) hide show
  1. email-log.php +14 -8
  2. readme.txt +13 -3
email-log.php CHANGED
@@ -1,11 +1,11 @@
1
  <?php
2
- /**
3
  Plugin Name: Email Log
4
  Plugin URI: http://sudarmuthu.com/wordpress/email-log
5
  Description: Logs every email sent through WordPress. Compatiable with WPMU too.
6
  Donate Link: http://sudarmuthu.com/if-you-wanna-thank-me
7
  Author: Sudar
8
- Version: 0.8.1
9
  Author URI: http://sudarmuthu.com/
10
  Text Domain: email-log
11
 
@@ -28,6 +28,11 @@ Text Domain: email-log
28
  - Added Dutch translations
29
  2012-07-23 - v0.8.1 - (Dev time: 0.5 hour)
30
  - Reworded most error messages and fixed lot of typos
 
 
 
 
 
31
 
32
  */
33
  /* Copyright 2009 Sudar Muthu (email : sudar@sudarmuthu.com)
@@ -93,7 +98,7 @@ class EmailLog {
93
  */
94
  function register_settings_page() {
95
  //Save the handle to your admin page - you'll need it to create a WP_Screen object
96
- $this->admin_page = add_options_page( __('Email Log', 'email-log'), __('Email Log', 'email-log'), 'manage_options', 'email-log', array(&$this, 'settings_page') );
97
 
98
  add_action("load-{$this->admin_page}",array(&$this,'create_settings_panel'));
99
  }
@@ -171,7 +176,7 @@ class EmailLog {
171
  */
172
  function add_action_links( $links ) {
173
  // Add a link to this plugin's settings page
174
- $settings_link = '<a href="options-general.php?page=email-log">' . __("Settings", 'email-log') . '</a>';
175
  array_unshift( $links, $settings_link );
176
  return $links;
177
  }
@@ -194,7 +199,7 @@ class EmailLog {
194
  global $text_direction;
195
 
196
  $base_name = plugin_basename('email-log');
197
- $base_page = 'admin.php?page='.$base_name;
198
 
199
  $email_log_page = intval($this->array_get($_GET, 'emaillog_page'));
200
  $emaillogs_filterid = trim(addslashes($this->array_get($_GET, 'id')));
@@ -626,11 +631,12 @@ jQuery('document').ready(function() {
626
 
627
  // Log into the database
628
  $wpdb->insert($this->table_name, array(
629
- 'to_email' => $mail_info['to'],
630
  'subject' => $mail_info['subject'],
631
  'message' => $mail_info['message'],
632
- 'headers' => $mail_info['headers'],
633
- 'attachments' => $attachment_present
 
634
  ));
635
 
636
  // return unmodifiyed array
1
  <?php
2
+ /*
3
  Plugin Name: Email Log
4
  Plugin URI: http://sudarmuthu.com/wordpress/email-log
5
  Description: Logs every email sent through WordPress. Compatiable with WPMU too.
6
  Donate Link: http://sudarmuthu.com/if-you-wanna-thank-me
7
  Author: Sudar
8
+ Version: 0.9.1
9
  Author URI: http://sudarmuthu.com/
10
  Text Domain: email-log
11
 
28
  - Added Dutch translations
29
  2012-07-23 - v0.8.1 - (Dev time: 0.5 hour)
30
  - Reworded most error messages and fixed lot of typos
31
+ 2013-01-08 - v0.9 - (Dev time: 1 hour)
32
+ - Use blog date/time for send date instead of server time
33
+ - Handle cases where the headers send is an array
34
+ 2013-01-08 - v0.9.1 - (Dev time: 0.5 hour)
35
+ - Moved the menu under tools (Thanks samuelaguilera)
36
 
37
  */
38
  /* Copyright 2009 Sudar Muthu (email : sudar@sudarmuthu.com)
98
  */
99
  function register_settings_page() {
100
  //Save the handle to your admin page - you'll need it to create a WP_Screen object
101
+ $this->admin_page = add_submenu_page( 'tools.php', __('Email Log', 'email-log'), __('Email Log', 'email-log'), 'manage_options', 'email-log', array(&$this, 'settings_page') );
102
 
103
  add_action("load-{$this->admin_page}",array(&$this,'create_settings_panel'));
104
  }
176
  */
177
  function add_action_links( $links ) {
178
  // Add a link to this plugin's settings page
179
+ $settings_link = '<a href="tools.php?page=email-log">' . __("Log", 'email-log') . '</a>';
180
  array_unshift( $links, $settings_link );
181
  return $links;
182
  }
199
  global $text_direction;
200
 
201
  $base_name = plugin_basename('email-log');
202
+ $base_page = 'tools.php?page='.$base_name;
203
 
204
  $email_log_page = intval($this->array_get($_GET, 'emaillog_page'));
205
  $emaillogs_filterid = trim(addslashes($this->array_get($_GET, 'id')));
631
 
632
  // Log into the database
633
  $wpdb->insert($this->table_name, array(
634
+ 'to_email' => is_array($mail_info['to']) ? $mail_info['to'][0] : $mail_info['to'],
635
  'subject' => $mail_info['subject'],
636
  'message' => $mail_info['message'],
637
+ 'headers' => is_array($mail_info['headers']) ? implode("\r\n", $mail_info['headers']) : $mail_info['headers'],
638
+ 'attachments' => $attachment_present,
639
+ 'sent_date' => current_time('mysql')
640
  ));
641
 
642
  // return unmodifiyed array
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: sudar
3
  Tags: email, wpmu, wordpress-mu, log
4
  Requires at least: 2.8
5
- Tested up to: 3.4.1
6
- Stable tag: 0.8.1
7
 
8
  Logs every email sent through WordPress. Compatible with WPMU too.
9
 
@@ -33,7 +33,10 @@ As [recommended by Ozh][1], the Plugin has uninstall hook which will clean up th
33
 
34
  The pot file is available with the Plugin. If you are willing to do translation for the Plugin, use the pot file to create the .po files for your language and let me know. I will add it to the Plugin after giving credit to you.
35
 
36
- ### Support
 
 
 
37
 
38
  Support for the Plugin is available from the [Plugin's home page][1]. If you have any questions or suggestions, do leave a comment there or contact me in [twitter][2].
39
 
@@ -110,6 +113,13 @@ Extract the zip file and drop the contents in the wp-content/plugins/ directory
110
  ###v0.8.1 (2012-07-23) (Dev time: 0.5 hour)
111
  * Reworded most error messages and fixed lot of typos
112
 
 
 
 
 
 
 
 
113
  ==Readme Generator==
114
 
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.
2
  Contributors: sudar
3
  Tags: email, wpmu, wordpress-mu, log
4
  Requires at least: 2.8
5
+ Tested up to: 3.5
6
+ Stable tag: 0.9.1
7
 
8
  Logs every email sent through WordPress. Compatible with WPMU too.
9
 
33
 
34
  The pot file is available with the Plugin. If you are willing to do translation for the Plugin, use the pot file to create the .po files for your language and let me know. I will add it to the Plugin after giving credit to you.
35
 
36
+ ### Development and Support
37
+ The development of the Plugin happens over at [github](http://github.com/sudar/email-log). If you want to contribute to the Plugin, [fork the project at github](http://github.com/sudar/email-log) and send me a pull request.
38
+
39
+ If you are not familiar with either git or Github then refer to this [guide to see how fork and send pull request](http://sudarmuthu.com/blog/contributing-to-project-hosted-in-github).
40
 
41
  Support for the Plugin is available from the [Plugin's home page][1]. If you have any questions or suggestions, do leave a comment there or contact me in [twitter][2].
42
 
113
  ###v0.8.1 (2012-07-23) (Dev time: 0.5 hour)
114
  * Reworded most error messages and fixed lot of typos
115
 
116
+ ### v0.9(2013-01-08) - (Dev time: 1 hour)
117
+ * Use blog date/time for send date instead of server time
118
+ * Handle cases where the headers send is an array
119
+
120
+ ### v0.9.1 (2013-01-08) - (Dev time: 0.5 hour)
121
+ * Moved the menu under tools (Thanks samuelaguilera)
122
+
123
  ==Readme Generator==
124
 
125
  This Readme file was generated using <a href = 'http://sudarmuthu.com/wordpress/wp-readme'>wp-readme</a>, which generates readme files for WordPress Plugins.