mirror of
git://develop.git.wordpress.org/
synced 2025-01-18 05:18:42 +01:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@58821 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
b59bc83af4
commit
a3173b6506
@ -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 );
|
||||
|
Loading…
x
Reference in New Issue
Block a user