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.


Top ↑

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' );
		}

	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.13.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.