Uses
Uses | Description |
---|---|
wp-includes/class-wp-post-type.php: WP_Post_Type::set_props() | Sets post type properties. |
Constructor.
Will populate object properties from the provided arguments and assign other default properties based on that information.
(string) (Required) Post type key.
(array|string) (Optional) Array or string of arguments for registering a post type.
Default value: array()
File: wp-includes/class-wp-post-type.php
public function __construct( $post_type, $args = array() ) { $this->name = $post_type; $this->set_props( $args ); }
Version | Description |
---|---|
4.6.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_post_type/__construct