LLMS_Blocks_Post_Instructors::register_meta()
Register custom meta fields.
Contents
Return Return
(void)
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,
)
);
}
}
Expand full source code Collapse full source code View on GitHub
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. |