SendGrid - Version 1.4.2

Version Description

  • Added SendGrid Statistics for the categories added in the SendGrid Settings Page

=

Download this release

Release Info

Developer team-rs
Plugin Icon 128x128 SendGrid
Version 1.4.2
Comparing to
See all releases

Code changes from version 1.4 to 1.4.2

Files changed (69) hide show
  1. assets/screenshot-1.png +0 -0
  2. assets/screenshot-2.png +0 -0
  3. assets/screenshot-3.png +0 -0
  4. assets/screenshot-4.png +0 -0
  5. assets/screenshot-5.png +0 -0
  6. assets/screenshot-6.png +0 -0
  7. assets/screenshot-7.png +0 -0
  8. lib/class-sendgrid-settings.php +10 -6
  9. lib/class-sendgrid-statistics.php +6 -2
  10. lib/class-sendgrid-tools.php +0 -0
  11. lib/overwrite-sendgrid-methods.php +6 -0
  12. readme.txt +11 -3
  13. vendor/sendgrid-php/.gitignore +0 -0
  14. vendor/sendgrid-php/.travis.yml +0 -0
  15. vendor/sendgrid-php/MIT.LICENSE +0 -0
  16. vendor/sendgrid-php/Makefile +0 -0
  17. vendor/sendgrid-php/README.md +0 -0
  18. vendor/sendgrid-php/SendGrid.php +0 -0
  19. vendor/sendgrid-php/SendGrid/Api.php +0 -0
  20. vendor/sendgrid-php/SendGrid/Mail.php +0 -0
  21. vendor/sendgrid-php/SendGrid/MailInterface.php +0 -0
  22. vendor/sendgrid-php/SendGrid/Smtp.php +0 -0
  23. vendor/sendgrid-php/SendGrid/Web.php +0 -0
  24. vendor/sendgrid-php/SendGrid_loader.php +0 -0
  25. vendor/sendgrid-php/Test/Mock/Mock_loader.php +0 -0
  26. vendor/sendgrid-php/Test/Mock/SmtpMock.php +0 -0
  27. vendor/sendgrid-php/Test/Mock/WebMock.php +0 -0
  28. vendor/sendgrid-php/Test/SendGrid/ApiTest.php +0 -0
  29. vendor/sendgrid-php/Test/SendGrid/MailTest.php +0 -0
  30. vendor/sendgrid-php/Test/SendGrid/SmtpTest.php +0 -0
  31. vendor/sendgrid-php/Test/SendGrid/WebTest.php +0 -0
  32. vendor/sendgrid-php/Test/SendGridTest.php +0 -0
  33. vendor/sendgrid-php/Test/a_loaderTest.php +0 -0
  34. vendor/sendgrid-php/Test/phpunit.xml +0 -0
  35. vendor/sendgrid-php/composer.json +0 -0
  36. vendor/sendgrid-php/composer.lock +0 -0
  37. view/css/datepicker/smoothness/images/animated-overlay.gif +0 -0
  38. view/css/datepicker/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  39. view/css/datepicker/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  40. view/css/datepicker/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  41. view/css/datepicker/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  42. view/css/datepicker/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  43. view/css/datepicker/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  44. view/css/datepicker/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  45. view/css/datepicker/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  46. view/css/datepicker/smoothness/images/ui-icons_222222_256x240.png +0 -0
  47. view/css/datepicker/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
  48. view/css/datepicker/smoothness/images/ui-icons_454545_256x240.png +0 -0
  49. view/css/datepicker/smoothness/images/ui-icons_888888_256x240.png +0 -0
  50. view/css/datepicker/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
  51. view/css/datepicker/smoothness/jquery-ui-1.10.3.custom.css +0 -0
  52. view/css/sendgrid.css +0 -0
  53. view/images/loader.gif +0 -0
  54. view/images/logo.png +0 -0
  55. view/images/logo32.png +0 -0
  56. view/js/jquery.flot.js +0 -0
  57. view/js/jquery.flot.symbol.js +0 -0
  58. view/js/jquery.flot.time.js +0 -0
  59. view/js/jquery.flot.togglelegend.js +0 -0
  60. view/js/jquery.ui.datepicker.js +0 -0
  61. view/js/sendgrid.stats.js +0 -0
  62. view/partials/sendgrid_stats_compliance.php +0 -0
  63. view/partials/sendgrid_stats_deliveries.php +0 -0
  64. view/partials/sendgrid_stats_engagement.php +0 -0
  65. view/partials/sendgrid_stats_widget.php +0 -0
  66. view/sendgrid_contextual_help.php +0 -0
  67. view/sendgrid_settings.php +9 -0
  68. view/sendgrid_stats.php +9 -1
  69. wpsendgrid.php +1 -1
assets/screenshot-1.png CHANGED
File without changes
assets/screenshot-2.png CHANGED
File without changes
assets/screenshot-3.png CHANGED
File without changes
assets/screenshot-4.png CHANGED
File without changes
assets/screenshot-5.png CHANGED
File without changes
assets/screenshot-6.png CHANGED
File without changes
assets/screenshot-7.png CHANGED
File without changes
lib/class-sendgrid-settings.php CHANGED
@@ -95,15 +95,19 @@ class Sendgrid_Settings
95
 
96
  $reply_to = $_POST['sendgrid_reply_to'];
97
  update_option( 'sendgrid_reply_to', $reply_to );
 
 
 
98
  }
99
  }
100
 
101
- $user = get_option('sendgrid_user');
102
- $password = get_option('sendgrid_pwd');
103
- $method = get_option('sendgrid_api');
104
- $name = get_option('sendgrid_from_name');
105
- $email = get_option('sendgrid_from_email');
106
- $reply_to = get_option('sendgrid_reply_to');
 
107
 
108
  $valid_credentials = false;
109
  if ( $user and $password )
95
 
96
  $reply_to = $_POST['sendgrid_reply_to'];
97
  update_option( 'sendgrid_reply_to', $reply_to );
98
+
99
+ $categories = $_POST['sendgrid_categories'];
100
+ update_option( 'sendgrid_categories', $categories );
101
  }
102
  }
103
 
104
+ $user = get_option('sendgrid_user');
105
+ $password = get_option('sendgrid_pwd');
106
+ $method = get_option('sendgrid_api');
107
+ $name = get_option('sendgrid_from_name');
108
+ $email = get_option('sendgrid_from_email');
109
+ $reply_to = get_option('sendgrid_reply_to');
110
+ $categories = get_option('sendgrid_categories');
111
 
112
  $valid_credentials = false;
113
  if ( $user and $password )
lib/class-sendgrid-statistics.php CHANGED
@@ -123,8 +123,12 @@ class Sendgrid_Statistics
123
  $parameters['end_date'] = $_POST['end_date'];
124
  }
125
 
126
- if ( $_POST['type'] and 'wordpress' == $_POST['type'] ) {
127
- $parameters['category'] = 'wp_sendgrid_plugin';
 
 
 
 
128
  }
129
 
130
  echo Sendgrid_Tools::curl_request( 'api/stats.get.json', $parameters );
123
  $parameters['end_date'] = $_POST['end_date'];
124
  }
125
 
126
+ if ( $_POST['type'] && 'general' != $_POST['type'] ) {
127
+ if( 'wordpress' == $_POST['type'] ) {
128
+ $parameters['category'] = 'wp_sendgrid_plugin';
129
+ } else {
130
+ $parameters['category'] = urlencode( $_POST['type'] );
131
+ }
132
  }
133
 
134
  echo Sendgrid_Tools::curl_request( 'api/stats.get.json', $parameters );
lib/class-sendgrid-tools.php CHANGED
File without changes
lib/overwrite-sendgrid-methods.php CHANGED
@@ -251,6 +251,12 @@ if ( ! function_exists('wp_mail'))
251
  ->setCategory( SENDGRID_CATEGORY )
252
  ->setFrom( $from_email );
253
 
 
 
 
 
 
 
254
  // send HTML content
255
  if ( 'text/plain' !== $content_type )
256
  {
251
  ->setCategory( SENDGRID_CATEGORY )
252
  ->setFrom( $from_email );
253
 
254
+ $categories = explode( ',', get_option('sendgrid_categories') );
255
+ foreach ($categories as $category)
256
+ {
257
+ $mail->addCategory($category);
258
+ }
259
+
260
  // send HTML content
261
  if ( 'text/plain' !== $content_type )
262
  {
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: team-rs
3
  Donate link: http://sendgrid.com/
4
  Tags: email, email reliability, email templates, sendgrid, smtp, transactional email, wp_mail,email infrastructure, email marketing, marketing email, deliverability, email deliverability, email delivery, email server, mail server, email integration, cloud email
5
  Requires at least: 3.3
6
- Tested up to: 3.9
7
- Stable tag: 1.4.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -129,6 +129,10 @@ Create a SendGrid account at <a href="http://sendgrid.com/partner/wordpress" tar
129
  * Fix URL for loading image
130
  = 1.4 =
131
  * Fix warnings for static method, add notice for php version < 5.3.0, refactor plugin code
 
 
 
 
132
 
133
  == Upgrade notice ==
134
 
@@ -139,4 +143,8 @@ Create a SendGrid account at <a href="http://sendgrid.com/partner/wordpress" tar
139
  = 1.3 =
140
  * Added support for Wordpress 3.8, fixed visual issues for Wordpress 3.7
141
  = 1.4 =
142
- * Fix warnings for static method, add notice for php version < 5.3.0, refactor plugin code
 
 
 
 
3
  Donate link: http://sendgrid.com/
4
  Tags: email, email reliability, email templates, sendgrid, smtp, transactional email, wp_mail,email infrastructure, email marketing, marketing email, deliverability, email deliverability, email delivery, email server, mail server, email integration, cloud email
5
  Requires at least: 3.3
6
+ Tested up to: 4.0
7
+ Stable tag: 1.4.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
129
  * Fix URL for loading image
130
  = 1.4 =
131
  * Fix warnings for static method, add notice for php version < 5.3.0, refactor plugin code
132
+ = 1.4.1 =
133
+ * Added support to set additional categories
134
+ = 1.4.2 =
135
+ * Added SendGrid Statistics for the categories added in the SendGrid Settings Page
136
 
137
  == Upgrade notice ==
138
 
143
  = 1.3 =
144
  * Added support for Wordpress 3.8, fixed visual issues for Wordpress 3.7
145
  = 1.4 =
146
+ * Fix warnings for static method, add notice for php version < 5.3.0, refactor plugin code
147
+ = 1.4.1 =
148
+ * Added support to set additional categories
149
+ = 1.4.2 =
150
+ * Added SendGrid Statistics for the categories added in the SendGrid Settings Page
vendor/sendgrid-php/.gitignore CHANGED
File without changes
vendor/sendgrid-php/.travis.yml CHANGED
File without changes
vendor/sendgrid-php/MIT.LICENSE CHANGED
File without changes
vendor/sendgrid-php/Makefile CHANGED
File without changes
vendor/sendgrid-php/README.md CHANGED
File without changes
vendor/sendgrid-php/SendGrid.php CHANGED
File without changes
vendor/sendgrid-php/SendGrid/Api.php CHANGED
File without changes
vendor/sendgrid-php/SendGrid/Mail.php CHANGED
File without changes
vendor/sendgrid-php/SendGrid/MailInterface.php CHANGED
File without changes
vendor/sendgrid-php/SendGrid/Smtp.php CHANGED
File without changes
vendor/sendgrid-php/SendGrid/Web.php CHANGED
File without changes
vendor/sendgrid-php/SendGrid_loader.php CHANGED
File without changes
vendor/sendgrid-php/Test/Mock/Mock_loader.php CHANGED
File without changes
vendor/sendgrid-php/Test/Mock/SmtpMock.php CHANGED
File without changes
vendor/sendgrid-php/Test/Mock/WebMock.php CHANGED
File without changes
vendor/sendgrid-php/Test/SendGrid/ApiTest.php CHANGED
File without changes
vendor/sendgrid-php/Test/SendGrid/MailTest.php CHANGED
File without changes
vendor/sendgrid-php/Test/SendGrid/SmtpTest.php CHANGED
File without changes
vendor/sendgrid-php/Test/SendGrid/WebTest.php CHANGED
File without changes
vendor/sendgrid-php/Test/SendGridTest.php CHANGED
File without changes
vendor/sendgrid-php/Test/a_loaderTest.php CHANGED
File without changes
vendor/sendgrid-php/Test/phpunit.xml CHANGED
File without changes
vendor/sendgrid-php/composer.json CHANGED
File without changes
vendor/sendgrid-php/composer.lock CHANGED
File without changes
view/css/datepicker/smoothness/images/animated-overlay.gif CHANGED
File without changes
view/css/datepicker/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png CHANGED
File without changes
view/css/datepicker/smoothness/images/ui-bg_flat_75_ffffff_40x100.png CHANGED
File without changes
view/css/datepicker/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png CHANGED
File without changes
view/css/datepicker/smoothness/images/ui-bg_glass_65_ffffff_1x400.png CHANGED
File without changes
view/css/datepicker/smoothness/images/ui-bg_glass_75_dadada_1x400.png CHANGED
File without changes
view/css/datepicker/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png CHANGED
File without changes
view/css/datepicker/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png CHANGED
File without changes
view/css/datepicker/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png CHANGED
File without changes
view/css/datepicker/smoothness/images/ui-icons_222222_256x240.png CHANGED
File without changes
view/css/datepicker/smoothness/images/ui-icons_2e83ff_256x240.png CHANGED
File without changes
view/css/datepicker/smoothness/images/ui-icons_454545_256x240.png CHANGED
File without changes
view/css/datepicker/smoothness/images/ui-icons_888888_256x240.png CHANGED
File without changes
view/css/datepicker/smoothness/images/ui-icons_cd0a0a_256x240.png CHANGED
File without changes
view/css/datepicker/smoothness/jquery-ui-1.10.3.custom.css CHANGED
File without changes
view/css/sendgrid.css CHANGED
File without changes
view/images/loader.gif CHANGED
File without changes
view/images/logo.png CHANGED
File without changes
view/images/logo32.png CHANGED
File without changes
view/js/jquery.flot.js CHANGED
File without changes
view/js/jquery.flot.symbol.js CHANGED
File without changes
view/js/jquery.flot.time.js CHANGED
File without changes
view/js/jquery.flot.togglelegend.js CHANGED
File without changes
view/js/jquery.ui.datepicker.js CHANGED
File without changes
view/js/sendgrid.stats.js CHANGED
File without changes
view/partials/sendgrid_stats_compliance.php CHANGED
File without changes
view/partials/sendgrid_stats_deliveries.php CHANGED
File without changes
view/partials/sendgrid_stats_engagement.php CHANGED
File without changes
view/partials/sendgrid_stats_widget.php CHANGED
File without changes
view/sendgrid_contextual_help.php CHANGED
File without changes
view/sendgrid_settings.php CHANGED
@@ -63,6 +63,15 @@
63
  <p class="description"><?php _e('Email address where replies will be returned.') ?></p>
64
  </td>
65
  </tr>
 
 
 
 
 
 
 
 
 
66
  </tbody>
67
  </table>
68
  <p class="submit">
63
  <p class="description"><?php _e('Email address where replies will be returned.') ?></p>
64
  </td>
65
  </tr>
66
+ <tr valign="top">
67
+ <th scope="row"><?php _e("Categories: "); ?></th>
68
+ <td>
69
+ <input type="text" name="sendgrid_categories" value="<?php echo $categories; ?>" size="20" class="regular-text">
70
+ <span><small><em><?php _e('Leave blank to send without categories.') ?></em></small></span>
71
+ <p class="description"><?php _e('Associates the category of the email this should be logged as. <br />
72
+ Categories must be separated by commas (Example: category1, category2).') ?></p>
73
+ </td>
74
+ </tr>
75
  </tbody>
76
  </table>
77
  <p class="submit">
view/sendgrid_stats.php CHANGED
@@ -6,8 +6,16 @@
6
  </div>
7
  <div class="pull-right sendgrid-statistics-change-type">
8
  <select id="sendgrid-statistics-change-type">
9
- <option value="wordpress" selected="selected">Wordpress statistics</option>
10
  <option value="general">General statistics</option>
 
 
 
 
 
 
 
 
 
11
  </select>
12
  </div>
13
 
6
  </div>
7
  <div class="pull-right sendgrid-statistics-change-type">
8
  <select id="sendgrid-statistics-change-type">
 
9
  <option value="general">General statistics</option>
10
+ <option value="wordpress" selected="selected">Wordpress statistics</option>
11
+ <?php $categories = explode( ',', get_option('sendgrid_categories') ); ?>
12
+ <?php if ( is_array( $categories ) and count( $categories ) > 0 ): ?>
13
+ <optgroup label="Categories:">
14
+ <?php foreach ( $categories as $cateogry ): ?>
15
+ <option value="<?php echo $cateogry; ?>"><?php echo $cateogry; ?></option>
16
+ <?php endforeach; ?>
17
+ </optgroup>
18
+ <?php endif; ?>
19
  </select>
20
  </div>
21
 
wpsendgrid.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: SendGrid
4
  Plugin URI: http://wordpress.org/plugins/sendgrid-email-delivery-simplified/
5
  Description: Email Delivery. Simplified. SendGrid's cloud-based email infrastructure relieves businesses of the cost and complexity of maintaining custom email systems. SendGrid provides reliable delivery, scalability and real-time analytics along with flexible APIs that make custom integration a breeze.
6
- Version: 1.4.0
7
  Author: SendGrid
8
  Author URI: http://sendgrid.com
9
  License: GPLv2
3
  Plugin Name: SendGrid
4
  Plugin URI: http://wordpress.org/plugins/sendgrid-email-delivery-simplified/
5
  Description: Email Delivery. Simplified. SendGrid's cloud-based email infrastructure relieves businesses of the cost and complexity of maintaining custom email systems. SendGrid provides reliable delivery, scalability and real-time analytics along with flexible APIs that make custom integration a breeze.
6
+ Version: 1.4.1
7
  Author: SendGrid
8
  Author URI: http://sendgrid.com
9
  License: GPLv2