Rewrite Rules: Ensure `url_to_postid()` operates as expected when it's used in the context of another site within a Multisite network that uses mixed URL schemes.

Fixes #35531

Built from https://develop.svn.wordpress.org/trunk@36750


git-svn-id: http://core.svn.wordpress.org/trunk@36717 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn 2016-02-28 02:13:25 +00:00
parent 5edba14d1a
commit f7101e6cbf
2 changed files with 3 additions and 2 deletions

View File

@ -487,7 +487,8 @@ function url_to_postid( $url ) {
$url = $url_split[0];
// Set the correct URL scheme.
$url = set_url_scheme( $url );
$scheme = parse_url( home_url(), PHP_URL_SCHEME );
$url = set_url_scheme( $url, $scheme );
// Add 'www.' if it is absent and should be there
if ( false !== strpos(home_url(), '://www.') && false === strpos($url, '://www.') )

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.5-beta1-36749';
$wp_version = '4.5-beta1-36750';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.