[wp-trac] [WordPress Trac] #40413: Handle `register_post_type` support's array
WordPress Trac
noreply at wordpress.org
Tue Apr 11 10:54:39 UTC 2017
#40413: Handle `register_post_type` support's array
-------------------------------+-----------------------------
Reporter: MaximeCulea | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Posts, Post Types | Version: trunk
Severity: normal | Keywords:
Focuses: |
-------------------------------+-----------------------------
When registering a post_type's support with the `add_post_type_support()`
function, it's possible to pass "extra" args to the support, because of
the `func_num_args` which will check if there is a third arg.
While when using `register_post_type()`, you can't pass any extra args to
a support, because it will be stripped by how WP_Post_Type->add_supports
[https://github.com/WordPress/WordPress/blob/master/wp-includes/class-wp-
post-type.php#L549 works].
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40413>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list