LLMS_Course::get_sales_page_url()
Get the URL to a WP Page or Custom URL when sales page redirection is enabled
Contents
Return Return
(string)
Source Source
File: includes/models/model.llms.course.php
}
/**
* Get course sections
*
* @since 3.0.0
* @since 3.24.0 Unknown.
*
* @param string $return Optional. Type of return [ids|posts|sections]. Default is 'sections'.
* @return int[]|WP_Post[]|LLMS_Section[] The type depends on value of `$return`.
*/
public function get_sections( $return = 'sections' ) {
$q = new WP_Query(
array(
'meta_key' => '_llms_order',
'meta_query' => array(
array(
'key' => '_llms_parent_course',
'value' => $this->id,
),
),
'order' => 'ASC',
'orderby' => 'meta_value_num',
'post_type' => 'section',
'posts_per_page' => 500,
)
);
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 3.23.0 | Unknown. |
| 3.20.0 | Introduced. |