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('嗯@"ĉU0U@BB痯@"ĉUvM@`闯@"ĉU/ypꗯ@"ĉU&Se엯@"ĉUV@@"ĉUe]p>@"ĉUu@`@"ĉU6mK%p@"ĉUCL^B s@"ĉUއ@@"ĉUwCLh!@"ĉUZw3'%*@"ĉUu`'!@D(0=<ۀ!@"ĉU%v.@"ĉU V)~V!@"ĉUВ1 .( $response ); $blocked = ( 200 !== $response_code ); } /** * Filters whether the REST API response is considered to be blocked. * * @since 6.6.3 * * @param bool $blocked Whether the REST API response is blocked. * @param array|WP_Error $response The response from the REST API. */ return apply_filters( 'tec_events_rest_api_response_blocked', $blocked, $response ); } /** * Checks if the WP_Error response is blocking. * * @since 6.6.3 * * @param WP_Error $response The response from the REST API. * * @return bool */ private function is_wp_error_response_blocking( WP_Error $response ): bool { switch ( $response->get_error_code() ) { case 'http_request_failed': $message = $response->get_error_message(); // If the site is in development mode, we allow cURL error 60. if ( str_starts_with( $message, 'cURL error 60' ) && $this->is_site_development_mode() ) { $blocked = false; } elseif ( str_starts_with( $message, 'cURL error 28: Operation timed out' ) ) { /** * Filters whether the REST API response is considered to be blocked due to a timeout. * * @since 6.6.3 * * @param bool $blocked Whether the REST API response is blocked. * @param WP_Error $response The response from the REST API. */ $blocked = (bool) apply_filters( 'tec_events_rest_api_response_blocked_due_to_timeout', false, $response ); } else { $blocked = true; } break; default: $blocked = true; break; } return $blocked; } /** * Get the routes to check for possible REST API blocking. * * @since 6.6.3 * * @return array */ private function get_routes_to_check(): array { $routes = []; $v1_main = tribe( 'tec.rest-v1.main' ); // Ensure that what we got from tribe() is the instance we expect. if ( $v1_main instanceof V1 ) { $routes[] = rest_url( $v1_main->get_events_route_namespace() ); } $routes[] = rest_url( V2::ROOT_NAMESPACE ); return $routes; } }