Make WordPress Core


Ignore:
Timestamp:
11/07/2021 01:35:52 AM (3 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Move wp-includes/class-http.php to wp-includes/class-wp-http.php.

This renames the file containing the WP_Http class to conform to the coding standards.

This commit also includes:

  • A new class-http.php that includes the new file, for anyone that may've been including the file directly.
  • Replaces references to the old filename with the new filename.

Follow-up to [8516], [13274], [33748].

Fixes #54389. See #53359.

File:
1 copied

Legend:

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

    r52025 r52026  
    274274        if ( empty( $url ) || empty( $parsed_url['scheme'] ) ) {
    275275            $response = new WP_Error( 'http_request_failed', __( 'A valid URL was not provided.' ) );
    276             /** This action is documented in wp-includes/class-http.php */
     276            /** This action is documented in wp-includes/class-wp-http.php */
    277277            do_action( 'http_api_debug', $response, 'response', 'Requests', $parsed_args, $url );
    278278            return $response;
     
    281281        if ( $this->block_request( $url ) ) {
    282282            $response = new WP_Error( 'http_request_not_executed', __( 'User has blocked requests through HTTP.' ) );
    283             /** This action is documented in wp-includes/class-http.php */
     283            /** This action is documented in wp-includes/class-wp-http.php */
    284284            do_action( 'http_api_debug', $response, 'response', 'Requests', $parsed_args, $url );
    285285            return $response;
     
    298298            if ( ! wp_is_writable( dirname( $parsed_args['filename'] ) ) ) {
    299299                $response = new WP_Error( 'http_request_failed', __( 'Destination directory for file streaming does not exist or is not writable.' ) );
    300                 /** This action is documented in wp-includes/class-http.php */
     300                /** This action is documented in wp-includes/class-wp-http.php */
    301301                do_action( 'http_api_debug', $response, 'response', 'Requests', $parsed_args, $url );
    302302                return $response;
     
    586586        $response = $transports[ $class ]->request( $url, $args );
    587587
    588         /** This action is documented in wp-includes/class-http.php */
     588        /** This action is documented in wp-includes/class-wp-http.php */
    589589        do_action( 'http_api_debug', $response, 'response', $class, $args, $url );
    590590
     
    593593        }
    594594
    595         /** This filter is documented in wp-includes/class-http.php */
     595        /** This filter is documented in wp-includes/class-wp-http.php */
    596596        return apply_filters( 'http_response', $response, $args, $url );
    597597    }
Note: See TracChangeset for help on using the changeset viewer.