WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 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:

Description

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 5 years ago.
adds the $position parameter to add_menu_page()

Download all attachments as: .zip

Change History (6)

comment:1 westi5 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.

scribu5 years ago

adds the $position parameter to add_menu_page()

comment:2 scribu5 years ago

  • Version set to 2.7

How about the new version of the patch?

comment:3 Denis-de-Bernardy5 years ago

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

patch still applies clean

comment:4 scribu5 years ago

  • Cc scribu@… added

comment:5 westi5 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.