Skip to content

tests_allow_http_request

github-actions[bot] edited this page Oct 6, 2025 · 1 revision

Allow HTTP requests to be made.

Auto-generated Example

/**
 * Allow HTTP requests to be made.
 *
 * @param bool   $allow 
 * @param array  $args 
 * @param string $url 
 * @return bool The filtered value.
 */
function my_tests_allow_http_request_callback( bool $allow, array $args, string $url ) {
    // Your code here.
    return $allow;
}
add_filter( 'tests_allow_http_request', 'my_tests_allow_http_request_callback', 10, 3 );

Parameters

  • bool $allow Whether to allow the HTTP request.
  • array $args Request arguments.
  • string $url The request URL.

Files

apply_filters( 'tests_allow_http_request', false, $args, $url )

← All Hooks

Users

Developers

Clone this wiki locally