Better Notifications for WordPress - Version 0.1b

Version Description

Download this release

Release Info

Developer voltronik
Plugin Icon 128x128 Better Notifications for WordPress
Version 0.1b
Comparing to
See all releases

Code changes from version 0.2b to 0.1b

README.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: voltronik, peterrocker
3
  Tags: notifications, email, roles, custom
4
  Requires at least: 3.5
5
  Tested up to: 3.5
6
- Stable tag: 0.2b
7
  License: GPLv3
8
 
9
  Send customisable HTML emails to user roles for different WordPress notifications.
@@ -94,9 +94,6 @@ It's possible you're inserting a shortcode into an email for a notification that
94
 
95
  == Changelog ==
96
 
97
- = 0.2 beta =
98
- * Added an option to suppress spam comment notifications.
99
-
100
  = 0.1 beta =
101
  * Initial version of the plugin.
102
  * Settings page for configuring notification types for roles.
3
  Tags: notifications, email, roles, custom
4
  Requires at least: 3.5
5
  Tested up to: 3.5
6
+ Stable tag: 0.1b
7
  License: GPLv3
8
 
9
  Send customisable HTML emails to user roles for different WordPress notifications.
94
 
95
  == Changelog ==
96
 
 
 
 
97
  = 0.1 beta =
98
  * Initial version of the plugin.
99
  * Settings page for configuring notification types for roles.
better-wordpress-notifications.php CHANGED
@@ -1,9 +1,9 @@
1
  <?php
2
  /*
3
  Plugin Name: Better Notifications for WordPress
4
- Plugin URI: http://wordpress.org/extend/plugins/bnfw/
5
  Description: Send customisable HTML emails to user roles for different WordPress notifications.
6
- Version: 0.2 Beta
7
  Author: Voltronik
8
  Author URI: http://www.voltronik.co.uk/
9
  Author Email: hello@voltronik.co.uk
@@ -174,10 +174,7 @@ function bnfw_publish_post($postID){
174
  function bnfw_comment_post($comment_id){
175
 
176
  $the_comment = get_comment($comment_id);
177
-
178
- if(!bnfw_check_for_spam($the_comment)){
179
- bnfw_launch_payload(bnfw_get_recipients_for_type('comment_post'), bnfw_get_subject_for_comment_post($the_comment), bnfw_get_payload_for_comment_post($the_comment));
180
- }
181
 
182
  }
183
 
@@ -191,17 +188,15 @@ function bnfw_user_register($user_id){
191
  function bnfw_trackback_post($comment_id){
192
 
193
  $the_comment = get_comment($comment_id);
194
- if(!bnfw_check_for_spam($the_comment)){
195
- bnfw_launch_payload(bnfw_get_recipients_for_type('trackback_post'), bnfw_get_subject_for_trackback_post($the_comment), bnfw_get_payload_for_trackback_post($the_comment));
196
- }
197
  }
198
 
199
  function bnfw_pingback_post($comment_id){
200
 
201
  $the_comment = get_comment($comment_id);
202
- if(!bnfw_check_for_spam($the_comment)){
203
- bnfw_launch_payload(bnfw_get_recipients_for_type('pingback_post'), bnfw_get_subject_for_pingback_post($the_comment), bnfw_get_payload_for_pingback_post($the_comment));
204
- }
205
  }
206
 
207
  function bnfw_lostpassword_post(){
1
  <?php
2
  /*
3
  Plugin Name: Better Notifications for WordPress
4
+ Plugin URI: http://www.voltronik.co.uk/wordpress-plugins/better-notifications-for-wordpress/
5
  Description: Send customisable HTML emails to user roles for different WordPress notifications.
6
+ Version: 0.1 Beta
7
  Author: Voltronik
8
  Author URI: http://www.voltronik.co.uk/
9
  Author Email: hello@voltronik.co.uk
174
  function bnfw_comment_post($comment_id){
175
 
176
  $the_comment = get_comment($comment_id);
177
+ bnfw_launch_payload(bnfw_get_recipients_for_type('comment_post'), bnfw_get_subject_for_comment_post($the_comment), bnfw_get_payload_for_comment_post($the_comment));
 
 
 
178
 
179
  }
180
 
188
  function bnfw_trackback_post($comment_id){
189
 
190
  $the_comment = get_comment($comment_id);
191
+ bnfw_launch_payload(bnfw_get_recipients_for_type('trackback_post'), bnfw_get_subject_for_trackback_post($the_comment), bnfw_get_payload_for_trackback_post($the_comment));
192
+
 
193
  }
194
 
195
  function bnfw_pingback_post($comment_id){
196
 
197
  $the_comment = get_comment($comment_id);
198
+ bnfw_launch_payload(bnfw_get_recipients_for_type('pingback_post'), bnfw_get_subject_for_pingback_post($the_comment), bnfw_get_payload_for_pingback_post($the_comment));
199
+
 
200
  }
201
 
202
  function bnfw_lostpassword_post(){
includes/admin-page.php CHANGED
@@ -109,11 +109,6 @@ function bnfw_settings_page() {
109
 
110
  </div>
111
 
112
- <div id="other-options" class="twelvecol first">
113
- <label for="bnfw_settings[bnfw_settings_spam]">Suppress notifications for comments marked as spam?</label>
114
- <input id="bnfw_settings[bnfw_settings_spam]" name="bnfw_settings[bnfw_settings_spam]" type="checkbox" value="1" <?php checked(1, $bnfw_options['bnfw_settings_spam']); ?> />
115
- </div>
116
-
117
  <p class="submit clearfix">
118
  <input type="submit" class="button-primary" value="Save Settings" />
119
  </p>
109
 
110
  </div>
111
 
 
 
 
 
 
112
  <p class="submit clearfix">
113
  <input type="submit" class="button-primary" value="Save Settings" />
114
  </p>
includes/bnfw_engine.php CHANGED
@@ -1,14 +1,5 @@
1
  <?php
2
 
3
- function bnfw_check_for_spam($the_comment){
4
-
5
- //returns true if the comment is marked as spam AND admin has enabled suppression of spam
6
- $bnfw_options = get_option('bnfw_settings');
7
- return((strcmp($the_comment->comment_approved, "spam") === 0) && $bnfw_options['bnfw_settings_spam'] === "1" );
8
-
9
- }
10
-
11
-
12
  /*
13
  Logic to retrieve to whom the notif should be sent
14
  */
1
  <?php
2
 
 
 
 
 
 
 
 
 
 
3
  /*
4
  Logic to retrieve to whom the notif should be sent
5
  */
includes/css/plugin_styles.css CHANGED
@@ -76,18 +76,9 @@ Admin Page Styling
76
 
77
  /***** Notifications Page *****/
78
 
79
- /* Other Options */
80
- #other-options {
81
- margin: 20px 0 50px 0;
82
- }
83
-
84
- #other-options label {
85
- padding-right: 10px;
86
- }
87
-
88
  /* Grid of checkboxes on Settings page */
89
  #role-settings {
90
- margin: 20px 0;
91
  }
92
 
93
  #role-settings .twocol {
76
 
77
  /***** Notifications Page *****/
78
 
 
 
 
 
 
 
 
 
 
79
  /* Grid of checkboxes on Settings page */
80
  #role-settings {
81
+ margin: 20px 0 50px 0;
82
  }
83
 
84
  #role-settings .twocol {