LLMS_Blocks_Post_Visibility::register_meta()
Register custom meta fields.
Contents
Return Return
(void)
Source Source
File: libraries/lifterlms-blocks/includes/class-llms-blocks-post-visibility.php
public function register_meta() { foreach ( array( 'course', 'llms_membership' ) as $post_type ) { register_rest_field( $post_type, 'visibility', array( 'get_callback' => array( $this, 'get_callback' ), 'update_callback' => array( $this, 'update_callback' ), 'schema' => array( 'description' => __( 'Post visibility.', 'lifterlms' ), 'type' => 'object', 'context' => array( 'view', 'edit' ), 'properties' => array(), 'arg_options' => array( 'sanitize_callback' => null, 'validate_callback' => null, ), ), ) ); } }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.3.0 | Introduced. |