LLMS_REST_Posts_Controller::llms_post_class_from_post_type()
Get the llms post model class from the controller post type.
Return Return
(string|bool) The llms post model class name if it exists or FALSE if it doesn't.
Source Source
File: libraries/lifterlms-rest/includes/abstracts/class-llms-rest-posts-controller.php
protected function llms_post_class_from_post_type() { if ( isset( $this->llms_post_class ) ) { return $this->llms_post_class; } $post_type = explode( '_', str_replace( 'llms_', '', $this->post_type ) ); $class = 'LLMS'; foreach ( $post_type as $part ) { $class .= '_' . ucfirst( $part ); } if ( class_exists( $class ) ) { $this->llms_post_class = $class; } else { $this->llms_post_class = false; } return $this->llms_post_class; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.0.0-beta.9 | Introduced. |