Changeset 42682
- Timestamp:
- 02/09/2018 06:10:15 PM (7 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-http.php
r42343 r42682 153 153 * 154 154 * @since 2.7.0 155 * 156 * @param int $timeout_value Time in seconds until a request times out. 157 * Default 5. 155 * @since 5.0.0 The `$url` parameter was added. 156 * 157 * @param int $timeout_value Time in seconds until a request times out. Default 5. 158 * @param string $url The request URL. 158 159 */ 159 'timeout' => apply_filters( 'http_request_timeout', 5 ),160 'timeout' => apply_filters( 'http_request_timeout', 5, $url ), 160 161 /** 161 162 * Filters the number of redirects allowed during an HTTP request. 162 163 * 163 164 * @since 2.7.0 164 * 165 * @param int $redirect_count Number of redirects allowed. Default 5. 165 * @since 5.0.0 The `$url` parameter was added. 166 * 167 * @param int $redirect_count Number of redirects allowed. Default 5. 168 * @param string $url The request URL. 166 169 */ 167 'redirection' => apply_filters( 'http_request_redirection_count', 5 ),170 'redirection' => apply_filters( 'http_request_redirection_count', 5, $url ), 168 171 /** 169 172 * Filters the version of the HTTP protocol used in a request. 170 173 * 171 174 * @since 2.7.0 172 * 173 * @param string $version Version of HTTP used. Accepts '1.0' and '1.1'. 174 * Default '1.0'. 175 * @since 5.0.0 The `$url` parameter was added. 176 * 177 * @param string $version Version of HTTP used. Accepts '1.0' and '1.1'. Default '1.0'. 178 * @param string $url The request URL. 175 179 */ 176 'httpversion' => apply_filters( 'http_request_version', '1.0' ),180 'httpversion' => apply_filters( 'http_request_version', '1.0', $url ), 177 181 /** 178 182 * Filters the user agent value sent with an HTTP request. 179 183 * 180 184 * @since 2.7.0 185 * @since 5.0.0 The `$url` parameter was added. 181 186 * 182 187 * @param string $user_agent WordPress user agent string. 188 * @param string $url The request URL. 183 189 */ 184 'user-agent' => apply_filters( 'http_headers_useragent', 'WordPress/' . get_bloginfo( 'version' ) . '; ' . get_bloginfo( 'url' ) ),190 'user-agent' => apply_filters( 'http_headers_useragent', 'WordPress/' . get_bloginfo( 'version' ) . '; ' . get_bloginfo( 'url' ), $url ), 185 191 /** 186 192 * Filters whether to pass URLs through wp_http_validate_url() in an HTTP request. 187 193 * 188 194 * @since 3.6.0 189 * 190 * @param bool $pass_url Whether to pass URLs through wp_http_validate_url(). 191 * Default false. 195 * @since 5.0.0 The `$url` parameter was added. 196 * 197 * @param bool $pass_url Whether to pass URLs through wp_http_validate_url(). Default false. 198 * @param string $url The request URL. 192 199 */ 193 'reject_unsafe_urls' => apply_filters( 'http_request_reject_unsafe_urls', false ),200 'reject_unsafe_urls' => apply_filters( 'http_request_reject_unsafe_urls', false, $url ), 194 201 'blocking' => true, 195 202 'headers' => array(), … … 351 358 * 352 359 * @since 2.8.0 353 * 354 * @param bool $ssl_verify Whether to verify the SSL connection. Default true. 360 * @since 5.0.0 The `$url` parameter was added. 361 * 362 * @param bool $ssl_verify Whether to verify the SSL connection. Default true. 363 * @param string $url The request URL. 355 364 */ 356 $options['verify'] = apply_filters( 'https_ssl_verify', $options['verify'] );365 $options['verify'] = apply_filters( 'https_ssl_verify', $options['verify'], $url ); 357 366 358 367 // Check for proxies. -
trunk/src/wp-includes/class-wp-http-curl.php
r42681 r42682 114 114 if ( $is_local ) { 115 115 /** This filter is documented in wp-includes/class-wp-http-streams.php */ 116 $ssl_verify = apply_filters( 'https_local_ssl_verify', $ssl_verify );116 $ssl_verify = apply_filters( 'https_local_ssl_verify', $ssl_verify, $url ); 117 117 } elseif ( ! $is_local ) { 118 118 /** This filter is documented in wp-includes/class-http.php */ 119 $ssl_verify = apply_filters( 'https_ssl_verify', $ssl_verify );119 $ssl_verify = apply_filters( 'https_ssl_verify', $ssl_verify, $url ); 120 120 } 121 121 -
trunk/src/wp-includes/class-wp-http-streams.php
r42681 r42682 98 98 * 99 99 * @since 2.8.0 100 * @since 5.0.0 The `$url` parameter was added. 100 101 * 101 * @param bool $ssl_verify Whether to verify the SSL connection. Default true. 102 * @param bool $ssl_verify Whether to verify the SSL connection. Default true. 103 * @param string $url The request URL. 102 104 */ 103 $ssl_verify = apply_filters( 'https_local_ssl_verify', $ssl_verify );105 $ssl_verify = apply_filters( 'https_local_ssl_verify', $ssl_verify, $url ); 104 106 } elseif ( ! $is_local ) { 105 107 /** This filter is documented in wp-includes/class-http.php */ 106 $ssl_verify = apply_filters( 'https_ssl_verify', $ssl_verify );108 $ssl_verify = apply_filters( 'https_ssl_verify', $ssl_verify, $url ); 107 109 } 108 110 -
trunk/src/wp-includes/class-wp-xmlrpc-server.php
r42648 r42682 6745 6745 6746 6746 /** This filter is documented in wp-includes/class-http.php */ 6747 $user_agent = apply_filters( 'http_headers_useragent', 'WordPress/' . get_bloginfo( 'version' ) . '; ' . get_bloginfo( 'url' ) );6747 $user_agent = apply_filters( 'http_headers_useragent', 'WordPress/' . get_bloginfo( 'version' ) . '; ' . get_bloginfo( 'url' ), $url ); 6748 6748 6749 6749 // Let's check the remote site
Note: See TracChangeset
for help on using the changeset viewer.