WP_REST_Post_Meta_Fields::__construct() WordPress Method
The WP_REST_Post_Meta_Fields::__construct() function sets up the fields used by the WP_REST_Post_Meta_Fields class.
WP_REST_Post_Meta_Fields::__construct( string $post_type ) #
Constructor.
Parameters
- $post_type
(string)(Required)Post type to register fields for.
Source
File: wp-includes/rest-api/fields/class-wp-rest-post-meta-fields.php
public function __construct( $post_type ) { $this->post_type = $post_type; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
4.7.0 | Introduced. |