[wp-trac] [WordPress Trac] #17447: Add 'register_post_type_args' hook
WordPress Trac
noreply at wordpress.org
Mon Feb 10 03:51:55 UTC 2014
#17447: Add 'register_post_type_args' hook
-------------------------------------------------+-------------------------
Reporter: mikeschinkel | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 3.9
Component: Posts, Post Types | Version: 3.1
Severity: normal | Resolution:
Keywords: has-patch dev-feedback 2nd-opinion | Focuses:
needs-docs |
-------------------------------------------------+-------------------------
Comment (by nacin):
Thanks to both of you for some good examples. I don't think it's
unreasonable to add the ability to modify a post type registration; I just
wonder if a single one-size-fits-all hook makes the most sense. Keeping
this more fine-grained might make things a little more verbose, but also a
bit more stable. Not sold either way, just throwing out some ideas:
* I'm not sure I love the idea of short-circuiting and preventing post
type registration. I think we'd have to avoid this ability for built-in
post types, at least for as long as WP falls flat on its face when this
happens.
* The ability to control labels should probably be its own discrete
filter. If we make some changes, get_post_type_labels() might be usable in
a callback to re-process as needed.
* The ability to control the compiled capabilities should probably be its
own discrete filter. If we make some changes, get_post_type_capabilities()
might be usable in a callback to re-compile as needed.
* There exists register_taxonomy_for_object_type(),
unregister_taxonomy_for_object_type(), add_meta_box(), remove_meta_box(),
add_post_type_support(), remove_post_type_support().
* Rewriting and query variables could possibly be broken out.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/17447#comment:20>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list