0, 'status_code' => 403, 'message' => __( 'Nonce not verified', self::get_config_data( $identifier,'text_domain' ) ), 'data' => [], ]; return new WP_HTTP_Response( $response, 403 ); } /** * will sanitize recursive * * @return array */ public static function ens_sanitize_recursive( $input ) { if ( is_array( $input ) ) { foreach ( $input as $key => $value ) { $input[$key] = ens_sanitize_recursive( $value ); } } elseif ( is_object( $input ) ) { foreach ( $input as $key => $value ) { $input->$key = ens_sanitize_recursive( $value ); } } else { if ( filter_var( $input, FILTER_VALIDATE_URL ) !== false ) { $input = sanitize_url( $input ); } elseif ( is_email( $input ) ) { $input = sanitize_email( $input ); } elseif ( is_int( $input ) ) { $input = intval( $input ); } elseif ( is_float( $input ) ) { $input = floatval( $input ); } elseif ( is_string( $input ) ) { if ( strpos( $input, '