Ticket #5483 (closed enhancement: invalid)

Opened 4 years ago

Last modified 3 years ago

menu-header.php enhancements

Reported by: huwr Owned by: anonymous
Priority: normal Milestone:
Component: Administration Version: 2.5
Severity: normal Keywords:
Cc:

Description

this patch introduces the following to menu-header.php:

  1. slightly cleaned up code, removed some redundancy
  1. gave class=current to li container. current version only applies this class to link, which renders some css techniques impossible. class was left in link as well for backwards compat, but is otherwise unnecessary as the link can be targeted with "li.current a {}".
  1. added action admin_menu_li with argument to run after each li. this will allow CMS and theme authors to place nested ul trees after each menu item, which is necessary and semantically proper for things like drop-down and instantly visible submenus.

the next step may be to push the submenu creation into a reusable function.

Attachments

menu-header-patch.diff Download (1.2 KB) - added by huwr 4 years ago.

Change History

huwr4 years ago

comment:1   DD324 years ago

  • Version set to 2.4
  • Type changed from defect to enhancement
  • Milestone changed from 2.3.2 to 2.4

IMO:

 $href = "admin.php?page={$submenu[$item[2]][0][2]}"; 

Should be written as:

 $href = 'admin.php?page=' . $submenu[$item[2]][0][2];

At least for the 2nd and 4th items where theres no reason for it to be contained within a string, Its just one of those smalll optimization things which makes sense to me.

I'm aware the exact same thing is used elsewhere within the file though

Also pushing to 2.4 as new features go into trunk, and then the possibility of backporting it to maintainence releases are considered.

  • Milestone changed from 2.5 to 2.6
  • Keywords has-patch removed
  • Status changed from new to closed
  • Resolution set to invalid
  • Milestone 2.9 deleted

Closing this as it relates to pre-2.7 UI and the patch is stale. Re-open if the changes are still required.

Note: See TracTickets for help on using tickets.