LLMS_Awards_Query::get_object( int|WP_Post $post )
Retrieve the object for a given result.
Parameters Parameters
- $post
-
(int|WP_Post) (Required) Post object or ID.
Return Return
(LLMS_User_Achievement|LLMS_User_Certificate|null) Returns the award object or null
for unexpected post types.
Source Source
File: includes/class-llms-awards-query.php
protected function get_object( $post ) { $post_type = get_post_type( $post ); if ( 'llms_my_achievement' === $post_type ) { return new LLMS_User_Achievement( $post ); } elseif ( 'llms_my_certificate' === $post_type ) { return llms_get_certificate( $post ); } return null; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
6.0.0 | Introduced. |