WordPress.org

Make WordPress Core

Ticket #16959: 16959.patch

File 16959.patch, 1.5 KB (added by hakre, 7 years ago)

adding $url

  • wp-includes/class-http.php

    ### Eclipse Workspace Patch 1.0
    #P wordpress-trunk
     
    700700         * @static
    701701         * @return boolean False means this class can not be used, true means it can.
    702702         */
    703         function test( $args = array() ) {
     703        function test( $args = array(), $url = '' ) {
    704704                if ( false !== ($option = get_option( 'disable_fsockopen' )) && time()-$option < 43200 ) // 12 hours
    705705                        return false;
    706706
     
    868868         *
    869869         * @return boolean False means this class can not be used, true means it can.
    870870         */
    871         function test($args = array()) {
     871        function test($args = array(), $url = '' ) {
    872872                if ( ! function_exists('fopen') || (function_exists('ini_get') && true != ini_get('allow_url_fopen')) )
    873873                        return false;
    874874
     
    10211021         *
    10221022         * @return boolean False means this class can not be used, true means it can.
    10231023         */
    1024         function test($args = array()) {
     1024        function test($args = array(), $url = '' ) {
    10251025                return apply_filters('use_http_extension_transport', function_exists('http_request'), $args );
    10261026        }
    10271027}
     
    12071207         *
    12081208         * @return boolean False means this class can not be used, true means it can.
    12091209         */
    1210         function test($args = array()) {
     1210        function test($args = array(), $url = '' ) {
    12111211                if ( function_exists('curl_init') && function_exists('curl_exec') )
    12121212                        return apply_filters('use_curl_transport', true, $args);
    12131213