LLMS_Course::get_to_array_excluded_properties()
Get the properties that will be explicitly excluded from the array representation of the model.
Description Description
This stub can be overloaded by an extending class and the property list is filterable via the llms_get_{$this->model_post_type_excluded_to_array_properties} filter.
Return Return
(string[])
Source Source
File: includes/models/model.llms.course.php
public function get_students( $statuses = 'enrolled', $limit = 50, $skip = 0 ) { return llms_get_enrolled_students( $this->get( 'id' ), $statuses, $limit, $skip ); } /** * Retrieve course tags * * @since 3.3.0 * * @param array $args Array of args passed to wp_get_post_terms. * @return array */ public function get_tags( $args = array() ) { return wp_get_post_terms( $this->get( 'id' ), 'course_tag', $args ); } /** * Get the properties that will be explicitly excluded from the array representation of the model. * * This stub can be overloaded by an extending class and the property list is filterable via the * {@see llms_get_{$this->model_post_type}_excluded_to_array_properties} filter. * * @since 5.4.1 * * @return string[] */ protected function get_to_array_excluded_properties() { /** * Disable course property exclusion while running `toArray()`. * * This hook is intended to allow developers to retain the functionality implemented * prior to the introduction of this hook. * * The LifterLMS developers consider the presence of these properties to be a bug but
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
5.4.1 | Introduced. |