LLMS_Shortcodes::course_info( array $atts )
Output various pieces of metadata about a course
Description Description
Parameters Parameters
- $atts
-
(array) (Required) array of user-submitted shortcode attributes
Return Return
(string)
Source Source
File: includes/shortcodes/class.llms.shortcodes.php
public static function course_info( $atts ) { extract( shortcode_atts( array( 'date_format' => 'F j, Y', // if $type is date, a custom date format can be supplied 'id' => get_the_ID(), 'key' => '', 'type' => '', // date, price ), $atts, 'lifterlms_course_info' ) ); $ret = ''; if ( $key ) { $course = new LLMS_Course( $id ); switch ( $type ) { case 'date': $ret = $course->get_date( $key, $date_format ); break; case 'price': $ret = $course->get_price( $key ); break; default: $ret = $course->get( $key ); } } return apply_filters( 'llms_shortcode_course_info', $ret, $atts ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |