wordpress-develop/tests/phpunit/tests/general
Sergey Biryukov d6e842cd28 Feeds: Add a set of fine-grained filters to disable the different types of feed links separately.
The previously available set of filters in the `feed_links()` function to enable or disable display of various feed links was quite limited:
* `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.

In order to disable the other feeds (post type archive, category, tag, custom taxonomy, author archive, search results), one would have to unhook `feed_links_extra()` from `wp_head`, but that would completely remove all of those feeds, as well as the single post comments feed.

To allow for more flexibility, this commit introduces a full set of filters in the `feed_links_extra()` function to control each one of the feeds independently, including 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 default to `true`, except for `feed_links_extra_show_post_comments_feed` which defaults to the result of `feed_links_show_comments_feed` to ensure backward compatibility.

Follow-up to [33838], [33839], [53125].

Props lopo, mukesh27, audrasjb, SergeyBiryukov.
Fixes #55904.

git-svn-id: https://develop.svn.wordpress.org/trunk@54161 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-14 17:12:20 +00:00
..
feedLinksExtra.php Feeds: Add a set of fine-grained filters to disable the different types of feed links separately. 2022-09-14 17:12:20 +00:00
paginateLinks.php Coding Standards: Add visibility to methods in tests/phpunit/tests/. 2021-11-04 15:22:47 +00:00
template_CheckedSelectedHelper.php Code Modernization: Rename the readonly() function to wp_readonly(). 2021-08-09 17:19:21 +00:00
template.php Tests: Use the factory method instead of the property. 2022-09-06 22:09:49 +00:00
wpError.php Build/Test Tools: Implement use of the void solution. 2021-08-07 10:29:41 +00:00
wpGetArchives.php Coding Standards: Add visibility to methods in tests/phpunit/tests/. 2021-11-04 15:22:47 +00:00
wpGetDocumentTitle.php Tests: Use the factory method instead of the property. 2022-09-06 22:09:49 +00:00
wpPreloadResources.php Tests: Rename the test class for wp_preload_resources() tests. 2022-08-06 00:03:01 +00:00
wpRequiredFieldIndicator.php Comments: Make wp_required_field_indicator() and wp_required_field_message() output filterable. 2022-09-12 22:29:02 +00:00
wpRequiredFieldMessage.php Comments: Make wp_required_field_indicator() and wp_required_field_message() output filterable. 2022-09-12 22:29:02 +00:00
wpResourceHints.php Script Loader: Remove default DNS prefetch entry for s.w.org. 2022-08-18 08:43:19 +00:00
wpTitle.php Template: Fix "undefined index: 00" when archive month query is empty in wp_title(). 2021-11-11 16:27:44 +00:00