LLMS_Blocks_Post_Instructors::register_meta()

Register custom meta fields.


Return Return

(void)


Top ↑

Source Source

File: libraries/lifterlms-blocks/includes/class-llms-blocks-post-instructors.php

	public function register_meta() {

		foreach ( $this->post_types as $post_type ) {

			register_rest_field(
				$post_type,
				'instructors',
				array(
					'get_callback'    => array( $this, 'get_callback' ),
					'update_callback' => array( $this, 'update_callback' ),
					'schema'          => null,
				)
			);

		}

	}

Top ↑

Changelog Changelog

Changelog
Version Description
1.7.1 Don't define a schema.
1.6.0 Use $this->post_types for loop.
1.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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