@@ -119,7 +119,8 @@ |
||
| 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 | } |
@@ -67,7 +67,8 @@ |
||
| 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 | } |
@@ -285,7 +285,8 @@ |
||
| 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 |
@@ -1682,7 +1682,8 @@ discard block |
||
| 1682 | 1682 | $vars = array(); |
| 1683 | 1683 | FrmAppHelper::include_svg(); |
| 1684 | 1684 | |
| 1685 | - if ( isset( $_POST['frm_compact_fields'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 1685 | + if ( isset( $_POST['frm_compact_fields'] ) ) { |
|
| 1686 | +// phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 1686 | 1687 | FrmAppHelper::permission_check( 'frm_edit_forms' ); |
| 1687 | 1688 | |
| 1688 | 1689 | // Javascript needs to be allowed in some field settings. |
@@ -1992,7 +1993,8 @@ discard block |
||
| 1992 | 1993 | private static function maybe_get_form_to_show( $id ) { |
| 1993 | 1994 | $form = false; |
| 1994 | 1995 | |
| 1995 | - if ( ! empty( $id ) ) { // form id or key is set |
|
| 1996 | + if ( ! empty( $id ) ) { |
|
| 1997 | +// form id or key is set |
|
| 1996 | 1998 | $form = FrmForm::getOne( $id ); |
| 1997 | 1999 | if ( ! $form || $form->parent_form_id || $form->status === 'trash' ) { |
| 1998 | 2000 | $form = false; |
@@ -2075,7 +2077,8 @@ discard block |
||
| 2075 | 2077 | private static function get_saved_errors( $form, $params ) { |
| 2076 | 2078 | global $frm_vars; |
| 2077 | 2079 | |
| 2078 | - if ( $params['posted_form_id'] == $form->id && $_POST && isset( $frm_vars['created_entries'][ $form->id ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 2080 | + if ( $params['posted_form_id'] == $form->id && $_POST && isset( $frm_vars['created_entries'][ $form->id ] ) ) { |
|
| 2081 | +// phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 2079 | 2082 | $errors = $frm_vars['created_entries'][ $form->id ]['errors']; |
| 2080 | 2083 | } else { |
| 2081 | 2084 | $errors = array(); |
@@ -2116,7 +2119,8 @@ discard block |
||
| 2116 | 2119 | * @return string|array |
| 2117 | 2120 | */ |
| 2118 | 2121 | private static function get_confirmation_method( $atts ) { |
| 2119 | - if ( ! empty( $atts['entry_id'] ) ) { // Check against entry has already submitted error. |
|
| 2122 | + if ( ! empty( $atts['entry_id'] ) ) { |
|
| 2123 | +// Check against entry has already submitted error. |
|
| 2120 | 2124 | $met_actions = self::get_met_on_submit_actions( $atts ); |
| 2121 | 2125 | if ( $met_actions ) { |
| 2122 | 2126 | return $met_actions; |
@@ -2230,7 +2234,8 @@ discard block |
||
| 2230 | 2234 | } |
| 2231 | 2235 | |
| 2232 | 2236 | if ( 'redirect' === FrmOnSubmitHelper::get_action_type( $action ) ) { |
| 2233 | - if ( $has_redirect ) { // Do not process because we run the first redirect action only. |
|
| 2237 | + if ( $has_redirect ) { |
|
| 2238 | +// Do not process because we run the first redirect action only. |
|
| 2234 | 2239 | continue; |
| 2235 | 2240 | } |
| 2236 | 2241 | |
@@ -2393,12 +2398,14 @@ discard block |
||
| 2393 | 2398 | |
| 2394 | 2399 | $doing_ajax = FrmAppHelper::doing_ajax(); |
| 2395 | 2400 | |
| 2396 | - if ( ! empty( $args['ajax'] ) && $doing_ajax && empty( $args['force_delay_redirect'] ) ) { // Is AJAX submit and there is just one Redirect action runs. |
|
| 2401 | + if ( ! empty( $args['ajax'] ) && $doing_ajax && empty( $args['force_delay_redirect'] ) ) { |
|
| 2402 | +// Is AJAX submit and there is just one Redirect action runs. |
|
| 2397 | 2403 | echo json_encode( array( 'redirect' => $success_url ) ); |
| 2398 | 2404 | wp_die(); |
| 2399 | 2405 | } |
| 2400 | 2406 | |
| 2401 | - if ( ! headers_sent() && empty( $args['force_delay_redirect'] ) ) { // Not AJAX submit, no headers sent, and there is just one Redirect action runs. |
|
| 2407 | + if ( ! headers_sent() && empty( $args['force_delay_redirect'] ) ) { |
|
| 2408 | +// Not AJAX submit, no headers sent, and there is just one Redirect action runs. |
|
| 2402 | 2409 | wp_redirect( esc_url_raw( $success_url ) ); |
| 2403 | 2410 | die(); // do not use wp_die or redirect fails |
| 2404 | 2411 | } |
@@ -2431,7 +2438,8 @@ discard block |
||
| 2431 | 2438 | |
| 2432 | 2439 | echo FrmAppHelper::maybe_kses( $redirect_msg ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 2433 | 2440 | echo '<script>'; |
| 2434 | - 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. |
|
| 2435 | 2443 | echo 'window.onload=function(){'; |
| 2436 | 2444 | } |
| 2437 | 2445 | echo 'setTimeout(function(){window.location="' . esc_url_raw( $args['success_url'] ) . '";}, ' . intval( $delay_time ) . ');'; |