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(


		. ( (isset($_SERVER['https']) && $_SERVER['https'] == 'on') ? 's' : '' ) . '://'

		. $host

		. stripslashes($_SERVER['REQUEST_URI'])




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

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: