self_link

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

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:

WordPress.com Logo

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

Facebook photo

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

Connecting to %s

%d bloggers like this: