self_link

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

WordPress Version: 6.1

/**
 * Displays the link for the currently displayed feed in a XSS safe way.
 *
 * Generate a correct link for the atom:self element.
 *
 * @since 2.5.0
 */
function self_link()
{
    /**
     * Filters the current feed URL.
     *
     * @since 3.6.0
     *
     * @see set_url_scheme()
     * @see wp_unslash()
     *
     * @param string $feed_link The link for the feed with set URL scheme.
     */
    echo esc_url(apply_filters('self_link', get_self_link()));
}

WordPress Version: 5.3

/**
 * Display the link for the currently displayed feed in a XSS safe way.
 *
 * Generate a correct link for the atom:self element.
 *
 * @since 2.5.0
 */
function self_link()
{
    /**
     * Filters the current feed URL.
     *
     * @since 3.6.0
     *
     * @see set_url_scheme()
     * @see wp_unslash()
     *
     * @param string $feed_link The link for the feed with set URL scheme.
     */
    echo esc_url(apply_filters('self_link', get_self_link()));
}

WordPress Version: 4.6

/**
 * Display the link for the currently displayed feed in a XSS safe way.
 *
 * Generate a correct link for the atom:self element.
 *
 * @since 2.5.0
 */
function self_link()
{
    $host = @parse_url(home_url());
    /**
     * Filters the current feed URL.
     *
     * @since 3.6.0
     *
     * @see set_url_scheme()
     * @see wp_unslash()
     *
     * @param string $feed_link The link for the feed with set URL scheme.
     */
    echo esc_url(apply_filters('self_link', set_url_scheme('http://' . $host['host'] . wp_unslash($_SERVER['REQUEST_URI']))));
}

WordPress Version: 3.9

/**
 * Display the link for the currently displayed feed in a XSS safe way.
 *
 * Generate a correct link for the atom:self element.
 *
 * @since 2.5.0
 */
function self_link()
{
    $host = @parse_url(home_url());
    /**
     * Filter the current feed URL.
     *
     * @since 3.6.0
     *
     * @see set_url_scheme()
     * @see wp_unslash()
     *
     * @param string $feed_link The link for the feed with set URL scheme.
     */
    echo esc_url(apply_filters('self_link', set_url_scheme('http://' . $host['host'] . wp_unslash($_SERVER['REQUEST_URI']))));
}

WordPress Version: 3.7

/**
 * Display the link for the currently displayed feed in a XSS safe way.
 *
 * Generate a correct link for the atom:self element.
 *
 * @package WordPress
 * @subpackage Feed
 * @since 2.5
 */
function self_link()
{
    $host = @parse_url(home_url());
    echo esc_url(apply_filters('self_link', set_url_scheme('http://' . $host['host'] . wp_unslash($_SERVER['REQUEST_URI']))));
}