From 05e35e900ee3e3874f9393f51ea87fc4bf11b6bd Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 28 Jul 2024 18:27:17 +0000 Subject: [PATCH] Feeds: Introduce `feed_links_args` and `feed_links_extra_args` filters. This allows for more flexibility in modifying how feed links are displayed by the `feed_links()` and `feed_links_extra()` functions, including, for example, a way to change the `»` separator to something else. Follow-up to [10377], [33838], [33839], [53125], [54161]. Props topdownjimmy, tw2113, williampatton. Fixes #43225. Built from https://develop.svn.wordpress.org/trunk@58821 git-svn-id: http://core.svn.wordpress.org/trunk@58217 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/general-template.php | 18 ++++++++++++++++++ wp-includes/version.php | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index bf70defd38..f199000b5c 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -3120,6 +3120,15 @@ function feed_links( $args = array() ) { $args = wp_parse_args( $args, $defaults ); + /** + * Filters the feed links arguments. + * + * @since 6.7.0 + * + * @param array $args An array of feed links arguments. + */ + $args = apply_filters( 'feed_links_args', $args ); + /** * Filters whether to display the posts feed link. * @@ -3182,6 +3191,15 @@ function feed_links_extra( $args = array() ) { $args = wp_parse_args( $args, $defaults ); + /** + * Filters the extra feed links arguments. + * + * @since 6.7.0 + * + * @param array $args An array of extra feed links arguments. + */ + $args = apply_filters( 'feed_links_extra_args', $args ); + if ( is_singular() ) { $id = 0; $post = get_post( $id ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 8a29847eb0..07c4c0e46d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.7-alpha-58820'; +$wp_version = '6.7-alpha-58821'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.