Title: posts – Make WordPress Core

---

#  Tag Archives: posts

 [  ](https://profiles.wordpress.org/ocean90/) [Dominik Schilling](https://profiles.wordpress.org/ocean90/)
12:13 pm _on_ July 13, 2016     
Tags: [4.6 ( 140 )](https://make.wordpress.org/core/tag/4-6/),
[dev-notes ( 620 )](https://make.wordpress.org/core/tag/dev-notes/), posts   

# 󠀁[WP_Post_Type in 4.6](https://make.wordpress.org/core/2016/07/13/wp_post_type-in-4-6/)󠁿

WordPress 4.6 will introduce a new `WP_Post_Type` class. This changes the global`
$wp_post_types` to an array of `WP_Post_Type` objects. `WP_Post_Type` provides methods
to handle post type supports, rewrite rules, metaMeta Meta is a term that refers
to the inside workings of a group. For us, this is the team that works on internal
WordPress sites like WordCamp Central and Make WordPress. boxes, hooksHooks In WordPress
theme and development, hooks are functions that can be applied to an action or a
Filter in WordPress. Actions are functions performed when a certain event occurs
in WordPress. Filters allow you to modify certain functions. Arguments used to hook
both filters and actions look the same., and taxonomies. These methods are used 
internally by [`register_post_type()`](https://developer.wordpress.org/reference/functions/register_post_type/)
and [`unregister_post_type()`](https://developer.wordpress.org/reference/functions/unregister_post_type/).
Each post type argument is now a property of `WP_Post_Type`.

The following functions have been changed to return a `WP_Post_Type` object:

 * `register_post_type()`
 * `get_post_type_object()`

The following hook parameters are now a `WP_Post_Type` object:

 * The second parameter `$post_type` of `xmlrpc_prepare_post_type`.
 * The second parameter `$post_type_object` of `registered_post_type`.
 * The third parameter `$post_type` of `nav_menu_items_{$post_type_name}`.

The following function accepts a `WP_Post_Type` object now too:

 * `is_post_type_viewable()`

For more background on the change, see [#36217](https://core.trac.wordpress.org/ticket/36217).

Note that there are plans to introduce a `WP_Taxonomy` class as well, see [#36224](https://core.trac.wordpress.org/ticket/36224).

[#4-6](https://make.wordpress.org/core/tag/4-6/), [#dev-notes](https://make.wordpress.org/core/tag/dev-notes/),
[#posts](https://make.wordpress.org/core/tag/posts/)