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. Use LLMS_Student->mark_favorite() instead.
LLMS_Student::insert_favorite_postmeta( int $object_id )
Add student postmeta data when lesson is favorited.
Contents
Description Description
See also See also
- LLMS_Student->mark_favorite()
Parameters Parameters
- $object_id
-
(int) (Required) WP Post ID of the object to mark/unmark as favorite.
Return Return
(bool)
Source Source
File: includes/models/model.llms.student.php
private function insert_favorite_postmeta( $object_id ) {
$update = llms_update_user_postmeta( $this->get_id(), $object_id, '_favorite', true );
// Returns boolean if postmeta update is successful.
return is_array( $update ) ? false : true;
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 7.5.0 | Introduced. |