This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Rest_Api::register_rest_field()

Register new Rest API fields


Source

File: includes/libs/rest-api/rest-api.class.php

	private function register_rest_field(){

		$objects = array();
		$post_types = Plugin::instance()->get_registered_post_types()->get_post_types();
		foreach( $post_types as $post_type ){
			$objects[] = $post_type->get_post_type()->name;
		}

		register_rest_field(
			$objects,
			'vimeo_video',
			[
				'get_callback' => [ $this, 'register_field' ],
				//'update_callback' => NULL,
				//'schema' => array()
			]
		);
	}

Start your video site now!

Manage and coordinate your Vimeo channels, albums or videos with your WordPress website. Perfect fit for membership, portfolio, online courses or any type of video collection.

Get Vimeotheque PRO!