Ticket #5483 (new enhancement)

Opened 1 year ago

Last modified 8 months ago

menu-header.php enhancements

Reported by: huwr Assigned to: anonymous
Priority: normal Milestone: 2.9
Component: Administration Version: 2.5
Severity: normal Keywords: has-patch
Cc:

Description

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

1. slightly cleaned up code, removed some redundancy

2. 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 {}".

3. 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 (1.2 kB) - added by huwr on 12/18/07 07:37:02.

Change History

12/18/07 07:37:02 changed by huwr

  • attachment menu-header-patch.diff added.

12/18/07 07:42:16 changed by DD32

  • 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.

03/19/08 23:54:00 changed by ffemtcj

  • milestone changed from 2.5 to 2.6.