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_Engagement_Handler::handle( string $type, array $args )
Handle validation and creation of an earned achievement or certificate.
Parameters Parameters
- $type
-
(string) (Required) Type of engagement, either "achievement" or "certificate".
- $args
-
(array) (Required) Indexed array of arguments.
- (int) WP_User ID.
- '1'
(int) WP_Post ID of the achievement or certificate template post. - '2'
(int|string) WP_Post ID of the related post that triggered the award or an empty string. - '3'
(int) WP_Post ID of the engagement post.
Return Return
(WP_Error[]|LLMS_User_Achiemvent|LLMS_User_Certificate) An array of errors or the earned engagement object
Source Source
File: includes/class-llms-engagement-handler.php
private static function handle( $type, $args ) { $can_process = self::can_process( $type, ...$args ); if ( true !== $can_process ) { return $can_process; } $dupcheck = self::dupcheck( $type, ...$args ); if ( true !== $dupcheck ) { return array( $dupcheck ); } return self::create( $type, ...$args ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
6.0.0 | Introduced. |