block_local_requests filter-hookWP 2.8.0

Filters whether to block local HTTP API requests.

A local request is one to localhost or to the same host as the site itself.

Usage

add_filter( 'block_local_requests', 'wp_kama_block_local_requests_filter' );

/**
 * Function for `block_local_requests` filter-hook.
 * 
 * @param bool $block Whether to block local requests.
 *
 * @return bool
 */
function wp_kama_block_local_requests_filter( $block ){

	// filter...
	return $block;
}
$block(true|false)
Whether to block local requests.
Default: false

Changelog

Since 2.8.0 Introduced.

Where the hook is called

WP_Http::block_request()
block_local_requests
wp-includes/class-wp-http.php 899
return apply_filters( 'block_local_requests', false );

Where the hook is used in WordPress

Usage not found.