mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 12:50:28 +00:00
Docs: Improve inline comments per the documentation standards.
Includes minor code layout fixes for better readability. See #48303. git-svn-id: https://develop.svn.wordpress.org/trunk@47122 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -943,15 +943,15 @@ class WP_Http {
|
||||
return $maybe_relative_path;
|
||||
}
|
||||
|
||||
// Check for a scheme on the 'relative' url
|
||||
// Check for a scheme on the 'relative' URL.
|
||||
if ( ! empty( $relative_url_parts['scheme'] ) ) {
|
||||
return $maybe_relative_path;
|
||||
}
|
||||
|
||||
$absolute_path = $url_parts['scheme'] . '://';
|
||||
|
||||
// Schemeless URLs will make it this far, so we check for a host in the relative url
|
||||
// and convert it to a protocol-url
|
||||
// Schemeless URLs will make it this far, so we check for a host in the relative URL
|
||||
// and convert it to a protocol-URL.
|
||||
if ( isset( $relative_url_parts['host'] ) ) {
|
||||
$absolute_path .= $relative_url_parts['host'];
|
||||
if ( isset( $relative_url_parts['port'] ) ) {
|
||||
@@ -964,7 +964,7 @@ class WP_Http {
|
||||
}
|
||||
}
|
||||
|
||||
// Start off with the Absolute URL path.
|
||||
// Start off with the absolute URL path.
|
||||
$path = ! empty( $url_parts['path'] ) ? $url_parts['path'] : '/';
|
||||
|
||||
// If it's a root-relative path, then great.
|
||||
@@ -988,7 +988,7 @@ class WP_Http {
|
||||
$path = preg_replace( '!^/(\.\./)+!', '', $path );
|
||||
}
|
||||
|
||||
// Add the Query string.
|
||||
// Add the query string.
|
||||
if ( ! empty( $relative_url_parts['query'] ) ) {
|
||||
$path .= '?' . $relative_url_parts['query'];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user