[wp-trac] [WordPress Trac] #17447: Add 'register_post_type_args' hook
WordPress Trac
noreply at wordpress.org
Mon Feb 10 07:00:50 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 MikeSchinkel):
Replying to [comment:25 nickciske]:
Nice first patch.
Several things.
1. See [comment:14 DrewAPicture]'s comment about needing hook docs.
2. Your patch doesn't allow short-circuiting of post type registration for
non built-in types.
3. Your patch doesn't pass in the sanitized version of the post type in
`$args['name']` and then capture it after the args as the post type name
as in my v2.x of the patch so you wouldn't be able to modify a post type
name in case of a conflict ''(which is mostly moot, but sometimes if the
plugin to fix is trivial enough it might be workable.)''
That said, I'm starting to think that it won't be as simple as just
bypassing `'_builtins'`; for example one of your use-cases was the need to
change capabilities; if we bypass builtins then capabilities for default
post types can't be fine-tuned easily.
Maybe we should tackle each and every use-case instead of a more broad
sweeping hook?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/17447#comment:24>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list