Use set_url_scheme(). Props johnbillion, MarcusPope. see #19037 #20759

git-svn-id: https://develop.svn.wordpress.org/trunk@21664 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2012-08-30 13:33:00 +00:00
parent bca5b5538d
commit 92ea34f6a2
14 changed files with 43 additions and 68 deletions
+1 -6
View File
@@ -488,12 +488,7 @@ function prep_atom_text_construct($data) {
*/
function self_link() {
$host = @parse_url(home_url());
$host = $host['host'];
echo esc_url(
( is_ssl() ? 'https' : 'http' ) . '://'
. $host
. stripslashes($_SERVER['REQUEST_URI'])
);
echo esc_url( set_url_scheme( 'http://' . $host['host'] . stripslashes($_SERVER['REQUEST_URI']) ) );
}
/**