| @@ -9,10 +9,8 @@ | ||
| 9 | 9 | */ |
| 10 | 10 | |
| 11 | 11 | namespace TUTOR; |
| 12 | 12 | |
| 13 | -use Tutor\Models\CourseModel; | |
| 14 | - | |
| 15 | 13 | if ( ! defined( 'ABSPATH' ) ) { |
| 16 | 14 | exit; |
| 17 | 15 | } |
| 18 | 16 | |
| @@ -31,12 +29,10 @@ | ||
| 31 | 29 | */ |
| 32 | 30 | public function __construct() { |
| 33 | 31 | parent::__construct( |
| 34 | 32 | 'tutor_course_widget', // Base ID. |
| 35 | - _x( 'Tutor Course', 'widget title', 'tutor' ), | |
| 36 | - array( | |
| 37 | - 'description' => _x( 'Display courses wherever widget support is available.', 'widget description', 'tutor' ), | |
| 38 | - ) | |
| 33 | + esc_html__( 'Tutor Course', 'tutor' ), // Name. | |
| 34 | + array( 'description' => esc_html__( 'Display courses wherever widget support is available.', 'tutor' ) ) // Args. | |
| 39 | 35 | ); |
| 40 | 36 | } |
| 41 | 37 | |
| 42 | 38 | /** |
| @@ -103,9 +99,9 @@ | ||
| 103 | 99 | $category = (array) explode( ',', $a['category'] ); |
| 104 | 100 | |
| 105 | 101 | $a['tax_query'] = array( |
| 106 | 102 | array( |
| 107 | - 'taxonomy' => CourseModel::COURSE_CATEGORY, | |
| 103 | + 'taxonomy' => 'course-category', | |
| 108 | 104 | 'field' => 'term_id', |
| 109 | 105 | 'terms' => $category, |
| 110 | 106 | 'operator' => 'IN', |
| 111 | 107 | ), |