LLMS_Post_Instructors::__construct( LLMS_Post_Model|WP_Post|int $post )
Constructor
Parameters Parameters
- $post
-
(LLMS_Post_Model|WP_Post|int) (Required) Post object or ID.
Source Source
File: includes/models/model.llms.post.instructors.php
public function __construct( $post ) { // Setup a post if post id of WP_Post is passed in. if ( is_numeric( $post ) || is_a( $post, 'WP_Post' ) ) { $post = llms_get_post( $post ); } // Double check we have an LLMS_Post. if ( is_subclass_of( $post, 'LLMS_Post_Model' ) ) { $this->post = $post; $this->id = $post->get( 'id' ); } }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.13.0 | Introduced. |