Opened 11 years ago
Last modified 6 years ago
#27286 new enhancement
create menu page for custom post types
Reported by: | norcross | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.8 |
Component: | General | Keywords: | has-patch dev-feedback |
Focuses: | administration | Cc: |
Description
Currently, there are dedicated functions for adding new items to a top-level navigation item, such as add_posts_page
, add_media_page
, add_links_page
, and so on. These all act as a wrapper for the add_submenu_page
. However, there is no dedicated function for custom post types. I am proposing to add a new function called add_post_type_page
that works in the same way. It's basically a copy of add_posts_page
with an additional parameter for the registered CPT.
Attachments (1)
Change History (6)
#2
follow-up:
↓ 3
@
11 years ago
Hmm. Aside from the fact that add_post_type_page() is far, far too ambiguous of a name (not your fault, you're just following existing convention), what's the use case here?
Perhaps something like #17447 would solve your issue?
#3
in reply to:
↑ 2
@
11 years ago
Replying to nacin:
Hmm. Aside from the fact that add_post_type_page() is far, far too ambiguous of a name (not your fault, you're just following existing convention), what's the use case here?
Perhaps something like #17447 would solve your issue?
I agree the name is vague, but wasn't sure about naming outside the convention.
My particular use cases are as follows:
- settings page for a plugin using CPTs
- archive page info (page title / description) for CPT (not a taxonomy)
- a drag and drop sorting page for CPT
these are just examples of things I've done this week for actual client work.
the ticket you referenced wouldn't address this as it isn't modifying an argument to the post type itself, rather, adding a new menu page.
actual hook naming aside, my goal here was standardization, since CPTs are now so widely used.
plugin.php file with additional function