Make WordPress Core

Ticket #53392: 53392.diff

File 53392.diff, 1.4 KB (added by pbiron, 3 years ago)
  • src/wp-includes/link-template.php

    From 2a4186b4ba35f248b8942daf9a76f8ed60cd1ccb Mon Sep 17 00:00:00 2001
    From: Paul Biron <paul@sparrowhawkcomputing.com>
    Date: Sun, 13 Jun 2021 10:38:46 -0600
    Subject: [PATCH] Add `the_posts_navigation_args` filter.
    
    ---
     src/wp-includes/link-template.php | 16 ++++++++++++++++
     1 file changed, 16 insertions(+)
    
    diff --git a/src/wp-includes/link-template.php b/src/wp-includes/link-template.php
    index 0ff33466e8..522137def8 100644
    a b function get_the_posts_pagination( $args = array() ) { 
    28462846                        )
    28472847                );
    28482848
     2849                /**
     2850                 * Filters the arguments for posts navibvation links.
     2851                 *
     2852                 * @since 5.9.0
     2853                 *
     2854                 * @param array $args {
     2855                 *     Optional. Default pagination arguments, see paginate_links().
     2856                 *
     2857                 *     @type string $screen_reader_text Screen reader text for navigation element.
     2858                 *                                      Default 'Posts navigation'.
     2859                 *     @type string $aria_label         ARIA label text for the nav element. Default 'Posts'.
     2860                 *     @type string $class              Custom class for the nav element. Default 'pagination'.
     2861                 * }
     2862                 */
     2863                $args = apply_filters( 'the_posts_navigation_args', $args );
     2864
    28492865                // Make sure we get a string back. Plain is the next best thing.
    28502866                if ( isset( $args['type'] ) && 'array' === $args['type'] ) {
    28512867                        $args['type'] = 'plain';