Filter hook 'self_link'

in WP Core File wp-includes/feed.php at line 695

View Source

self_link

Filter Hook
Description
Filters the current feed URL.

Hook Information

File Location wp-includes/feed.php View on GitHub
Hook Type Filter
Line Number 695

Hook Parameters

Type Name Description
string $feed_link The link for the feed with set URL scheme.

Usage Examples

Basic Usage
<?php
// Hook into self_link
add_filter('self_link', 'my_custom_filter', 10, 1);

function my_custom_filter($feed_link) {
    // Your custom filtering logic here
    return $feed_link;
}

Source Code Context

wp-includes/feed.php:695 - How this hook is used in WordPress core
<?php
 690  	 * @see set_url_scheme()
 691  	 * @see wp_unslash()
 692  	 *
 693  	 * @param string $feed_link The link for the feed with set URL scheme.
 694  	 */
 695  	echo esc_url( apply_filters( 'self_link', get_self_link() ) );
 696  }
 697  
 698  /**
 699   * Gets the UTC time of the most recently modified post from WP_Query.
 700   *

PHP Documentation

<?php
/**
	 * 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.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-includes/feed.php
Related Hooks

Related hooks will be displayed here in future updates.