[wp-trac] [WordPress Trac] #55904: Add a set of fine-grained filters to disable the different types of feed links separately

WordPress Trac noreply at wordpress.org
Wed Sep 14 19:38:15 UTC 2022


#55904: Add a set of fine-grained filters to disable the different types of feed
links separately
-------------------------------------------------+-------------------------
 Reporter:  lopo                                 |       Owner:  audrasjb
     Type:  enhancement                          |      Status:  closed
 Priority:  normal                               |   Milestone:  6.1
Component:  Feeds                                |     Version:
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests needs-      |     Focuses:
  testing                                        |
-------------------------------------------------+-------------------------

Old description:

> The current set of filters to enable/disable display feed links is quite
> limited.
> We have just:
> * `feed_links_show_posts_feed` to control the main feed
> * `feed_links_show_comments_feed` to control both the global comments
> feed, and the comment feed for singular posts.
>
> If you want do disable the other feeds (post type archive, category, tag,
> custom taxonomy, author archive, search results) you have to unhook
> `feed_links_extra` from  `wp_head`, but this removes completely all those
> feeds + the single post comments feed.
>
> We should introduce a full set of filters to control each one of the
> feeds independently, included a way to enable/disable the single post
> comments feed when the global comments feed is disabled/enabled:
> * `feed_links_show_post_comments_feed`
> * `feed_links_show_post_type_archive_feed`
> * `feed_links_show_category_feed`
> * `feed_links_show_tag_feed`
> * `feed_links_show_tax_feed`
> * `feed_links_show_author_feed`
> * `feed_links_show_search_feed`
>
> All of them should get `true` as default input, except for
> `feed_links_show_post_comments_feed` which should get the output of
> `feed_links_show_comments_feed` to ensure backwards compatibility.

New description:

 The current set of filters to enable/disable display feed links is quite
 limited.
 We have just:
 * `feed_links_show_posts_feed` to control the main feed
 * `feed_links_show_comments_feed` to control both the global comments
 feed, and the comment feed for singular posts.

 If you want do disable the other feeds (post type archive, category, tag,
 custom taxonomy, author archive, search results) you have to unhook
 `feed_links_extra` from  `wp_head`, but this removes completely all those
 feeds + the single post comments feed.

 We should introduce a full set of filters to control each one of the feeds
 independently, included a way to enable/disable the single post comments
 feed when the global comments feed is disabled/enabled:
 * `feed_links_extra_show_post_comments_feed`
 * `feed_links_extra_show_post_type_archive_feed`
 * `feed_links_extra_show_category_feed`
 * `feed_links_extra_show_tag_feed`
 * `feed_links_extra_show_tax_feed`
 * `feed_links_extra_show_author_feed`
 * `feed_links_extra_show_search_feed`

 All of them should get `true` as default input, except for
 `feed_links_extra_show_post_comments_feed` which should get the output of
 `feed_links_show_comments_feed` to ensure backwards compatibility.

--

Comment (by SergeyBiryukov):

 Updated ticket description to match the filter names in the commit, as
 they were changed to match the function name.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/55904#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list