WordPress.org

Make WordPress Core

Opened 12 years ago

Closed 11 years ago

#5483 closed enhancement (invalid)

menu-header.php enhancements

Reported by: huwr Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.5
Component: Administration Keywords:
Focuses: 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 (1)

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

Download all attachments as: .zip

Change History (4)

#1 @DD32
12 years ago

  • Milestone changed from 2.3.2 to 2.4
  • Type changed from defect to enhancement
  • Version set 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.

#2 @ffemtcj
12 years ago

  • Milestone changed from 2.5 to 2.6

#3 @mrmist
11 years ago

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

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.