Completed
Pull Request — master (#1038)
by Stephanie
36s
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   +14 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1697,7 +1697,8 @@  discard block
 block discarded – undo
1697 1697
 		$vars   = array();
1698 1698
 		FrmAppHelper::include_svg();
1699 1699
 
1700
-		if ( isset( $_POST['frm_compact_fields'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
1700
+		if ( isset( $_POST['frm_compact_fields'] ) ) {
1701
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
1701 1702
 			FrmAppHelper::permission_check( 'frm_edit_forms' );
1702 1703
 
1703 1704
 			// Javascript needs to be allowed in some field settings.
@@ -2007,7 +2008,8 @@  discard block
 block discarded – undo
2007 2008
 	private static function maybe_get_form_to_show( $id ) {
2008 2009
 		$form = false;
2009 2010
 
2010
-		if ( ! empty( $id ) ) { // form id or key is set
2011
+		if ( ! empty( $id ) ) {
2012
+// form id or key is set
2011 2013
 			$form = FrmForm::getOne( $id );
2012 2014
 			if ( ! $form || $form->parent_form_id || $form->status === 'trash' ) {
2013 2015
 				$form = false;
@@ -2090,7 +2092,8 @@  discard block
 block discarded – undo
2090 2092
 	private static function get_saved_errors( $form, $params ) {
2091 2093
 		global $frm_vars;
2092 2094
 
2093
-		if ( $params['posted_form_id'] == $form->id && $_POST && isset( $frm_vars['created_entries'][ $form->id ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
2095
+		if ( $params['posted_form_id'] == $form->id && $_POST && isset( $frm_vars['created_entries'][ $form->id ] ) ) {
2096
+// phpcs:ignore WordPress.Security.NonceVerification.Missing
2094 2097
 			$errors = $frm_vars['created_entries'][ $form->id ]['errors'];
2095 2098
 		} else {
2096 2099
 			$errors = array();
@@ -2243,7 +2246,8 @@  discard block
 block discarded – undo
2243 2246
 			}
2244 2247
 
2245 2248
 			if ( 'redirect' === FrmOnSubmitHelper::get_action_type( $action ) ) {
2246
-				if ( $has_redirect ) { // Do not process because we run the first redirect action only.
2249
+				if ( $has_redirect ) {
2250
+// Do not process because we run the first redirect action only.
2247 2251
 					continue;
2248 2252
 				}
2249 2253
 
@@ -2402,12 +2406,14 @@  discard block
 block discarded – undo
2402 2406
 
2403 2407
 		$doing_ajax = FrmAppHelper::doing_ajax();
2404 2408
 
2405
-		if ( ! empty( $args['ajax'] ) && $doing_ajax && empty( $args['force_delay_redirect'] ) ) { // Is AJAX submit and there is just one Redirect action runs.
2409
+		if ( ! empty( $args['ajax'] ) && $doing_ajax && empty( $args['force_delay_redirect'] ) ) {
2410
+// Is AJAX submit and there is just one Redirect action runs.
2406 2411
 			echo json_encode( array( 'redirect' => $success_url ) );
2407 2412
 			wp_die();
2408 2413
 		}
2409 2414
 
2410
-		if ( ! headers_sent() && empty( $args['force_delay_redirect'] ) ) { // Not AJAX submit, no headers sent, and there is just one Redirect action runs.
2415
+		if ( ! headers_sent() && empty( $args['force_delay_redirect'] ) ) {
2416
+// Not AJAX submit, no headers sent, and there is just one Redirect action runs.
2411 2417
 			wp_redirect( esc_url_raw( $success_url ) );
2412 2418
 			die(); // do not use wp_die or redirect fails
2413 2419
 		}
@@ -2432,7 +2438,8 @@  discard block
 block discarded – undo
2432 2438
 
2433 2439
 		echo FrmAppHelper::maybe_kses( $redirect_msg ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
2434 2440
 		echo '<script>';
2435
-		if ( empty( $args['doing_ajax'] ) ) { // Not AJAX submit, delay JS until window.load.
2441
+		if ( empty( $args['doing_ajax'] ) ) {
2442
+// Not AJAX submit, delay JS until window.load.
2436 2443
 			echo 'window.onload=function(){';
2437 2444
 		}
2438 2445
 		echo 'setTimeout(function(){window.location="' . esc_url_raw( $args['success_url'] ) . '";}, ' . intval( $delay_time ) . ');';
Please login to merge, or discard this patch.
classes/helpers/FrmStylesCardHelper.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
 	 * @param bool             $hidden
81 81
 	 * @return array
82 82
 	 */
83
-	private function get_params_for_style_card( $style, $hidden = false ) {	
83
+	private function get_params_for_style_card( $style, $hidden = false ) {
84 84
 		if ( ! empty( $style->post_content['position'] ) ) {
85 85
 			$label_position = $style->post_content['position'];
86 86
 		} else {
Please login to merge, or discard this patch.