Make WordPress Core

Changeset 58821


Ignore:
Timestamp:
07/28/2024 06:25:13 PM (7 weeks ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/general-template.php

    r58407 r58821  
    31223122
    31233123    /**
     3124     * Filters the feed links arguments.
     3125     *
     3126     * @since 6.7.0
     3127     *
     3128     * @param array $args An array of feed links arguments.
     3129     */
     3130    $args = apply_filters( 'feed_links_args', $args );
     3131
     3132    /**
    31243133     * Filters whether to display the posts feed link.
    31253134     *
     
    31823191
    31833192    $args = wp_parse_args( $args, $defaults );
     3193
     3194    /**
     3195     * Filters the extra feed links arguments.
     3196     *
     3197     * @since 6.7.0
     3198     *
     3199     * @param array $args An array of extra feed links arguments.
     3200     */
     3201    $args = apply_filters( 'feed_links_extra_args', $args );
    31843202
    31853203    if ( is_singular() ) {
Note: See TracChangeset for help on using the changeset viewer.