use_curl_transport
Filter HookDescription
Filters whether cURL can be used as a transport for retrieving a URL.Hook Information
File Location |
wp-includes/class-wp-http-curl.php
View on GitHub
|
Hook Type | Filter |
Line Number | 415 |
Hook Parameters
Type | Name | Description |
---|---|---|
bool
|
$use_class
|
Whether the class can be used. Default true. |
array
|
$args
|
An array of request arguments. |
Usage Examples
Basic Usage
<?php
// Hook into use_curl_transport
add_filter('use_curl_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-curl.php:415
- How this hook is used in WordPress core
<?php
410 * @since 2.7.0
411 *
412 * @param bool $use_class Whether the class can be used. Default true.
413 * @param array $args An array of request arguments.
414 */
415 return apply_filters( 'use_curl_transport', true, $args );
416 }
417 }
PHP Documentation
<?php
/**
* Filters whether cURL 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 An array of request arguments.
*/
Quick Info
- Hook Type: Filter
- Parameters: 2
- File: wp-includes/class-wp-http-curl.php
Related Hooks
Related hooks will be displayed here in future updates.