LLMS_Student::mark_favorite( int $object_id, string $object_type )

Mark a lesson favorite for the given user.


Description Description

See also See also


Top ↑

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'.


Top ↑

Return Return

(bool)


Top ↑

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


Top ↑

Changelog Changelog

Changelog
Version Description
7.5.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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