start_controls_section( 'course_list_layout_content', [ 'label' => __('Layout', 'acadlix-addon-for-elementor'), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'course_list_layout_column', array( 'label' => __('Columns', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SELECT, 'default' => '3', 'options' => array( '1' => __('1', 'acadlix-addon-for-elementor'), '2' => __('2', 'acadlix-addon-for-elementor'), '3' => __('3', 'acadlix-addon-for-elementor'), '4' => __('4', 'acadlix-addon-for-elementor'), ), ) ); $this->add_control( 'course_list_layout_perpage', array( 'label' => __('Course Per Page', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::NUMBER, 'min' => 1, 'max' => 100, 'step' => 1, 'default' => 6, ) ); $this->add_control( 'course_list_layout_divider', [ 'type' => Controls_Manager::DIVIDER, ] ); $this->add_control( 'course_list_layout_image', array( 'label' => __('Show Image', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SWITCHER, 'label_on' => __('Show', 'acadlix-addon-for-elementor'), 'label_off' => __('Hide', 'acadlix-addon-for-elementor'), 'return_value' => 'yes', 'default' => 'yes', ) ); $this->add_control( 'course_list_layout_difficulty_level', array( 'label' => __('Show Difficulty Level', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SWITCHER, 'label_on' => __('Show', 'acadlix-addon-for-elementor'), 'label_off' => __('Hide', 'acadlix-addon-for-elementor'), 'return_value' => 'yes', 'default' => 'yes', ) ); $this->add_control( 'course_list_layout_title', array( 'label' => __('Show Title', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SWITCHER, 'label_on' => __('Show', 'acadlix-addon-for-elementor'), 'label_off' => __('Hide', 'acadlix-addon-for-elementor'), 'return_value' => 'yes', 'default' => 'yes', ) ); $this->add_control( 'course_list_layout_author', array( 'label' => __('Show Author', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SWITCHER, 'label_on' => __('Show', 'acadlix-addon-for-elementor'), 'label_off' => __('Hide', 'acadlix-addon-for-elementor'), 'return_value' => 'yes', 'default' => 'yes', ) ); $this->add_control( 'course_list_layout_wishlist', array( 'label' => __('Show Wishlist', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SWITCHER, 'label_on' => __('Show', 'acadlix-addon-for-elementor'), 'label_off' => __('Hide', 'acadlix-addon-for-elementor'), 'return_value' => 'yes', 'default' => 'yes', ) ); $this->add_control( 'course_list_layout_pagination', array( 'label' => __('Show Pagination', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SWITCHER, 'label_on' => __('Show', 'acadlix-addon-for-elementor'), 'label_off' => __('Hide', 'acadlix-addon-for-elementor'), 'return_value' => 'yes', 'default' => 'yes', ) ); $this->add_control( 'course_list_layout_divider_2', [ 'type' => Controls_Manager::DIVIDER, ] ); $this->add_control( 'course_list_author_link', array( 'label' => __('Author Link', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SELECT, 'options' => array( 'new_window' => 'New Window', 'same_window' => 'Same Window', ), 'default' => 'same_window', ) ); $this->add_control( 'course_list_course_link', array( 'label' => __('Course Link', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SELECT, 'options' => array( 'new_window' => 'New Window', 'same_window' => 'Same Window', ), 'default' => 'same_window', ) ); $this->end_controls_section(); $this->start_controls_section( 'course_list_rating_content', [ 'label' => __('Rating', 'acadlix-addon-for-elementor'), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'course_list_rating_show', array( 'label' => __('Show Rating', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SWITCHER, 'label_on' => __('Show', 'acadlix-addon-for-elementor'), 'label_off' => __('Hide', 'acadlix-addon-for-elementor'), 'return_value' => 'yes', 'default' => 'no', ) ); $this->add_control( 'course_list_rating_divider', [ 'type' => \Elementor\Controls_Manager::DIVIDER, ] ); $selector = '{{WRAPPER}} .aelms-course-card-rating'; $this->add_responsive_control( 'course_list_rating_display', [ 'label' => __('Display', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SELECT, 'options' => [ 'block' => __('Block', 'acadlix-addon-for-elementor'), 'flex' => __('Flex', 'acadlix-addon-for-elementor'), ], 'selectors' => [ $selector => 'display: {{VALUE}};', ], 'default' => 'flex', ] ); $this->add_responsive_control( 'course_list_rating_flex_direction', [ 'label' => __('Flex Direction', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SELECT, 'options' => [ 'row' => __('Row', 'acadlix-addon-for-elementor'), 'row-reverse' => __('Row Reverse', 'acadlix-addon-for-elementor'), 'column' => __('Column', 'acadlix-addon-for-elementor'), 'column-reverse' => __('Column Reverse', 'acadlix-addon-for-elementor'), ], 'selectors' => [ $selector => 'flex-direction: {{VALUE}};', ], 'default' => 'row', 'condition' => [ 'course_list_rating_display' => 'flex', ], ] ); $this->add_responsive_control( 'course_list_rating_justify_content', [ 'label' => __('Justify Content', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SELECT, 'options' => [ 'flex-start' => __('Flex Start', 'acadlix-addon-for-elementor'), 'flex-end' => __('Flex End', 'acadlix-addon-for-elementor'), 'center' => __('Center', 'acadlix-addon-for-elementor'), 'space-between' => __('Space Between', 'acadlix-addon-for-elementor'), 'space-around' => __('Space Around', 'acadlix-addon-for-elementor'), 'space-evenly' => __('Space Evenly', 'acadlix-addon-for-elementor'), 'stretch' => __('Stretch', 'acadlix-addon-for-elementor'), ], 'selectors' => [ $selector => 'justify-content: {{VALUE}};', ], 'default' => 'flex-start', 'condition' => [ 'course_list_rating_display' => 'flex', ], ] ); $this->add_responsive_control( 'course_list_rating_align_items', [ 'label' => __('Align Items', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SELECT, 'options' => [ 'flex-start' => __('Flex Start', 'acadlix-addon-for-elementor'), 'flex-end' => __('Flex End', 'acadlix-addon-for-elementor'), 'center' => __('Center', 'acadlix-addon-for-elementor'), 'baseline' => __('Baseline', 'acadlix-addon-for-elementor'), 'stretch' => __('Stretch', 'acadlix-addon-for-elementor'), ], 'selectors' => [ $selector => 'align-items: {{VALUE}};', ], 'default' => 'center', 'condition' => [ 'course_list_rating_display' => 'flex', ], ] ); $this->add_responsive_control( 'course_list_rating_gap', [ 'label' => __('Gap', 'acadlix-addon-for-elementor'), 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => ['px', '%', 'em', 'rem', 'custom'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'default' => [ 'unit' => 'px', 'size' => 2, ], 'selectors' => [ "{$selector}" => 'gap: {{SIZE}}{{UNIT}};', ], 'condition' => [ 'course_list_rating_display' => 'flex', ], ] ); $this->end_controls_section(); $this->start_controls_section( 'course_list_query_content', [ 'label' => __('Query', 'acadlix-addon-for-elementor'), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'course_list_layout_exclude_course_bundle', array( 'label' => __('Exclude Course bundle', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SWITCHER, 'label_on' => __('Show', 'acadlix-addon-for-elementor'), 'label_off' => __('Hide', 'acadlix-addon-for-elementor'), 'return_value' => 'yes', 'default' => 'no', ) ); $course_categories = aelms_get_course_categories(); $course_tags = aelms_get_course_tags(); $authors = aelms_get_authors(); $this->start_controls_tabs('course_list_query_tabs'); $this->start_controls_tab( 'course_list_query_include_tab', [ 'label' => __('Include', 'acadlix-addon-for-elementor'), ] ); $this->add_control( 'course_list_include_by_categories', array( 'label' => __('Categories', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SELECT2, 'multiple' => true, 'options' => $course_categories, 'default' => array(), ) ); $this->add_control( 'course_list_include_by_tags', array( 'label' => __('Tags', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SELECT2, 'multiple' => true, 'options' => $course_tags, 'default' => array(), ) ); $this->add_control( 'course_list_include_by_authors', array( 'label' => __('Authors', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SELECT2, 'multiple' => true, 'options' => $authors, 'default' => array(), ) ); $this->end_controls_tab(); $this->start_controls_tab( 'course_list_query_exclude_tab', [ 'label' => __('Exclude', 'acadlix-addon-for-elementor'), ] ); $this->add_control( 'course_list_exclude_by_categories', array( 'label' => __('Categories', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SELECT2, 'multiple' => true, 'options' => $course_categories, 'default' => array(), ) ); $this->add_control( 'course_list_exclude_by_tags', array( 'label' => __('Tags', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SELECT2, 'multiple' => true, 'options' => $course_tags, 'default' => array(), ) ); $this->add_control( 'course_list_exclude_by_authors', array( 'label' => __('Authors', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SELECT2, 'multiple' => true, 'options' => $authors, 'default' => array(), ) ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->add_control( 'course_list_inculde_exclude_divider', array( 'type' => Controls_Manager::DIVIDER, ) ); $this->add_control( 'course_list_orderby', array( 'label' => __('OrderBy', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SELECT, 'options' => array( 'post_date' => 'Date', 'post_title' => 'Title', ), 'default' => 'post_date', ) ); $this->add_control( 'course_list_order', array( 'label' => __('Order', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SELECT, 'options' => array( 'asc' => 'ASC', 'desc' => 'DESC', ), 'default' => 'desc', ) ); $this->end_controls_section(); $this->start_controls_section( 'course_list_pagination_content', [ 'label' => __('Pagination', 'acadlix-addon-for-elementor'), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'course_list_pagination_type', array( 'label' => __('Pagination', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SELECT, 'default' => 'number_prev_next', 'options' => array( 'prev_next' => __('Previous/Next', 'acadlix-addon-for-elementor'), 'number_prev_next' => __('Numbers + Previous/Next', 'acadlix-addon-for-elementor'), 'numbers' => __('Numbers', 'acadlix-addon-for-elementor'), ), ) ); $this->add_control( 'course_list_pagination_page_limit', array( 'label' => __('Page Limit', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::NUMBER, 'min' => 1, 'max' => 20, 'step' => 1, 'default' => 5, 'condition' => [ 'course_list_pagination_type' => ['numbers', 'number_prev_next'], ], ) ); $this->add_control( 'course_list_pagination_previous_label', array( 'label' => __('Previous Label', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::TEXT, 'default' => __('« Previous', 'acadlix-addon-for-elementor'), ) ); $this->add_control( 'course_list_pagination_next_label', array( 'label' => __('Next Label', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::TEXT, 'default' => __('Next »', 'acadlix-addon-for-elementor'), ) ); $this->add_control( 'course_list_pagination_alignment', array( 'label' => __('Alignment', 'acadlix-addon-for-elementor'), 'type' => \Elementor\Controls_Manager::CHOOSE, 'options' => array( 'flex-start' => array( 'title' => __('Left', 'acadlix-addon-for-elementor'), 'icon' => 'eicon-text-align-left', ), 'center' => array( 'title' => __('Center', 'acadlix-addon-for-elementor'), 'icon' => 'eicon-text-align-center', ), 'flex-end' => array( 'title' => __('Right', 'acadlix-addon-for-elementor'), 'icon' => 'eicon-text-align-right', ), ), 'default' => 'center', 'selectors' => array( '{{WRAPPER}} .aelms-course-list-pagination' => 'justify-content:{{VALUE}};', ), ) ); $this->end_controls_section(); } protected function register_style_controls() { $wrapper = '{{WRAPPER}} .aelms-course-list-container'; $items_selector = "{$wrapper} .aelms-course-list-items-container"; $card = "{$wrapper} .aelms-course-card"; $card_body = "{$card} .aelms-course-card-body"; $card_footer = "{$card_body} .aelms-course-card-footer"; $image = "{$card} .aelms-course-card-image img"; $difficulty_level = "{$card} .aelms-course-card-difficulty-level"; $rating = "{$card} .aelms-course-card-rating"; $rating_icon = "{$rating} .aelms-course-rating-stars i"; $rating_value = "{$rating} .aelms-course-rating-value"; $title = "{$card} .aelms-course-card-title"; $author = "{$card} .aelms-course-card-author"; $footer = "{$card} .aelms-course-card-footer"; $price = "{$card} .aelms-course-card-price"; $sale_price = "{$card_body} .aelms-course-card-sale-price"; $regular_price = "{$card_body} .aelms-course-card-regular-price"; $action_buttons = "{$card_footer} .aelms-course-action-buttons"; $action_button = "{$card_footer} .aelms-action-button"; $wishlist = "{$card_footer} .aelms-course-card-wishlist"; $pagination = "{$wrapper} .aelms-course-list-pagination"; $pagination_link = "{$pagination} .aelms-pagination-link"; $pagination_current = "{$pagination} .aelms-pagination__current"; $pagination_number = "{$pagination} .aelms-pagination__number"; $pagination_prev = "{$pagination} .aelms-pagination__prev"; $pagination_next = "{$pagination} .aelms-pagination__next"; $this->start_controls_section( 'course_list_layout_style', [ 'label' => __('Layout', 'acadlix-addon-for-elementor'), 'tab' => Controls_Manager::TAB_STYLE, ] ); // Layout Column Gap $this->add_control( 'course_list_columns_gap', array( 'label' => __('Columns Gap', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SLIDER, 'size_unit' => array('px'), 'range' => array( 'px' => array( 'min' => 0, 'max' => 100, 'step' => 1, ), ), 'default' => array( 'unit' => 'px', 'size' => 32, ), 'selectors' => array( "{$items_selector}" => 'column-gap: {{SIZE}}{{UNIT}};', ), ) ); // Layout Column Gap $this->add_control( 'course_list_rows_gap', array( 'label' => __('Rows Gap', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SLIDER, 'size_unit' => array('px'), 'range' => array( 'px' => array( 'min' => 0, 'max' => 100, 'step' => 1, ), ), 'default' => array( 'unit' => 'px', 'size' => 32, ), 'selectors' => array( "{$items_selector}" => 'row-gap: {{SIZE}}{{UNIT}};', ), ) ); $this->end_controls_section(); $this->start_controls_section( 'course_list_card_style', [ 'label' => __('Card', 'acadlix-addon-for-elementor'), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'course_list_card_padding', array( 'label' => __('Padding', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array('px', '%'), 'selectors' => array( "{$card}" => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ), ) ); $this->add_control( 'course_list_card_background_color', array( 'label' => __('Background Color', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::COLOR, 'selectors' => array( "{$card}" => 'background-color: {{VALUE}};', ), ) ); $this->start_controls_tabs('course_list_card_style_tabs'); $this->start_controls_tab( 'course_list_card_style_normal_tab', [ 'label' => __('Normal', 'acadlix-addon-for-elementor'), ] ); $this->add_group_control( Group_Control_Border::get_type(), array( 'name' => 'course_list_card_normal_border', 'label' => __('Border', 'acadlix-addon-for-elementor'), 'selector' => "{$card}", ) ); $this->add_control( 'course_list_card_normal_border_radius', array( 'label' => __('Border Radius', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SLIDER, 'size_units' => array('px', '%'), 'default' => array( 'size' => 8, 'unit' => 'px', ), 'selectors' => array( "{$card}" => 'border-radius: {{SIZE}}{{UNIT}} ;', ), ) ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), array( 'name' => 'course_list_card_normal_box_shadow', 'label' => __('Box Shadow', 'acadlix-addon-for-elementor'), 'selector' => "{$card}", ) ); $this->end_controls_tab(); $this->start_controls_tab( 'course_list_card_style_hover_tab', [ 'label' => __('Hover', 'acadlix-addon-for-elementor'), ] ); $this->add_group_control( Group_Control_Border::get_type(), array( 'name' => 'course_list_card_hover_border', 'label' => __('Border', 'acadlix-addon-for-elementor'), 'selector' => "{$card}:hover", ) ); $this->add_control( 'course_list_card_hover_border_radius', array( 'label' => __('Border Radius', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SLIDER, 'size_units' => array('px', '%'), 'default' => array( 'size' => 8, 'unit' => 'px', ), 'selectors' => array( "{$card}:hover" => 'border-radius: {{SIZE}}{{UNIT}} ;', ), ) ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), array( 'name' => 'course_list_card_hover_box_shadow', 'label' => __('Box Shadow', 'acadlix-addon-for-elementor'), 'selector' => "{$card}:hover", ) ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->end_controls_section(); $this->start_controls_section( 'course_list_content_style', [ 'label' => __('Content', 'acadlix-addon-for-elementor'), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'course_list_content_padding', array( 'label' => __('Padding', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array('px', '%'), 'selectors' => array( "{$card_body}" => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ), 'default' => [ 'top' => 8, 'right' => 8, 'bottom' => 8, 'left' => 8, 'unit' => 'px', 'isLinked' => true, ], ) ); $this->add_control( 'course_list_content_image', array( 'label' => __('Image', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::HEADING, ) ); $this->add_control( 'course_list_content_image_height', array( 'label' => __('Height', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SLIDER, 'size_units' => array('px', '%'), 'default' => array( 'size' => 200, 'unit' => 'px', ), 'range' => array( 'px' => array( 'min' => 0, 'max' => 500, ), ), 'selectors' => array( "{$image}" => 'height: {{SIZE}}{{UNIT}} ;', ), ) ); $this->add_control( 'course_list_content_image_width', array( 'label' => __('Width', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SLIDER, 'size_units' => array('px', '%'), 'default' => array( 'size' => 100, 'unit' => '%', ), 'range' => array( 'px' => array( 'min' => 0, 'max' => 500, ), '%' => array( 'min' => 0, 'max' => 100, ), ), 'selectors' => array( "{$image}" => 'width: {{SIZE}}{{UNIT}} ;', ), ) ); $this->add_control( 'course_list_content_difficulty_level', array( 'label' => __('Difficulty Level', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::HEADING, ) ); $this->add_responsive_control( 'course_list_content_difficulty_level_color', array( 'label' => __('Color', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::COLOR, 'selectors' => array( "{$difficulty_level}" => 'color: {{VALUE}};', ), 'default' => '#0073e6', ) ); $this->add_responsive_control( 'course_list_content_difficulty_level_background_color', array( 'label' => __('Background Color', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::COLOR, 'selectors' => array( "{$difficulty_level}" => 'background-color: {{VALUE}};', ), 'default' => '#cce5ff', ) ); $this->add_group_control( Group_Control_Typography::get_type(), array( 'name' => 'course_list_content_difficulty_level_typography', 'label' => __('Typography', 'acadlix-addon-for-elementor'), 'selector' => "{$difficulty_level}", 'fields_options' => array( 'typography' => [ 'default' => 'yes' ], 'font_size' => [ 'default' => [ 'size' => 14, 'unit' => 'px', ] ], 'text_decoration' => [ 'default' => 'none' ], 'font_weight' => [ 'default' => '500' ], ) ) ); $this->add_control( 'course_list_content_difficulty_level_spacing', array( 'label' => __('Space', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SLIDER, 'size_units' => array('px'), 'range' => array( 'px' => array( 'min' => 0, 'max' => 300, ), ), 'selectors' => array( "{$difficulty_level}" => 'margin-top: {{SIZE}}{{UNIT}}; margin-bottom: {{SIZE}}{{UNIT}};', ), ) ); $this->add_control( 'course_list_content_difficulty_level_width_type', array( 'label' => __('Width Type', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SELECT, 'default' => 'fit-content', 'options' => array( 'none' => __('None', 'acadlix-addon-for-elementor'), 'auto' => __('Auto', 'acadlix-addon-for-elementor'), 'fit-content' => __('Fit Content', 'acadlix-addon-for-elementor'), 'max-content' => __('Max Content', 'acadlix-addon-for-elementor'), 'min-content' => __('Min Content', 'acadlix-addon-for-elementor'), ), 'selectors' => array( "{$difficulty_level}" => 'width: {{VALUE}};', ), ) ); $this->add_control( 'course_list_content_difficulty_level_width', array( 'label' => __('Width', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SLIDER, 'size_units' => array('px'), 'range' => array( 'px' => array( 'min' => 0, 'max' => 300, ), ), 'selectors' => array( "{$difficulty_level}" => 'width: {{SIZE}}{{UNIT}}; margin-bottom: {{SIZE}}{{UNIT}};', ), 'condition' => array( 'course_list_content_difficulty_level_width_type' => 'none', ), ) ); $this->add_control( 'course_list_content_difficulty_level_padding', array( 'label' => __('Padding', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array('px', '%'), 'selectors' => array( "{$difficulty_level}" => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ), 'default' => [ 'top' => 2, 'right' => 8, 'bottom' => 2, 'left' => 8, 'unit' => 'px', 'isLinked' => true, ], ) ); $this->add_group_control( Group_Control_Border::get_type(), array( 'name' => 'course_list_content_difficulty_level_border', 'label' => __('Border', 'acadlix-addon-for-elementor'), 'selector' => "{$difficulty_level}", ) ); $this->add_control( 'course_list_content_difficulty_level_border_radius', array( 'label' => __('Border Radius', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SLIDER, 'size_units' => array('px', '%'), 'default' => array( 'size' => 6, 'unit' => 'px', ), 'selectors' => array( "{$difficulty_level}" => 'border-radius: {{SIZE}}{{UNIT}} ;', ), ) ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), array( 'name' => 'course_list_content_difficulty_level_box_shadow', 'label' => __('Box Shadow', 'acadlix-addon-for-elementor'), 'selector' => "{$difficulty_level}", ) ); $this->add_control( 'course_list_content_rating_divider', array( 'type' => Controls_Manager::DIVIDER, ) ); $this->add_control( 'course_list_content_rating', array( 'label' => __('Rating', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::HEADING, ) ); $this->add_control( 'course_list_content_rating_icon_color', array( 'label' => __('Icon Color', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::COLOR, 'selectors' => array( $rating_icon => 'color: {{VALUE}}' ), 'default' => '#ed9700', ) ); $this->add_responsive_control( 'course_list_content_rating_icon_size', array( 'label' => __('Icon Size', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SLIDER, 'size_units' => array('px'), 'range' => array( 'px' => array( 'min' => 5, 'max' => 100, ), ), 'default' => array( 'unit' => 'px', 'size' => 16, ), 'selectors' => array( $rating_icon => 'font-size: {{SIZE}}{{UNIT}};', ), ) ); $this->add_control( 'course_list_content_rating_value_color', array( 'label' => __('Color', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::COLOR, 'selectors' => array( $rating_value => 'color: {{VALUE}}' ), 'default' => '#161616', ) ); $this->add_group_control( Group_Control_Typography::get_type(), array( 'name' => 'course_list_content_rating_value_typography', 'label' => __('Typography', 'acadlix-addon-for-elementor'), 'selector' => $rating_value, ) ); $this->add_control( 'course_list_content_rating_padding', array( 'label' => __('Padding', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array('px', '%'), 'selectors' => array( "{$rating}" => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ), ) ); $this->add_control( 'course_list_content_title_divider', array( 'type' => Controls_Manager::DIVIDER, ) ); $this->add_control( 'course_list_content_title', array( 'label' => __('Title', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::HEADING, ) ); $this->add_responsive_control( 'course_list_content_title_color', array( 'label' => __('Color', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::COLOR, 'selectors' => array( "{$title} a" => 'color: {{VALUE}};', ), 'default' => '#161616', ) ); $this->add_group_control( Group_Control_Typography::get_type(), array( 'name' => 'course_list_content_title_typography', 'label' => __('Typography', 'acadlix-addon-for-elementor'), 'selector' => "{$title} a", 'fields_options' => array( 'typography' => [ 'default' => 'yes' ], 'font_size' => [ 'default' => [ 'size' => 16, 'unit' => 'px', ] ], 'text_decoration' => [ 'default' => 'none' ], 'font_weight' => [ 'default' => '700' ], 'line_height' => [ 'default' => [ 'size' => 20, 'unit' => 'px', ] ] ) ) ); $this->add_control( 'course_list_content_title_spacing', array( 'label' => __('Space', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SLIDER, 'size_units' => array('px'), 'range' => array( 'px' => array( 'min' => 0, 'max' => 300, ), ), 'selectors' => array( "{$title}" => 'margin-top: {{SIZE}}{{UNIT}}; margin-bottom: {{SIZE}}{{UNIT}};', ), ) ); $this->add_control( 'course_list_content_author_divider', array( 'type' => Controls_Manager::DIVIDER, ) ); $this->add_control( 'course_list_content_author', array( 'label' => __('Author', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::HEADING, ) ); $this->start_controls_tabs('course_list_content_author_style_tabs'); $this->start_controls_tab( 'course_list_content_author_style_normal_tab', [ 'label' => __('Normal', 'acadlix-addon-for-elementor'), ] ); $this->add_control( 'course_list_content_author_color', [ 'label' => __('Color', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::COLOR, 'selectors' => [ "{$author} a" => 'color: {{VALUE}};', ], 'default' => '#818998', ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'course_list_content_author_typography', 'label' => __('Typography', 'acadlix-addon-for-elementor'), 'selector' => "{$author} a", 'fields_options' => array( 'typography' => [ 'default' => 'yes' ], 'font_size' => [ 'default' => [ 'size' => 12, 'unit' => 'px', ] ], 'text_decoration' => [ 'default' => 'none' ], 'font_weight' => [ 'default' => '500' ], ) ] ); $this->end_controls_tab(); $this->start_controls_tab( 'course_list_content_author_style_hover_tab', [ 'label' => __('Hover', 'acadlix-addon-for-elementor'), ] ); $this->add_control( 'course_list_content_author_color_hover', [ 'label' => __('Color', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::COLOR, 'selectors' => [ "{$author} a:hover" => 'color: {{VALUE}};', ], 'default' => '#818998', ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'course_list_content_author_typography_hover', 'label' => __('Typography', 'acadlix-addon-for-elementor'), 'selector' => "{$author} a:hover", 'fields_options' => array( 'typography' => [ 'default' => 'yes' ], 'font_size' => [ 'default' => [ 'size' => 12, 'unit' => 'px', ] ], 'text_decoration' => [ 'default' => 'none' ], 'font_weight' => [ 'default' => '500' ] ) ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->end_controls_section(); $this->start_controls_section( 'course_list_footer_style', [ 'label' => __('Footer', 'acadlix-addon-for-elementor'), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'course_list_footer_display', [ 'label' => __('Display', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SELECT, 'options' => [ 'block' => __('Block', 'acadlix-addon-for-elementor'), 'flex' => __('Flex', 'acadlix-addon-for-elementor'), ], 'selectors' => [ $footer => 'display: {{VALUE}};', ], 'default' => 'block', ] ); $this->add_responsive_control( 'course_list_footer_flex_direction', [ 'label' => __('Flex Direction', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SELECT, 'options' => [ 'row' => __('Row', 'acadlix-addon-for-elementor'), 'row-reverse' => __('Row Reverse', 'acadlix-addon-for-elementor'), 'column' => __('Column', 'acadlix-addon-for-elementor'), 'column-reverse' => __('Column Reverse', 'acadlix-addon-for-elementor'), ], 'selectors' => [ $footer => 'flex-direction: {{VALUE}};', ], 'default' => 'row', 'condition' => [ 'course_list_footer_display' => 'flex', ], ] ); $this->add_responsive_control( 'course_list_footer_justify_content', [ 'label' => __('Justify Content', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SELECT, 'options' => [ 'flex-start' => __('Flex Start', 'acadlix-addon-for-elementor'), 'flex-end' => __('Flex End', 'acadlix-addon-for-elementor'), 'center' => __('Center', 'acadlix-addon-for-elementor'), 'space-between' => __('Space Between', 'acadlix-addon-for-elementor'), 'space-around' => __('Space Around', 'acadlix-addon-for-elementor'), 'space-evenly' => __('Space Evenly', 'acadlix-addon-for-elementor'), 'stretch' => __('Stretch', 'acadlix-addon-for-elementor'), ], 'selectors' => [ $footer => 'justify-content: {{VALUE}};', ], 'default' => 'space-between', 'condition' => [ 'course_list_footer_display' => 'flex', ], ] ); $this->add_responsive_control( 'course_list_footer_align_items', [ 'label' => __('Align Items', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SELECT, 'options' => [ 'flex-start' => __('Flex Start', 'acadlix-addon-for-elementor'), 'flex-end' => __('Flex End', 'acadlix-addon-for-elementor'), 'center' => __('Center', 'acadlix-addon-for-elementor'), 'baseline' => __('Baseline', 'acadlix-addon-for-elementor'), 'stretch' => __('Stretch', 'acadlix-addon-for-elementor'), ], 'selectors' => [ $footer => 'align-items: {{VALUE}};', ], 'default' => 'center', 'condition' => [ 'course_list_footer_display' => 'flex', ], ] ); $this->add_responsive_control( 'course_list_footer_gap', [ 'label' => __('Gap', 'acadlix-addon-for-elementor'), 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => ['px', '%', 'em', 'rem', 'custom'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'default' => [ 'unit' => 'px', 'size' => 2, ], 'selectors' => [ "{$footer}" => 'gap: {{SIZE}}{{UNIT}};', ], 'condition' => [ 'course_list_footer_display' => 'flex', ], ] ); $this->add_responsive_control( 'course_list_footer_padding', array( 'label' => __('Padding', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array('px', '%'), 'selectors' => array( "{$card_footer}" => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ), 'default' => array( 'top' => 4, 'right' => 4, 'bottom' => 4, 'left' => 4, 'unit' => 'px', 'isLinked' => true, ), ) ); $this->add_responsive_control( 'course_list_footer_background_color', array( 'label' => __('Background Color', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::COLOR, 'selectors' => array( "{$card_footer}" => 'background-color: {{VALUE}};', ), ) ); $this->add_responsive_control( 'course_list_footer_price_padding', array( 'label' => __('Price Padding', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array('px', '%'), 'selectors' => array( "{$price}" => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ), 'default' => array( 'top' => 4, 'right' => 4, 'bottom' => 4, 'left' => 4, 'unit' => 'px', 'isLinked' => true, ), ) ); $this->add_control( 'course_list_footer_sale_price_divider', [ 'type' => Controls_Manager::DIVIDER, ] ); $this->add_control( 'course_list_footer_sale_price_heading', array( 'label' => __('Sale Price', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::HEADING, ) ); $this->add_responsive_control( 'course_list_footer_sale_price_color', [ 'label' => __('Color', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::COLOR, 'selectors' => [ "{$sale_price}" => 'color: {{VALUE}};', ], 'default' => '#161616', ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'course_list_footer_sale_price_typography', 'label' => __('Typography', 'acadlix-addon-for-elementor'), 'selector' => "{$sale_price}", 'fields_options' => [ 'typography' => [ 'default' => 'yes' ], 'font_size' => [ 'default' => [ 'size' => 16, 'unit' => 'px', ], ], 'text_decoration' => [ 'default' => 'none' ], 'font_weight' => [ 'default' => '500' ] ], ] ); $this->add_control( 'course_list_footer_regular_price_divider', [ 'type' => Controls_Manager::DIVIDER, ] ); $this->add_control( 'course_list_footer_regular_price_heading', array( 'label' => __('Regular Price', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::HEADING, ) ); $this->add_responsive_control( 'course_list_footer_regular_price_color', [ 'label' => __('Color', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::COLOR, 'selectors' => [ "{$regular_price}" => 'color: {{VALUE}};', ], 'default' => '#818998', ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'course_list_footer_regular_price_typography', 'label' => __('Typography', 'acadlix-addon-for-elementor'), 'selector' => "{$regular_price}", 'fields_options' => [ 'typography' => [ 'default' => 'yes' ], 'font_size' => [ 'default' => [ 'size' => 14, 'unit' => 'px', ], ], 'text_decoration' => [ 'default' => 'line-through' ], 'font_weight' => [ 'default' => '500' ] ], ] ); $this->add_control( 'course_list_footer_buy_button_divider', [ 'type' => Controls_Manager::DIVIDER, ] ); $this->add_control( 'course_list_footer_action_button_heading', array( 'label' => __('Action Button', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::HEADING, ) ); $this->add_responsive_control( 'course_list_footer_action_buttons_display', [ 'label' => __('Display', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SELECT, 'options' => [ 'block' => __('Block', 'acadlix-addon-for-elementor'), 'flex' => __('Flex', 'acadlix-addon-for-elementor'), ], 'selectors' => [ $action_buttons => 'display: {{VALUE}};', ], 'default' => 'flex', ] ); $this->add_responsive_control( 'course_list_footer_action_buttons_flex_direction', [ 'label' => __('Flex Direction', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SELECT, 'options' => [ 'row' => __('Row', 'acadlix-addon-for-elementor'), 'row-reverse' => __('Row Reverse', 'acadlix-addon-for-elementor'), 'column' => __('Column', 'acadlix-addon-for-elementor'), 'column-reverse' => __('Column Reverse', 'acadlix-addon-for-elementor'), ], 'selectors' => [ $action_buttons => 'flex-direction: {{VALUE}};', ], 'default' => 'row', 'condition' => [ 'course_list_footer_action_buttons_display' => 'flex', ], ] ); $this->add_responsive_control( 'course_list_footer_action_buttons_justify_content', [ 'label' => __('Justify Content', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SELECT, 'options' => [ 'flex-start' => __('Flex Start', 'acadlix-addon-for-elementor'), 'flex-end' => __('Flex End', 'acadlix-addon-for-elementor'), 'center' => __('Center', 'acadlix-addon-for-elementor'), 'space-between' => __('Space Between', 'acadlix-addon-for-elementor'), 'space-around' => __('Space Around', 'acadlix-addon-for-elementor'), 'space-evenly' => __('Space Evenly', 'acadlix-addon-for-elementor'), 'stretch' => __('Stretch', 'acadlix-addon-for-elementor'), ], 'selectors' => [ $action_buttons => 'justify-content: {{VALUE}};', ], 'default' => 'flex-start', 'condition' => [ 'course_list_footer_action_buttons_display' => 'flex', ], ] ); $this->add_responsive_control( 'course_list_footer_action_buttons_align_items', [ 'label' => __('Align Items', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SELECT, 'options' => [ 'flex-start' => __('Flex Start', 'acadlix-addon-for-elementor'), 'flex-end' => __('Flex End', 'acadlix-addon-for-elementor'), 'center' => __('Center', 'acadlix-addon-for-elementor'), 'baseline' => __('Baseline', 'acadlix-addon-for-elementor'), 'stretch' => __('Stretch', 'acadlix-addon-for-elementor'), ], 'selectors' => [ $action_buttons => 'align-items: {{VALUE}};', ], 'default' => 'center', 'condition' => [ 'course_list_footer_action_buttons_display' => 'flex', ], ] ); $this->add_responsive_control( 'course_list_footer_action_buttons_gap', [ 'label' => __('Gap', 'acadlix-addon-for-elementor'), 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => ['px', '%', 'em', 'rem', 'custom'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'default' => [ 'unit' => 'px', 'size' => 2, ], 'selectors' => [ "{$action_buttons}" => 'gap: {{SIZE}}{{UNIT}};', ], 'condition' => [ 'course_list_footer_action_buttons_display' => 'flex', ], ] ); $this->add_responsive_control( 'course_list_footer_action_button_width', [ 'label' => __('Width', 'acadlix-addon-for-elementor'), 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => [ '%'], 'range' => [ '%' => [ 'min' => 0, 'max' => 100, ], ], 'default' => [ 'unit' => '%', 'size' => 100, ], 'selectors' => [ "{$action_button}" => 'width: {{SIZE}}{{UNIT}};', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'course_list_footer_buy_button_typography', 'label' => __('Typography', 'acadlix-addon-for-elementor'), 'selector' => "{$action_button}", 'fields_options' => [ 'typography' => [ 'default' => 'yes' ], 'font_size' => [ 'default' => [ 'size' => 14, 'unit' => 'px', ], ], 'text_decoration' => [ 'default' => 'none' ], 'line_height' => [ 'default' => [ 'unit' => 'px', 'size' => 18, ] ], 'font_weight' => [ 'default' => '500' ], ], ] ); $this->add_control( 'course_list_footer_buy_button_padding', [ 'label' => __('Padding', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%', 'em'], 'selectors' => [ "{$action_button}" => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'default' => [ 'top' => 10, 'right' => 10, 'bottom' => 10, 'left' => 10, 'unit' => 'px', 'isLinked' => true, ], ] ); $this->add_group_control( Group_Control_Border::get_type(), array( 'name' => 'course_list_footer_buy_now_border', 'label' => __('Border', 'acadlix-addon-for-elementor'), 'selector' => "{$action_button}", ) ); $this->add_control( 'course_list_footer_buy_now_border_radius', array( 'label' => __('Border Radius', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SLIDER, 'size_units' => array('px', '%'), 'default' => array( 'size' => 8, 'unit' => 'px', ), 'selectors' => array( "{$action_button}" => 'border-radius: {{SIZE}}{{UNIT}} ;', ), ) ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), array( 'name' => 'course_list_footer_buy_now_box_shadow', 'label' => __('Box Shadow', 'acadlix-addon-for-elementor'), 'selector' => "{$action_button}", ) ); $this->start_controls_tabs('course_list_footer_style_tabs'); $this->start_controls_tab( 'course_list_footer_style_normal_tab', [ 'label' => __('Normal', 'acadlix-addon-for-elementor'), ] ); $this->add_responsive_control( 'course_list_footer_buy_now_normal_color', array( 'label' => __('Color', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::COLOR, 'selectors' => array( "{$action_button}" => 'color: {{VALUE}};', ), 'default' => '#ffffff', ) ); $this->add_responsive_control( 'course_list_footer_buy_now_normal_background', array( 'label' => __('Background Color', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::COLOR, 'selectors' => array( "{$action_button}" => 'background-color: {{VALUE}};', ), 'default' => '#0073e6', ) ); $this->end_controls_tab(); $this->start_controls_tab( 'course_list_footer_style_hover_tab', [ 'label' => __('Hover', 'acadlix-addon-for-elementor'), ] ); $this->add_responsive_control( 'course_list_footer_buy_now_hover_color', array( 'label' => __('Color', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::COLOR, 'selectors' => array( "{$action_button}:hover" => 'color: {{VALUE}};', ), 'default' => '#ffffff', ) ); $this->add_responsive_control( 'course_list_footer_buy_now_hover_background', array( 'label' => __('Background Color', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::COLOR, 'selectors' => array( "{$action_button}:hover" => 'background-color: {{VALUE}};', ), 'default' => '#0073e6', ) ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->add_control( 'course_list_footer_wishlist_divider', [ 'type' => Controls_Manager::DIVIDER, ] ); $this->add_control( 'course_list_footer_wishlist_heading', array( 'label' => __('Wishlist', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::HEADING, ) ); $this->add_responsive_control( 'course_list_footer_wishlist_color', [ 'label' => __('Color', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::COLOR, 'selectors' => [ "{$wishlist}" => 'color: {{VALUE}};', ], 'default' => '#0073e6', ] ); $this->add_responsive_control( 'course_list_footer_wishlist_background_color', array( 'label' => __('Background Color', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::COLOR, 'selectors' => [ "{$wishlist}" => 'background-color: {{VALUE}};', ], 'default' => '#ffffff', ) ); $this->add_group_control( Group_Control_Typography::get_type(), array( 'name' => 'course_list_footer_wishlist_typography', 'label' => __('Typography', 'acadlix-addon-for-elementor'), 'selector' => "{$wishlist}", 'fields_options' => [ 'typography' => [ 'default' => 'yes', ], 'font_size' => [ 'default' => [ 'unit' => 'px', 'size' => 18, ], ], ], ) ); $this->add_responsive_control( 'course_list_footer_wishlist_padding', [ 'label' => __('Padding', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', 'em', '%'], 'selectors' => [ "{$wishlist}" => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'default' => [ 'top' => 10, 'right' => 10, 'bottom' => 10, 'left' => 10, 'unit' => 'px', 'isLinked' => true, ], ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'course_list_footer_wishlist_border', 'label' => __('Border', 'acadlix-addon-for-elementor'), 'selector' => "{$wishlist}", ] ); $this->add_responsive_control( 'course_list_footer_wishlist_radius', [ 'label' => __('Border Radius', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', 'em', '%'], 'selectors' => [ "{$wishlist}" => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'default' => [ 'top' => 50, 'right' => 50, 'bottom' => 50, 'left' => 50, 'unit' => '%', 'isLinked' => true, ], ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'course_list_footer_wishlist_box_shadow', 'label' => __('Box Shadow', 'acadlix-addon-for-elementor'), 'selector' => "{$wishlist}", 'fields_options' => [ 'box_shadow_type' => [ 'default' => 'yes' ], 'box_shadow' => [ 'default' => [ 'horizontal' => 0, 'vertical' => 0, 'blur' => 10, 'spread' => 0, 'color' => 'rgba(0,0,0,0.15)', ], ], ], ] ); $this->end_controls_section(); $this->start_controls_section( 'course_list_pagination_style', [ 'label' => __('Pagination', 'acadlix-addon-for-elementor'), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'course_list_pagination_margin_top', [ 'label' => __('Margin Top', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px', 'em', '%'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, ], ], 'default' => [ 'unit' => 'px', 'size' => 8, ], 'selectors' => [ "{$pagination}" => 'margin-top: {{SIZE}}{{UNIT}};', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), array( 'name' => 'course_list_pagination_typography', 'label' => __('Typography', 'acadlix-addon-for-elementor'), 'selector' => "{$pagination_link}", 'fields_options' => [ 'typography' => [ 'default' => 'yes', ], 'font_size' => [ 'default' => [ 'unit' => 'px', 'size' => 18, ], ], 'text_decoration' => [ 'default' => 'none', ], ], ) ); $this->start_controls_tabs('course_list_pagination_style_tabs'); $this->start_controls_tab( 'course_list_pagination_style_normal_tab', [ 'label' => __('Normal', 'acadlix-addon-for-elementor'), ] ); $this->add_responsive_control( 'course_list_pagination_normal_color', array( 'label' => __('Color', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::COLOR, 'selectors' => array( "{$pagination_link}" => 'color: {{VALUE}};', ), 'default' => '#161616', ) ); $this->add_responsive_control( 'course_list_pagination_normal_background_color', array( 'label' => __('Background Color', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::COLOR, 'selectors' => array( "{$pagination_link}" => 'background-color: {{VALUE}};', ), 'default' => '#ffffff', ) ); $this->add_group_control( Group_Control_Border::get_type(), array( 'name' => 'course_list_pagination_normal_border', 'label' => __('Border', 'acadlix-addon-for-elementor'), 'selector' => "{$pagination_link}", ) ); $this->end_controls_tab(); $this->start_controls_tab( 'course_list_pagination_style_hover_tab', [ 'label' => __('Hover', 'acadlix-addon-for-elementor'), ] ); $this->add_responsive_control( 'course_list_pagination_hover_color', array( 'label' => __('Color', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::COLOR, 'selectors' => array( "{$pagination_link}:hover" => 'color: {{VALUE}};', ), 'default' => '#161616', ) ); $this->add_responsive_control( 'course_list_pagination_hover_background_color', array( 'label' => __('Background Color', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::COLOR, 'selectors' => array( "{$pagination_link}:hover" => 'background-color: {{VALUE}};', ), 'default' => '#ffffff', ) ); $this->add_group_control( Group_Control_Border::get_type(), array( 'name' => 'course_list_pagination_hover_border', 'label' => __('Border', 'acadlix-addon-for-elementor'), 'selector' => "{$pagination_link}:hover", ) ); $this->end_controls_tab(); $this->start_controls_tab( 'course_list_pagination_style_active_tab', [ 'label' => __('Active', 'acadlix-addon-for-elementor'), ] ); $this->add_responsive_control( 'course_list_pagination_active_color', array( 'label' => __('Color', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::COLOR, 'selectors' => array( "{$pagination_current}" => 'color: {{VALUE}};', ), 'default' => '#161616', ) ); $this->add_responsive_control( 'course_list_pagination_active_background_color', array( 'label' => __('Background Color', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::COLOR, 'selectors' => array( "{$pagination_current}" => 'background-color: {{VALUE}};', ), 'default' => '#ffffff', ) ); $this->add_group_control( Group_Control_Border::get_type(), array( 'name' => 'course_list_pagination_active_border', 'label' => __('Border', 'acadlix-addon-for-elementor'), 'selector' => "{$pagination_current}", ) ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->add_control( 'course_list_pagination_divider', array( 'type' => Controls_Manager::DIVIDER, ) ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), array( 'name' => 'course_list_pagination_box_shadow', 'label' => __('Box Shadow', 'acadlix-addon-for-elementor'), 'selector' => "{$pagination_link}", ) ); $this->add_control( 'course_list_pagination_border_radius', array( 'label' => __('Border Radius', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SLIDER, 'size_units' => array('px', '%'), 'default' => array( 'size' => 8, 'unit' => 'px', ), 'selectors' => array( "{$pagination_link}" => 'border-radius: {{SIZE}}{{UNIT}} ;', ), ) ); $this->add_control( 'course_list_pagination_padding', array( 'label' => __('Padding', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => array('px', '%'), 'default' => array( 'top' => 8, 'right' => 8, 'bottom' => 8, 'left' => 8, 'unit' => 'px', ), 'selectors' => array( "{$pagination_link}" => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ), ) ); $this->add_control( 'course_list_pagination_space', array( 'label' => __('Space Between', 'acadlix-addon-for-elementor'), 'type' => Controls_Manager::SLIDER, 'size_unit' => array('px'), 'range' => array( 'px' => array( 'min' => 0, 'max' => 100, 'step' => 1, ), ), 'default' => array( 'size' => 6, 'unit' => 'px', ), 'selectors' => array( "{$pagination}" => 'gap: {{SIZE}}{{UNIT}};', ), ) ); $this->end_controls_section(); } protected function render() { ob_start(); $settings = $this->get_settings_for_display(); include AELMS_PLUGIN_DIR . 'templates/course/list.php'; $html = ob_get_clean(); echo wp_kses_post($html); } }