• About WordPress
    • About WordPress
    • WordPress.org
    • Documentation
    • Support
    • Feedback
  • Log In
  • Register
WordPress.org
WordPress.org
  • Plugins
  • Themes
  • Patterns
  • Learn
  • Support
    • Documentation
    • Forums
  • News
  • About
  • Get Involved
    • Five for the Future
  • Showcase
  • Mobile
  • Hosting
  • Openverse
  • Get WordPress
Get WordPress

Code Reference

Skip to content
Filter by type:
Search
Browse: Home / Reference / Classes / WP_REST_Post_Meta_Fields / WP_REST_Post_Meta_Fields::__construct()

WP_REST_Post_Meta_Fields::__construct( string $post_type )

Constructor.

Contents

  • Parameters
  • Source
  • Related
    • Used By
  • Changelog
  • User Contributed Notes

Parameters

$post_type

(string) (Required) Post type to register fields for.


Top ↑

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 code Collapse full source code View on Trac View on GitHub


Top ↑

Related

Top ↑

Used By

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

Constructor.


Top ↑

Changelog

Changelog
Version Description
4.7.0 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.

  • About
  • News
  • Hosting
  • Donate
  • Support
  • Developers
  • Get Involved
  • Learn
  • Showcase
  • Plugins
  • Themes
  • Patterns
  • WordCamp
  • WordPress.TV
  • BuddyPress
  • bbPress
  • WordPress.com
  • Matt
  • Privacy
  • Public Code
WordPress.org
WordPress.org
  • Visit our Facebook page
  • Visit our Twitter account
Code is Poetry

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.