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

See #48303.
Built from https://develop.svn.wordpress.org/trunk@46828


git-svn-id: http://core.svn.wordpress.org/trunk@46628 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2019-12-07 14:03:03 +00:00
parent 6677070a13
commit f11d28a779
2 changed files with 3 additions and 30 deletions

View File

@ -61,19 +61,7 @@ if ( ! class_exists( 'TwentyTwenty_Walker_Page' ) ) {
$css_class[] = 'current_page_parent';
}
/**
* Filters the list of CSS classes to include with each page item in the list.
*
* @since 2.8.0
*
* @see wp_list_pages()
*
* @param string[] $css_class An array of CSS classes to be applied to each list item.
* @param WP_Post $page Page data object.
* @param int $depth Depth of page, used for padding.
* @param array $args An array of arguments.
* @param int $current_page ID of the current page.
*/
/** This filter is documented in wp-includes/class-walker-page.php */
$css_classes = implode( ' ', apply_filters( 'page_css_class', $css_class, $page, $depth, $args, $current_page ) );
$css_classes = $css_classes ? ' class="' . esc_attr( $css_classes ) . '"' : '';
@ -89,22 +77,7 @@ if ( ! class_exists( 'TwentyTwenty_Walker_Page' ) ) {
$atts['href'] = get_permalink( $page->ID );
$atts['aria-current'] = ( $page->ID === $current_page ) ? 'page' : '';
/**
* Filters the HTML attributes applied to a page menu item's anchor element.
*
* @since 4.8.0
*
* @param array $atts {
* The HTML attributes applied to the menu item's `<a>` element, empty strings are ignored.
*
* @type string $href The href attribute.
* @type string $aria_current The aria-current attribute.
* }
* @param WP_Post $page Page data object.
* @param int $depth Depth of page, used for padding.
* @param array $args An array of arguments.
* @param int $current_page ID of the current page.
*/
/** This filter is documented in wp-includes/class-walker-page.php */
$atts = apply_filters( 'page_menu_link_attributes', $atts, $page, $depth, $args, $current_page );
$attributes = '';

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.4-alpha-46827';
$wp_version = '5.4-alpha-46828';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.