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.
Использование
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.
По умолчанию: false
Список изменений
С версии 2.8.0 | Введена. |
Где вызывается хук
block_local_requests
wp-includes/class-wp-http.php 913
return apply_filters( 'block_local_requests', false );