WordPress.org

Make WordPress Core

Ticket #8772: 8772.diff

File 8772.diff, 2.2 KB (added by DD32, 6 years ago)
  • wp-includes/deprecated.php

     
    13041304        return get_comment($comment_ID, ARRAY_A); 
    13051305} 
    13061306 
     1307/** 
     1308 * Allows disabling of the HTTP Extension use within WordPress 
     1309 * 
     1310 * @deprecated Use the filter 'use_exthttp_transport' 
     1311 * @deprecated 2.8.0 
     1312 * @since 2.7.0 
     1313 * 
     1314 * @access private 
     1315 * 
     1316 * @param bool $available Whether the transport is available 
     1317 * @return bool Whether the transport is available 
     1318 */ 
     1319function _use_exthttp_transport($available) { 
     1320        if ( has_filter('use_http_extension_transport') ) 
     1321                _deprecated_function( 'filter: use_http_extension_transport', '2.8', 'use_exthttp_transport' ); 
     1322 
     1323        return apply_filters('use_http_extension_transport', $available); 
     1324} 
     1325add_filter('use_exthttp_transport', '_use_exthttp_transport', 5); 
     1326 
    13071327?> 
     1328 No newline at end of file 
  • wp-includes/http.php

     
    100100                static $working_transport, $blocking_transport, $nonblocking_transport; 
    101101 
    102102                if ( is_null($working_transport) ) { 
    103                         if ( true === WP_Http_ExtHttp::test() && apply_filters('use_http_extension_transport', true) ) { 
     103                        if ( true === WP_Http_ExtHttp::test() && apply_filters('use_exthttp_transport', true) ) { 
    104104                                $working_transport['exthttp'] = new WP_Http_ExtHttp(); 
    105105                                $blocking_transport[] = &$working_transport['exthttp']; 
    106106                        } else if ( true === WP_Http_Curl::test() && apply_filters('use_curl_transport', true) ) { 
     
    151151                static $working_transport, $blocking_transport, $nonblocking_transport; 
    152152 
    153153                if ( is_null($working_transport) ) { 
    154                         if ( true === WP_Http_ExtHttp::test() && apply_filters('use_http_extension_transport', true) ) { 
     154                        if ( true === WP_Http_ExtHttp::test() && apply_filters('use_exthttp_transport', true) ) { 
    155155                                $working_transport['exthttp'] = new WP_Http_ExtHttp(); 
    156156                                $blocking_transport[] = &$working_transport['exthttp']; 
    157157                        } else if ( true === WP_Http_Streams::test() && apply_filters('use_streams_transport', true) ) {