get_self_link

The timeline below displays how wordpress function get_self_link has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 5.5

/**
 * Returns the link for the currently displayed feed.
 *
 * @since 5.3.0
 *
 * @return string Correct link for the atom:self element.
 */
function get_self_link()
{
    $host = parse_url(home_url());
    return set_url_scheme('http://' . $host['host'] . wp_unslash($_SERVER['REQUEST_URI']));
}

WordPress Version: 5.3

/**
 * Returns the link for the currently displayed feed.
 *
 * @since 5.3.0
 *
 * @return string Correct link for the atom:self element.
 */
function get_self_link()
{
    $host = @parse_url(home_url());
    return set_url_scheme('http://' . $host['host'] . wp_unslash($_SERVER['REQUEST_URI']));
}