self_link()

Display the link for the currently displayed feed in a XSS safe way.


Description Description

Generate a correct link for the atom:self element.


Source Source

File: wp-includes/feed.php

625
626
627
628
629
630
631
632
633
634
635
636
637
638
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'] ) ) ) );
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.5.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.