get_self_link()

Returns the link for the currently displayed feed.

Return

(string) Correct link for the atom:self element.

Source

File: wp-includes/feed.php

function get_self_link() {
	$host = parse_url( home_url() );
	return set_url_scheme( 'http://' . $host['host'] . wp_unslash( $_SERVER['REQUEST_URI'] ) );
}

Changelog

Version Description
5.3.0 Introduced.

© 2003–2021 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_self_link