use_streams_transport
Filters whether streams can be used as a transport for retrieving a URL.
Использование
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.
По умолчанию: true - $args(массив)
- Request arguments.
Список изменений
С версии 2.7.0 | Введена. |
Где вызывается хук
use_streams_transport
wp-includes/class-wp-http-streams.php 519
return apply_filters( 'use_streams_transport', true, $args );