diff --git a/wp-content/themes/academyAfrica/includes/widgets/featured_courses.php b/wp-content/themes/academyAfrica/includes/widgets/featured_courses.php index b8d34d2b..631e7906 100644 --- a/wp-content/themes/academyAfrica/includes/widgets/featured_courses.php +++ b/wp-content/themes/academyAfrica/includes/widgets/featured_courses.php @@ -13,7 +13,7 @@ public function get_name() public function get_style_depends() { - return ['academy-africa-featured-courses','academy-africa-learndash-course-grid']; + return ['academy-africa-featured-courses', 'academy-africa-learndash-course-grid']; } public function get_script_depends() @@ -36,40 +36,6 @@ public function get_categories() return ['academy-africa']; } - public function concatenate_with_count($array) - { - $count = count($array); - return $count === 0 ? '' : ($count === 1 ? $array[0] : $array[0] . ' + ' . ($count - 1) . ' more'); - } - - - public function get_courses() - { - return [ - [ - 'title' => 'Introduction to Data Visualisation with Flourish', - 'providers' => ['code for africa'], - 'students_count' => 75, - 'price' => 'Free', - 'image' => '/wp-content/plugins/academy-africa/includes/assets/images/user.svg', - ], - [ - 'title' => 'Fact-checking for Social Media', - 'providers' => ['pesacheck'], - 'students_count' => 75, - 'price' => 'Free', - 'image' => '/wp-content/plugins/academy-africa/includes/assets/images/user.svg', - ], - [ - 'title' => 'Drone Journalism', - 'providers' => ['Sensors Africa', 'pesacheck', 'code for africa'], - 'students_count' => 75, - 'price' => 'Free', - 'image' => '/wp-content/plugins/academy-africa/includes/assets/images/user.svg', - ], - ];; - } - protected function register_controls() { $this->start_controls_section( @@ -200,48 +166,12 @@ protected function register_controls() $this->end_controls_section(); } - public function get_current_user() - { - return [ - 'first_name' => 'First Name Middle Name', - 'last_name' => 'Last Name' - ]; - } - - public function get_academy_head() - { - return [ - 'name' => 'First Name Middle Name', - 'role' => 'Academy Head', - 'signature' => '/wp-content/plugins/academy-africa/includes/assets/images/signature.png', - 'date' => 'MM/DD/YYYY', - ]; - } - protected function render() { - // $course_list = do_shortcode('[ld_course_list array=true]'); - // print_r($course_list); - $settings = $this->get_settings_for_display(); - $courses = $this->get_courses(); $title = $settings['title']; $description = $settings['description']; - $courses_link_label = $settings['link_to_courses_label']; - $courses_link_url = $settings['link_to_courses']; - $want_to_learn = $settings['want_to_learn']; - $banner_description = $settings['banner_description']; - $certificate_course = $settings['certificate_course']; - $certificate_description = $settings['certificate_description']; - $presented_to = $settings['presented_to']; - $certificate_type = $settings['certificate_type']; - $certificate_title = $settings['certificate_title']; - $user = $this->get_current_user(); - $art_board = "/wp-content/plugins/academy-africa/includes/assets/images/artboard.png"; - $company_image = "/wp-content/plugins/academy-africa/includes/assets/images/cfa_bw.png"; - $company_name = "academy.Africa"; - $academy_head = $this->get_academy_head(); ?> - -