Subscribe To Comments Reloaded - Version 200813

Version Description

Download this release

Release Info

Developer wpkube
Plugin Icon 128x128 Subscribe To Comments Reloaded
Version 200813
Comparing to
See all releases

Code changes from version 200629 to 200813

readme.txt CHANGED
@@ -6,8 +6,8 @@ Plugin URI: http://subscribe-reloaded.com/
6
  Requires at least: 4.0
7
  Requires PHP: 5.6
8
  Requires MySQL: 5.6
9
- Tested up to: 5.4
10
- Stable tag: 200629
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
 
@@ -30,8 +30,6 @@ Subscribe to Comments Reloaded is a robust plugin that enables commenters to sig
30
  * One Click Unsubscribe
31
  * Get and Download your System information for better support.
32
 
33
- [](http://coderisk.com/wp/plugin/subscribe-to-comments-reloaded/RIPS-ntLoAy443J)
34
-
35
  == Installation ==
36
 
37
 
@@ -101,6 +99,9 @@ Just go to the Options Panel and click the generate button. By generating a new
101
  7. Manage the subscriptions on the Frontend Side.
102
 
103
  == Changelog ==
 
 
 
104
  = v200629 =
105
  * **New** Option to show the subscription checkbox/select only for logged in users (option called "Enable only for logged in users" and located in WP admin > StCR > Options)
106
  * **New** Added [comment_date] and [comment_time] shortcodes which can be used in the "notification message".
6
  Requires at least: 4.0
7
  Requires PHP: 5.6
8
  Requires MySQL: 5.6
9
+ Tested up to: 5.6
10
+ Stable tag: 200813
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
 
30
  * One Click Unsubscribe
31
  * Get and Download your System information for better support.
32
 
 
 
33
  == Installation ==
34
 
35
 
99
  7. Manage the subscriptions on the Frontend Side.
100
 
101
  == Changelog ==
102
+ = v200813 =
103
+ * **Fix** Error when permanently deleting a post/page/... (related to WP 5.5 change in the "delete_post" hook coming with a 2nd parameter)
104
+
105
  = v200629 =
106
  * **New** Option to show the subscription checkbox/select only for logged in users (option called "Enable only for logged in users" and located in WP admin > StCR > Options)
107
  * **New** Added [comment_date] and [comment_time] shortcodes which can be used in the "notification message".
subscribe-to-comments-reloaded.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: Subscribe to Comments Reloaded
4
  * Description: Subscribe to Comments Reloaded is a robust plugin that enables commenters to sign up for e-mail notifications. It includes a full-featured subscription manager that your commenters can use to unsubscribe to certain posts or suspend all notifications.
5
- * Version: 200629
6
  * Author: WPKube
7
  * Author URI: http://wpkube.com/
8
  * License: GPL-2.0+
2
  /**
3
  * Plugin Name: Subscribe to Comments Reloaded
4
  * Description: Subscribe to Comments Reloaded is a robust plugin that enables commenters to sign up for e-mail notifications. It includes a full-featured subscription manager that your commenters can use to unsubscribe to certain posts or suspend all notifications.
5
+ * Version: 200813
6
  * Author: WPKube
7
  * Author URI: http://wpkube.com/
8
  * License: GPL-2.0+
utils/stcr_utils.php CHANGED
@@ -303,6 +303,11 @@ if( ! class_exists('\\'.__NAMESPACE__.'\\stcr_utils') )
303
  * Returns an email address where some possible 'offending' strings have been removed
304
  */
305
  public function clean_email( $_email ) {
 
 
 
 
 
306
  $offending_strings = array(
307
  "/to\:/i",
308
  "/from\:/i",
@@ -313,7 +318,8 @@ if( ! class_exists('\\'.__NAMESPACE__.'\\stcr_utils') )
313
  "/mime\-version\:/i"
314
  );
315
 
316
- return sanitize_email( stripslashes( strip_tags( preg_replace( $offending_strings, '', $_email ) ) ) );
 
317
  }
318
  // end clean_email
319
 
303
  * Returns an email address where some possible 'offending' strings have been removed
304
  */
305
  public function clean_email( $_email ) {
306
+
307
+ if ( is_array( $_email) || is_object( $_email ) ) {
308
+ return;
309
+ }
310
+
311
  $offending_strings = array(
312
  "/to\:/i",
313
  "/from\:/i",
318
  "/mime\-version\:/i"
319
  );
320
 
321
+ return sanitize_email( stripslashes( strip_tags( preg_replace( $offending_strings, '', $_email ) ) ) );
322
+
323
  }
324
  // end clean_email
325
 
wp_subscribe_reloaded.php CHANGED
@@ -8,7 +8,7 @@ if ( ! function_exists( 'add_action' ) ) {
8
  }
9
 
10
  // globals
11
- define( __NAMESPACE__.'\\VERSION','200629' );
12
  define( __NAMESPACE__.'\\DEVELOPMENT', false );
13
  define( __NAMESPACE__.'\\SLUG', "subscribe-to-comments-reloaded" );
14
 
@@ -870,7 +870,7 @@ if( ! class_exists('\\'.__NAMESPACE__.'\\wp_subscribe_reloaded') ) {
870
  $include_post_content = include WP_PLUGIN_DIR . '/subscribe-to-comments-reloaded/templates/request-management-link.php';
871
  }
872
 
873
- }
874
 
875
  global $wp_query;
876
 
@@ -938,7 +938,7 @@ if( ! class_exists('\\'.__NAMESPACE__.'\\wp_subscribe_reloaded') ) {
938
  $this->utils->stcr_logger( "\n [ERROR][$date] - $ex->getMessage()\n" );
939
  $this->utils->stcr_logger( "\n [ERROR][$date] - $ex->getTraceAsString()\n" );
940
 
941
- }
942
 
943
  // return filtered posts
944
  return $posts;
@@ -1062,6 +1062,11 @@ if( ! class_exists('\\'.__NAMESPACE__.'\\wp_subscribe_reloaded') ) {
1062
  */
1063
  public function delete_subscriptions( $_post_id = 0, $_email = '' ) {
1064
 
 
 
 
 
 
1065
  global $wpdb;
1066
 
1067
  $has_subscriptions = false;
8
  }
9
 
10
  // globals
11
+ define( __NAMESPACE__.'\\VERSION','200813' );
12
  define( __NAMESPACE__.'\\DEVELOPMENT', false );
13
  define( __NAMESPACE__.'\\SLUG', "subscribe-to-comments-reloaded" );
14
 
870
  $include_post_content = include WP_PLUGIN_DIR . '/subscribe-to-comments-reloaded/templates/request-management-link.php';
871
  }
872
 
873
+ }
874
 
875
  global $wp_query;
876
 
938
  $this->utils->stcr_logger( "\n [ERROR][$date] - $ex->getMessage()\n" );
939
  $this->utils->stcr_logger( "\n [ERROR][$date] - $ex->getTraceAsString()\n" );
940
 
941
+ }
942
 
943
  // return filtered posts
944
  return $posts;
1062
  */
1063
  public function delete_subscriptions( $_post_id = 0, $_email = '' ) {
1064
 
1065
+ // related to wp 5.5 delete_post coming with 2nd parameter of WP Post object
1066
+ if ( is_object( $_email ) ) {
1067
+ $_email = '';
1068
+ }
1069
+
1070
  global $wpdb;
1071
 
1072
  $has_subscriptions = false;