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.


Top ↑

Return Return

(boolean|LLMS_User_Achievement|LLMS_User_Certificate) Returns false for invalid post types. Otherwise returns the post model object.


Top ↑

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

	}


Top ↑

Changelog Changelog

Changelog
Version Description
6.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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