use_streams_transport
Filter HookDescription
Filters whether streams can be used as a transport for retrieving a URL.Hook Information
File Location |
wp-includes/class-wp-http-streams.php
View on GitHub
|
Hook Type | Filter |
Line Number | 519 |
Hook Parameters
Type | Name | Description |
---|---|---|
bool
|
$use_class
|
Whether the class can be used. Default true. |
array
|
$args
|
Request arguments. |
Usage Examples
Basic Usage
<?php
// Hook into use_streams_transport
add_filter('use_streams_transport', 'my_custom_filter', 10, 2);
function my_custom_filter($use_class, $args) {
// Your custom filtering logic here
return $use_class;
}
Source Code Context
wp-includes/class-wp-http-streams.php:519
- How this hook is used in WordPress core
<?php
514 * @since 2.7.0
515 *
516 * @param bool $use_class Whether the class can be used. Default true.
517 * @param array $args Request arguments.
518 */
519 return apply_filters( 'use_streams_transport', true, $args );
520 }
521 }
522
523 /**
524 * Deprecated HTTP Transport method which used fsockopen.
PHP Documentation
<?php
/**
* Filters whether streams can be used as a transport for retrieving a URL.
*
* @since 2.7.0
*
* @param bool $use_class Whether the class can be used. Default true.
* @param array $args Request arguments.
*/
Quick Info
- Hook Type: Filter
- Parameters: 2
- File: wp-includes/class-wp-http-streams.php
Related Hooks
Related hooks will be displayed here in future updates.