-
Notifications
You must be signed in to change notification settings - Fork 85
tests_allow_http_request
github-actions[bot] edited this page Oct 6, 2025
·
1 revision
Allow HTTP requests to be made.
/**
* 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 );
-
bool
$allow
Whether to allow the HTTP request. -
array
$args
Request arguments. -
string
$url
The request URL.
apply_filters( 'tests_allow_http_request', false, $args, $url )
Follow @[email protected] for updates and news.