block_local_requests
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
block_local_requests
wp-includes/class-wp-http.php 918
return apply_filters( 'block_local_requests', false );