WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/07/2015 01:06:58 AM (5 years ago)
Author:
wonderboymusic
Message:

Rewrite/Permalinks/Canonical: in url_to_postid(), call set_url_scheme() on the URL to combat mixed content issues and find posts cross-scheme.

Adds unit tests.

Props swissspidy.
Fixes #34144.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rewrite-functions.php

    r34712 r34890  
    340340    $url = $url_split[0];
    341341
     342    // Set the correct URL scheme.
     343    $url = set_url_scheme( $url );
     344
    342345    // Add 'www.' if it is absent and should be there
    343346    if ( false !== strpos(home_url(), '://www.') && false === strpos($url, '://www.') )
Note: See TracChangeset for help on using the changeset viewer.