LLMS_Blocks_Post_Types::__construct()
Constructor
Contents
Return Return
(void)
Source Source
File: libraries/lifterlms-blocks/includes/class-llms-blocks-post-types.php
public function __construct() { // Enable REST API for custom post types. add_filter( 'lifterlms_register_post_type_course', array( $this, 'enable_rest' ), 5 ); add_filter( 'lifterlms_register_post_type_lesson', array( $this, 'enable_rest' ), 5 ); add_filter( 'lifterlms_register_post_type_membership', array( $this, 'enable_rest' ), 5 ); // Enable REST API for custom post taxonomies. add_filter( 'lifterlms_register_taxonomy_args_course_cat', array( $this, 'enable_rest' ), 5 ); add_filter( 'lifterlms_register_taxonomy_args_course_tag', array( $this, 'enable_rest' ), 5 ); add_filter( 'lifterlms_register_taxonomy_args_course_track', array( $this, 'enable_rest' ), 5 ); add_filter( 'lifterlms_register_taxonomy_args_course_difficulty', array( $this, 'enable_rest' ), 5 ); add_filter( 'lifterlms_register_taxonomy_args_membership_cat', array( $this, 'enable_rest' ), 5 ); add_filter( 'lifterlms_register_taxonomy_args_membership_tag', array( $this, 'enable_rest' ), 5 ); // Setup block editor templates. add_filter( 'lifterlms_register_post_type_course', array( $this, 'add_course_template' ), 5 ); add_filter( 'lifterlms_register_post_type_membership', array( $this, 'add_membership_template' ), 5 ); add_filter( 'lifterlms_register_post_type_lesson', array( $this, 'add_lesson_template' ), 5 ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.7.0 | Add membership categories and tags to WordPress REST API. Add membership post type editor template. |
1.0.0 | Introduced. |