Make WordPress Core


Ignore:
Timestamp:
01/29/2020 12:43:23 AM (6 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve inline comments per the documentation standards.

Includes minor code layout fixes for better readability.

See #48303.

File:
1 edited

Legend:

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

    r42876 r47122  
    2121    public function __construct( $server, $path = false, $port = false, $timeout = 15 ) {
    2222        if ( ! $path ) {
    23             // Assume we have been given a URL instead
     23            // Assume we have been given a URL instead.
    2424            $bits         = parse_url( $server );
    2525            $this->scheme = $bits['scheme'];
     
    2828            $this->path   = ! empty( $bits['path'] ) ? $bits['path'] : '/';
    2929
    30             // Make absolutely sure we have a path
     30            // Make absolutely sure we have a path.
    3131            if ( ! $this->path ) {
    3232                $this->path = '/';
     
    6363        );
    6464
    65         // Merge Custom headers ala #8145
     65        // Merge Custom headers ala #8145.
    6666        foreach ( $this->headers as $header => $value ) {
    6767            $args['headers'][ $header ] = $value;
     
    8181        }
    8282
    83         // Now send the request
     83        // Now send the request.
    8484        if ( $this->debug ) {
    8585            echo '<pre class="ixr_request">' . htmlspecialchars( $xml ) . "\n</pre>\n\n";
     
    104104        }
    105105
    106         // Now parse what we've got back
     106        // Now parse what we've got back.
    107107        $this->message = new IXR_Message( wp_remote_retrieve_body( $response ) );
    108108        if ( ! $this->message->parse() ) {
    109             // XML error
     109            // XML error.
    110110            $this->error = new IXR_Error( -32700, 'parse error. not well formed' );
    111111            return false;
     
    118118        }
    119119
    120         // Message must be OK
     120        // Message must be OK.
    121121        return true;
    122122    }
Note: See TracChangeset for help on using the changeset viewer.