WordPress.org

Make WordPress Core

Changeset 10870


Ignore:
Timestamp:
04/04/2009 05:55:48 PM (9 years ago)
Author:
ryan
Message:

Correct spelling. Props jbsil. see #4011

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/http.php

    r10864 r10870  
    507507     * You block external URL requests by defining WP_HTTP_BLOCK_EXTERNAL in your wp-config.php file
    508508     * and this will only allow localhost and your blog to make requests. The constant
    509      * WP_ACCESSABLE_HOSTS will allow additional hosts to go through for requests. The format of the
    510      * WP_ACCESSABLE_HOSTS constant is a comma separated list of hostnames to allow.
     509     * WP_ACCESSIBLE_HOSTS will allow additional hosts to go through for requests. The format of the
     510     * WP_ACCESSIBLE_HOSTS constant is a comma separated list of hostnames to allow.
    511511     *
    512512     * @since 2.8.0
     
    541541            return apply_filters('block_local_requests', false);
    542542
    543         if ( !defined('WP_ACCESSABLE_HOSTS') )
     543        if ( !defined('WP_ACCESSIBLE_HOSTS') )
    544544            return true;
    545545
    546         static $accessable_hosts;
    547         if ( null == $accessable_hosts )
    548             $accessable_hosts = preg_split('|,\s*|', WP_ACCESSABLE_HOSTS);
    549 
    550         return !in_array( $check['host'], $accessable_hosts ); //Inverse logic, If its in the array, then we can't access it.
     546        static $accessible_hosts;
     547        if ( null == $accessible_hosts )
     548            $accessible_hosts = preg_split('|,\s*|', WP_ACCESSIBLE_HOSTS);
     549
     550        return !in_array( $check['host'], $accessible_hosts ); //Inverse logic, If its in the array, then we can't access it.
    551551    }
    552552}
     
    12491249            }
    12501250        }
    1251        
     1251
    12521252        $is_local = isset($args['local']) && $args['local'];
    12531253        $ssl_verify = isset($args['sslverify']) && $args['sslverify'];
     
    15231523        if ( !defined('WP_PROXY_BYPASS_HOSTS') )
    15241524            return true;
    1525        
     1525
    15261526        static $bypass_hosts;
    15271527        if ( null == $bypass_hosts )
    15281528            $bypass_hosts = preg_split('|,\s*|', WP_PROXY_BYPASS_HOSTS);
    1529        
     1529
    15301530        return !in_array( $check['host'], $bypass_hosts );
    15311531    }
Note: See TracChangeset for help on using the changeset viewer.