Make WordPress Core


Ignore:
Timestamp:
12/07/2019 02:01:44 PM (7 years ago)
Author:
SergeyBiryukov
Message:

Twenty Twenty: Use duplicate hook references for page_css_class and page_menu_link_attributes filters in TwentyTwenty_Walker_Page.

See #48303.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentytwenty/classes/class-twentytwenty-walker-page.php

    r46827 r46828  
    6262                        }
    6363
    64                         /**
    65                          * Filters the list of CSS classes to include with each page item in the list.
    66                          *
    67                          * @since 2.8.0
    68                          *
    69                          * @see wp_list_pages()
    70                          *
    71                          * @param string[] $css_class    An array of CSS classes to be applied to each list item.
    72                          * @param WP_Post  $page         Page data object.
    73                          * @param int      $depth        Depth of page, used for padding.
    74                          * @param array    $args         An array of arguments.
    75                          * @param int      $current_page ID of the current page.
    76                          */
     64                        /** This filter is documented in wp-includes/class-walker-page.php */
    7765                        $css_classes = implode( ' ', apply_filters( 'page_css_class', $css_class, $page, $depth, $args, $current_page ) );
    7866                        $css_classes = $css_classes ? ' class="' . esc_attr( $css_classes ) . '"' : '';
     
    9078                        $atts['aria-current'] = ( $page->ID === $current_page ) ? 'page' : '';
    9179
    92                         /**
    93                          * Filters the HTML attributes applied to a page menu item's anchor element.
    94                          *
    95                          * @since 4.8.0
    96                          *
    97                          * @param array $atts {
    98                          *     The HTML attributes applied to the menu item's `<a>` element, empty strings are ignored.
    99                          *
    100                          *     @type string $href         The href attribute.
    101                          *     @type string $aria_current The aria-current attribute.
    102                          * }
    103                          * @param WP_Post $page         Page data object.
    104                          * @param int     $depth        Depth of page, used for padding.
    105                          * @param array   $args         An array of arguments.
    106                          * @param int     $current_page ID of the current page.
    107                          */
     80                        /** This filter is documented in wp-includes/class-walker-page.php */
    10881                        $atts = apply_filters( 'page_menu_link_attributes', $atts, $page, $depth, $args, $current_page );
    10982
Note: See TracChangeset for help on using the changeset viewer.