llms_get_post( WP_Post|int $post, mixed $error = false )
Retrieve the LLMS Post Model for a give post by ID or WP_Post Object
Description Description
Parameters Parameters
- $post
-
(Required) Instance of WP_Post or a WP Post ID.
- $error
-
(Optional) Determine what to return if the LLMS class isn't found. post = WP_Post falsy = false.
Default value: false
Return Return
(LLMS_Post_Model|WP_Post|null|false) LLMS_Post_Model extended object, null if WP get_post() fails, WP_Post if LLMS_Post_Model extended class isn't found and $error = 'post' false if LLMS_Post_Model extended class isn't found and $error != 'post'.
Source Source
File: includes/llms.functions.core.php
Changelog Changelog
Version | Description |
---|---|
4.10.1 | Made sure to only instantiate LifterLMS classes. |
3.3.0 | |
3.16.11 | Introduced. |