start_controls_section( 'compare_content_option', [ 'label' => esc_html__( 'Compare Listing', 'adirectory' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'hide_compare', [ 'label' => __( 'Hide Compare Listing', 'adirectory' ), 'type' => \Elementor\Controls_Manager::SWITCHER, 'label_on' => __( 'Show', 'adirectory' ), 'label_off' => __( 'Hide', 'adirectory' ), 'return_value' => 'yes', 'default' => 'yes', ] ); $this->add_control( 'compare_icon', [ 'label' => esc_html__( 'Icon', 'adirectory' ), 'type' => \Elementor\Controls_Manager::ICONS, 'condition' => [ 'hide_compare' => 'yes', ], 'default' => [ 'value' => 'fa fa-code-compare', 'library' => 'fa-solid', ], ] ); $this->end_controls_section(); } $this->start_controls_section( 'fav_content_option', [ 'label' => esc_html__( 'Favourite Listing', 'adirectory' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'hide_fav', [ 'label' => __( 'Hide Favourite Listing', 'adirectory' ), 'type' => \Elementor\Controls_Manager::SWITCHER, 'label_on' => __( 'Show', 'adirectory' ), 'label_off' => __( 'Hide', 'adirectory' ), 'return_value' => 'yes', 'default' => 'yes', ] ); $this->add_control( 'fav_icon', [ 'label' => esc_html__( 'Icon', 'adirectory' ), 'type' => \Elementor\Controls_Manager::ICONS, 'condition' => [ 'hide_fav' => 'yes', ], 'default' => [ 'value' => 'fas fa-heart', 'library' => 'fa-solid', ], ] ); $this->end_controls_section(); $this->start_controls_section( 'addlist_content_option', [ 'label' => esc_html__( 'Add Listing', 'adirectory' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'add_listing', [ 'label' => __( 'Hide Add Listing', 'adirectory' ), 'type' => \Elementor\Controls_Manager::SWITCHER, 'label_on' => __( 'Show', 'adirectory' ), 'label_off' => __( 'Hide', 'adirectory' ), 'return_value' => 'yes', 'default' => 'yes', ] ); $this->add_control( 'addlist_icon', [ 'label' => esc_html__( 'Icon', 'adirectory' ), 'type' => \Elementor\Controls_Manager::ICONS, 'condition' => [ 'add_listing' => 'yes', ], 'default' => [ 'value' => 'fas fa-plus', 'library' => 'fa-solid', ], ] ); $this->add_control( 'addlist_btn_text', [ 'label' => __( 'Add Listing Button Text', 'adirectory' ), 'type' => \Elementor\Controls_Manager::TEXT, 'default' => __( 'Add Listing', 'adirectory' ), 'condition' => [ 'add_listing' => 'yes', ], 'placeholder' => __( 'Type your title here', 'adirectory' ), ] ); $this->end_controls_section(); $this->start_controls_section( 'dashboard_content_option', [ 'label' => esc_html__( 'Account', 'adirectory' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'hide_dash', [ 'label' => __( 'Hide Account', 'adirectory' ), 'type' => \Elementor\Controls_Manager::SWITCHER, 'label_on' => __( 'Show', 'adirectory' ), 'label_off' => __( 'Hide', 'adirectory' ), 'return_value' => 'yes', 'default' => 'yes', ] ); $this->add_control( 'before_login_heading', [ 'label' => esc_html__( 'Before Login Options', 'adirectory' ), 'type' => \Elementor\Controls_Manager::HEADING, 'separator' => 'before', 'condition' => [ 'hide_dash' => 'yes', ], ] ); $this->add_control( 'dashbaord_icon', [ 'label' => esc_html__( 'Icon', 'adirectory' ), 'type' => \Elementor\Controls_Manager::ICONS, 'condition' => [ 'hide_dash' => 'yes', ], 'default' => [ 'value' => 'fas fa-user', 'library' => 'fa-solid', ], ] ); $this->add_control( 'dash_btn_text', [ 'label' => __( 'Login Button Text', 'adirectory' ), 'type' => \Elementor\Controls_Manager::TEXT, 'default' => __( 'My Account', 'adirectory' ), 'condition' => [ 'hide_dash' => 'yes', ], 'placeholder' => __( 'Type your title here', 'adirectory' ), ] ); $this->add_control( 'after_login_heading', [ 'label' => esc_html__( 'After Login Options', 'adirectory' ), 'type' => \Elementor\Controls_Manager::HEADING, 'separator' => 'before', 'condition' => [ 'hide_dash' => 'yes', ], ] ); $this->add_control( 'after_dashbaord_icon', [ 'label' => esc_html__( 'Icon', 'adirectory' ), 'type' => \Elementor\Controls_Manager::ICONS, 'condition' => [ 'hide_dash' => 'yes', ], 'default' => [ 'value' => 'fas fa-user', 'library' => 'fa-solid', ], ] ); $this->add_control( 'after_dash_btn_text', [ 'label' => __( 'Login Button Text', 'adirectory' ), 'type' => \Elementor\Controls_Manager::TEXT, 'default' => __( 'My Account', 'adirectory' ), 'condition' => [ 'hide_dash' => 'yes', ], 'placeholder' => __( 'Type your title here', 'adirectory' ), ] ); $this->add_control( 'afdh_action', [ 'label' => esc_html__( 'Action Type', 'adirectory' ), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => '', 'options' => [ '' => esc_html__( 'Logout', 'adirectory' ), 'custom_link' => esc_html__( 'Custom Link', 'adirectory' ), ], 'condition' => [ 'hide_dash' => 'yes', ], ] ); $this->add_control( 'afdh_custom_link', [ 'label' => esc_html__( 'Link', 'adirectory' ), 'type' => \Elementor\Controls_Manager::URL, 'options' => [ 'url', 'is_external', 'nofollow' ], 'default' => [ 'url' => '', 'is_external' => false, 'nofollow' => false, ], 'condition' => [ 'hide_dash' => 'yes', 'afdh_action' => 'custom_link', ], 'label_block' => true, ] ); $this->end_controls_section(); // Style controle $this->start_controls_section( 'top_misc_global_style', [ 'label' => esc_html__( 'Global Styles', 'adirectory' ), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, ] ); $this->add_group_control( \Elementor\Group_Control_Typography::get_type(), [ 'name' => 'content_typography', 'selector' => '{{WRAPPER}} .adqs-topmisc-bar', ] ); $this->end_controls_section(); // Compare $this->start_controls_section( 'compare_style_Section', [ 'label' => esc_html__( 'Compare Styles', 'adirectory' ), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'compare_svg_color', [ 'label' => __( 'Compare Svg Color', 'adirectory' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .adqs-compare-widget-wrapper .rel_icon svg' => 'fill: {{VALUE}}', ], ] ); $this->add_responsive_control( 'compare_svg_size', [ 'type' => \Elementor\Controls_Manager::SLIDER, 'label' => esc_html__( 'Compare Svg Size', 'adirectory' ), 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, ], ], 'devices' => [ 'desktop', 'tablet', 'mobile' ], 'desktop_default' => [ 'size' => 30, 'unit' => 'px', ], 'tablet_default' => [ 'size' => 20, 'unit' => 'px', ], 'mobile_default' => [ 'size' => 10, 'unit' => 'px', ], 'selectors' => [ '{{WRAPPER}} .adqs-compare-widget-wrapper .rel_icon svg' => 'width: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'compare_outer_bg', [ 'label' => __( 'Compare Outer Bg', 'adirectory' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .adqs-compare-widget-wrapper a' => 'background: {{VALUE}}', ], ] ); $this->add_control( 'compare_count_bg', [ 'label' => __( 'Compare Count Bg', 'adirectory' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .adqs-compare-widget-wrapper .abs-count' => 'background: {{VALUE}}', ], ] ); $this->add_control( 'compare_count_text', [ 'label' => __( 'Compare Count Font Color', 'adirectory' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .adqs-compare-widget-wrapper .abs-count' => 'color: {{VALUE}}', ], ] ); $this->end_controls_section(); // Favorite styles $this->start_controls_section( 'fav_style_section', [ 'label' => esc_html__( 'Favourite Styles', 'adirectory' ), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'fav_svg_color', [ 'label' => __( 'Favourite Svg Color', 'adirectory' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .adqs-favlist-widget-wrapper .rel_icon svg' => 'fill: {{VALUE}}', ], ] ); $this->add_responsive_control( 'fav_svg_size', [ 'type' => \Elementor\Controls_Manager::SLIDER, 'label' => esc_html__( 'Favourite Svg Size', 'adirectory' ), 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, ], ], 'devices' => [ 'desktop', 'tablet', 'mobile' ], 'desktop_default' => [ 'size' => 30, 'unit' => 'px', ], 'tablet_default' => [ 'size' => 20, 'unit' => 'px', ], 'mobile_default' => [ 'size' => 10, 'unit' => 'px', ], 'selectors' => [ '{{WRAPPER}} .adqs-favlist-widget-wrapper .rel_icon svg' => 'width: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'fav_outer_bg', [ 'label' => __( 'Favourite Outer Bg', 'adirectory' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .adqs-favlist-widget-wrapper a' => 'background: {{VALUE}}', ], ] ); $this->add_control( 'fav_count_bg', [ 'label' => __( 'Favourite Count Bg', 'adirectory' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .adqs-favlist-widget-wrapper .abs-count' => 'background: {{VALUE}}', ], ] ); $this->add_control( 'fav_count_text', [ 'label' => __( 'Favorite Count Text Color', 'adirectory' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .adqs-favlist-widget-wrapper .abs-count' => 'color: {{VALUE}}', ], ] ); $this->end_controls_section(); // Add listing styles $this->start_controls_section( 'addlist_style_section', [ 'label' => esc_html__( 'Add Listing Styles', 'adirectory' ), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, ] ); // Addlist Button Styles Tab Control $this->start_controls_tabs( 'addlist_style_tabs' ); $this->start_controls_tab( 'addlist_style_normal_tab', [ 'label' => esc_html__( 'Normal', 'textdomain' ), ] ); $this->add_control( 'addlist_svg_color', [ 'label' => __( 'Icon Svg Color', 'adirectory' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .adqs-addlist-widget-wrapper .btn_icon svg' => 'fill: {{VALUE}}', ], ] ); $this->add_responsive_control( 'addlist_svg_size', [ 'type' => \Elementor\Controls_Manager::SLIDER, 'label' => esc_html__( 'Icon Svg Size', 'adirectory' ), 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, ], ], 'devices' => [ 'desktop', 'tablet', 'mobile' ], 'desktop_default' => [ 'size' => 30, 'unit' => 'px', ], 'tablet_default' => [ 'size' => 20, 'unit' => 'px', ], 'mobile_default' => [ 'size' => 10, 'unit' => 'px', ], 'selectors' => [ '{{WRAPPER}} .adqs-addlist-widget-wrapper .btn_icon svg' => 'width: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'addlist_text_color', [ 'label' => __( 'Button Text Color', 'adirectory' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .adqs-addlist-widget-wrapper .btn_text' => 'color: {{VALUE}}', ], ] ); $this->add_responsive_control( 'addlist_btn_txt_size', [ 'type' => Controls_Manager::SLIDER, 'label' => esc_html__( 'Font Size', 'adirectory' ), 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, ], ], 'devices' => [ 'desktop', 'tablet', 'mobile' ], 'desktop_default' => [ 'size' => 30, 'unit' => 'px', ], 'tablet_default' => [ 'size' => 20, 'unit' => 'px', ], 'mobile_default' => [ 'size' => 10, 'unit' => 'px', ], 'selectors' => [ '{{WRAPPER}} .adqs-addlist-widget-wrapper .btn_text' => 'font-size: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'addlist_btn_bg', [ 'label' => __( 'Button Background', 'adirectory' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .adqs-addlist-widget-wrapper a' => 'background: {{VALUE}}', ], ] ); $this->add_responsive_control( 'addlist_btn_padding', [ 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'label' => esc_html__( 'Padding', 'adirectory' ), 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ], 'selectors' => [ '{{WRAPPER}} .adqs-addlist-widget-wrapper a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_group_control( \Elementor\Group_Control_Border::get_type(), [ 'name' => 'border_addlist', 'selector' => '{{WRAPPER}} .adqs-addlist-widget-wrapper a', ] ); $this->add_responsive_control( 'addlist_btn_border_radius', [ 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'label' => esc_html__( 'Border Radius', 'adirectory' ), 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ], 'selectors' => [ '{{WRAPPER}} .adqs-addlist-widget-wrapper a' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_tab(); $this->start_controls_tab( 'addlist_style_hover_tab', [ 'label' => esc_html__( 'Hover', 'textdomain' ), ] ); $this->add_control( 'addlist_svg_hover_color', [ 'label' => __( 'Icon Hover Color', 'adirectory' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .adqs-addlist-widget-wrapper:hover .btn_icon svg' => 'fill: {{VALUE}}', ], ] ); $this->add_control( 'addlist_text_color_hover', [ 'label' => __( 'Text Hover Color', 'adirectory' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .adqs-addlist-widget-wrapper:hover .btn_text' => 'color: {{VALUE}}', ], ] ); $this->add_control( 'addlist_btn_bg_hover', [ 'label' => __( 'Button Hover Background', 'adirectory' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .adqs-addlist-widget-wrapper:hover a' => 'background: {{VALUE}} !important', ], ] ); $this->add_group_control( \Elementor\Group_Control_Border::get_type(), [ 'name' => 'border', 'selector' => '{{WRAPPER}} .adqs-addlist-widget-wrapper:hover a', ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->end_controls_section(); // dashboard styles $this->start_controls_section( 'dasah_style_section', [ 'label' => esc_html__( 'Account Styles', 'adirectory' ), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'dash_svg_color', [ 'label' => __( 'Icon Svg Color', 'adirectory' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .adqs-dshaboard-widget-wrapper .btn_icon svg' => 'fill: {{VALUE}}', ], ] ); // $this->add_control( // 'dash_svg_size', // [ // 'label' => __('Dashboard Svg Size', 'adirectory'), // 'type' => \Elementor\Controls_Manager::SLIDER, // 'selectors' => [ // '{{WRAPPER}} .adqs-dshaboard-widget-wrapper .btn_icon svg' => 'width: {{VALUE}}', // ], // ] // ); $this->add_responsive_control( 'dash_svg_size', [ 'type' => \Elementor\Controls_Manager::SLIDER, 'label' => esc_html__( 'Svg Size', 'adirectory' ), 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, ], ], 'devices' => [ 'desktop', 'tablet', 'mobile' ], 'desktop_default' => [ 'size' => 30, 'unit' => 'px', ], 'tablet_default' => [ 'size' => 20, 'unit' => 'px', ], 'mobile_default' => [ 'size' => 10, 'unit' => 'px', ], 'selectors' => [ '{{WRAPPER}} .adqs-dshaboard-widget-wrapper .btn_icon svg' => 'width: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'dash_text_color', [ 'label' => __( 'Button text Color', 'adirectory' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .adqs-dshaboard-widget-wrapper .btn_text' => 'color: {{VALUE}}', ], ] ); $this->add_responsive_control( 'dash_btn_padding', [ 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'label' => esc_html__( 'Button Padding', 'adirectory' ), 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ], 'selectors' => [ '{{WRAPPER}} .adqs-dshaboard-widget-wrapper a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'dash_btn_bg', [ 'label' => __( 'Button Bg', 'adirectory' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .adqs-dshaboard-widget-wrapper a' => 'background: {{VALUE}}', ], ] ); $this->add_responsive_control( 'dash_btn_txt_size', [ 'type' => \Elementor\Controls_Manager::SLIDER, 'label' => esc_html__( 'Font Size', 'adirectory' ), 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, ], ], 'devices' => [ 'desktop', 'tablet', 'mobile' ], 'desktop_default' => [ 'size' => 30, 'unit' => 'px', ], 'tablet_default' => [ 'size' => 20, 'unit' => 'px', ], 'mobile_default' => [ 'size' => 10, 'unit' => 'px', ], 'selectors' => [ '{{WRAPPER}} .adqs-dshaboard-widget-wrapper .btn_text' => 'font-size: {{SIZE}}{{UNIT}};', ], ] ); $this->end_controls_section(); } /** * Render Advanced widget output on the frontend. * * Written in PHP and used to generate the final HTML. * * @since 1.0.0 * @access protected */ protected function render() { $settings = $this->get_settings_for_display(); ob_start(); ?>
widgets_manager->register( new Topmisc() );