Completed
Pull Request — master (#1580)
by Stephanie
52s
created
classes/controllers/FrmEntriesController.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -491,7 +491,8 @@
 block discarded – undo
491 491
 
492 492
 	public static function process_entry( $errors = '', $ajax = false ) {
493 493
 		$form_id = FrmAppHelper::get_post_param( 'form_id', '', 'absint' );
494
-		if ( FrmAppHelper::is_admin() || empty( $_POST ) || empty( $form_id ) || ! isset( $_POST['item_key'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
494
+		if ( FrmAppHelper::is_admin() || empty( $_POST ) || empty( $form_id ) || ! isset( $_POST['item_key'] ) ) {
495
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
495 496
 			return;
496 497
 		}
497 498
 
Please login to merge, or discard this patch.
classes/helpers/FrmEntriesHelper.php 1 patch
Braces   +14 added lines, -7 removed lines patch added patch discarded remove patch
@@ -114,13 +114,16 @@  discard block
 block discarded – undo
114 114
 	 */
115 115
 	public static function value_is_posted( $field, $args ) {
116 116
 		$value_is_posted = false;
117
-		if ( $_POST ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
117
+		if ( $_POST ) {
118
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
118 119
 			$repeating = isset( $args['repeating'] ) && $args['repeating'];
119 120
 			if ( $repeating ) {
120
-				if ( isset( $_POST['item_meta'][ $args['parent_field_id'] ][ $args['key_pointer'] ][ $field->id ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
121
+				if ( isset( $_POST['item_meta'][ $args['parent_field_id'] ][ $args['key_pointer'] ][ $field->id ] ) ) {
122
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
121 123
 					$value_is_posted = true;
122 124
 				}
123
-			} elseif ( isset( $_POST['item_meta'][ $field->id ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
125
+			} elseif ( isset( $_POST['item_meta'][ $field->id ] ) ) {
126
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
124 127
 				$value_is_posted = true;
125 128
 			}
126 129
 		}
@@ -322,8 +325,10 @@  discard block
 block discarded – undo
322 325
 	 * @since 4.01
323 326
 	 */
324 327
 	private static function set_parent_field_posted_value( $field, $value, $args ) {
325
-		if ( isset( $_POST['item_meta'][ $args['parent_field_id'] ] ) && is_array( $_POST['item_meta'][ $args['parent_field_id'] ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
326
-			if ( ! isset( $_POST['item_meta'][ $args['parent_field_id'] ][ $args['key_pointer'] ] ) || ! is_array( $_POST['item_meta'][ $args['parent_field_id'] ][ $args['key_pointer'] ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
328
+		if ( isset( $_POST['item_meta'][ $args['parent_field_id'] ] ) && is_array( $_POST['item_meta'][ $args['parent_field_id'] ] ) ) {
329
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
330
+			if ( ! isset( $_POST['item_meta'][ $args['parent_field_id'] ][ $args['key_pointer'] ] ) || ! is_array( $_POST['item_meta'][ $args['parent_field_id'] ][ $args['key_pointer'] ] ) ) {
331
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
327 332
 				$_POST['item_meta'][ $args['parent_field_id'] ][ $args['key_pointer'] ] = array(); // phpcs:ignore WordPress.Security.NonceVerification.Missing
328 333
 			}
329 334
 		} else {
@@ -395,7 +400,8 @@  discard block
 block discarded – undo
395 400
 		self::set_other_repeating_vals( $field, $value, $args );
396 401
 
397 402
 		// Check if there are any posted "Other" values.
398
-		if ( FrmField::is_option_true( $field, 'other' ) && isset( $_POST['item_meta']['other'][ $field->id ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
403
+		if ( FrmField::is_option_true( $field, 'other' ) && isset( $_POST['item_meta']['other'][ $field->id ] ) ) {
404
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
399 405
 
400 406
 			// Save original value.
401 407
 			$args['temp_value'] = $value;
@@ -425,7 +431,8 @@  discard block
 block discarded – undo
425 431
 		}
426 432
 
427 433
 		// Check if there are any other posted "other" values for this field.
428
-		if ( FrmField::is_option_true( $field, 'other' ) && isset( $_POST['item_meta'][ $args['parent_field_id'] ][ $args['key_pointer'] ]['other'][ $field->id ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
434
+		if ( FrmField::is_option_true( $field, 'other' ) && isset( $_POST['item_meta'][ $args['parent_field_id'] ][ $args['key_pointer'] ]['other'][ $field->id ] ) ) {
435
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
429 436
 			// Save original value
430 437
 			$args['temp_value'] = $value;
431 438
 			$args['other']      = true;
Please login to merge, or discard this patch.
deprecated/FrmEDD_SL_Plugin_Updater.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -303,11 +303,13 @@
 block discarded – undo
303 303
 
304 304
 		global $frm_edd_plugin_data;
305 305
 
306
-		if ( empty( $_REQUEST['edd_sl_action'] ) || 'view_plugin_changelog' !== $_REQUEST['edd_sl_action'] ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
306
+		if ( empty( $_REQUEST['edd_sl_action'] ) || 'view_plugin_changelog' !== $_REQUEST['edd_sl_action'] ) {
307
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
307 308
 			return;
308 309
 		}
309 310
 
310
-		if ( empty( $_REQUEST['plugin'] ) || empty( $_REQUEST['slug'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
311
+		if ( empty( $_REQUEST['plugin'] ) || empty( $_REQUEST['slug'] ) ) {
312
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
311 313
 			return;
312 314
 		}
313 315
 
Please login to merge, or discard this patch.
classes/models/FrmSolution.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,8 @@
 block discarded – undo
42 42
 		}
43 43
 
44 44
 		// Only do this for single site installs.
45
-		if ( isset( $_GET['activate-multi'] ) || is_network_admin() ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
45
+		if ( isset( $_GET['activate-multi'] ) || is_network_admin() ) {
46
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
46 47
 			return;
47 48
 		}
48 49
 
Please login to merge, or discard this patch.
classes/helpers/FrmXMLHelper.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,8 @@
 block discarded – undo
87 87
 
88 88
 		if ( ! isset( $imported['form_status'] ) || empty( $imported['form_status'] ) ) {
89 89
 			// Check for an error message in the XML.
90
-			if ( isset( $xml->Code ) && isset( $xml->Message ) ) { // phpcs:ignore WordPress.NamingConventions
90
+			if ( isset( $xml->Code ) && isset( $xml->Message ) ) {
91
+// phpcs:ignore WordPress.NamingConventions
91 92
 				$imported['error'] = (string) $xml->Message; // phpcs:ignore WordPress.NamingConventions
92 93
 			}
93 94
 		}
Please login to merge, or discard this patch.
classes/controllers/FrmStylesController.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -119,7 +119,8 @@
 block discarded – undo
119 119
 	 * @return void
120 120
 	 */
121 121
 	private static function maybe_hook_into_global_settings_save() {
122
-		if ( empty( $_POST ) || ! isset( $_POST['style'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
122
+		if ( empty( $_POST ) || ! isset( $_POST['style'] ) ) {
123
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
123 124
 			// Avoid changing any style data if the style array is not sent in the request.
124 125
 			return;
125 126
 		}
Please login to merge, or discard this patch.
classes/models/FrmStyle.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,8 @@
 block discarded – undo
67 67
 			$new_instance = (array) $new_instance;
68 68
 			$this->id     = $new_instance['ID'];
69 69
 
70
-			if ( $id != $this->id || ! $_POST || ! isset( $_POST['frm_style_setting'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
70
+			if ( $id != $this->id || ! $_POST || ! isset( $_POST['frm_style_setting'] ) ) {
71
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
71 72
 				// Don't continue if not saving this style.
72 73
 				continue;
73 74
 			}
Please login to merge, or discard this patch.
classes/helpers/FrmStylesHelper.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -285,7 +285,8 @@
 block discarded – undo
285 285
 	public static function get_settings_for_output( $style ) {
286 286
 		if ( self::previewing_style() ) {
287 287
 			$frm_style = new FrmStyle();
288
-			if ( isset( $_POST['frm_style_setting'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
288
+			if ( isset( $_POST['frm_style_setting'] ) ) {
289
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
289 290
 
290 291
 				// Sanitizing is done later.
291 292
 				$posted = wp_unslash( $_POST['frm_style_setting'] ); //phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing
Please login to merge, or discard this patch.
classes/views/dashboard/templates/counters.php 1 patch
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,20 +15,26 @@
 block discarded – undo
15 15
 				<h4><?php echo esc_html( $counter['heading'] ); ?></h4>
16 16
 				<?php if ( isset( $counter['cta'] ) && isset( $counter['cta']['display'] ) && true === $counter['cta']['display'] ) : ?>
17 17
 					<a href="<?php echo esc_url( $counter['cta']['link'] ); ?>"><?php echo esc_attr( $counter['cta']['title'] ); ?></a>
18
-				<?php else : ?>
18
+				<?php else {
19
+	: ?>
19 20
 					<?php if ( 'currency' === $counter['type'] ) : ?>
20 21
 						<div class="frm-flex-box frm-gap-md">
21 22
 							<?php foreach ( $counter['items'] as $item ) : ?>
22 23
 								<b>
23
-									<?php echo esc_attr( $item['counter_label']['symbol_left'] ); ?>
24
+									<?php echo esc_attr( $item['counter_label']['symbol_left'] );
25
+}
26
+?>
24 27
 									<span class="frm-counter" data-type="<?php echo esc_attr( $counter['type'] ); ?>" data-locale="<?php echo esc_attr( get_locale() ); ?>" data-counter="<?php echo (int) $item['counter']; ?>"><?php echo (int) $item['counter']; ?></span>
25 28
 									<?php echo esc_attr( $item['counter_label']['symbol_right'] ); ?>
26 29
 								</b>
27 30
 							<?php endforeach; ?>
28 31
 						</div>
29
-					<?php else : ?>
32
+					<?php else {
33
+	: ?>
30 34
 						<b>
31
-							<span class="frm-counter" data-type="<?php echo esc_attr( $counter['type'] ); ?>" data-locale="<?php echo esc_attr( get_locale() ); ?>" data-counter="<?php echo (int) $counter['counter']; ?>"><?php echo (int) $counter['counter']; ?></span>
35
+							<span class="frm-counter" data-type="<?php echo esc_attr( $counter['type'] );
36
+}
37
+?>" data-locale="<?php echo esc_attr( get_locale() ); ?>" data-counter="<?php echo (int) $counter['counter']; ?>"><?php echo (int) $counter['counter']; ?></span>
32 38
 						</b>
33 39
 					<?php endif; ?>
34 40
 				<?php endif; ?>
Please login to merge, or discard this patch.