Version Description
Download this release
Release Info
| Developer | wpkube |
| Plugin | |
| Version | 220513 |
| Comparing to | |
| See all releases | |
Code changes from version 220512 to 220513
- readme.txt +4 -1
- subscribe-to-comments-reloaded.php +1 -1
- utils/stcr_manage.php +4 -0
- utils/stcr_upgrade.php +5 -0
- wp_subscribe_reloaded.php +5 -1
readme.txt
CHANGED
|
@@ -7,7 +7,7 @@ Requires at least: 4.0
|
|
| 7 |
Requires PHP: 5.6
|
| 8 |
Requires MySQL: 5.6
|
| 9 |
Tested up to: 5.9
|
| 10 |
-
Stable tag:
|
| 11 |
License: GPLv2 or later
|
| 12 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 13 |
|
|
@@ -95,6 +95,9 @@ Just go to the Options Panel and click the generate button. By generating a new
|
|
| 95 |
7. Manage the subscriptions on the Frontend Side.
|
| 96 |
|
| 97 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
| 98 |
= v220512 =
|
| 99 |
* **Important** Security fixes
|
| 100 |
|
| 7 |
Requires PHP: 5.6
|
| 8 |
Requires MySQL: 5.6
|
| 9 |
Tested up to: 5.9
|
| 10 |
+
Stable tag: 220513
|
| 11 |
License: GPLv2 or later
|
| 12 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 13 |
|
| 95 |
7. Manage the subscriptions on the Frontend Side.
|
| 96 |
|
| 97 |
== Changelog ==
|
| 98 |
+
= v220513 =
|
| 99 |
+
* **Fix** Issue with migration to the new supported post types option
|
| 100 |
+
|
| 101 |
= v220512 =
|
| 102 |
* **Important** Security fixes
|
| 103 |
|
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:
|
| 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: 220513
|
| 6 |
* Author: WPKube
|
| 7 |
* Author URI: http://wpkube.com/
|
| 8 |
* License: GPL-2.0+
|
utils/stcr_manage.php
CHANGED
|
@@ -63,6 +63,10 @@ if( ! class_exists('\\'.__NAMESPACE__.'\\stcr_manage') )
|
|
| 63 |
add_action( 'publish_' . $post_type_name , array( $this, 'subscribe_post_author' ) );
|
| 64 |
}
|
| 65 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
}
|
| 67 |
|
| 68 |
public function admin_notices() {
|
| 63 |
add_action( 'publish_' . $post_type_name , array( $this, 'subscribe_post_author' ) );
|
| 64 |
}
|
| 65 |
}
|
| 66 |
+
|
| 67 |
+
// Migrate the Enable only on blog posts option to newly used options.
|
| 68 |
+
$this->upgrade->migrate_post_type_support();
|
| 69 |
+
|
| 70 |
}
|
| 71 |
|
| 72 |
public function admin_notices() {
|
utils/stcr_upgrade.php
CHANGED
|
@@ -723,6 +723,11 @@ if( ! class_exists('\\'.__NAMESPACE__.'\\stcr_upgrade') ) {
|
|
| 723 |
*/
|
| 724 |
public function migrate_post_type_support() {
|
| 725 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 726 |
// Get the old data of Enable only on blog posts from database.
|
| 727 |
$only_for_posts = get_option( 'subscribe_reloaded_only_for_posts', 'no' );
|
| 728 |
if ( 'yes' == $only_for_posts ) {
|
| 723 |
*/
|
| 724 |
public function migrate_post_type_support() {
|
| 725 |
|
| 726 |
+
// Check if migration already done
|
| 727 |
+
if ( get_option( 'subscribe_reloaded_post_type_supports' ) ) {
|
| 728 |
+
return;
|
| 729 |
+
}
|
| 730 |
+
|
| 731 |
// Get the old data of Enable only on blog posts from database.
|
| 732 |
$only_for_posts = get_option( 'subscribe_reloaded_only_for_posts', 'no' );
|
| 733 |
if ( 'yes' == $only_for_posts ) {
|
wp_subscribe_reloaded.php
CHANGED
|
@@ -8,7 +8,7 @@ if ( ! function_exists( 'add_action' ) ) {
|
|
| 8 |
}
|
| 9 |
|
| 10 |
// globals
|
| 11 |
-
define( __NAMESPACE__.'\\VERSION','
|
| 12 |
define( __NAMESPACE__.'\\DEVELOPMENT', false );
|
| 13 |
define( __NAMESPACE__.'\\SLUG', "subscribe-to-comments-reloaded" );
|
| 14 |
|
|
@@ -1539,6 +1539,10 @@ if( ! class_exists('\\'.__NAMESPACE__.'\\wp_subscribe_reloaded') ) {
|
|
| 1539 |
$post_type = get_post_type( $post->ID );
|
| 1540 |
$only_for_logged_in = get_option( 'subscribe_reloaded_only_for_logged_in', 'no' );
|
| 1541 |
$supported_post_types = get_option( 'subscribe_reloaded_post_type_supports' );
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1542 |
if ( in_array( 'stcr_none', $supported_post_types ) ) {
|
| 1543 |
$supported_post_types = array_flip( $supported_post_types );
|
| 1544 |
unset( $supported_post_types['stcr_none'] );
|
| 8 |
}
|
| 9 |
|
| 10 |
// globals
|
| 11 |
+
define( __NAMESPACE__.'\\VERSION','220513' );
|
| 12 |
define( __NAMESPACE__.'\\DEVELOPMENT', false );
|
| 13 |
define( __NAMESPACE__.'\\SLUG', "subscribe-to-comments-reloaded" );
|
| 14 |
|
| 1539 |
$post_type = get_post_type( $post->ID );
|
| 1540 |
$only_for_logged_in = get_option( 'subscribe_reloaded_only_for_logged_in', 'no' );
|
| 1541 |
$supported_post_types = get_option( 'subscribe_reloaded_post_type_supports' );
|
| 1542 |
+
if ( ! $supported_post_types ) {
|
| 1543 |
+
$this->upgrade->migrate_post_type_support();
|
| 1544 |
+
$supported_post_types = get_option( 'subscribe_reloaded_post_type_supports' );
|
| 1545 |
+
}
|
| 1546 |
if ( in_array( 'stcr_none', $supported_post_types ) ) {
|
| 1547 |
$supported_post_types = array_flip( $supported_post_types );
|
| 1548 |
unset( $supported_post_types['stcr_none'] );
|
