apply_filters( 'block_local_requests', bool $block )
- Since
- 2.8.0
Filters whether to block local HTTP API requests.
Description
A local request is one to localhost or to the same host as the site itself.
Parameters
$blockbool- Whether to block local requests. Default false.
Fired at · 1
wp-includes/class-wp-http.php:918WP_Http::block_request()
Source
* A local request is one to `localhost` or to the same host as the site itself. * * @since 2.8.0 * * @param bool $block Whether to block local requests. Default false. */ return apply_filters( 'block_local_requests', false ); } if ( ! defined( 'WP_ACCESSIBLE_HOSTS' ) ) { return true; }History
Introduced in 2.8.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.9.7 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.