| 1 |
<?php |
| 2 |
/** |
| 3 |
* Featured Courses Shortcode. |
| 4 |
* |
| 5 |
* @author ThimPress |
| 6 |
* @category Shortcodes |
| 7 |
* @package Learnpress/Shortcodes |
| 8 |
* @version 3.0.0 |
| 9 |
* @extends LP_Abstract_Shortcode_Courses |
| 10 |
*/ |
| 11 |
|
| 12 |
/** |
| 13 |
* Prevent loading this file directly |
| 14 |
*/ |
| 15 |
defined( 'ABSPATH' ) || exit(); |
| 16 |
|
| 17 |
if ( ! class_exists( 'LP_Shortcode_Featured_Courses' ) ) { |
| 18 |
|
| 19 |
/** |
| 20 |
* Class LP_Shortcode_Featured_Courses |
| 21 |
*/ |
| 22 |
class LP_Shortcode_Featured_Courses extends LP_Abstract_Shortcode_Courses { |
| 23 |
/** |
| 24 |
* LP_Featured_Courses_Shortcode constructor. |
| 25 |
* |
| 26 |
* @param mixed $atts |
| 27 |
*/ |
| 28 |
public function __construct( $atts = '' ) { |
| 29 |
parent::__construct( $atts ); |
| 30 |
} |
| 31 |
|
| 32 |
/** |
| 33 |
* Query courses. |
| 34 |
* |
| 35 |
* @since 3.0.0 |
| 36 |
*/ |
| 37 |
public function query_courses() { |
| 38 |
$this->_query = $this->curd->get_featured_courses( |
| 39 |
array( |
| 40 |
'limit' => $this->_atts['limit'], |
| 41 |
'order_by' => $this->_atts['order_by'], |
| 42 |
'order' => $this->_atts['order'], |
| 43 |
) |
| 44 |
); |
| 45 |
} |
| 46 |
} |
| 47 |
} |
| 48 |
|