Changeset 56045
- Timestamp:
- 06/26/2023 09:31:30 PM (21 months ago)
- Location:
- trunk/src/wp-content/themes/twentytwenty
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentytwenty/classes/class-twentytwenty-walker-page.php
r55276 r56045 39 39 if ( isset( $args['item_spacing'] ) && 'preserve' === $args['item_spacing'] ) { 40 40 $t = "\t"; 41 $n = "\n";42 41 } else { 43 42 $t = ''; 44 $n = '';45 43 } 46 44 if ( $depth ) { -
trunk/src/wp-content/themes/twentytwenty/inc/template-tags.php
r55276 r56045 241 241 * 242 242 * @since Twenty Twenty 1.0 243 *244 * @global WP_Post $post Global post object.245 243 * 246 244 * @param int $post_id The ID of the post. … … 332 330 $has_meta = false; 333 331 334 global $post;335 332 $the_post = get_post( $post_id ); 336 333 setup_postdata( $the_post ); … … 546 543 * @param int $depth Depth of page, used for padding. 547 544 * @param array $args An array of arguments. 548 * @param int $current_page ID of the current page.549 545 * @return array CSS class names. 550 546 */ 551 function twentytwenty_filter_wp_list_pages_item_classes( $css_class, $page, $depth, $args , $current_page) {547 function twentytwenty_filter_wp_list_pages_item_classes( $css_class, $page, $depth, $args ) { 552 548 553 549 // Only apply to wp_list_pages() calls with match_menu_classes set to true. … … 572 568 } 573 569 574 add_filter( 'page_css_class', 'twentytwenty_filter_wp_list_pages_item_classes', 10, 5);570 add_filter( 'page_css_class', 'twentytwenty_filter_wp_list_pages_item_classes', 10, 4 ); 575 571 576 572 /** … … 581 577 * @param stdClass $args An object of wp_nav_menu() arguments. 582 578 * @param WP_Post $item Menu item data object. 583 * @param int $depth Depth of menu item. Used for padding.584 579 * @return stdClass An object of wp_nav_menu() arguments. 585 580 */ 586 function twentytwenty_add_sub_toggles_to_main_menu( $args, $item , $depth) {581 function twentytwenty_add_sub_toggles_to_main_menu( $args, $item ) { 587 582 588 583 // Add sub menu toggles to the Expanded Menu with toggles. … … 623 618 } 624 619 625 add_filter( 'nav_menu_item_args', 'twentytwenty_add_sub_toggles_to_main_menu', 10, 3);620 add_filter( 'nav_menu_item_args', 'twentytwenty_add_sub_toggles_to_main_menu', 10, 2 ); 626 621 627 622 /**
Note: See TracChangeset
for help on using the changeset viewer.