Make WordPress Core

Ticket #57371: 57371.patch

File 57371.patch, 1.8 KB (added by upadalavipul, 2 years ago)
  • twentytwenty/classes/class-twentytwenty-walker-page.php

     
    3838
    3939                        if ( isset( $args['item_spacing'] ) && 'preserve' === $args['item_spacing'] ) {
    4040                                $t = "\t";
    41                                 $n = "\n";
    4241                        } else {
    4342                                $t = '';
    44                                 $n = '';
    4543                        }
    4644                        if ( $depth ) {
    4745                                $indent = str_repeat( $t, $depth );
  • twentytwenty/inc/template-tags.php

     
    329329                // Make sure we don't output an empty container.
    330330                $has_meta = false;
    331331
    332                 global $post;
    333332                $the_post = get_post( $post_id );
    334333                setup_postdata( $the_post );
    335334
     
    526525 * @param int      $current_page ID of the current page.
    527526 * @return array CSS class names.
    528527 */
    529 function twentytwenty_filter_wp_list_pages_item_classes( $css_class, $page, $depth, $args, $current_page ) {
     528function twentytwenty_filter_wp_list_pages_item_classes( $css_class, $page, $depth, $args ) {
    530529
    531530        // Only apply to wp_list_pages() calls with match_menu_classes set to true.
    532531        $match_menu_classes = isset( $args['match_menu_classes'] );
     
    561560 * @param int      $depth Depth of menu item. Used for padding.
    562561 * @return stdClass An object of wp_nav_menu() arguments.
    563562 */
    564 function twentytwenty_add_sub_toggles_to_main_menu( $args, $item, $depth ) {
     563function twentytwenty_add_sub_toggles_to_main_menu( $args, $item ) {
    565564
    566565        // Add sub menu toggles to the Expanded Menu with toggles.
    567566        if ( isset( $args->show_toggles ) && $args->show_toggles ) {