Merged in feature/81-dev-dev01 (pull request #5)

auto-patch  81-dev-dev01-2023-12-05T22_45_26

* auto-patch  81-dev-dev01-2023-12-05T22_45_26
This commit is contained in:
Tony Volpe
2023-12-05 23:05:59 +00:00
parent ba16964e7a
commit 725d3043d5
1463 changed files with 142461 additions and 89421 deletions

View File

@@ -326,11 +326,11 @@ class WP_Http {
);
// Ensure redirects follow browser behavior.
$options['hooks']->register( 'requests.before_redirect', array( get_class(), 'browser_redirect_compatibility' ) );
$options['hooks']->register( 'requests.before_redirect', array( static::class, 'browser_redirect_compatibility' ) );
// Validate redirected URLs.
if ( function_exists( 'wp_kses_bad_protocol' ) && $parsed_args['reject_unsafe_urls'] ) {
$options['hooks']->register( 'requests.before_redirect', array( get_class(), 'validate_redirects' ) );
$options['hooks']->register( 'requests.before_redirect', array( static::class, 'validate_redirects' ) );
}
if ( $parsed_args['stream'] ) {
@@ -463,7 +463,7 @@ class WP_Http {
if ( $value instanceof WP_Http_Cookie ) {
$attributes = array_filter(
$value->get_attributes(),
static function( $attr ) {
static function ( $attr ) {
return null !== $attr;
}
);
@@ -516,6 +516,8 @@ class WP_Http {
* Tests which transports are capable of supporting the request.
*
* @since 3.2.0
* @deprecated 6.4.0 Use WpOrg\Requests\Requests::get_transport_class()
* @see WpOrg\Requests\Requests::get_transport_class()
*
* @param array $args Request arguments.
* @param string $url URL to request.
@@ -529,13 +531,14 @@ class WP_Http {
* Filters which HTTP transports are available and in what order.
*
* @since 3.7.0
* @deprecated 6.4.0 Use WpOrg\Requests\Requests::get_transport_class()
*
* @param string[] $transports Array of HTTP transports to check. Default array contains
* 'curl' and 'streams', in that order.
* @param array $args HTTP request arguments.
* @param string $url The URL to request.
*/
$request_order = apply_filters( 'http_api_transports', $transports, $args, $url );
$request_order = apply_filters_deprecated( 'http_api_transports', array( $transports, $args, $url ), '6.4.0' );
// Loop over each transport on each HTTP request looking for one which will serve this request's needs.
foreach ( $request_order as $transport ) {
@@ -919,7 +922,6 @@ class WP_Http {
} else {
return ! in_array( $check['host'], $accessible_hosts, true ); // Inverse logic, if it's in the array, then don't block it.
}
}
/**
@@ -1102,5 +1104,4 @@ class WP_Http {
return false;
}
}