Use home to determine self link host

git-svn-id: https://develop.svn.wordpress.org/trunk@9769 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-11-18 23:04:42 +00:00
parent d2cd5afeed
commit 920b968be8
1 changed files with 3 additions and 1 deletions

View File

@ -498,10 +498,12 @@ function prep_atom_text_construct($data) {
* @since 2.5
*/
function self_link() {
$host = @parse_url(get_option('home'));
$host = $host['host'];
echo clean_url(
'http'
. ( (isset($_SERVER['https']) && $_SERVER['https'] == 'on') ? 's' : '' ) . '://'
. $_SERVER['HTTP_HOST']
. $host
. stripslashes($_SERVER['REQUEST_URI'])
);
}