@@ -218,8 +218,11 @@ |
||
218 | 218 | name="<?php echo esc_attr( $name ); ?>" |
219 | 219 | <?php if ( $args['placeholders'] && 'hidden' !== $field['type'] ) : ?> |
220 | 220 | value="<% if ( typeof <?php echo preg_replace( '/[^a-z0-9_]/i', '', $name ); // WPCS: XSS OK ?> !== "undefined" ) { print( <?php echo preg_replace( '/[^a-z0-9_]/i', '', $name ); // WPCS: XSS OK ?> ); } %>" |
221 | - <?php else : ?> |
|
222 | - value="<?php echo esc_attr( $value ); ?>" |
|
221 | + <?php else { |
|
222 | + : ?> |
|
223 | + value="<?php echo esc_attr( $value ); |
|
224 | +} |
|
225 | +?>" |
|
223 | 226 | <?php endif; ?> |
224 | 227 | class="widefat" |
225 | 228 | /> |
@@ -20,7 +20,8 @@ |
||
20 | 20 | } |
21 | 21 | |
22 | 22 | // If we're not running a module check, let the maintenance message show. |
23 | -if ( ! isset( $_GET['wordpoints_module_check'], $_GET['check_module'] ) ) { // WPCS: CSRF OK. |
|
23 | +if ( ! isset( $_GET['wordpoints_module_check'], $_GET['check_module'] ) ) { |
|
24 | +// WPCS: CSRF OK. |
|
24 | 25 | return; |
25 | 26 | } |
26 | 27 |
@@ -28,7 +28,8 @@ |
||
28 | 28 | add_action( 'admin_notices', 'WordPoints_Installables::admin_notices' ); |
29 | 29 | add_action( 'wpmu_new_blog', 'WordPoints_Installables::wpmu_new_blog' ); |
30 | 30 | |
31 | -if ( isset( $_GET['wordpoints_module_check'], $_GET['check_module'] ) ) { // WPCS: CSRF OK. |
|
31 | +if ( isset( $_GET['wordpoints_module_check'], $_GET['check_module'] ) ) { |
|
32 | +// WPCS: CSRF OK. |
|
32 | 33 | |
33 | 34 | add_action( 'shutdown', 'wordpoints_maintenance_shutdown_print_rand_str' ); |
34 | 35 |
@@ -88,7 +88,8 @@ discard block |
||
88 | 88 | */ |
89 | 89 | function wordpoints_maintenance_shutdown_print_rand_str() { |
90 | 90 | |
91 | - if ( ! isset( $_GET['wordpoints_module_check'] ) ) { // WPCS: CSRF OK. |
|
91 | + if ( ! isset( $_GET['wordpoints_module_check'] ) ) { |
|
92 | +// WPCS: CSRF OK. |
|
92 | 93 | return; |
93 | 94 | } |
94 | 95 | |
@@ -98,7 +99,8 @@ discard block |
||
98 | 99 | $nonce = get_option( 'wordpoints_module_check_nonce' ); |
99 | 100 | } |
100 | 101 | |
101 | - if ( ! $nonce || ! hash_equals( $nonce, sanitize_key( $_GET['wordpoints_module_check'] ) ) ) { // WPCS: CSRF OK. |
|
102 | + if ( ! $nonce || ! hash_equals( $nonce, sanitize_key( $_GET['wordpoints_module_check'] ) ) ) { |
|
103 | +// WPCS: CSRF OK. |
|
102 | 104 | return; |
103 | 105 | } |
104 | 106 | |
@@ -128,7 +130,8 @@ discard block |
||
128 | 130 | */ |
129 | 131 | function wordpoints_maintenance_filter_modules( $modules ) { |
130 | 132 | |
131 | - if ( ! isset( $_GET['check_module'], $_GET['wordpoints_module_check'] ) ) { // WPCS: CSRF OK. |
|
133 | + if ( ! isset( $_GET['check_module'], $_GET['wordpoints_module_check'] ) ) { |
|
134 | +// WPCS: CSRF OK. |
|
132 | 135 | return $modules; |
133 | 136 | } |
134 | 137 | |
@@ -138,7 +141,8 @@ discard block |
||
138 | 141 | $nonce = get_option( 'wordpoints_module_check_nonce' ); |
139 | 142 | } |
140 | 143 | |
141 | - if ( ! $nonce || ! hash_equals( $nonce, sanitize_key( $_GET['wordpoints_module_check'] ) ) ) { // WPCS: CSRF OK. |
|
144 | + if ( ! $nonce || ! hash_equals( $nonce, sanitize_key( $_GET['wordpoints_module_check'] ) ) ) { |
|
145 | +// WPCS: CSRF OK. |
|
142 | 146 | return $modules; |
143 | 147 | } |
144 | 148 |
@@ -853,7 +853,8 @@ discard block |
||
853 | 853 | |
854 | 854 | $tab = ''; |
855 | 855 | |
856 | - if ( isset( $_GET['tab'] ) ) { // WPCS: CSRF OK. |
|
856 | + if ( isset( $_GET['tab'] ) ) { |
|
857 | +// WPCS: CSRF OK. |
|
857 | 858 | |
858 | 859 | $tab = sanitize_key( $_GET['tab'] ); // WPCS: CSRF OK. |
859 | 860 | } |
@@ -892,7 +893,8 @@ discard block |
||
892 | 893 | |
893 | 894 | $page = ''; |
894 | 895 | |
895 | - if ( isset( $_GET['page'] ) ) { // WPCS: CSRF OK. |
|
896 | + if ( isset( $_GET['page'] ) ) { |
|
897 | +// WPCS: CSRF OK. |
|
896 | 898 | $page = sanitize_key( $_GET['page'] ); // WPCS: CSRF OK. |
897 | 899 | } |
898 | 900 | |
@@ -1231,7 +1233,8 @@ discard block |
||
1231 | 1233 | */ |
1232 | 1234 | function wordpoints_admin_ajax_breaking_module_check() { |
1233 | 1235 | |
1234 | - if ( ! isset( $_GET['wordpoints_module_check'] ) ) { // WPCS: CSRF OK. |
|
1236 | + if ( ! isset( $_GET['wordpoints_module_check'] ) ) { |
|
1237 | +// WPCS: CSRF OK. |
|
1235 | 1238 | wp_die( '', 400 ); |
1236 | 1239 | } |
1237 | 1240 | |
@@ -1241,7 +1244,8 @@ discard block |
||
1241 | 1244 | $nonce = get_option( 'wordpoints_module_check_nonce' ); |
1242 | 1245 | } |
1243 | 1246 | |
1244 | - if ( ! $nonce || ! hash_equals( $nonce, sanitize_key( $_GET['wordpoints_module_check'] ) ) ) { // WPCS: CSRF OK. |
|
1247 | + if ( ! $nonce || ! hash_equals( $nonce, sanitize_key( $_GET['wordpoints_module_check'] ) ) ) { |
|
1248 | +// WPCS: CSRF OK. |
|
1245 | 1249 | wp_die( '', 403 ); |
1246 | 1250 | } |
1247 | 1251 |
@@ -334,7 +334,8 @@ discard block |
||
334 | 334 | */ |
335 | 335 | protected function get_reaction_store() { |
336 | 336 | |
337 | - if ( ! isset( $_POST['reaction_store'] ) ) { // WPCS: CSRF OK. |
|
337 | + if ( ! isset( $_POST['reaction_store'] ) ) { |
|
338 | +// WPCS: CSRF OK. |
|
338 | 339 | $this->unexpected_error( 'reaction_store' ); |
339 | 340 | } |
340 | 341 | |
@@ -361,7 +362,8 @@ discard block |
||
361 | 362 | */ |
362 | 363 | protected function get_reaction() { |
363 | 364 | |
364 | - if ( ! isset( $_POST['id'] ) ) { // WPCS: CSRF OK. |
|
365 | + if ( ! isset( $_POST['id'] ) ) { |
|
366 | +// WPCS: CSRF OK. |
|
365 | 367 | $this->unexpected_error( 'id' ); |
366 | 368 | } |
367 | 369 |
@@ -11,9 +11,11 @@ |
||
11 | 11 | |
12 | 12 | if ( isset( $_POST['clear-recent-list'] ) ) { |
13 | 13 | $action = 'clear-recent-list'; |
14 | -} elseif ( isset( $_REQUEST['action'] ) && -1 !== (int) $_REQUEST['action'] ) { // WPCS: CSRF OK. |
|
14 | +} elseif ( isset( $_REQUEST['action'] ) && -1 !== (int) $_REQUEST['action'] ) { |
|
15 | +// WPCS: CSRF OK. |
|
15 | 16 | $action = sanitize_key( $_REQUEST['action'] ); |
16 | -} elseif ( isset( $_REQUEST['action2'] ) && -1 !== (int) $_REQUEST['action2'] ) { // WPCS: CSRF OK. |
|
17 | +} elseif ( isset( $_REQUEST['action2'] ) && -1 !== (int) $_REQUEST['action2'] ) { |
|
18 | +// WPCS: CSRF OK. |
|
17 | 19 | $action = sanitize_key( $_REQUEST['action2'] ); |
18 | 20 | } else { |
19 | 21 | $action = ''; |
@@ -17,7 +17,8 @@ |
||
17 | 17 | // Show messages and errors. |
18 | 18 | // |
19 | 19 | |
20 | -if ( isset( $_GET['wordpoints_component'], $_GET['_wpnonce'] ) && $wordpoints_components->is_registered( sanitize_key( $_GET['wordpoints_component'] ) ) ) { // WPCS: CSRF OK. |
|
20 | +if ( isset( $_GET['wordpoints_component'], $_GET['_wpnonce'] ) && $wordpoints_components->is_registered( sanitize_key( $_GET['wordpoints_component'] ) ) ) { |
|
21 | +// WPCS: CSRF OK. |
|
21 | 22 | |
22 | 23 | $component = sanitize_key( $_GET['wordpoints_component'] ); |
23 | 24 |
@@ -143,7 +143,8 @@ discard block |
||
143 | 143 | */ |
144 | 144 | function wordpoints_points_admin_screen_hooks() { |
145 | 145 | |
146 | - if ( isset( $_GET['edithook'] ) || isset( $_POST['savehook'] ) || isset( $_POST['removehook'] ) ) { // WPCS: CSRF OK. |
|
146 | + if ( isset( $_GET['edithook'] ) || isset( $_POST['savehook'] ) || isset( $_POST['removehook'] ) ) { |
|
147 | +// WPCS: CSRF OK. |
|
147 | 148 | |
148 | 149 | // - We're doing this without AJAX (JS). |
149 | 150 | |
@@ -206,7 +207,8 @@ discard block |
||
206 | 207 | */ |
207 | 208 | function wordpoints_no_js_points_hooks_save() { |
208 | 209 | |
209 | - if ( ! isset( $_POST['savehook'] ) && ! isset( $_POST['removehook'] ) ) { // WPCS: CSRF OK. |
|
210 | + if ( ! isset( $_POST['savehook'] ) && ! isset( $_POST['removehook'] ) ) { |
|
211 | +// WPCS: CSRF OK. |
|
210 | 212 | return; |
211 | 213 | } |
212 | 214 | |
@@ -290,9 +292,12 @@ discard block |
||
290 | 292 | |
291 | 293 | <?php if ( $has_form ) : ?> |
292 | 294 | <hr /> |
293 | - <?php else : ?> |
|
295 | + <?php else { |
|
296 | + : ?> |
|
294 | 297 | <br /> |
295 | - <?php endif; ?> |
|
298 | + <?php endif; |
|
299 | +} |
|
300 | +?> |
|
296 | 301 | |
297 | 302 | <div class="hook-instance-description"> |
298 | 303 | <label for="<?php $hook->the_field_id( '_description' ); ?>"><?php echo esc_html_x( 'Description (optional):', 'points hook', 'wordpoints' ); ?></label> |