Make WordPress Core

Opened 7 years ago

Closed 6 years ago

#9942 closed enhancement (fixed)

DRY in add_menu_page(), add_object_page() and add_utility_page()

Reported by: scribu Owned by: westi
Milestone: 2.9 Priority: normal
Severity: normal Version: 2.7
Component: Menus Keywords: has-patch needs-review
Focuses: Cc:


Instead of repeating the same code in all the three functions, use a generic function.

Attachments (1)

toplevel.patch (3.0 KB) - added by scribu 7 years ago.
adds the $position parameter to add_menu_page()

Download all attachments as: .zip

Change History (6)

#1 @westi
7 years ago

  • Milestone changed from 2.8 to 2.9
  • Owner set to westi
  • Status changed from new to reviewing

Refactoring is good.

But moving to 2.9 for now.

7 years ago

adds the $position parameter to add_menu_page()

#2 @scribu
7 years ago

  • Version set to 2.7

How about the new version of the patch?

#3 @Denis-de-Bernardy
6 years ago

  • Component changed from Administration to Menus
  • Keywords needs-review added

patch still applies clean

#4 @scribu
6 years ago

  • Cc scribu@… added

#5 @westi
6 years ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

(In [11856]) Make add_object_page() and add_utility_page() use add_menu_page() rather than duplicated code. Fixes #9942 props scribu.

Note: See TracTickets for help on using tickets.