feed_links_show_posts_feed
Filter HookDescription
Filters whether to display the posts feed link.Hook Information
File Location |
wp-includes/general-template.php
View on GitHub
|
Hook Type | Filter |
Line Number | 3266 |
Hook Parameters
Type | Name | Description |
---|---|---|
bool
|
$show
|
Whether to display the posts feed link. Default true. |
Usage Examples
Basic Usage
<?php
// Hook into feed_links_show_posts_feed
add_filter('feed_links_show_posts_feed', 'my_custom_filter', 10, 1);
function my_custom_filter($show) {
// Your custom filtering logic here
return $show;
}
Source Code Context
wp-includes/general-template.php:3266
- How this hook is used in WordPress core
<?php
3261 *
3262 * @since 4.4.0
3263 *
3264 * @param bool $show Whether to display the posts feed link. Default true.
3265 */
3266 if ( apply_filters( 'feed_links_show_posts_feed', true ) ) {
3267 printf(
3268 '<link rel="alternate" type="%s" title="%s" href="%s" />' . "\n",
3269 feed_content_type(),
3270 esc_attr( sprintf( $args['feedtitle'], get_bloginfo( 'name' ), $args['separator'] ) ),
3271 esc_url( get_feed_link() )
PHP Documentation
<?php
/**
* Filters whether to display the posts feed link.
*
* @since 4.4.0
*
* @param bool $show Whether to display the posts feed link. Default true.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/general-template.php
Related Hooks
Related hooks will be displayed here in future updates.