Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
LLMS_Controller_Awards::get_object( integer $post_id )
Retrieves the award post model for the given WP_Post.
Parameters Parameters
- $post_id
-
(integer) (Required) WP_Post ID.
Return Return
(boolean|LLMS_User_Achievement|LLMS_User_Certificate) Returns false
for invalid post types. Otherwise returns the post model object.
Source Source
File: includes/controllers/class-llms-controller-awards.php
private static function get_object( $post_id ) { $post_type = get_post_type( $post_id ); if ( ! in_array( $post_type, self::$post_types, true ) ) { return false; } $class_name = sprintf( 'LLMS_User_%s', ucwords( self::strip_prefix( $post_type ) ) ); return new $class_name( $post_id ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
6.0.0 | Introduced. |