On this page
self_link()
Displays the link for the currently displayed feed in a XSS safe way.
Description
Generate a correct link for the atom:self element.
Source
File: wp-includes/feed.php. View all references
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() ) );
}
Hooks
- apply_filters( 'self_link',
string $feed_link ) -
Filters the current feed URL.
Related
Uses
| Uses | Description |
|---|---|
| get_self_link() wp-includes/feed.php | Returns the link for the currently displayed feed. |
| esc_url() wp-includes/formatting.php | Checks and cleans a URL. |
| apply_filters() wp-includes/plugin.php | Calls the callback functions that have been added to a filter hook. |
Changelog
| Version | Description |
|---|---|
| 2.5.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/self_link