| @@ -42,10 +42,10 @@ | ||
| 42 | 42 | if ( ! wp_verify_nonce( Fns::get_nonce(), rtsb()->nonceText ) || ! current_user_can( 'manage_options' ) ) { |
| 43 | 43 | wp_send_json_error( esc_html__( 'Security error: Insufficient permissions.', 'shopbuilder' ) ); |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | - $func_with_param = sanitize_text_field( $_REQUEST['func_with_param'] ?? '' ); | |
| 47 | - $s = sanitize_text_field( $_REQUEST['s'] ?? '' ); | |
| 46 | + $func_with_param = sanitize_text_field( $_REQUEST['func_with_param'] ?? '' ); //phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash | |
| 47 | + $s = sanitize_text_field( $_REQUEST['s'] ?? '' ); //phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash | |
| 48 | 48 | $decodedString = stripslashes( $func_with_param ); |
| 49 | 49 | $functionArray = json_decode( $decodedString, true ); |
| 50 | 50 | $className = $functionArray[0]; |
| 51 | 51 | $methodName = $functionArray[1]; |
| @@ -136,9 +136,9 @@ | ||
| 136 | 136 | ); |
| 137 | 137 | } |
| 138 | 138 | |
| 139 | 139 | $section_id = isset( $_POST['section_id'] ) ? sanitize_text_field( wp_unslash( $_POST['section_id'] ) ) : ''; |
| 140 | - $module_ids = isset( $_POST['module_ids'] ) ? array_map( 'sanitize_text_field', $_POST['module_ids'] ) : []; | |
| 140 | + $module_ids = isset( $_POST['module_ids'] ) ? array_map( 'sanitize_text_field', $_POST['module_ids'] ) : []; //phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash | |
| 141 | 141 | $type = isset( $_POST['type'] ) && 'active' === sanitize_text_field( wp_unslash( $_POST['type'] ) ) ? 'active' : false; |
| 142 | 142 | |
| 143 | 143 | if ( ! $section_id || empty( $module_ids ) ) { |
| 144 | 144 | wp_send_json_error( |