Completed
Pull Request — master (#1031)
by Stephanie
49s
created
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/controllers/FrmFormsController.php 1 patch
Braces   +12 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1672,7 +1672,8 @@  discard block
 block discarded – undo
1672 1672
 		$vars   = array();
1673 1673
 		FrmAppHelper::include_svg();
1674 1674
 
1675
-		if ( isset( $_POST['frm_compact_fields'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
1675
+		if ( isset( $_POST['frm_compact_fields'] ) ) {
1676
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
1676 1677
 			FrmAppHelper::permission_check( 'frm_edit_forms' );
1677 1678
 
1678 1679
 			// Javascript needs to be allowed in some field settings.
@@ -1982,7 +1983,8 @@  discard block
 block discarded – undo
1982 1983
 	private static function maybe_get_form_to_show( $id ) {
1983 1984
 		$form = false;
1984 1985
 
1985
-		if ( ! empty( $id ) ) { // form id or key is set
1986
+		if ( ! empty( $id ) ) {
1987
+// form id or key is set
1986 1988
 			$form = FrmForm::getOne( $id );
1987 1989
 			if ( ! $form || $form->parent_form_id || $form->status === 'trash' ) {
1988 1990
 				$form = false;
@@ -2065,7 +2067,8 @@  discard block
 block discarded – undo
2065 2067
 	private static function get_saved_errors( $form, $params ) {
2066 2068
 		global $frm_vars;
2067 2069
 
2068
-		if ( $params['posted_form_id'] == $form->id && $_POST && isset( $frm_vars['created_entries'][ $form->id ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
2070
+		if ( $params['posted_form_id'] == $form->id && $_POST && isset( $frm_vars['created_entries'][ $form->id ] ) ) {
2071
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
2069 2072
 			$errors = $frm_vars['created_entries'][ $form->id ]['errors'];
2070 2073
 		} else {
2071 2074
 			$errors = array();
@@ -2218,7 +2221,8 @@  discard block
 block discarded – undo
2218 2221
 			}
2219 2222
 
2220 2223
 			if ( 'redirect' === FrmOnSubmitHelper::get_action_type( $action ) ) {
2221
-				if ( $has_redirect ) { // Do not process because we run the first redirect action only.
2224
+				if ( $has_redirect ) {
2225
+// Do not process because we run the first redirect action only.
2222 2226
 					continue;
2223 2227
 				}
2224 2228
 
@@ -2381,7 +2385,8 @@  discard block
 block discarded – undo
2381 2385
 		if ( isset( $args['ajax'] ) && $args['ajax'] && $doing_ajax && empty( $args['force_delay_redirect'] ) ) {
2382 2386
 			echo json_encode( array( 'redirect' => $success_url ) );
2383 2387
 			wp_die();
2384
-		} elseif ( ! headers_sent() && empty( $args['force_delay_redirect'] ) ) { // Not AJAX submit and there is just one On Submit action runs.
2388
+		} elseif ( ! headers_sent() && empty( $args['force_delay_redirect'] ) ) {
2389
+// Not AJAX submit and there is just one On Submit action runs.
2385 2390
 			wp_redirect( esc_url_raw( $success_url ) );
2386 2391
 			die(); // do not use wp_die or redirect fails
2387 2392
 		} else {
@@ -2405,7 +2410,8 @@  discard block
 block discarded – undo
2405 2410
 
2406 2411
 		echo FrmAppHelper::maybe_kses( $redirect_msg ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
2407 2412
 		echo '<script type="text/javascript">';
2408
-		if ( empty( $args['doing_ajax'] ) ) { // Not AJAX submit, delay JS until window.load.
2413
+		if ( empty( $args['doing_ajax'] ) ) {
2414
+// Not AJAX submit, delay JS until window.load.
2409 2415
 			echo 'window.onload=function(){';
2410 2416
 		}
2411 2417
 		echo 'setTimeout(function(){window.location="' . esc_url_raw( $args['success_url'] ) . '";}, ' . intval( $delay_time ) . ');';
Please login to merge, or discard this patch.
classes/views/styles/_styles-list.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -97,7 +97,8 @@
 block discarded – undo
97 97
 		array_walk(
98 98
 			$info,
99 99
 			function( $style, $key ) use ( $card_helper ) {
100
-				if ( is_numeric( $key ) ) { // Skip active_sub/expires keys.
100
+				if ( is_numeric( $key ) ) {
101
+// Skip active_sub/expires keys.
101 102
 					$card_helper->echo_card_template( $style );
102 103
 				}
103 104
 			}
Please login to merge, or discard this patch.