LLMS_Student::mark_favorite( int $object_id, string $object_type )
Mark a lesson favorite for the given user.
Description Description
See also See also
- llms_mark_favorite(): calls this function without having to instantiate the LLMS_Student class first.
Parameters Parameters
- $object_id
-
(int) (Required) WP Post ID of the object to mark/unmark as favorite.
- $object_type
-
(string) (Required) The object type, currently only 'lesson'.
Return Return
(bool)
Source Source
File: includes/models/model.llms.student.php
public function mark_favorite( $object_id, $object_type ) {
// Short circuit if it's already favorited.
if ( $this->is_favorite( $object_id, $object_type ) ) {
return true;
}
return $this->update_favorite_status( 'favorite', $object_id, $object_type );
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 7.5.0 | Introduced. |