Definition:
function self_link() {}
Display the link for the currently displayed feed in a XSS safe way.
Generate a correct link for the atom:self element.
Source code
function self_link() {
$host = @parse_url(home_url());
$host = $host['host'];
echo esc_url(
'http'
. ( (isset($_SERVER['https']) && $_SERVER['https'] == 'on') ? 's' : '' ) . '://'
. $host
. stripslashes($_SERVER['REQUEST_URI'])
);
}
2825

February 12, 2011 


No comments yet... Be the first to leave a reply!