LLMS_Course::get_difficulty( string $field = 'name' )
Get Difficulty
Parameters Parameters
- $field
-
(string) (Optional) Which field to return from the available term fields. Any public variables from a WP_Term object are acceptable: term_id, name, slug, and more. Default is 'name'.
Default value: 'name'
Return Return
(string)
Source Source
File: includes/models/model.llms.course.php
*/ public function get_difficulty( $field = 'name' ) { $terms = get_the_terms( $this->get( 'id' ), 'course_difficulty' ); if ( false === $terms ) { return ''; } $difficulties = wp_list_pluck( $terms, $field ); return implode( ', ', $difficulties ); } /** * Retrieve course instructor information * * @since 3.13.0
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.24.0 | Unknown. |
1.0.0 | Introduced. |