[wp-trac] [WordPress Trac] #17447: Add 'register_post_type_args' hook
WordPress Trac
noreply at wordpress.org
Sun Feb 9 22:48:41 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 nickciske):
+1
Here's my use case:
Using a 3rd party plugin that adds a CPT to WordPress... but the developer
uses the built in 'post' capabilities -- which means it's difficult to
have a user who can only edit that CPT (but not posts). It's easy for the
dev and most plugin users, but doesn't use the WP capabilities system to
allow the site owner to make those decisions.
In this case the 3rd party plugin had a filter wrapped around it's
arguments before they were passed to register_post_type, but 99% of CPT
plugins I've seen in the repo are not this considerate. Having this in
core would be really useful to tweak 3rd party CPTs without having to fork
the core plugin.
In addition, being able to change labels and other options while using a
'common' plugin (like Justin Tadlock's portfolio plugin) would increase
standardization without hurting customizability. E.g., why fork the entire
plugin just to rename them "Samples"?
As for fragility, anyone changing CPT arguments via a filter should know
the risks - muck up the arguments and you'll break things, but that's the
case with any core filter.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/17447#comment:19>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list