use_streams_transport filter-hookWP 2.7.0

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

WP_Http_Streams::test()
use_streams_transport
wp-includes/class-wp-http-streams.php 507
return apply_filters( 'use_streams_transport', true, $args );

Where the hook is used in WordPress

Usage not found.