Make WordPress Core

Opened 14 years ago

Closed 11 years ago

#23108 closed enhancement (fixed)

Deprecate add_object_page() and add_utility_page()

Reported by: SergeyBiryukov Owned by: swissspidy
Priority: normal Milestone: 4.5
Component: Administration Version:
Severity: normal Keywords: has-patch commit
Cc: Focuses:

Description

add_object_page() and add_utility_page() are not used in core and are just wrappers which pass $_wp_last_object_menu++ and $_wp_last_utility_menu++, respectively, to add_menu_page().

This can lead to a conflict with other menu items added by plugins, see #23095.

Attachments (3)

23108.patch​ (5.7 KB ) - added by SergeyBiryukov 14 years ago.
23108.2.patch​ (5.8 KB ) - added by ocean90 14 years ago.
23108.3.patch​ (6.1 KB ) - added by swissspidy 11 years ago.

Download all attachments as: .zip

Change History (16)

#2 @SergeyBiryukov
14 years ago

  • Keywords has-patch added

#4 @SergeyBiryukov
14 years ago

  • Milestone Awaiting Review → 3.6

#5 @chriscct7
14 years ago

  • Cc chriscct7@… added

+1

#6 @mordauk
14 years ago

  • Cc pippin@… added

@ocean90
14 years ago

#7 @ocean90
14 years ago

23108.2.patch​ adds the _deprecated_function() calls.

#8 @ryan
13 years ago

  • Milestone 3.6 → Future Release

#9 @jamesgol
12 years ago

Just ran into an issue with a plugin using add_object_page on too many items and overwriting other entries. Searched for an issue and ended up here.

I'd agree this should be deprecated but for the time being why not just ditch the whole $_wp_last_object_menu++; in add_object_page and have it pass null to add_menu_page?

@swissspidy
11 years ago

#10 @swissspidy
11 years ago

  • Milestone Future Release → 4.5

#11 @ocean90
11 years ago

  • Keywords commit added

#12 @swissspidy
11 years ago

  • Owner set to swissspidy
  • Status new → assigned

#13 @swissspidy
11 years ago

  • Resolution → fixed
  • Status assigned → closed

In 35874:

Admin Menu: Deprecate add_object_page() and add_utility_page().

These functions are not used in core and are just wrappers for add_menu_page().

Fixes #23108.

Note: See TracTickets for help on using tickets.