[wp-trac] [WordPress Trac] #40413: Handle `register_post_type` support's array
WordPress Trac
noreply at wordpress.org
Tue Sep 17 19:57:28 UTC 2019
#40413: Handle `register_post_type` support's array
---------------------------------------------+----------------------
Reporter: MaximeCulea | Owner: desrosj
Type: enhancement | Status: closed
Priority: normal | Milestone: 5.3
Component: Posts, Post Types | Version: 2.9
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests commit | Focuses:
---------------------------------------------+----------------------
Changes (by desrosj):
* status: reviewing => closed
* resolution: => fixed
Comment:
In [changeset:"46160" 46160]:
{{{
#!CommitTicketReference repository="" revision="46160"
Posts, Post Types: Allow support arguments to be specified when
registering post types.
The `add_post_type_support()` function accepts an optional third parameter
that allows extra arguments to be supplied to configure post type support
for a given feature. However, because of how `register_post_type()` and
`WP_Post_Type->add_supports()` work, it is currently impossible to pass
these additional arguments when initially registering a post type with
`register_post_type()`.
This change makes it possible to supply additional arguments for a feature
using the `supports` argument of `register_post_type()`.
Props MaximeCulea, seuser, desrosj, johnbillion.
Fixes #40413.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40413#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list