[wp-trac] [WordPress Trac] #49644: Move logic from register_post_type() into WP_Post_Type->register()
WordPress Trac
noreply at wordpress.org
Fri Mar 13 17:16:34 UTC 2020
#49644: Move logic from register_post_type() into WP_Post_Type->register()
------------------------------------+------------------------------
Reporter: MikeSchinkel | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Posts, Post Types | Version: 5.4
Severity: normal | Resolution:
Keywords: has-patch dev-feedback | Focuses:
------------------------------------+------------------------------
Comment (by MikeSchinkel):
So I proactively updated the patch to save the WP_Error to
`$post_type->last_error`.
Also added a 2nd parameter to the `'unregistered_post_type'` hook and
moved the `$removed` parameter I added in the first patch to the 3rd
parameter position.
Finally, I added PHPDoc headers that I missed in the first patch.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49644#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list