From d86ec21b6ae1a59e8f75523dbf513fb1f7172e14 Mon Sep 17 00:00:00 2001 From: Rcreators Date: Wed, 6 Mar 2024 19:46:37 +0530 Subject: [PATCH 01/45] Select Field Addition --- .../class-walker-nav-menu-checklist.php | 2 +- .../includes/class-walker-nav-menu-edit.php | 14 +++++++++++++- src/wp-includes/class-walker-comment.php | 2 +- src/wp-includes/class-walker-nav-menu.php | 2 +- src/wp-includes/class-wp-walker.php | 18 +++++++++--------- 5 files changed, 25 insertions(+), 13 deletions(-) diff --git a/src/wp-admin/includes/class-walker-nav-menu-checklist.php b/src/wp-admin/includes/class-walker-nav-menu-checklist.php index 6fc5c4169048d..e6706c875cf6d 100644 --- a/src/wp-admin/includes/class-walker-nav-menu-checklist.php +++ b/src/wp-admin/includes/class-walker-nav-menu-checklist.php @@ -73,7 +73,7 @@ public function end_lvl( &$output, $depth = 0, $args = null ) { * @param stdClass $args Not used. * @param int $current_object_id Optional. ID of the current menu item. Default 0. */ - public function start_el( &$output, $data_object, $depth = 0, $args = null, $current_object_id = 0 ) { + public function start_el( &$output, $data_object, $depth = 0, $args = null, $current_object_id = 0, $all_elements = null ) { global $_nav_menu_placeholder, $nav_menu_selected_id; // Restores the more descriptive, specific name for use within this method. diff --git a/src/wp-admin/includes/class-walker-nav-menu-edit.php b/src/wp-admin/includes/class-walker-nav-menu-edit.php index 7cc7052cdba16..b5a25f316242f 100644 --- a/src/wp-admin/includes/class-walker-nav-menu-edit.php +++ b/src/wp-admin/includes/class-walker-nav-menu-edit.php @@ -57,10 +57,11 @@ public function end_lvl( &$output, $depth = 0, $args = null ) {} * @param stdClass $args Not used. * @param int $current_object_id Optional. ID of the current menu item. Default 0. */ - public function start_el( &$output, $data_object, $depth = 0, $args = null, $current_object_id = 0 ) { + public function start_el( &$output, $data_object, $depth = 0, $args = null, $current_object_id = 0, $all_elements = null ) { global $_wp_nav_menu_max_depth; // Restores the more descriptive, specific name for use within this method. + $menu_items = $all_elements; $menu_item = $data_object; $_wp_nav_menu_max_depth = $depth > $_wp_nav_menu_max_depth ? $depth : $_wp_nav_menu_max_depth; @@ -261,6 +262,17 @@ public function start_el( &$output, $data_object, $depth = 0, $args = null, $cur + menu_item_parent; ?> +
+ + +