LLMS_Shortcode_Courses::get_output()
Retrieve the actual content of the shortcode
Description Description
$atts & $content are both filtered before being passed to get_output() output is filtered so the return of get_output() doesn’t need its own filter.
Return Return
(string)
Source Source
File: includes/shortcodes/class.llms.shortcode.courses.php
191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 | protected function get_output() { $this ->enqueue_script( 'llms-jquery-matchheight' ); ob_start(); // If we're outputting a "My Courses" list and we don't have a student output login info. if ( 'no' !== $this ->get_attribute( 'mine' ) && ! llms_get_student() ) { printf( __( 'You must be logged in to view this information. Click %1$shere%2$s to login.' , 'lifterlms' ), '<a href="' . llms_get_page_url( 'myaccount' ) . '">' , '</a>' ); } else { if ( 'no' !== $this ->get_attribute( 'mine' ) && ! $this ->get_post__in() ) { printf( '<p>%s</p>' , __( 'No courses found.' , 'lifterlms' ) ); } else { lifterlms_loop( $this ->get_wp_query() ); } } return ob_get_clean(); } |
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.30.2 | Output a message instead of the entire course catalog when "mine" is used and and current student is not enrolled in any courses. |
3.14.0 | Introduced. |