Changeset 46468 for trunk/src/wp-includes/class-http.php
- Timestamp:
- 10/12/2019 06:03:22 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-http.php
r46424 r46468 823 823 824 824 /** 825 * Block requests through the proxy.825 * Determines whether an HTTP API request to the given URL should be blocked. 826 826 * 827 827 * Those who are behind a proxy and want to prevent access to certain hosts may do so. This will 828 * prevent plugins from working and core functionality, if you don't include api.wordpress.org.829 * 830 * You block external URL requests by defining WP_HTTP_BLOCK_EXTERNAL as true in your wp-config.php828 * prevent plugins from working and core functionality, if you don't include `api.wordpress.org`. 829 * 830 * You block external URL requests by defining `WP_HTTP_BLOCK_EXTERNAL` as true in your `wp-config.php` 831 831 * file and this will only allow localhost and your site to make requests. The constant 832 * WP_ACCESSIBLE_HOSTSwill allow additional hosts to go through for requests. The format of the833 * WP_ACCESSIBLE_HOSTSconstant is a comma separated list of hostnames to allow, wildcard domains834 * are supported, eg *.wordpress.org will allow for all subdomains of wordpress.orgto be contacted.832 * `WP_ACCESSIBLE_HOSTS` will allow additional hosts to go through for requests. The format of the 833 * `WP_ACCESSIBLE_HOSTS` constant is a comma separated list of hostnames to allow, wildcard domains 834 * are supported, eg `*.wordpress.org` will allow for all subdomains of `wordpress.org` to be contacted. 835 835 * 836 836 * @since 2.8.0 … … 860 860 if ( 'localhost' == $check['host'] || ( isset( $home['host'] ) && $home['host'] == $check['host'] ) ) { 861 861 /** 862 * Filters whether to block local requests through the proxy. 862 * Filters whether to block local HTTP API requests. 863 * 864 * A local request is one to `localhost` or to the same host as the site itself. 863 865 * 864 866 * @since 2.8.0 865 867 * 866 * @param bool $block Whether to block local requests through proxy. 867 * Default false. 868 * @param bool $block Whether to block local requests. Default false. 868 869 */ 869 870 return apply_filters( 'block_local_requests', false ); … … 994 995 * @since 3.7.0 995 996 * 996 * @param string $url The URL which was requested. 997 * @param array $args The Arguments which were used to make the request. 998 * @param array $response The Response of the HTTP request. 999 * @return false|object False if no redirect is present, a WP_HTTP or WP_Error result otherwise. 997 * @param string $url The URL which was requested. 998 * @param array $args The arguments which were used to make the request. 999 * @param array $response The response of the HTTP request. 1000 * @return false|WP_Error|array False if no redirect is present, a WP_Error object if there's an error, or an HTTP 1001 * API response array if the redirect is successfully followed. 1000 1002 */ 1001 1003 public static function handle_redirects( $url, $args, $response ) {
Note: See TracChangeset
for help on using the changeset viewer.