use_streams_transport
Filters whether streams can be used as a transport for retrieving a URL.
Usage
add_filter( 'use_streams_transport', 'wp_kama_use_streams_transport_filter', 10, 2 ); /** * Function for `use_streams_transport` filter-hook. * * @param bool $use_class Whether the class can be used. * @param array $args Request arguments. * * @return bool */ function wp_kama_use_streams_transport_filter( $use_class, $args ){ // filter... return $use_class; }
- $use_class(true|false)
- Whether the class can be used.
Default: true - $args(array)
- Request arguments.
Changelog
Since 2.7.0 | Introduced. |
Where the hook is called
use_streams_transport
wp-includes/class-wp-http-streams.php 517
return apply_filters( 'use_streams_transport', true, $args );