LLMS_Post_Instructors::__construct( mixed $post )
Constructor
Description Description
Parameters Parameters
- $post
-
(mixed) (Required) (obj) LLMS_Post_Model (obj) WP_Post (int) WP_Post 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. |
User Contributed Notes User Contributed Notes
Permalink: