WP_REST_Meta_Fields::register_field

Advertisement

Summery Summery

Registers the meta field.

Syntax Syntax

WP_REST_Meta_Fields::register_field()

Source Source

File: wp-includes/rest-api/fields/class-wp-rest-meta-fields.php

	public function register_field() {
		register_rest_field(
			$this->get_rest_field_type(),
			'meta',
			array(
				'get_callback'    => array( $this, 'get_value' ),
				'update_callback' => array( $this, 'update_value' ),
				'schema'          => $this->get_field_schema(),
			)
		);
	}

Advertisement

Changelog Changelog

Changelog
Version Description
4.7.0 Introduced.

See also See also

Advertisement

Leave a Reply