feed_links_extra_show_post_type_archive_feed
Filter HookDescription
Filters whether to display the post type archive feed link.Hook Information
| File Location |
wp-includes/general-template.php
View on GitHub
|
| Hook Type | Filter |
| Line Number | 3374 |
Hook Parameters
| Type | Name | Description |
|---|---|---|
bool
|
$show
|
Whether to display the post type archive feed link. Default true. |
Usage Examples
Basic Usage
<?php
// Hook into feed_links_extra_show_post_type_archive_feed
add_filter('feed_links_extra_show_post_type_archive_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:3374
- How this hook is used in WordPress core
<?php
3369 *
3370 * @since 6.1.0
3371 *
3372 * @param bool $show Whether to display the post type archive feed link. Default true.
3373 */
3374 $show_post_type_archive_feed = apply_filters( 'feed_links_extra_show_post_type_archive_feed', true );
3375
3376 if ( $show_post_type_archive_feed ) {
3377 $post_type = get_query_var( 'post_type' );
3378
3379 if ( is_array( $post_type ) ) {
PHP Documentation
<?php
/**
* Filters whether to display the post type archive feed link.
*
* @since 6.1.0
*
* @param bool $show Whether to display the post type archive 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.