ClassicPress logo
Skip to content
Filter by type:

Browse:

  • Home
  • Classes
  • WP_REST_Post_Meta_Fields
  • WP_REST_Post_Meta_Fields::__construct()

WP_REST_Post_Meta_Fields::__construct( string $post_type )

Constructor.


Parameters

$post_type

(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 Source Code View on GitHub


Related

Used By

Used By
Used By Description
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php: WP_REST_Posts_Controller::__construct()

Constructor.


Changelog

Changelog
Version Description
4.7.0 Introduced.
ClassicPress Documentation • Made with ClassicPress
Privacy Policy