Subscribe To Comments Reloaded - Version 220725

Version Description

Download this release

Release Info

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

Code changes from version 220608 to 220725

includes/css/stcr-style.css ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .stcr-pagination-links {
2
+ display: flex;
3
+ flex-wrap: wrap;
4
+ }
5
+ .stcr-pagination-links .stcr-page-link {
6
+ display: block;
7
+ padding: 5px 15px;
8
+ margin-left: -1px;
9
+ border: 1px solid #eaeaea;
10
+ }
11
+ .stcr-pagination-links .stcr-page-link:first-child {
12
+ border-top-left-radius: 5px;
13
+ border-bottom-left-radius: 5px;
14
+ }
15
+ .stcr-pagination-links .stcr-page-link:last-child {
16
+ border-top-right-radius: 5px;
17
+ border-bottom-right-radius: 5px;
18
+ }
includes/sass/stcr-style.scss ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .stcr-pagination-links {
2
+ display: flex;
3
+ flex-wrap: wrap;
4
+
5
+ .stcr-page-link {
6
+ display: block;
7
+ padding: 5px 15px;
8
+ margin-left: -1px;
9
+ border: 1px solid #eaeaea;
10
+
11
+ &:first-child {
12
+ border-top-left-radius: 5px;
13
+ border-bottom-left-radius: 5px;
14
+ }
15
+
16
+ &:last-child {
17
+ border-top-right-radius: 5px;
18
+ border-bottom-right-radius: 5px;
19
+ }
20
+ }
21
+ }
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: 6.0
10
- Stable tag: 220608
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
 
@@ -95,6 +95,10 @@ 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
  = v220608 =
99
  * **New** The "Add Subscription" option in the admin panel now allows multiple email addresses to be added at once.
100
  * **Fix** Force the redirect URL to be the same domain as the website
7
  Requires PHP: 5.6
8
  Requires MySQL: 5.6
9
  Tested up to: 6.0
10
+ Stable tag: 220725
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
+ = v220725 =
99
+ * **Fix** Issue with the noindex tag
100
+ * **Tweak** The noindex tag now also applies to real (non-virtual) management page
101
+
102
  = v220608 =
103
  * **New** The "Add Subscription" option in the admin panel now allows multiple email addresses to be added at once.
104
  * **Fix** Force the redirect URL to be the same domain as the website
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: 220608
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: 220725
6
  * Author: WPKube
7
  * Author URI: http://wpkube.com/
8
  * License: GPL-2.0+
templates/author.php CHANGED
@@ -118,7 +118,83 @@ if ( is_array( $subscriptions ) && ! empty( $subscriptions ) ) {
118
  }
119
  echo "</tbody>";
120
  echo "</table>";
 
121
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
122
  echo '<p id="subscribe-reloaded-select-all-p"><i class="fa fa-expand" aria-hidden="true"></i>&nbsp;<a class="subscribe-reloaded-small-button stcr-subs-select-all" href="#" onclick="stcrCheckAll(event)">' . esc_html__( 'Select all', 'subscribe-to-comments-reloaded' ) . '</a> ';
123
  echo '&nbsp;&nbsp;<i class="fa fa-compress" aria-hidden="true"></i>&nbsp;<a class="subscribe-reloaded-small-button stcr-subs-select-none" href="#" onclick="stcrUncheckAll(event)">' . esc_html__( 'Invert selection', 'subscribe-to-comments-reloaded' ) . '</a></p>';
124
  echo '<p id="subscribe-reloaded-action-p">' . esc_html__( 'Action:', 'subscribe-to-comments-reloaded' );
@@ -144,80 +220,6 @@ if ( is_array( $subscriptions ) && ! empty( $subscriptions ) ) {
144
  </fieldset>
145
  </form>
146
 
147
- <div class="stcr-pagination-links">
148
- <?php
149
- // For first disable.
150
- if ( $disable_first ) {
151
- echo '<span class="disabled" aria-hidden="true">&laquo;</span>';
152
- } else {
153
- printf(
154
- '<a class="first-page" href="%s"><span aria-hidden="true">%s</span></a>',
155
- esc_url( remove_query_arg( 'subscription_paged', $current_url ) ),
156
- '&laquo;'
157
- );
158
- }
159
-
160
- // For previous disable.
161
- if ( $disable_prev ) {
162
- echo '<span class="disabled" aria-hidden="true">&lsaquo;</span>';
163
- } else {
164
- printf(
165
- '<a class="prev-page" href="%s"><span aria-hidden="true">%s</span></a>',
166
- esc_url( add_query_arg( array( 'post_permalink' => $post_permalink, 'subscription_paged' => max( 1, $subscriptions_pagenum - 1 ) ), $current_url ) ),
167
- '&lsaquo;'
168
- );
169
- }
170
-
171
- // For page numbers.
172
- echo '<span class="stcr-subscriptions-management-links">';
173
- for ( $number = 1; $number <= $subscriptions_total_pages; $number ++ ) {
174
- if ( $number === $subscriptions_pagenum ) {
175
- printf(
176
- '<span aria-current="page" class="page-numbers current">%s</span>',
177
- esc_attr( number_format_i18n( $number ) )
178
- );
179
- $dots = true;
180
- } else {
181
- if ( $number <= 1 || ( $subscriptions_pagenum && $number >= $subscriptions_pagenum - 2 && $number <= $subscriptions_pagenum + 2 ) || $number > $subscriptions_total_pages - 1 ) {
182
- printf(
183
- '<a class="page-numbers" href="%s">%s</a>',
184
- /** This filter is documented in wp-includes/general-template.php */
185
- esc_url( add_query_arg( array( 'post_permalink' => $post_permalink, 'subscription_paged' => $number ), $current_url ) ),
186
- esc_attr( number_format_i18n( $number ) )
187
- );
188
- $dots = true;
189
- } elseif ( $dots ) {
190
- echo '<span class="page-numbers dots">' . __( '&hellip;', 'subscribe-to-comments-reloaded' ) . '</span>';
191
- $dots = false;
192
- }
193
- }
194
- }
195
- echo '</span>';
196
-
197
- // For next disable.
198
- if ( $disable_next ) {
199
- echo '<span class="disabled" aria-hidden="true">&rsaquo;</span>';
200
- } else {
201
- printf(
202
- '<a class="next-page" href="%s"><span aria-hidden="true">%s</span></a>',
203
- esc_url( add_query_arg( array( 'post_permalink' => $post_permalink, 'subscription_paged' => min( $subscriptions_total_pages, $subscriptions_pagenum + 1 ) ), $current_url ) ),
204
- '&rsaquo;'
205
- );
206
- }
207
-
208
- // For last disable.
209
- if ( $disable_last ) {
210
- echo '<span class="disabled" aria-hidden="true">&raquo;</span>';
211
- } else {
212
- printf(
213
- "<a class='last-page' href='%s'><span aria-hidden='true'>%s</span></a>",
214
- esc_url( add_query_arg( array( 'post_permalink' => $post_permalink, 'subscription_paged' => $subscriptions_total_pages ), $current_url ) ),
215
- '&raquo;'
216
- );
217
- }
218
- ?>
219
- </div>
220
-
221
  <script type="text/javascript">
222
 
223
  function stcrCheckAll(e) {
118
  }
119
  echo "</tbody>";
120
  echo "</table>";
121
+ ?>
122
 
123
+ <?php if ( $subscriptions_total_pages > 1 ) { ?>
124
+ <p class="stcr-pagination-links">
125
+ <?php
126
+ // For first disable.
127
+ if ( $disable_first ) {
128
+ echo '<span class="stcr-disabled stcr-page-link" aria-hidden="true">&laquo;</span>';
129
+ } else {
130
+ printf(
131
+ '<a class="stcr-first-page stcr-page-link" href="%s"><span aria-hidden="true">%s</span></a>',
132
+ esc_url( remove_query_arg( 'subscription_paged', $current_url ) ),
133
+ '&laquo;'
134
+ );
135
+ }
136
+
137
+ // For previous disable.
138
+ if ( $disable_prev ) {
139
+ echo '<span class="stcr-disabled stcr-page-link" aria-hidden="true">&lsaquo;</span>';
140
+ } else {
141
+ printf(
142
+ '<a class="stcr-prev-page stcr-page-link" href="%s"><span aria-hidden="true">%s</span></a>',
143
+ esc_url( add_query_arg( array( 'post_permalink' => $post_permalink, 'subscription_paged' => max( 1, $subscriptions_pagenum - 1 ) ), $current_url ) ),
144
+ '&lsaquo;'
145
+ );
146
+ }
147
+
148
+ // For page numbers.
149
+ for ( $number = 1; $number <= $subscriptions_total_pages; $number ++ ) {
150
+ if ( $number === $subscriptions_pagenum ) {
151
+ printf(
152
+ '<span aria-current="page" class="stcr-page-numbers stcr-current-page stcr-page-link">%s</span>',
153
+ esc_attr( number_format_i18n( $number ) )
154
+ );
155
+ $dots = true;
156
+ } else {
157
+ if ( $number <= 1 || ( $subscriptions_pagenum && $number >= $subscriptions_pagenum - 2 && $number <= $subscriptions_pagenum + 2 ) || $number > $subscriptions_total_pages - 1 ) {
158
+ printf(
159
+ '<a class="stcr-page-numbers stcr-page-link" href="%s">%s</a>',
160
+ /** This filter is documented in wp-includes/general-template.php */
161
+ esc_url( add_query_arg( array( 'post_permalink' => $post_permalink, 'subscription_paged' => $number ), $current_url ) ),
162
+ esc_attr( number_format_i18n( $number ) )
163
+ );
164
+ $dots = true;
165
+ } elseif ( $dots ) {
166
+ echo '<span class="stcr-page-numbers stcr-dots stcr-page-link">' . __( '&hellip;', 'subscribe-to-comments-reloaded' ) . '</span>';
167
+ $dots = false;
168
+ }
169
+ }
170
+ }
171
+
172
+ // For next disable.
173
+ if ( $disable_next ) {
174
+ echo '<span class="stcr-disabled stcr-page-link" aria-hidden="true">&rsaquo;</span>';
175
+ } else {
176
+ printf(
177
+ '<a class="stcr-next-page stcr-page-link" href="%s"><span aria-hidden="true">%s</span></a>',
178
+ esc_url( add_query_arg( array( 'post_permalink' => $post_permalink, 'subscription_paged' => min( $subscriptions_total_pages, $subscriptions_pagenum + 1 ) ), $current_url ) ),
179
+ '&rsaquo;'
180
+ );
181
+ }
182
+
183
+ // For last disable.
184
+ if ( $disable_last ) {
185
+ echo '<span class="stcr-disabled stcr-page-link" aria-hidden="true">&raquo;</span>';
186
+ } else {
187
+ printf(
188
+ "<a class='stcr-last-page stcr-page-link' href='%s'><span aria-hidden='true'>%s</span></a>",
189
+ esc_url( add_query_arg( array( 'post_permalink' => $post_permalink, 'subscription_paged' => $subscriptions_total_pages ), $current_url ) ),
190
+ '&raquo;'
191
+ );
192
+ }
193
+ ?>
194
+ </p>
195
+ <?php } ?>
196
+
197
+ <?php
198
  echo '<p id="subscribe-reloaded-select-all-p"><i class="fa fa-expand" aria-hidden="true"></i>&nbsp;<a class="subscribe-reloaded-small-button stcr-subs-select-all" href="#" onclick="stcrCheckAll(event)">' . esc_html__( 'Select all', 'subscribe-to-comments-reloaded' ) . '</a> ';
199
  echo '&nbsp;&nbsp;<i class="fa fa-compress" aria-hidden="true"></i>&nbsp;<a class="subscribe-reloaded-small-button stcr-subs-select-none" href="#" onclick="stcrUncheckAll(event)">' . esc_html__( 'Invert selection', 'subscribe-to-comments-reloaded' ) . '</a></p>';
200
  echo '<p id="subscribe-reloaded-action-p">' . esc_html__( 'Action:', 'subscribe-to-comments-reloaded' );
220
  </fieldset>
221
  </form>
222
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
223
  <script type="text/javascript">
224
 
225
  function stcrCheckAll(e) {
templates/request-management-link.php CHANGED
@@ -26,8 +26,8 @@ $recaptcha_version = get_option( 'subscribe_reloaded_recaptcha_version', 'v2' );
26
 
27
  // google recaptcha confirm
28
  if ( $use_captcha == 'yes' ) {
29
- $captcha_output .= '<div class="g-recaptcha" data-sitekey="' . $captcha_site_key . '"></div>';
30
  if ( 'v2' == $recaptcha_version ) {
 
31
  if ( isset( $_POST['g-recaptcha-response'] ) ) {
32
  $captcha = sanitize_text_field( wp_unslash( $_POST['g-recaptcha-response'] ) );
33
  $captcha_result = wp_remote_post( 'https://www.google.com/recaptcha/api/siteverify', array(
@@ -54,7 +54,7 @@ if ( $use_captcha == 'yes' ) {
54
  $captcha_result = wp_remote_post( 'https://www.google.com/recaptcha/api/siteverify', array(
55
  'method' => 'POST',
56
  'body' => array(
57
- 'secret' => $recaptcha_secret_key,
58
  'response' => $captcha,
59
  )
60
  ));
26
 
27
  // google recaptcha confirm
28
  if ( $use_captcha == 'yes' ) {
 
29
  if ( 'v2' == $recaptcha_version ) {
30
+ $captcha_output .= '<div class="g-recaptcha" data-sitekey="' . $captcha_site_key . '"></div>';
31
  if ( isset( $_POST['g-recaptcha-response'] ) ) {
32
  $captcha = sanitize_text_field( wp_unslash( $_POST['g-recaptcha-response'] ) );
33
  $captcha_result = wp_remote_post( 'https://www.google.com/recaptcha/api/siteverify', array(
54
  $captcha_result = wp_remote_post( 'https://www.google.com/recaptcha/api/siteverify', array(
55
  'method' => 'POST',
56
  'body' => array(
57
+ 'secret' => $captcha_secret_key,
58
  'response' => $captcha,
59
  )
60
  ));
templates/subscribe.php CHANGED
@@ -27,8 +27,8 @@ if ( get_option( 'subscribe_reloaded_allow_subscribe_without_comment', 'yes' ) !
27
 
28
  // google recaptcha confirm
29
  if ( $use_captcha == 'yes' ) {
30
- $captcha_output .= '<div class="g-recaptcha" data-sitekey="' . $captcha_site_key . '"></div>';
31
  if ( 'v2' == $recaptcha_version ) {
 
32
  if ( isset( $_POST['g-recaptcha-response'] ) ) {
33
  $captcha = sanitize_text_field( wp_unslash( $_POST['g-recaptcha-response'] ) );
34
  $captcha_result = wp_remote_post( 'https://www.google.com/recaptcha/api/siteverify', array(
@@ -55,7 +55,7 @@ if ( $use_captcha == 'yes' ) {
55
  $captcha_result = wp_remote_post( 'https://www.google.com/recaptcha/api/siteverify', array(
56
  'method' => 'POST',
57
  'body' => array(
58
- 'secret' => $recaptcha_secret_key,
59
  'response' => $captcha,
60
  )
61
  ));
27
 
28
  // google recaptcha confirm
29
  if ( $use_captcha == 'yes' ) {
 
30
  if ( 'v2' == $recaptcha_version ) {
31
+ $captcha_output .= '<div class="g-recaptcha" data-sitekey="' . $captcha_site_key . '"></div>';
32
  if ( isset( $_POST['g-recaptcha-response'] ) ) {
33
  $captcha = sanitize_text_field( wp_unslash( $_POST['g-recaptcha-response'] ) );
34
  $captcha_result = wp_remote_post( 'https://www.google.com/recaptcha/api/siteverify', array(
55
  $captcha_result = wp_remote_post( 'https://www.google.com/recaptcha/api/siteverify', array(
56
  'method' => 'POST',
57
  'body' => array(
58
+ 'secret' => $captcha_secret_key,
59
  'response' => $captcha,
60
  )
61
  ));
templates/user.php CHANGED
@@ -136,7 +136,83 @@ if ( is_array( $subscriptions ) && ! empty( $subscriptions ) ) {
136
  }
137
  echo "</tbody>";
138
  echo "</table>";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
139
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
140
  echo '<p id="subscribe-reloaded-select-all-p">
141
  <i class="fa fa-expand" aria-hidden="true"></i>&nbsp;
142
  <a class="subscribe-reloaded-small-button stcr-subs-select-all" href="#" onclick="stcrCheckAll(event)">' . esc_html__( 'Select all', 'subscribe-to-comments-reloaded' ) . '</a> ';
@@ -183,80 +259,6 @@ if ( is_array( $subscriptions ) && ! empty( $subscriptions ) ) {
183
  </fieldset>
184
  </form>
185
 
186
- <div class="stcr-pagination-links">
187
- <?php
188
- // For first disable.
189
- if ( $disable_first ) {
190
- echo '<span class="disabled" aria-hidden="true">&laquo;</span>';
191
- } else {
192
- printf(
193
- '<a class="first-page" href="%s"><span aria-hidden="true">%s</span></a>',
194
- esc_url( remove_query_arg( 'subscription_paged', $current_url ) ),
195
- '&laquo;'
196
- );
197
- }
198
-
199
- // For previous disable.
200
- if ( $disable_prev ) {
201
- echo '<span class="disabled" aria-hidden="true">&lsaquo;</span>';
202
- } else {
203
- printf(
204
- '<a class="prev-page" href="%s"><span aria-hidden="true">%s</span></a>',
205
- esc_url( add_query_arg( array( 'post_permalink' => $post_permalink, 'subscription_paged' => max( 1, $subscriptions_pagenum - 1 ) ), $current_url ) ),
206
- '&lsaquo;'
207
- );
208
- }
209
-
210
- // For page numbers.
211
- echo '<span class="stcr-subscriptions-management-links">';
212
- for ( $number = 1; $number <= $subscriptions_total_pages; $number ++ ) {
213
- if ( $number === $subscriptions_pagenum ) {
214
- printf(
215
- '<span aria-current="page" class="page-numbers current">%s</span>',
216
- esc_attr( number_format_i18n( $number ) )
217
- );
218
- $dots = true;
219
- } else {
220
- if ( $number <= 1 || ( $subscriptions_pagenum && $number >= $subscriptions_pagenum - 2 && $number <= $subscriptions_pagenum + 2 ) || $number > $subscriptions_total_pages - 1 ) {
221
- printf(
222
- '<a class="page-numbers" href="%s">%s</a>',
223
- /** This filter is documented in wp-includes/general-template.php */
224
- esc_url( add_query_arg( array( 'post_permalink' => $post_permalink, 'subscription_paged' => $number ), $current_url ) ),
225
- esc_attr( number_format_i18n( $number ) )
226
- );
227
- $dots = true;
228
- } elseif ( $dots ) {
229
- echo '<span class="page-numbers dots">' . __( '&hellip;', 'subscribe-to-comments-reloaded' ) . '</span>';
230
- $dots = false;
231
- }
232
- }
233
- }
234
- echo '</span>';
235
-
236
- // For next disable.
237
- if ( $disable_next ) {
238
- echo '<span class="disabled" aria-hidden="true">&rsaquo;</span>';
239
- } else {
240
- printf(
241
- '<a class="next-page" href="%s"><span aria-hidden="true">%s</span></a>',
242
- esc_url( add_query_arg( array( 'post_permalink' => $post_permalink, 'subscription_paged' => min( $subscriptions_total_pages, $subscriptions_pagenum + 1 ) ), $current_url ) ),
243
- '&rsaquo;'
244
- );
245
- }
246
-
247
- // For last disable.
248
- if ( $disable_last ) {
249
- echo '<span class="disabled" aria-hidden="true">&raquo;</span>';
250
- } else {
251
- printf(
252
- "<a class='last-page' href='%s'><span aria-hidden='true'>%s</span></a>",
253
- esc_url( add_query_arg( array( 'post_permalink' => $post_permalink, 'subscription_paged' => $subscriptions_total_pages ), $current_url ) ),
254
- '&raquo;'
255
- );
256
- }
257
- ?>
258
- </div>
259
-
260
  <script type="text/javascript">
261
 
262
  function stcrCheckAll(e) {
136
  }
137
  echo "</tbody>";
138
  echo "</table>";
139
+ ?>
140
+
141
+ <?php if ( $subscriptions_total_pages > 1 ) { ?>
142
+ <p class="stcr-pagination-links">
143
+ <?php
144
+ // For first disable.
145
+ if ( $disable_first ) {
146
+ echo '<span class="stcr-disabled stcr-page-link" aria-hidden="true">&laquo;</span>';
147
+ } else {
148
+ printf(
149
+ '<a class="stcr-first-page stcr-page-link" href="%s"><span aria-hidden="true">%s</span></a>',
150
+ esc_url( remove_query_arg( 'subscription_paged', $current_url ) ),
151
+ '&laquo;'
152
+ );
153
+ }
154
 
155
+ // For previous disable.
156
+ if ( $disable_prev ) {
157
+ echo '<span class="stcr-disabled stcr-page-link" aria-hidden="true">&lsaquo;</span>';
158
+ } else {
159
+ printf(
160
+ '<a class="stcr-prev-page stcr-page-link" href="%s"><span aria-hidden="true">%s</span></a>',
161
+ esc_url( add_query_arg( array( 'post_permalink' => $post_permalink, 'subscription_paged' => max( 1, $subscriptions_pagenum - 1 ) ), $current_url ) ),
162
+ '&lsaquo;'
163
+ );
164
+ }
165
+
166
+ // For page numbers.
167
+ for ( $number = 1; $number <= $subscriptions_total_pages; $number ++ ) {
168
+ if ( $number === $subscriptions_pagenum ) {
169
+ printf(
170
+ '<span aria-current="page" class="stcr-page-numbers stcr-current-page stcr-page-link">%s</span>',
171
+ esc_attr( number_format_i18n( $number ) )
172
+ );
173
+ $dots = true;
174
+ } else {
175
+ if ( $number <= 1 || ( $subscriptions_pagenum && $number >= $subscriptions_pagenum - 2 && $number <= $subscriptions_pagenum + 2 ) || $number > $subscriptions_total_pages - 1 ) {
176
+ printf(
177
+ '<a class="stcr-page-numbers stcr-page-link" href="%s">%s</a>',
178
+ /** This filter is documented in wp-includes/general-template.php */
179
+ esc_url( add_query_arg( array( 'post_permalink' => $post_permalink, 'subscription_paged' => $number ), $current_url ) ),
180
+ esc_attr( number_format_i18n( $number ) )
181
+ );
182
+ $dots = true;
183
+ } elseif ( $dots ) {
184
+ echo '<span class="stcr-page-numbers stcr-dots stcr-page-link">' . __( '&hellip;', 'subscribe-to-comments-reloaded' ) . '</span>';
185
+ $dots = false;
186
+ }
187
+ }
188
+ }
189
+
190
+ // For next disable.
191
+ if ( $disable_next ) {
192
+ echo '<span class="stcr-disabled stcr-page-link" aria-hidden="true">&rsaquo;</span>';
193
+ } else {
194
+ printf(
195
+ '<a class="stcr-next-page stcr-page-link" href="%s"><span aria-hidden="true">%s</span></a>',
196
+ esc_url( add_query_arg( array( 'post_permalink' => $post_permalink, 'subscription_paged' => min( $subscriptions_total_pages, $subscriptions_pagenum + 1 ) ), $current_url ) ),
197
+ '&rsaquo;'
198
+ );
199
+ }
200
+
201
+ // For last disable.
202
+ if ( $disable_last ) {
203
+ echo '<span class="stcr-disabled stcr-page-link" aria-hidden="true">&raquo;</span>';
204
+ } else {
205
+ printf(
206
+ "<a class='stcr-last-page stcr-page-link' href='%s'><span aria-hidden='true'>%s</span></a>",
207
+ esc_url( add_query_arg( array( 'post_permalink' => $post_permalink, 'subscription_paged' => $subscriptions_total_pages ), $current_url ) ),
208
+ '&raquo;'
209
+ );
210
+ }
211
+ ?>
212
+ </p>
213
+ <?php } ?>
214
+
215
+ <?php
216
  echo '<p id="subscribe-reloaded-select-all-p">
217
  <i class="fa fa-expand" aria-hidden="true"></i>&nbsp;
218
  <a class="subscribe-reloaded-small-button stcr-subs-select-all" href="#" onclick="stcrCheckAll(event)">' . esc_html__( 'Select all', 'subscribe-to-comments-reloaded' ) . '</a> ';
259
  </fieldset>
260
  </form>
261
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
262
  <script type="text/javascript">
263
 
264
  function stcrCheckAll(e) {
utils/stcr_manage.php CHANGED
@@ -63,7 +63,7 @@ if( ! class_exists('\\'.__NAMESPACE__.'\\stcr_manage') )
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
 
@@ -680,10 +680,45 @@ if( ! class_exists('\\'.__NAMESPACE__.'\\stcr_manage') )
680
  */
681
  public function add_custom_header_meta() {
682
  $a = html_entity_decode( stripslashes( get_option( 'subscribe_reloaded_custom_header_meta', '' ) ), ENT_QUOTES, 'UTF-8' );
683
- echo wp_kses( $a, wp_kses_allowed_html( 'post' ) );
 
 
 
 
 
 
 
 
 
 
684
  }
685
  // end add_custom_header_meta
686
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
687
  /**
688
  * Adds a new column header to the Edit Comments panel
689
  */
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
 
680
  */
681
  public function add_custom_header_meta() {
682
  $a = html_entity_decode( stripslashes( get_option( 'subscribe_reloaded_custom_header_meta', '' ) ), ENT_QUOTES, 'UTF-8' );
683
+ echo wp_kses(
684
+ $a,
685
+ array(
686
+ 'meta' => array(
687
+ 'charset' => array(),
688
+ 'content' => array(),
689
+ 'http-equiv' => array(),
690
+ 'name' => array(),
691
+ ),
692
+ )
693
+ );
694
  }
695
  // end add_custom_header_meta
696
 
697
+ /**
698
+ * Adds custom HTML code to the HEAD section of the management page
699
+ */
700
+ public function add_custom_header_meta_real_page() {
701
+
702
+ $virtual_page_enabled = get_option( 'subscribe_reloaded_manager_page_enabled', 'yes' );
703
+
704
+ if ( 'no' === $virtual_page_enabled ) {
705
+ $a = html_entity_decode( stripslashes( get_option( 'subscribe_reloaded_custom_header_meta', '' ) ), ENT_QUOTES, 'UTF-8' );
706
+ echo wp_kses(
707
+ $a,
708
+ array(
709
+ 'meta' => array(
710
+ 'charset' => array(),
711
+ 'content' => array(),
712
+ 'http-equiv' => array(),
713
+ 'name' => array(),
714
+ ),
715
+ )
716
+ );
717
+ }
718
+
719
+ }
720
+ // end add_custom_header_meta_real_page
721
+
722
  /**
723
  * Adds a new column header to the Edit Comments panel
724
  */
utils/stcr_utils.php CHANGED
@@ -650,6 +650,10 @@ if( ! class_exists('\\'.__NAMESPACE__.'\\stcr_utils') )
650
  wp_enqueue_style('stcr-font-awesome');
651
  }
652
 
 
 
 
 
653
  // google recaptcha
654
  if ( get_option( 'subscribe_reloaded_use_captcha', 'no' ) == 'yes' ) {
655
 
650
  wp_enqueue_style('stcr-font-awesome');
651
  }
652
 
653
+ $stcr_style_css = plugins_url( '/includes/css/stcr-style.css', STCR_PLUGIN_FILE );
654
+ wp_register_style( 'stcr-style', $stcr_style_css );
655
+ wp_enqueue_style( 'stcr-style' );
656
+
657
  // google recaptcha
658
  if ( get_option( 'subscribe_reloaded_use_captcha', 'no' ) == 'yes' ) {
659
 
wp_subscribe_reloaded.php CHANGED
@@ -8,7 +8,7 @@ if ( ! function_exists( 'add_action' ) ) {
8
  }
9
 
10
  // globals
11
- define( __NAMESPACE__.'\\VERSION','220608' );
12
  define( __NAMESPACE__.'\\DEVELOPMENT', false );
13
  define( __NAMESPACE__.'\\SLUG', "subscribe-to-comments-reloaded" );
14
 
@@ -152,6 +152,7 @@ if( ! class_exists('\\'.__NAMESPACE__.'\\wp_subscribe_reloaded') ) {
152
  add_filter( 'the_posts', array( $this, 'subscribe_reloaded_manage' ), 10, 2 );
153
  }
154
 
 
155
  }
156
 
157
  // filter to add custom output before comment content
@@ -176,11 +177,24 @@ if( ! class_exists('\\'.__NAMESPACE__.'\\wp_subscribe_reloaded') ) {
176
  add_action( 'deleted_comment', array( $this, 'comment_deleted' ) );
177
  add_action( 'wp_set_comment_status', array( $this, 'comment_status_changed' ) );
178
 
179
- // new columns in post/comment tables ( WP admin > Posts and WP admin > Comments )
180
- add_filter( 'manage_edit-comments_columns', array( $this, 'add_column_header' ) );
181
- add_filter( 'manage_posts_columns', array( $this, 'add_column_header' ) );
182
- add_action( 'manage_comments_custom_column', array( $this, 'add_comment_column' ) );
183
- add_action( 'manage_posts_custom_column', array( $this, 'add_post_column' ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
184
 
185
  // Add appropriate entries in the admin menu
186
  add_action( 'admin_menu', array( $this, 'add_config_menu' ) );
@@ -1552,7 +1566,7 @@ if( ! class_exists('\\'.__NAMESPACE__.'\\wp_subscribe_reloaded') ) {
1552
  // if not enabled for this post type, return default
1553
  if ( ! in_array( $post_type, $supported_post_types ) ) {
1554
  if ( $echo ) {
1555
-
1556
  } else {
1557
  return $submit_field;
1558
  }
@@ -1562,7 +1576,7 @@ if( ! class_exists('\\'.__NAMESPACE__.'\\wp_subscribe_reloaded') ) {
1562
  // only for logged in users
1563
  if ( $only_for_logged_in == 'yes' && ! is_user_logged_in() ) {
1564
  if ( $echo ) {
1565
-
1566
  } else {
1567
  return $submit_field;
1568
  }
@@ -1577,7 +1591,7 @@ if( ! class_exists('\\'.__NAMESPACE__.'\\wp_subscribe_reloaded') ) {
1577
  $is_disabled = get_post_meta( $post->ID, 'stcr_disable_subscriptions', true );
1578
  if ( ! empty( $is_disabled ) ) {
1579
  if ( $echo ) {
1580
-
1581
  } else {
1582
  return $submit_field;
1583
  }
@@ -1782,6 +1796,11 @@ if( ! class_exists('\\'.__NAMESPACE__.'\\wp_subscribe_reloaded') ) {
1782
  global $wp_subscribe_reloaded;
1783
  global $post;
1784
 
 
 
 
 
 
1785
  $prepend = '';
1786
 
1787
  // comment held for moderation and email is subscribed to the post
8
  }
9
 
10
  // globals
11
+ define( __NAMESPACE__.'\\VERSION','220725' );
12
  define( __NAMESPACE__.'\\DEVELOPMENT', false );
13
  define( __NAMESPACE__.'\\SLUG', "subscribe-to-comments-reloaded" );
14
 
152
  add_filter( 'the_posts', array( $this, 'subscribe_reloaded_manage' ), 10, 2 );
153
  }
154
 
155
+ add_action( 'wp_head', array( $this, 'add_custom_header_meta_real_page' ) );
156
  }
157
 
158
  // filter to add custom output before comment content
177
  add_action( 'deleted_comment', array( $this, 'comment_deleted' ) );
178
  add_action( 'wp_set_comment_status', array( $this, 'comment_status_changed' ) );
179
 
180
+ // New columns in comment and enabled post types tables.
181
+ add_filter( 'manage_edit-comments_columns', array( $this, 'add_column_header' ) );
182
+ add_action( 'manage_comments_custom_column', array( $this, 'add_comment_column' ) );
183
+ // For supported post types.
184
+ $supported_post_types = get_option( 'subscribe_reloaded_post_type_supports' );
185
+ if ( ! $supported_post_types ) {
186
+ $this->upgrade->migrate_post_type_support();
187
+ $supported_post_types = get_option( 'subscribe_reloaded_post_type_supports' );
188
+ }
189
+ if ( in_array( 'stcr_none', $supported_post_types ) ) {
190
+ $supported_post_types = array_flip( $supported_post_types );
191
+ unset( $supported_post_types['stcr_none'] );
192
+ }
193
+ $supported_post_types = array_flip( $supported_post_types );
194
+ foreach ( $supported_post_types as $post_type ) {
195
+ add_filter( 'manage_' . $post_type . '_posts_columns', array( $this, 'add_column_header' ) );
196
+ add_action( 'manage_' . $post_type . '_posts_custom_column', array( $this, 'add_post_column' ) );
197
+ }
198
 
199
  // Add appropriate entries in the admin menu
200
  add_action( 'admin_menu', array( $this, 'add_config_menu' ) );
1566
  // if not enabled for this post type, return default
1567
  if ( ! in_array( $post_type, $supported_post_types ) ) {
1568
  if ( $echo ) {
1569
+
1570
  } else {
1571
  return $submit_field;
1572
  }
1576
  // only for logged in users
1577
  if ( $only_for_logged_in == 'yes' && ! is_user_logged_in() ) {
1578
  if ( $echo ) {
1579
+
1580
  } else {
1581
  return $submit_field;
1582
  }
1591
  $is_disabled = get_post_meta( $post->ID, 'stcr_disable_subscriptions', true );
1592
  if ( ! empty( $is_disabled ) ) {
1593
  if ( $echo ) {
1594
+
1595
  } else {
1596
  return $submit_field;
1597
  }
1796
  global $wp_subscribe_reloaded;
1797
  global $post;
1798
 
1799
+ // do not proceed if we do not have a post ID
1800
+ if ( empty( $post->ID ) ) {
1801
+ return $comment_text;
1802
+ }
1803
+
1804
  $prepend = '';
1805
 
1806
  // comment held for moderation and email is subscribed to the post