LLMS_Lesson::is_available()
Determine if an element is available based on drip settings If no settings, this will return true if the posts’s published date is in the past
Description Description
Return Return
(boolean)
Source Source
File: includes/models/model.llms.lesson.php
public function is_available() { $drip_method = $this->get( 'drip_method' ); // drip is no enabled, so the element is available if ( ! $drip_method ) { return true; } $available = $this->get_available_date( 'U' ); $now = llms_current_time( 'timestamp' ); return ( $now > $available ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.16.0 | Introduced. |
User Contributed Notes User Contributed Notes
Permalink: