mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-01 11:14:36 +00:00
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 git-svn-id: https://develop.svn.wordpress.org/trunk@36750 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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.') )
|
||||
|
||||
Reference in New Issue
Block a user