diff -r 3d4e9c994f10 -r a86126ab1dd4 wp/wp-admin/includes/class-walker-nav-menu-checklist.php --- a/wp/wp-admin/includes/class-walker-nav-menu-checklist.php Tue Oct 22 16:11:46 2019 +0200 +++ b/wp/wp-admin/includes/class-walker-nav-menu-checklist.php Tue Dec 15 13:49:49 2020 +0100 @@ -30,11 +30,11 @@ * * @since 3.0.0 * - * @param string $output Used to append additional content (passed by reference). - * @param int $depth Depth of page. Used for padding. - * @param array $args Not used. + * @param string $output Used to append additional content (passed by reference). + * @param int $depth Depth of page. Used for padding. + * @param stdClass $args Not used. */ - public function start_lvl( &$output, $depth = 0, $args = array() ) { + public function start_lvl( &$output, $depth = 0, $args = null ) { $indent = str_repeat( "\t", $depth ); $output .= "\n$indent"; } @@ -62,26 +62,27 @@ * * @since 3.0.0 * - * @global int $_nav_menu_placeholder + * @global int $_nav_menu_placeholder + * @global int|string $nav_menu_selected_id * - * @param string $output Used to append additional content (passed by reference). - * @param object $item Menu item data object. - * @param int $depth Depth of menu item. Used for padding. - * @param array $args Not used. - * @param int $id Not used. + * @param string $output Used to append additional content (passed by reference). + * @param WP_Post $item Menu item data object. + * @param int $depth Depth of menu item. Used for padding. + * @param stdClass $args Not used. + * @param int $id Not used. */ - public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) { - global $_nav_menu_placeholder; + public function start_el( &$output, $item, $depth = 0, $args = null, $id = 0 ) { + global $_nav_menu_placeholder, $nav_menu_selected_id; $_nav_menu_placeholder = ( 0 > $_nav_menu_placeholder ) ? intval( $_nav_menu_placeholder ) - 1 : -1; - $possible_object_id = isset( $item->post_type ) && 'nav_menu_item' == $item->post_type ? $item->object_id : $_nav_menu_placeholder; + $possible_object_id = isset( $item->post_type ) && 'nav_menu_item' === $item->post_type ? $item->object_id : $_nav_menu_placeholder; $possible_db_id = ( ! empty( $item->ID ) ) && ( 0 < $possible_object_id ) ? (int) $item->ID : 0; $indent = ( $depth ) ? str_repeat( "\t", $depth ) : ''; $output .= $indent . '
  • '; $output .= '