[wp-trac] [WordPress Trac] #17447: Add 'register_post_type_args' hook
WordPress Trac
noreply at wordpress.org
Wed Sep 16 16:12:14 UTC 2015
#17447: Add 'register_post_type_args' hook
------------------------------------+-----------------------------
Reporter: mikeschinkel | Owner: SergeyBiryukov
Type: enhancement | Status: reopened
Priority: normal | Milestone: 4.4
Component: Posts, Post Types | Version: 3.1
Severity: normal | Resolution:
Keywords: has-patch dev-feedback | Focuses:
------------------------------------+-----------------------------
Comment (by MikeSchinkel):
Replying to [comment:42 swissspidy]:
> Replying to [comment:40 MikeSchinkel]:
>
> > For example, I might need ''"Post"'' to be labeled ''"Story"'' or
''"Article."''
>
> There's the
[https://developer.wordpress.org/reference/hooks/post_type_labels_post_type/
post_type_labels] hook for that.
>
> > Or I might need to add additional ''"supports"'' attributes to
''"Post"'' and ''"Page."''
>
> You can use `add_post_type_support` for that.
Fair points. But those were just _some_ examples. Here are more:
- Setting `'public'` or any of the other visibility settings to be `false`
''(or `true`)'' for ''"Post"'' or ''"Page."''
- Changing the `'menu_position'`, `'menu_icon'`, `'capabilities'` for
''"Post"'' or ''"Page."''
- Changing `'rewrite'` or `'permalink_epmask'` for ''"Post"'' or
''"Page."''
- Making changes to `'attachment'`, `'revision'`, or `'nav_menu_item.'`
Since a programming can actually make any changes they need to builtins
without this hook, it seems like disabling access to builtins via the
hooks hobbles the hook for uses which I originally requested the hook
''(even though I did not explicitly state that)'' but for with very little
benefit.
If the overriding concern is that people will accidentally change builtins
they did not intend to change then I would ask for an additional
`'register_builtin_post_type_args'` hook to allow for explicit changes.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/17447#comment:43>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list