Version Description
Download this release
Release Info
| Developer | wpkube |
| Plugin | |
| Version | 220523 |
| Comparing to | |
| See all releases | |
Code changes from version 220513 to 220523
- options/index.php +0 -4
- options/options_template.php +7 -3
- options/panel1-business-logic.php +1 -0
- options/stcr_comment_form.php +7 -3
- options/stcr_manage_subscriptions.php +0 -12
- options/stcr_management_page.php +7 -3
- options/stcr_notifications.php +7 -3
- options/stcr_options.php +7 -3
- options/stcr_system.php +13 -3
- readme.txt +4 -1
- subscribe-to-comments-reloaded.php +1 -1
- utils/stcr_utils.php +75 -4
- wp_subscribe_reloaded.php +1 -1
options/index.php
CHANGED
|
@@ -9,8 +9,6 @@ global $wp_locale;
|
|
| 9 |
|
| 10 |
?>
|
| 11 |
|
| 12 |
-
<link href="<?php echo esc_url( plugins_url( '/vendor/bootstrap/dist/css/bootstrap.min.css', STCR_PLUGIN_FILE ) ); ?>" rel="stylesheet"/>
|
| 13 |
-
<link href="<?php echo esc_url( plugins_url( '/vendor/Font-Awesome/web-fonts-with-css/css/fontawesome-all.min.css', STCR_PLUGIN_FILE ) ); ?>" rel="stylesheet"/>
|
| 14 |
<style type="text/css">
|
| 15 |
#wpcontent {
|
| 16 |
background: #f1f1f1 !important;
|
|
@@ -22,5 +20,3 @@ global $wp_locale;
|
|
| 22 |
}
|
| 23 |
.navbar a { font-size: 1em !important; font-weight: 600; color: #464646 !important;}
|
| 24 |
</style>
|
| 25 |
-
|
| 26 |
-
<script type="text/javascript" src="<?php echo esc_url( plugins_url( '/vendor/bootstrap/dist/js/bootstrap.bundle.min.js', STCR_PLUGIN_FILE ) ); ?>"></script>
|
| 9 |
|
| 10 |
?>
|
| 11 |
|
|
|
|
|
|
|
| 12 |
<style type="text/css">
|
| 13 |
#wpcontent {
|
| 14 |
background: #f1f1f1 !important;
|
| 20 |
}
|
| 21 |
.navbar a { font-size: 1em !important; font-weight: 600; color: #464646 !important;}
|
| 22 |
</style>
|
|
|
|
|
|
options/options_template.php
CHANGED
|
@@ -58,6 +58,13 @@ if ( isset( $_POST['options'] ) ) {
|
|
| 58 |
|
| 59 |
$faulty_fields = array();
|
| 60 |
$subscribe_options = wp_unslash( $_POST['options'] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
foreach ( $subscribe_options as $option => $value )
|
| 62 |
{
|
| 63 |
if ( ! $wp_subscribe_reloaded->stcr->utils->stcr_update_menu_options( $option, $value, $options[$option] ) )
|
|
@@ -79,8 +86,6 @@ if ( isset( $_POST['options'] ) ) {
|
|
| 79 |
wp_print_scripts( 'quicktags' );
|
| 80 |
|
| 81 |
?>
|
| 82 |
-
<link href="<?php echo esc_url( plugins_url( '/vendor/webui-popover/dist/jquery.webui-popover.min.css', STCR_PLUGIN_FILE ) ); ?>" rel="stylesheet"/>
|
| 83 |
-
|
| 84 |
<div class="container-fluid">
|
| 85 |
<div class="mt-3"></div>
|
| 86 |
<div class="row">
|
|
@@ -118,7 +123,6 @@ wp_print_scripts( 'quicktags' );
|
|
| 118 |
|
| 119 |
</div>
|
| 120 |
</div>
|
| 121 |
-
<script type="text/javascript" src="<?php echo esc_url( plugins_url( '/vendor/webui-popover/dist/jquery.webui-popover.min.js', STCR_PLUGIN_FILE ) ); ?>"></script>
|
| 122 |
<?php
|
| 123 |
//global $wp_subscribe_reloaded;
|
| 124 |
// Tell WP that we are going to use a resource.
|
| 58 |
|
| 59 |
$faulty_fields = array();
|
| 60 |
$subscribe_options = wp_unslash( $_POST['options'] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput
|
| 61 |
+
$subscribe_options = array_map(
|
| 62 |
+
array(
|
| 63 |
+
'stcr\stcr_utils',
|
| 64 |
+
'sanitize_options'
|
| 65 |
+
),
|
| 66 |
+
$subscribe_options
|
| 67 |
+
);
|
| 68 |
foreach ( $subscribe_options as $option => $value )
|
| 69 |
{
|
| 70 |
if ( ! $wp_subscribe_reloaded->stcr->utils->stcr_update_menu_options( $option, $value, $options[$option] ) )
|
| 86 |
wp_print_scripts( 'quicktags' );
|
| 87 |
|
| 88 |
?>
|
|
|
|
|
|
|
| 89 |
<div class="container-fluid">
|
| 90 |
<div class="mt-3"></div>
|
| 91 |
<div class="row">
|
| 123 |
|
| 124 |
</div>
|
| 125 |
</div>
|
|
|
|
| 126 |
<?php
|
| 127 |
//global $wp_subscribe_reloaded;
|
| 128 |
// Tell WP that we are going to use a resource.
|
options/panel1-business-logic.php
CHANGED
|
@@ -136,6 +136,7 @@ switch ( $action ) {
|
|
| 136 |
|
| 137 |
$post_list = $email_list = array();
|
| 138 |
$subscription_lists = wp_unslash( $_POST['subscriptions_list'] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput
|
|
|
|
| 139 |
foreach ( $subscription_lists as $a_subscription ) {
|
| 140 |
list( $a_post, $a_email ) = explode( ',', $a_subscription );
|
| 141 |
if ( ! in_array( $a_post, $post_list ) ) {
|
| 136 |
|
| 137 |
$post_list = $email_list = array();
|
| 138 |
$subscription_lists = wp_unslash( $_POST['subscriptions_list'] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput
|
| 139 |
+
$subscription_lists = array_map( 'wp_kses_post', $subscription_lists );
|
| 140 |
foreach ( $subscription_lists as $a_subscription ) {
|
| 141 |
list( $a_post, $a_email ) = explode( ',', $a_subscription );
|
| 142 |
if ( ! in_array( $a_post, $post_list ) ) {
|
options/stcr_comment_form.php
CHANGED
|
@@ -38,6 +38,13 @@ if ( isset( $_POST['options'] ) ) {
|
|
| 38 |
|
| 39 |
$faulty_fields = array();
|
| 40 |
$subscribe_options = wp_unslash( $_POST['options'] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
foreach ( $subscribe_options as $option => $value )
|
| 42 |
{
|
| 43 |
|
|
@@ -58,8 +65,6 @@ if ( isset( $_POST['options'] ) ) {
|
|
| 58 |
echo '</p></div>';
|
| 59 |
}
|
| 60 |
?>
|
| 61 |
-
<link href="<?php echo esc_url( plugins_url( '/vendor/webui-popover/dist/jquery.webui-popover.min.css', STCR_PLUGIN_FILE ) ); ?>" rel="stylesheet"/>
|
| 62 |
-
|
| 63 |
<div class="container-fluid">
|
| 64 |
<div class="mt-3"></div>
|
| 65 |
<div class="row">
|
|
@@ -375,7 +380,6 @@ if ( isset( $_POST['options'] ) ) {
|
|
| 375 |
</div>
|
| 376 |
</div>
|
| 377 |
|
| 378 |
-
<script type="text/javascript" src="<?php echo esc_url( plugins_url( '/vendor/webui-popover/dist/jquery.webui-popover.min.js', STCR_PLUGIN_FILE ) ); ?>"></script>
|
| 379 |
<?php
|
| 380 |
global $wp_subscribe_reloaded;
|
| 381 |
// Tell WP that we are going to use a resource.
|
| 38 |
|
| 39 |
$faulty_fields = array();
|
| 40 |
$subscribe_options = wp_unslash( $_POST['options'] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput
|
| 41 |
+
$subscribe_options = array_map(
|
| 42 |
+
array(
|
| 43 |
+
'stcr\stcr_utils',
|
| 44 |
+
'sanitize_options'
|
| 45 |
+
),
|
| 46 |
+
$subscribe_options
|
| 47 |
+
);
|
| 48 |
foreach ( $subscribe_options as $option => $value )
|
| 49 |
{
|
| 50 |
|
| 65 |
echo '</p></div>';
|
| 66 |
}
|
| 67 |
?>
|
|
|
|
|
|
|
| 68 |
<div class="container-fluid">
|
| 69 |
<div class="mt-3"></div>
|
| 70 |
<div class="row">
|
| 380 |
</div>
|
| 381 |
</div>
|
| 382 |
|
|
|
|
| 383 |
<?php
|
| 384 |
global $wp_subscribe_reloaded;
|
| 385 |
// Tell WP that we are going to use a resource.
|
options/stcr_manage_subscriptions.php
CHANGED
|
@@ -32,13 +32,6 @@ if ( is_readable( trailingslashit( dirname( STCR_PLUGIN_FILE ) ) . 'options/pane
|
|
| 32 |
}
|
| 33 |
|
| 34 |
?>
|
| 35 |
-
<style type="text/css">
|
| 36 |
-
|
| 37 |
-
</style>
|
| 38 |
-
|
| 39 |
-
<link href="<?php echo esc_url( plugins_url( '/vendor/datatables/media/css/jquery.dataTables.min.css', STCR_PLUGIN_FILE ) ); ?>" rel="stylesheet"/>
|
| 40 |
-
<link href="<?php echo esc_url( plugins_url( '/vendor/datatables/media/css/dataTables.bootstrap4.min.css', STCR_PLUGIN_FILE ) ); ?>" rel="stylesheet"/>
|
| 41 |
-
<link href="<?php echo esc_url( plugins_url( '/vendor/datatables.net-responsive-bs4/css/responsive.bootstrap4.min.css', STCR_PLUGIN_FILE ) ); ?>" rel="stylesheet"/>
|
| 42 |
|
| 43 |
<div class="container-fluid">
|
| 44 |
|
|
@@ -344,11 +337,6 @@ if ( is_readable( trailingslashit( dirname( STCR_PLUGIN_FILE ) ) . 'options/pane
|
|
| 344 |
</div>
|
| 345 |
</div>
|
| 346 |
|
| 347 |
-
<script type="text/javascript" src="<?php echo esc_url( plugins_url( '/vendor/datatables/media/js/jquery.dataTables.min.js', STCR_PLUGIN_FILE ) ); ?>"></script>
|
| 348 |
-
<script type="text/javascript" src="<?php echo esc_url( plugins_url( '/vendor/datatables/media/js/dataTables.bootstrap4.min.js', STCR_PLUGIN_FILE ) ); ?>"></script>
|
| 349 |
-
<script type="text/javascript" src="<?php echo esc_url( plugins_url( '/vendor/datatables.net-responsive/js/dataTables.responsive.min.js', STCR_PLUGIN_FILE ) ); ?>"></script>
|
| 350 |
-
<script type="text/javascript" src="<?php echo esc_url( plugins_url( '/vendor/datatables.net-responsive-bs4/js/responsive.bootstrap4.min.js', STCR_PLUGIN_FILE ) ); ?>"></script>
|
| 351 |
-
|
| 352 |
<?php
|
| 353 |
// Tell WP that we are going to use a resource.
|
| 354 |
$wp_subscribe_reloaded->stcr->utils->register_script_to_wp( "stcr-subs-management", "subs_management.js", "includes/js/admin");
|
| 32 |
}
|
| 33 |
|
| 34 |
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
|
| 36 |
<div class="container-fluid">
|
| 37 |
|
| 337 |
</div>
|
| 338 |
</div>
|
| 339 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 340 |
<?php
|
| 341 |
// Tell WP that we are going to use a resource.
|
| 342 |
$wp_subscribe_reloaded->stcr->utils->register_script_to_wp( "stcr-subs-management", "subs_management.js", "includes/js/admin");
|
options/stcr_management_page.php
CHANGED
|
@@ -44,6 +44,13 @@ if ( isset( $_POST['options'] ) ) {
|
|
| 44 |
|
| 45 |
$faulty_fields = array();
|
| 46 |
$subscribe_options = wp_unslash( $_POST['options'] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
foreach ( $subscribe_options as $option => $value )
|
| 48 |
{
|
| 49 |
if ( ! $wp_subscribe_reloaded->stcr->utils->stcr_update_menu_options( $option, $value, $options[$option] ) )
|
|
@@ -76,8 +83,6 @@ if ( isset( $_POST['options'] ) ) {
|
|
| 76 |
wp_print_scripts( 'quicktags' );
|
| 77 |
|
| 78 |
?>
|
| 79 |
-
<link href="<?php echo esc_url( plugins_url( '/vendor/webui-popover/dist/jquery.webui-popover.min.css', STCR_PLUGIN_FILE ) ); ?>" rel="stylesheet"/>
|
| 80 |
-
|
| 81 |
<div class="container-fluid">
|
| 82 |
<div class="mt-3"></div>
|
| 83 |
<div class="row">
|
|
@@ -440,7 +445,6 @@ wp_print_scripts( 'quicktags' );
|
|
| 440 |
</div>
|
| 441 |
</div>
|
| 442 |
|
| 443 |
-
<script type="text/javascript" src="<?php echo esc_url( plugins_url( '/vendor/webui-popover/dist/jquery.webui-popover.min.js', STCR_PLUGIN_FILE ) ); ?>"></script>
|
| 444 |
<?php
|
| 445 |
global $wp_subscribe_reloaded;
|
| 446 |
// Tell WP that we are going to use a resource.
|
| 44 |
|
| 45 |
$faulty_fields = array();
|
| 46 |
$subscribe_options = wp_unslash( $_POST['options'] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput
|
| 47 |
+
$subscribe_options = array_map(
|
| 48 |
+
array(
|
| 49 |
+
'stcr\stcr_utils',
|
| 50 |
+
'sanitize_options'
|
| 51 |
+
),
|
| 52 |
+
$subscribe_options
|
| 53 |
+
);
|
| 54 |
foreach ( $subscribe_options as $option => $value )
|
| 55 |
{
|
| 56 |
if ( ! $wp_subscribe_reloaded->stcr->utils->stcr_update_menu_options( $option, $value, $options[$option] ) )
|
| 83 |
wp_print_scripts( 'quicktags' );
|
| 84 |
|
| 85 |
?>
|
|
|
|
|
|
|
| 86 |
<div class="container-fluid">
|
| 87 |
<div class="mt-3"></div>
|
| 88 |
<div class="row">
|
| 445 |
</div>
|
| 446 |
</div>
|
| 447 |
|
|
|
|
| 448 |
<?php
|
| 449 |
global $wp_subscribe_reloaded;
|
| 450 |
// Tell WP that we are going to use a resource.
|
options/stcr_notifications.php
CHANGED
|
@@ -38,6 +38,13 @@ if ( isset( $_POST['options'] ) ) {
|
|
| 38 |
|
| 39 |
$faulty_fields = array();
|
| 40 |
$subscribe_options = wp_unslash( $_POST['options'] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
foreach ( $subscribe_options as $option => $value )
|
| 42 |
{
|
| 43 |
|
|
@@ -74,8 +81,6 @@ if ( isset( $_POST['options'] ) ) {
|
|
| 74 |
wp_print_scripts( 'quicktags' );
|
| 75 |
|
| 76 |
?>
|
| 77 |
-
<link href="<?php echo esc_url( plugins_url( '/vendor/webui-popover/dist/jquery.webui-popover.min.css', STCR_PLUGIN_FILE ) ); ?>" rel="stylesheet"/>
|
| 78 |
-
|
| 79 |
<div class="container-fluid">
|
| 80 |
<div class="mt-3"></div>
|
| 81 |
<div class="row">
|
|
@@ -372,7 +377,6 @@ wp_print_scripts( 'quicktags' );
|
|
| 372 |
</div>
|
| 373 |
</div>
|
| 374 |
|
| 375 |
-
<script type="text/javascript" src="<?php echo esc_url( plugins_url( '/vendor/webui-popover/dist/jquery.webui-popover.min.js', STCR_PLUGIN_FILE ) ); ?>"></script>
|
| 376 |
<?php
|
| 377 |
//global $wp_subscribe_reloaded;
|
| 378 |
// Tell WP that we are going to use a resource.
|
| 38 |
|
| 39 |
$faulty_fields = array();
|
| 40 |
$subscribe_options = wp_unslash( $_POST['options'] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput
|
| 41 |
+
$subscribe_options = array_map(
|
| 42 |
+
array(
|
| 43 |
+
'stcr\stcr_utils',
|
| 44 |
+
'sanitize_options'
|
| 45 |
+
),
|
| 46 |
+
$subscribe_options
|
| 47 |
+
);
|
| 48 |
foreach ( $subscribe_options as $option => $value )
|
| 49 |
{
|
| 50 |
|
| 81 |
wp_print_scripts( 'quicktags' );
|
| 82 |
|
| 83 |
?>
|
|
|
|
|
|
|
| 84 |
<div class="container-fluid">
|
| 85 |
<div class="mt-3"></div>
|
| 86 |
<div class="row">
|
| 377 |
</div>
|
| 378 |
</div>
|
| 379 |
|
|
|
|
| 380 |
<?php
|
| 381 |
//global $wp_subscribe_reloaded;
|
| 382 |
// Tell WP that we are going to use a resource.
|
options/stcr_options.php
CHANGED
|
@@ -95,6 +95,13 @@ if ( array_key_exists( "generate_key", $_POST ) ) {
|
|
| 95 |
|
| 96 |
$faulty_fields = array();
|
| 97 |
$subscribe_options = wp_unslash( $_POST['options'] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 98 |
foreach ( $subscribe_options as $option => $value )
|
| 99 |
{
|
| 100 |
if ( ! $wp_subscribe_reloaded->stcr->utils->stcr_update_menu_options( $option, $value, $options[$option] ) )
|
|
@@ -116,8 +123,6 @@ if ( array_key_exists( "generate_key", $_POST ) ) {
|
|
| 116 |
wp_print_scripts( 'quicktags' );
|
| 117 |
|
| 118 |
?>
|
| 119 |
-
<link href="<?php echo esc_url( plugins_url( '/vendor/webui-popover/dist/jquery.webui-popover.min.css', STCR_PLUGIN_FILE ) ); ?>" rel="stylesheet"/>
|
| 120 |
-
|
| 121 |
<div class="container-fluid">
|
| 122 |
<div class="mt-3"></div>
|
| 123 |
<div class="row">
|
|
@@ -812,7 +817,6 @@ wp_print_scripts( 'quicktags' );
|
|
| 812 |
|
| 813 |
</div>
|
| 814 |
</div>
|
| 815 |
-
<script type="text/javascript" src="<?php echo esc_url( plugins_url( '/vendor/webui-popover/dist/jquery.webui-popover.min.js', STCR_PLUGIN_FILE ) ); ?>"></script>
|
| 816 |
<?php
|
| 817 |
//global $wp_subscribe_reloaded;
|
| 818 |
// Tell WP that we are going to use a resource.
|
| 95 |
|
| 96 |
$faulty_fields = array();
|
| 97 |
$subscribe_options = wp_unslash( $_POST['options'] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput
|
| 98 |
+
$subscribe_options = array_map(
|
| 99 |
+
array(
|
| 100 |
+
'stcr\stcr_utils',
|
| 101 |
+
'sanitize_options'
|
| 102 |
+
),
|
| 103 |
+
$subscribe_options
|
| 104 |
+
);
|
| 105 |
foreach ( $subscribe_options as $option => $value )
|
| 106 |
{
|
| 107 |
if ( ! $wp_subscribe_reloaded->stcr->utils->stcr_update_menu_options( $option, $value, $options[$option] ) )
|
| 123 |
wp_print_scripts( 'quicktags' );
|
| 124 |
|
| 125 |
?>
|
|
|
|
|
|
|
| 126 |
<div class="container-fluid">
|
| 127 |
<div class="mt-3"></div>
|
| 128 |
<div class="row">
|
| 817 |
|
| 818 |
</div>
|
| 819 |
</div>
|
|
|
|
| 820 |
<?php
|
| 821 |
//global $wp_subscribe_reloaded;
|
| 822 |
// Tell WP that we are going to use a resource.
|
options/stcr_system.php
CHANGED
|
@@ -103,6 +103,13 @@ else {
|
|
| 103 |
|
| 104 |
$faulty_fields = array();
|
| 105 |
$subscribe_options = wp_unslash( $_POST['options'] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 106 |
foreach ( $subscribe_options as $option => $value )
|
| 107 |
{
|
| 108 |
if ( ! $wp_subscribe_reloaded->stcr->utils->stcr_update_menu_options( $option, $value, $options[$option] ) )
|
|
@@ -139,7 +146,6 @@ else {
|
|
| 139 |
}
|
| 140 |
}
|
| 141 |
?>
|
| 142 |
-
<link href="<?php echo esc_url( plugins_url( '/vendor/webui-popover/dist/jquery.webui-popover.min.css', STCR_PLUGIN_FILE ) ); ?>" rel="stylesheet"/>
|
| 143 |
<style type="text/css">
|
| 144 |
.system-error {
|
| 145 |
color: #dc3545;
|
|
@@ -430,7 +436,12 @@ else {
|
|
| 430 |
|
| 431 |
// Get the SSL status.
|
| 432 |
if ( ini_get( 'allow_url_fopen' ) ) {
|
| 433 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 434 |
}
|
| 435 |
|
| 436 |
if ( false !== $tlsCheck )
|
|
@@ -772,7 +783,6 @@ else {
|
|
| 772 |
|
| 773 |
</div>
|
| 774 |
</div>
|
| 775 |
-
<script type="text/javascript" src="<?php echo esc_url( plugins_url( '/vendor/webui-popover/dist/jquery.webui-popover.min.js', STCR_PLUGIN_FILE ) ); ?>"></script>
|
| 776 |
<?php
|
| 777 |
//global $wp_subscribe_reloaded;
|
| 778 |
// Tell WP that we are going to use a resource.
|
| 103 |
|
| 104 |
$faulty_fields = array();
|
| 105 |
$subscribe_options = wp_unslash( $_POST['options'] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput
|
| 106 |
+
$subscribe_options = array_map(
|
| 107 |
+
array(
|
| 108 |
+
'stcr\stcr_utils',
|
| 109 |
+
'sanitize_options'
|
| 110 |
+
),
|
| 111 |
+
$subscribe_options
|
| 112 |
+
);
|
| 113 |
foreach ( $subscribe_options as $option => $value )
|
| 114 |
{
|
| 115 |
if ( ! $wp_subscribe_reloaded->stcr->utils->stcr_update_menu_options( $option, $value, $options[$option] ) )
|
| 146 |
}
|
| 147 |
}
|
| 148 |
?>
|
|
|
|
| 149 |
<style type="text/css">
|
| 150 |
.system-error {
|
| 151 |
color: #dc3545;
|
| 436 |
|
| 437 |
// Get the SSL status.
|
| 438 |
if ( ini_get( 'allow_url_fopen' ) ) {
|
| 439 |
+
$tlsRemote = wp_remote_get( 'https://www.howsmyssl.com/a/check' );
|
| 440 |
+
$responseCode = wp_remote_retrieve_response_code( $tlsRemote );
|
| 441 |
+
|
| 442 |
+
if ( 200 === $responseCode ) {
|
| 443 |
+
$tlsCheck = wp_remote_retrieve_body( $tlsRemote );
|
| 444 |
+
}
|
| 445 |
}
|
| 446 |
|
| 447 |
if ( false !== $tlsCheck )
|
| 783 |
|
| 784 |
</div>
|
| 785 |
</div>
|
|
|
|
| 786 |
<?php
|
| 787 |
//global $wp_subscribe_reloaded;
|
| 788 |
// Tell WP that we are going to use a resource.
|
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 |
= v220513 =
|
| 99 |
* **Fix** Issue with migration to the new supported post types option
|
| 100 |
|
| 7 |
Requires PHP: 5.6
|
| 8 |
Requires MySQL: 5.6
|
| 9 |
Tested up to: 5.9
|
| 10 |
+
Stable tag: 220523
|
| 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 |
+
= v220523 =
|
| 99 |
+
* **Fix** Minor fixes
|
| 100 |
+
|
| 101 |
= v220513 =
|
| 102 |
* **Fix** Issue with migration to the new supported post types option
|
| 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: 220523
|
| 6 |
* Author: WPKube
|
| 7 |
* Author URI: http://wpkube.com/
|
| 8 |
* License: GPL-2.0+
|
utils/stcr_utils.php
CHANGED
|
@@ -563,19 +563,43 @@ if( ! class_exists('\\'.__NAMESPACE__.'\\stcr_utils') )
|
|
| 563 |
$stcr_admin_css = plugins_url( '/includes/css/stcr-admin-style.css', STCR_PLUGIN_FILE );
|
| 564 |
|
| 565 |
// register scripts
|
| 566 |
-
wp_register_script('stcr-admin-js', $stcr_admin_js, array( 'jquery' ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 567 |
|
| 568 |
// rergister styles
|
| 569 |
wp_register_style( 'stcr-admin-style', $stcr_admin_css );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 570 |
|
| 571 |
// check if we're on our pages
|
| 572 |
if ( strpos( $hook, 'stcr' ) !== false ) {
|
| 573 |
|
| 574 |
// enqueue scripts
|
| 575 |
-
wp_enqueue_script('stcr-admin-js');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 576 |
|
| 577 |
// enqueue styles
|
| 578 |
-
wp_enqueue_style('stcr-admin-style');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 579 |
|
| 580 |
}
|
| 581 |
|
|
@@ -815,7 +839,11 @@ if( ! class_exists('\\'.__NAMESPACE__.'\\stcr_utils') )
|
|
| 815 |
|
| 816 |
break;
|
| 817 |
case 'multicheck':
|
| 818 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 819 |
|
| 820 |
break;
|
| 821 |
case 'select':
|
|
@@ -964,5 +992,48 @@ if( ! class_exists('\\'.__NAMESPACE__.'\\stcr_utils') )
|
|
| 964 |
return true;
|
| 965 |
|
| 966 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 967 |
}
|
| 968 |
}
|
| 563 |
$stcr_admin_css = plugins_url( '/includes/css/stcr-admin-style.css', STCR_PLUGIN_FILE );
|
| 564 |
|
| 565 |
// register scripts
|
| 566 |
+
wp_register_script( 'stcr-admin-js', $stcr_admin_js, array( 'jquery' ) );
|
| 567 |
+
wp_register_script( 'bootstrap', plugins_url( '/vendor/bootstrap/dist/js/bootstrap.bundle.min.js', STCR_PLUGIN_FILE ), array( 'jquery' ), false, true );
|
| 568 |
+
wp_register_script( 'webui-popover', plugins_url( '/vendor/webui-popover/dist/jquery.webui-popover.min.js', STCR_PLUGIN_FILE ), array( 'jquery' ), false, true );
|
| 569 |
+
wp_register_script( 'dataTables', plugins_url( '/vendor/datatables/media/js/jquery.dataTables.min.js', STCR_PLUGIN_FILE ), array( 'jquery' ), false, true );
|
| 570 |
+
wp_register_script( 'dataTables-bootstrap4', plugins_url( '/vendor/datatables/media/js/dataTables.bootstrap4.min.js', STCR_PLUGIN_FILE ), array( 'jquery' ), false, true );
|
| 571 |
+
wp_register_script( 'dataTables-responsive', plugins_url( '/vendor/datatables.net-responsive/js/dataTables.responsive.min.js', STCR_PLUGIN_FILE ), array( 'jquery' ), false, true );
|
| 572 |
+
wp_register_script( 'responsive-bootstrap4', plugins_url( '/vendor/datatables.net-responsive-bs4/js/responsive.bootstrap4.min.js', STCR_PLUGIN_FILE ), array( 'jquery' ), false, true );
|
| 573 |
|
| 574 |
// rergister styles
|
| 575 |
wp_register_style( 'stcr-admin-style', $stcr_admin_css );
|
| 576 |
+
wp_register_style( 'fontawesome', plugins_url( '/vendor/Font-Awesome/web-fonts-with-css/css/fontawesome-all.min.css', STCR_PLUGIN_FILE ) );
|
| 577 |
+
wp_register_style( 'bootstrap', plugins_url( '/vendor/bootstrap/dist/css/bootstrap.min.css', STCR_PLUGIN_FILE ) );
|
| 578 |
+
wp_register_style( 'webui-popover', plugins_url( '/vendor/webui-popover/dist/jquery.webui-popover.min.css', STCR_PLUGIN_FILE ) );
|
| 579 |
+
wp_register_style( 'datatables', plugins_url( '/vendor/datatables/media/css/jquery.dataTables.min.css', STCR_PLUGIN_FILE ) );
|
| 580 |
+
wp_register_style( 'datatables-bootstrap4', plugins_url( '/vendor/datatables/media/css/dataTables.bootstrap4.min.css', STCR_PLUGIN_FILE ) );
|
| 581 |
+
wp_register_style( 'datatables-net-responsive-bs4', plugins_url( '/vendor/datatables.net-responsive-bs4/css/responsive.bootstrap4.min.css', STCR_PLUGIN_FILE ) );
|
| 582 |
|
| 583 |
// check if we're on our pages
|
| 584 |
if ( strpos( $hook, 'stcr' ) !== false ) {
|
| 585 |
|
| 586 |
// enqueue scripts
|
| 587 |
+
wp_enqueue_script( 'stcr-admin-js' );
|
| 588 |
+
wp_enqueue_script( 'bootstrap' );
|
| 589 |
+
wp_enqueue_script( 'webui-popover' );
|
| 590 |
+
wp_enqueue_script( 'dataTables' );
|
| 591 |
+
wp_enqueue_script( 'dataTables-bootstrap4' );
|
| 592 |
+
wp_enqueue_script( 'dataTables-responsive' );
|
| 593 |
+
wp_enqueue_script( 'responsive-bootstrap4' );
|
| 594 |
|
| 595 |
// enqueue styles
|
| 596 |
+
wp_enqueue_style( 'stcr-admin-style' );
|
| 597 |
+
wp_enqueue_style( 'fontawesome' );
|
| 598 |
+
wp_enqueue_style( 'bootstrap' );
|
| 599 |
+
wp_enqueue_style( 'webui-popover' );
|
| 600 |
+
wp_enqueue_style( 'datatables' );
|
| 601 |
+
wp_enqueue_style( 'datatables-bootstrap4' );
|
| 602 |
+
wp_enqueue_style( 'datatables-net-responsive-bs4' );
|
| 603 |
|
| 604 |
}
|
| 605 |
|
| 839 |
|
| 840 |
break;
|
| 841 |
case 'multicheck':
|
| 842 |
+
$final_value = array();
|
| 843 |
+
foreach ( $_value as $value ) {
|
| 844 |
+
$final_value[] = sanitize_text_field( $value );
|
| 845 |
+
}
|
| 846 |
+
update_option( 'subscribe_reloaded_' . $_option, $final_value );
|
| 847 |
|
| 848 |
break;
|
| 849 |
case 'select':
|
| 992 |
return true;
|
| 993 |
|
| 994 |
}
|
| 995 |
+
|
| 996 |
+
/**
|
| 997 |
+
* Sanitize the user input on plugin options save.
|
| 998 |
+
*
|
| 999 |
+
* @param string|array|mixed $values The plugin setting options.
|
| 1000 |
+
*
|
| 1001 |
+
* @return string|array|mixed The sanitized user data.
|
| 1002 |
+
*/
|
| 1003 |
+
public static function sanitize_options( $values ) {
|
| 1004 |
+
|
| 1005 |
+
// If the values is set to array, sanitize each of the values.
|
| 1006 |
+
if ( is_array( $values ) ) {
|
| 1007 |
+
$final_value = array();
|
| 1008 |
+
foreach ( $values as $value ) {
|
| 1009 |
+
$final_value[] = sanitize_text_field( $value );
|
| 1010 |
+
}
|
| 1011 |
+
|
| 1012 |
+
return $final_value;
|
| 1013 |
+
}
|
| 1014 |
+
|
| 1015 |
+
// If user have set the meta tag, then, sanitize that via wp_kses.
|
| 1016 |
+
$matches = array();
|
| 1017 |
+
preg_match( '/<meta/i', $values, $matches );
|
| 1018 |
+
if ( $matches ) {
|
| 1019 |
+
$final_value = wp_kses(
|
| 1020 |
+
$values,
|
| 1021 |
+
array(
|
| 1022 |
+
'meta' => array(
|
| 1023 |
+
'charset' => array(),
|
| 1024 |
+
'content' => array(),
|
| 1025 |
+
'http-equiv' => array(),
|
| 1026 |
+
'name' => array(),
|
| 1027 |
+
),
|
| 1028 |
+
)
|
| 1029 |
+
);
|
| 1030 |
+
|
| 1031 |
+
return $final_value;
|
| 1032 |
+
}
|
| 1033 |
+
|
| 1034 |
+
// Sanitize everything else with the HTML attributes available for posts.
|
| 1035 |
+
return wp_kses_post( $values );
|
| 1036 |
+
|
| 1037 |
+
}
|
| 1038 |
}
|
| 1039 |
}
|
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 |
|
| 8 |
}
|
| 9 |
|
| 10 |
// globals
|
| 11 |
+
define( __NAMESPACE__.'\\VERSION','220523' );
|
| 12 |
define( __NAMESPACE__.'\\DEVELOPMENT', false );
|
| 13 |
define( __NAMESPACE__.'\\SLUG', "subscribe-to-comments-reloaded" );
|
| 14 |
|
