Sid Gifari File Manager
🏠 Root
/
home
/
ailwtbdh
/
public_html
/
wp-content
/
plugins
/
profundcore
/
addons
/
widgets
/
Editing: campaign.php
<?php namespace Elementor; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } class profund_Campaign_Boxes extends Widget_Base { public function get_name() { return 'profund-campaign-box'; } public function get_title() { return __( 'Campaign Box', 'profundcore' ); } public function get_icon() { return "eicon-preview"; } public function get_script_depends() { return [ 'slick', 'el-widget-active', 'jquery-appear', 'isotope', 'imagesloaded', ]; } public function get_categories() { return [ 'profund-addons' ]; } protected function register_controls() { $this->start_controls_section( 'content_section', [ 'label' => __( 'Campaign Settings', 'profundcore' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'slider_on', [ 'label' => __( 'Slider', 'profundcore' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'On', 'profundcore' ), 'label_off' => __( 'Off', 'profundcore' ), 'return_value' => 'yes', 'default' => 'yes', ] ); $this->add_control( 'filter_on', [ 'label' => __( 'Filter Menu.', 'profundcore' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'On', 'profundcore' ), 'label_off' => __( 'Off', 'profundcore' ), 'return_value' => 'yes', 'default' => 'yes', 'condition' => [ 'slider_on!' => 'yes', ] ] ); $this->add_control( 'load_more', [ 'label' => __( 'Load Items.', 'profundcore' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'On', 'profundcore' ), 'label_off' => __( 'Off', 'profundcore' ), 'return_value' => 'yes', 'default' => 'no', 'condition' => [ 'slider_on!' => 'yes', 'filter_on!' => 'yes', ] ] ); $this->add_control( 'loaded_item', [ 'label' => __( 'Default Load', 'profundcore' ), 'type' => Controls_Manager::NUMBER, 'min' => 1, 'max' => 30, 'step' => 1, 'default' => 6, 'condition' => [ 'load_more' => 'yes', 'slider_on!' => 'yes', 'filter_on!' => 'yes', ] ] ); $this->add_control( 'load_slice', [ 'label' => __( 'Slice Item', 'profundcore' ), 'type' => Controls_Manager::NUMBER, 'min' => 1, 'max' => 30, 'step' => 1, 'default' => 3, 'condition' => [ 'load_more' => 'yes', 'slider_on!' => 'yes', 'filter_on!' => 'yes', ] ] ); $repeater = new Repeater(); $repeater->add_control( 'camp_post_categories', [ 'label' => esc_html__( 'Categories', 'profundcore' ), 'type' => Controls_Manager::SELECT, 'options' => profund_get_taxonomies('campaigncats'), ] ); $repeater->add_control( 'camp_post_categories_icon', [ 'label' => esc_html__( 'Select Icon', 'profundcore' ), 'type' => Controls_Manager::ICON ] ); $this->add_control( 'category_list', [ 'label' => __( 'Category Item', 'profundcore' ), 'type' => Controls_Manager::REPEATER, 'fields' => $repeater->get_controls(), 'title_field' => '{{{ camp_post_categories }}}', 'condition' => [ 'load_more!' => 'yes', 'slider_on!' => 'yes', 'filter_on' => 'yes', ] ] ); $this->add_control( 'post_limit', [ 'label' => __('Limit', 'profundcore'), 'type' => Controls_Manager::NUMBER, 'default' => 15, 'separator'=>'before', ] ); $this->add_control( 'custom_order', [ 'label' => esc_html__( 'Custom order', 'profundcore' ), 'type' => Controls_Manager::SWITCHER, 'return_value' => 'yes', 'default' => 'no', ] ); $this->add_control( 'postorder', [ 'label' => esc_html__( 'Order', 'profundcore' ), 'type' => Controls_Manager::SELECT, 'default' => 'DESC', 'options' => [ 'DESC' => esc_html__('Descending','profundcore'), 'ASC' => esc_html__('Ascending','profundcore'), ], 'condition' => [ 'custom_order!' => 'yes', ] ] ); $this->add_control( 'orderby', [ 'label' => esc_html__( 'Orderby', 'profundcore' ), 'type' => Controls_Manager::SELECT, 'default' => 'none', 'options' => [ 'none' => esc_html__('None','profundcore'), 'ID' => esc_html__('ID','profundcore'), 'date' => esc_html__('Date','profundcore'), 'name' => esc_html__('Name','profundcore'), 'title' => esc_html__('Title','profundcore'), 'comment_count' => esc_html__('Comment count','profundcore'), 'rand' => esc_html__('Random','profundcore'), ], 'condition' => [ 'custom_order' => 'yes', ] ] ); $this->add_control( 'show_thumb', [ 'label' => esc_html__( 'Thumbnail', 'profundcore' ), 'type' => Controls_Manager::SWITCHER, 'return_value' => 'yes', 'default' => 'yes', ] ); $this->add_control( 'show_author', [ 'label' => esc_html__( 'Author Info', 'profundcore' ), 'type' => Controls_Manager::SWITCHER, 'return_value' => 'yes', 'default' => 'yes', ] ); $this->add_control( 'show_title', [ 'label' => esc_html__( 'Title', 'profundcore' ), 'type' => Controls_Manager::SWITCHER, 'return_value' => 'yes', 'default' => 'yes', ] ); $this->add_control( 'title_length', [ 'label' => __( 'Title Length', 'profundcore' ), 'type' => Controls_Manager::NUMBER, 'step' => 1, 'default' => 5, 'condition'=>[ 'show_title'=>'yes', ] ] ); $this->add_control( 'show_content', [ 'label' => esc_html__( 'Content', 'profundcore' ), 'type' => Controls_Manager::SWITCHER, 'return_value' => 'yes', 'default' => 'no', ] ); $this->add_control( 'content_length', [ 'label' => __( 'Content Length', 'profundcore' ), 'type' => Controls_Manager::NUMBER, 'step' => 1, 'default' => 20, 'condition'=>[ 'show_content'=>'yes', ] ] ); $this->add_control( 'show_cat', [ 'label' => esc_html__( 'Category', 'profundcore' ), 'type' => Controls_Manager::SWITCHER, 'return_value' => 'yes', 'default' => 'no', ] ); $this->add_control( 'show_read_more_btn', [ 'label' => esc_html__( 'Read More', 'profundcore' ), 'type' => Controls_Manager::SWITCHER, 'return_value' => 'yes', 'default' => 'no', ] ); $this->add_control( 'read_more_txt', [ 'label' => __( 'Read More button text', 'profundcore' ), 'type' => Controls_Manager::TEXT, 'default' => __( 'Read More', 'profundcore' ), 'placeholder' => __( 'Read More', 'profundcore' ), 'label_block'=>true, 'condition'=>[ 'show_read_more_btn'=>'yes', ] ] ); $this->add_control( 'readmore_button', [ 'label' => __( 'Read More icon', 'profundcore' ), 'type' => Controls_Manager::ICON, 'default' => 'fa fa-arrow-right', 'condition'=>[ 'show_read_more_btn'=>'yes', ] ] ); $this->end_controls_section(); // Slider setting $this->start_controls_section( 'carosul_slider_option', [ 'label' => __( 'Slider Option', 'profundcore' ), 'condition' => [ 'slider_on' => 'yes', ] ] ); $this->add_control( 'slitems', [ 'label' => __( 'Slider Items', 'profundcore' ), 'type' => Controls_Manager::NUMBER, 'min' => 1, 'max' => 20, 'step' => 1, 'default' => 3, 'condition' => [ 'slider_on' => 'yes', ] ] ); $this->add_control( 'slarrows', [ 'label' => __( 'Slider Arrow', 'profundcore' ), 'type' => Controls_Manager::SWITCHER, 'return_value' => 'yes', 'default' => 'yes', 'condition' => [ 'slider_on' => 'yes', ] ] ); $this->add_control( 'slprevicon', [ 'label' => __( 'Previous icon', 'profundcore' ), 'type' => Controls_Manager::ICON, 'default' => 'fa fa-angle-left', 'condition' => [ 'slider_on' => 'yes', 'slarrows' => 'yes', ] ] ); $this->add_control( 'slnexticon', [ 'label' => __( 'Next icon', 'profundcore' ), 'type' => Controls_Manager::ICON, 'default' => 'fa fa-angle-right', 'condition' => [ 'slider_on' => 'yes', 'slarrows' => 'yes', ] ] ); $this->add_control( 'sldots', [ 'label' => __( 'Slider dots', 'profundcore' ), 'type' => Controls_Manager::SWITCHER, 'return_value' => 'yes', 'default' => 'no', 'condition' => [ 'slider_on' => 'yes', ] ] ); $this->add_control( 'slpause_on_hover', [ 'type' => Controls_Manager::SWITCHER, 'label_off' => __('No', 'profundcore'), 'label_on' => __('Yes', 'profundcore'), 'return_value' => 'yes', 'default' => 'yes', 'label' => __('Pause on Hover?', 'profundcore'), 'condition' => [ 'slider_on' => 'yes', ] ] ); $this->add_control( 'slcentermode', [ 'label' => __( 'Center Mode', 'profundcore' ), 'type' => Controls_Manager::SWITCHER, 'return_value' => 'yes', 'default' => 'no', 'condition' => [ 'slider_on' => 'yes', ] ] ); $this->add_control( 'slcenterpadding', [ 'label' => __( 'Center padding', 'profundcore' ), 'type' => Controls_Manager::NUMBER, 'min' => 0, 'max' => 500, 'step' => 1, 'default' => 50, 'condition' => [ 'slider_on' => 'yes', 'slcentermode' => 'yes', ] ] ); $this->add_control( 'slautolay', [ 'label' => __( 'Slider auto play', 'profundcore' ), 'type' => Controls_Manager::SWITCHER, 'return_value' => 'yes', 'separator' => 'before', 'default' => 'no', 'condition' => [ 'slider_on' => 'yes', ] ] ); $this->add_control( 'slautoplay_speed', [ 'label' => __('Autoplay speed', 'profundcore'), 'type' => Controls_Manager::NUMBER, 'default' => 3000, 'condition' => [ 'slider_on' => 'yes', ] ] ); $this->add_control( 'slanimation_speed', [ 'label' => __('Autoplay animation speed', 'profundcore'), 'type' => Controls_Manager::NUMBER, 'default' => 300, 'condition' => [ 'slider_on' => 'yes', ] ] ); $this->add_control( 'slscroll_columns', [ 'label' => __('Slider item to scroll', 'profundcore'), 'type' => Controls_Manager::NUMBER, 'min' => 1, 'max' => 10, 'step' => 1, 'default' => 1, 'condition' => [ 'slider_on' => 'yes', ] ] ); $this->add_control( 'heading_tablet', [ 'label' => __( 'Tablet', 'profundcore' ), 'type' => Controls_Manager::HEADING, 'separator' => 'after', 'condition' => [ 'slider_on' => 'yes', ] ] ); $this->add_control( 'sltablet_display_columns', [ 'label' => __('Slider Items', 'profundcore'), 'type' => Controls_Manager::NUMBER, 'min' => 1, 'max' => 8, 'step' => 1, 'default' => 2, 'condition' => [ 'slider_on' => 'yes', ] ] ); $this->add_control( 'sltablet_scroll_columns', [ 'label' => __('Slider item to scroll', 'profundcore'), 'type' => Controls_Manager::NUMBER, 'min' => 1, 'max' => 8, 'step' => 1, 'default' => 1, 'condition' => [ 'slider_on' => 'yes', ] ] ); $this->add_control( 'sltablet_width', [ 'label' => __('Tablet Resolution', 'profundcore'), 'description' => __('The resolution to tablet.', 'profundcore'), 'type' => Controls_Manager::NUMBER, 'default' => 778, 'condition' => [ 'slider_on' => 'yes', ] ] ); $this->add_control( 'heading_mobile', [ 'label' => __( 'Mobile Phone', 'profundcore' ), 'type' => Controls_Manager::HEADING, 'separator' => 'after', 'condition' => [ 'slider_on' => 'yes', ] ] ); $this->add_control( 'slmobile_display_columns', [ 'label' => __('Slider Items', 'profundcore'), 'type' => Controls_Manager::NUMBER, 'min' => 1, 'max' => 4, 'step' => 1, 'default' => 1, 'condition' => [ 'slider_on' => 'yes', ] ] ); $this->add_control( 'slmobile_scroll_columns', [ 'label' => __('Slider item to scroll', 'profundcore'), 'type' => Controls_Manager::NUMBER, 'min' => 1, 'max' => 4, 'step' => 1, 'default' => 1, 'condition' => [ 'slider_on' => 'yes', ] ] ); $this->add_control( 'slmobile_width', [ 'label' => __('Mobile Resolution', 'profundcore'), 'description' => __('The resolution to mobile.', 'profundcore'), 'type' => Controls_Manager::NUMBER, 'default' => 480, 'condition' => [ 'slider_on' => 'yes', ] ] ); $this->end_controls_section(); // Slider Option end // post Style tab section $this->start_controls_section( 'campaign_area_style_section', [ 'label' => __( 'Area Style', 'profundcore' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'campaign_area_margin', [ 'label' => __( 'Margin', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .campaign-box-area' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' =>'before', ] ); $this->add_responsive_control( 'campaign_area_padding', [ 'label' => __( 'Padding', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .campaign-box-area' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' =>'before', ] ); $this->add_responsive_control( 'campaign_area_width', [ 'label' => __( 'Width', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%', 'vw' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 1000, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], 'vw' => [ 'min' => 0, 'max' => 100, ], ], 'default' => [ 'unit' => '%', 'size' => 100, ], 'selectors' => [ '{{WRAPPER}} .campaign-box-area' => 'width: {{SIZE}}{{UNIT}};', ], ] ); $this->end_controls_section(); // post section style end // Service Style tab section $this->start_controls_section( 'campaign_column_style_section', [ 'label' => __( 'Column Style', 'profundcore' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => [ 'slider_on!' => 'yes', ] ] ); $this->add_responsive_control( 'campaign_column_margin', [ 'label' => __( 'Margin', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .campaign-box-area.campaign-grid .campaign-item' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' =>'before', ] ); $this->add_responsive_control( 'campaign_column_padding', [ 'label' => __( 'Padding', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .campaign-box-area.campaign-grid .campaign-item' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' =>'before', ] ); $this->add_responsive_control( 'campaign_column_width', [ 'label' => __( 'Width', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 1000, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ] ], 'default' => [ 'unit' => '%', 'size' => 33.33, ], 'selectors' => [ '{{WRAPPER}} .campaign-box-area.campaign-grid .campaign-item' => 'width: {{SIZE}}{{UNIT}};', ], ] ); $this->end_controls_section(); // post Style tab section $this->start_controls_section( 'campaign_box_style_section', [ 'label' => __( 'Box Style', 'profundcore' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'campaign_box_margin', [ 'label' => __( 'Margin', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .campaign-box-area .campaign-item .campaign-box' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' =>'before', ] ); $this->add_responsive_control( 'campaign_box_padding', [ 'label' => __( 'Padding', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .campaign-box-area .campaign-item .campaign-box .box-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' =>'before', ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'campaign_box_border', 'label' => __( 'Border', 'core' ), 'selector' => '{{WRAPPER}} .campaign-box-area .campaign-item .campaign-box', 'separator' =>'before', ] ); $this->add_responsive_control( 'campaign_box_border_radius', [ 'label' => esc_html__( 'Border Radius', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'selectors' => [ '{{WRAPPER}} .campaign-box-area .campaign-item .campaign-box' => 'border-radius: {{TOP}}px {{RIGHT}}px {{BOTTOM}}px {{LEFT}}px;', ], 'separator' =>'before', ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'campaign_box_shadow', 'label' => __( 'Box Shadow', '' ), 'selector' => '{{WRAPPER}} .campaign-box-area .campaign-item .campaign-box', 'separator' =>'before', ] ); $this->add_group_control( Group_Control_Background::get_type(), [ 'name' => 'campaign_box_background', 'label' => __( 'Background', 'profundcore' ), 'types' => [ 'classic', 'gradient' ], 'selector' => '{{WRAPPER}} .campaign-box-area .campaign-item .campaign-box', 'separator' =>'before', ] ); $this->end_controls_section(); // post section style end // post Style tab section $this->start_controls_section( 'cat_box_style_section', [ 'label' => __( 'Category', 'profundcore' ), 'tab' => Controls_Manager::TAB_STYLE ] ); $this->add_control( 'cat_selct_box_style', [ 'label' => esc_html__( 'Cat Position', 'profundcore' ), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => '', 'options' => [ 'float:right;' => esc_html__( 'Right', 'profundcore' ), 'display:block;' => esc_html__( 'Bottom', 'profundcore' ), 'display:inline-block;' => esc_html__( 'Default', 'profundcore' ), ], 'selectors' => [ '{{WRAPPER}} .author_details .profund-cat' => '{{VALUE}}', ], ] ); $this->add_control( 'cats_color', [ 'label' => esc_html__( 'Color', 'profundcore' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .author_details .profund-cat' => 'color: {{VALUE}}', ], ] ); $this->add_group_control( \Elementor\Group_Control_Typography::get_type(), [ 'name' => 'cats__typography', 'selector' => '{{WRAPPER}} .author_details .profund-cat', ] ); $this->add_group_control( \Elementor\Group_Control_Background::get_type(), [ 'name' => 'cats_background', 'label' => esc_html__( 'Background', 'profundcore' ), 'types' => [ 'classic', 'gradient' ], 'selector' => '{{WRAPPER}} .author_details .profund-cat', ] ); $this->add_group_control( \Elementor\Group_Control_Border::get_type(), [ 'name' => 'cats_border', 'label' => esc_html__( 'Border', 'profundcore' ), 'selector' => '{{WRAPPER}} .author_details .profund-cat', ] ); $this->add_control( 'border_cart_adfra', [ 'label' => esc_html__( 'Border Radius', 'profundcore' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => [ 'px', '%' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 1000, 'step' => 5, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'default' => [ 'unit' => '%', 'size' => 50, ], 'selectors' => [ '{{WRAPPER}} .author_details .profund-cat' => 'border-radius: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'cats_margin', [ 'label' => esc_html__( 'Margin', 'profundcore' ), 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .author_details .profund-cat' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'cats_padding', [ 'label' => esc_html__( 'Padding', 'profundcore' ), 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .author_details .profund-cat' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'cat_hovermore_options', [ 'label' => esc_html__( 'Hover', 'profundcore' ), 'type' => \Elementor\Controls_Manager::HEADING, 'separator' => 'before', ] ); $this->add_control( 'cats_hover_color', [ 'label' => esc_html__( 'Hover Color', 'profundcore' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .author_details .profund-cat:hover' => 'color: {{VALUE}}', ], ] ); $this->add_group_control( \Elementor\Group_Control_Background::get_type(), [ 'name' => 'cats_hover_background', 'label' => esc_html__( 'Background', 'profundcore' ), 'types' => [ 'classic', 'gradient' ], 'selector' => '{{WRAPPER}} .author_details .profund-cat:hover', ] ); $this->end_controls_section(); // post section style end // post Style tab section $this->start_controls_section( 'content_box_style_section', [ 'label' => __( 'Content Box', 'profundcore' ), 'tab' => Controls_Manager::TAB_STYLE ] ); $this->add_control( 'conbtnt_selct_box_style', [ 'label' => esc_html__( 'Content Order', 'profundcore' ), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => '', 'options' => [ 'display:flex;flex-direction:column;' => esc_html__( 'Yes', 'profundcore' ), '' => esc_html__( 'No', 'profundcore' ), ], 'selectors' => [ '{{WRAPPER}} .campaign-box-area .campaign-item .campaign-box .box-content' => '{{VALUE}}', ], ] ); $this->add_control( 'title_order_h', [ 'label' => esc_html__( 'Title', 'profundcore' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => -50, 'max' => 1000, 'step' => 5, ], ], 'selectors' => [ '{{WRAPPER}} .main-title' => 'order: {{SIZE}};', ], 'condition' => [ 'conbtnt_selct_box_style' => ['display:flex;flex-direction:column;'] ] ] ); $this->add_control( 'skill_order_h', [ 'label' => esc_html__( 'Skillbar', 'profundcore' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => -50, 'max' => 1000, 'step' => 5, ], ], 'selectors' => [ '{{WRAPPER}} .skillbar' => 'order: {{SIZE}};', ], 'condition' => [ 'conbtnt_selct_box_style' => ['display:flex;flex-direction:column;'] ] ] ); $this->add_control( 'author_order_h', [ 'label' => esc_html__( 'Author / Cat', 'profundcore' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => -50, 'max' => 1000, 'step' => 5, ], ], 'selectors' => [ '{{WRAPPER}} .author_details' => 'order: {{SIZE}};', ], 'condition' => [ 'conbtnt_selct_box_style' => ['display:flex;flex-direction:column;'] ] ] ); $this->end_controls_section(); // post section style end $this->start_controls_section( 'image_box_style_section', [ 'label' => __( 'Image Box', 'profundcore' ), 'tab' => Controls_Manager::TAB_STYLE ] ); $this->add_responsive_control( 'image_position', [ 'label' => __( 'Image Position', 'profundcore' ), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'flex' => [ 'title' => __( 'Left', 'profundcore' ), 'icon' => 'fa fa-align-left', ], 'block' => [ 'title' => __( 'None', 'profundcore' ), 'icon' => 'fa fa-align-center', ] ], 'selectors' => [ '{{WRAPPER}} .campaign-box-area .campaign-item .campaign-box' => 'display: {{VALUE}};', ], 'default' => 'block', 'separator' =>'before', ] ); $this->add_responsive_control( 'image_width', [ 'label' => __( 'Width', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 1000, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .campaign-box-area .campaign-item .campaign-box .box-image' => 'width: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'image_box_margin', [ 'label' => __( 'Margin', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .campaign-box-area .campaign-item .campaign-box .box-image' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' =>'before', ] ); $this->add_responsive_control( 'image_box_padding', [ 'label' => __( 'Padding', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .campaign-box-area .campaign-item .campaign-box .box-image' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' =>'before', ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'image_box_border', 'label' => __( 'Border', 'core' ), 'selector' => '{{WRAPPER}} .campaign-box-area .campaign-item .campaign-box .box-image', 'separator' =>'before', ] ); $this->add_responsive_control( 'image_box_border_radius', [ 'label' => esc_html__( 'Border Radius', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'selectors' => [ '{{WRAPPER}} .campaign-box-area .campaign-item .campaign-box .box-image' => 'border-radius: {{TOP}}px {{RIGHT}}px {{BOTTOM}}px {{LEFT}}px;', ], 'separator' =>'before', ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'image_box_shadow', 'label' => __( 'Box Shadow', '' ), 'selector' => '{{WRAPPER}} .campaign-box-area .campaign-item .campaign-box .box-image', 'separator' =>'before', ] ); $this->end_controls_section(); // post section style end $this->start_controls_section( 'author_style_section', [ 'label' => __( 'Author Style', 'profundcore' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'author_typography', 'selector' => '{{WRAPPER}} .campaign-box .author-name', ] ); $this->add_control( 'author_color', [ 'label' => __( 'Color', 'profundcore' ), 'type' => Controls_Manager::COLOR, 'default' => '#72778D', 'selectors' => [ '{{WRAPPER}} .campaign-box .author-name' => 'color: {{VALUE}};', ], ] ); $this->add_responsive_control( 'author_margin', [ 'label' => __( 'Margin', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'default' => [ 'top' => '0', 'right' => '0', 'bottom' => '10', 'left' => '0', 'isLinked' => false ], 'selectors' => [ '{{WRAPPER}} .campaign-box .author_details' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' =>'before', ] ); $this->add_responsive_control( 'author_padding', [ 'label' => __( 'Padding', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'default' => [ 'top' => '0', 'right' => '0', 'bottom' => '0', 'left' => '0', 'isLinked' => false ], 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .campaign-box .author_details' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' =>'before', ] ); $this->end_controls_section(); $this->start_controls_section( 'title_style_section', [ 'label' => __( 'Title Style', 'profundcore' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'title_typography', 'selector' => '{{WRAPPER}} .campaign-box-area .campaign-item .campaign-box .main-title', ] ); $this->add_control( 'title_color', [ 'label' => __( 'Color', 'profundcore' ), 'type' => Controls_Manager::COLOR, 'default' => '#151d41', 'selectors' => [ '.campaign-box-area .campaign-item .campaign-box .main-title a' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'title_hover_color', [ 'label' => __( 'Hover Color', 'profundcore' ), 'type' => Controls_Manager::COLOR, 'default' => '#55c882', 'selectors' => [ '.campaign-box-area .campaign-item .campaign-box .main-title a:hover' => 'color: {{VALUE}};', ], ] ); $this->add_responsive_control( 'title_margin', [ 'label' => __( 'Margin', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'default' => [ 'top' => '0', 'right' => '0', 'bottom' => '15', 'left' => '0', 'isLinked' => false ], 'selectors' => [ '{{WRAPPER}} .campaign-box-area .campaign-item .campaign-box .main-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' =>'before', ] ); $this->add_responsive_control( 'title_padding', [ 'label' => __( 'Padding', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'default' => [ 'top' => '0', 'right' => '0', 'bottom' => '0', 'left' => '0', 'isLinked' => false ], 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .campaign-box-area .campaign-item .campaign-box .main-title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' =>'before', ] ); $this->end_controls_section(); $this->start_controls_section( 'progress_style_section', [ 'label' => __( 'Progress Bar', 'profundcore' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'bar_color', [ 'label' => __( 'Bar Color', 'profundcore' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .skillbar .count-bar' => 'background-color: {{VALUE}};', ] ] ); $this->add_control( 'bar_bg_color', [ 'label' => __( 'Background Color', 'profundcore' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .skillbar' => 'background-color: {{VALUE}};', ], ] ); $this->add_control( 'percentage_color', [ 'label' => __( 'Percentage Color', 'profundcore' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .skillbar .count' => 'color: {{VALUE}};', ] ] ); $this->add_responsive_control( 'parcentage_bar_height', [ 'label' => __( 'Bar Height', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0, 'max' => 1000, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], 'vh' => [ 'min' => 0, 'max' => 100, ] ], 'size_units' => [ 'px', '%', 'vh' ], 'selectors' => [ '{{WRAPPER}} .skillbar .count-bar, {{WRAPPER}} .skillbar' => 'height: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'bar_radius', [ 'label' => __( 'Bar Radius', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'default' => [ 'top' => '2', 'right' => '2', 'bottom' => '2', 'left' => '2', 'isLinked' => false ], 'selectors' => [ '{{WRAPPER}} .skillbar .count-bar, {{WRAPPER}} .skillbar' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'progress_margin', [ 'label' => __( 'Margin', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'default' => [ 'top' => '0', 'right' => '0', 'bottom' => '20', 'left' => '0', 'isLinked' => false ], 'selectors' => [ '{{WRAPPER}} .skillbar' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_section(); $this->start_controls_section( 'footer_style_section', [ 'label' => __( 'Footer Style', 'profundcore' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'footer_title_typography', 'label' => __( 'Title Typography', 'profundcore' ), 'selector' => '{{WRAPPER}} .campaign-box-area .campaign-item .campaign-box .box-footer .title', ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'footer_content_typography', 'label' => __( 'Content Typography', 'profundcore' ), 'selector' => '{{WRAPPER}} .campaign-box-area .campaign-item .campaign-box .box-footer .content', ] ); $this->add_control( 'footer_title_color', [ 'label' => __( 'Title Color', 'profundcore' ), 'type' => Controls_Manager::COLOR, 'default' => '#63688e', 'selectors' => [ '{{WRAPPER}} .campaign-box-area .campaign-item .campaign-box .box-footer .title' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'footer_content_color', [ 'label' => __( 'Content Color', 'profundcore' ), 'type' => Controls_Manager::COLOR, 'default' => '#55C882', 'selectors' => [ '{{WRAPPER}} .campaign-box-area .campaign-item .campaign-box .box-footer .content' => 'color: {{VALUE}};', ], ] ); $this->end_controls_section(); $this->start_controls_section( 'post_slider_readmore_style_section', [ 'label' => __( 'Read More', 'profundcore' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition'=>[ 'show_read_more_btn'=>'yes', 'read_more_txt!'=>'', ] ] ); $this->start_controls_tabs('readmore_style_tabs'); $this->start_controls_tab( 'readmore_style_normal_tab', [ 'label' => __( 'Normal', 'profundcore' ), ] ); $this->add_control( 'readmore_color', [ 'label' => __( 'Color', 'profundcore' ), 'type' => Controls_Manager::COLOR, 'default'=>'#55C882', 'selectors' => [ '{{WRAPPER}} .campaign-box .readmore-btn' => 'color: {{VALUE}}', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'readmore_typography', 'label' => __( 'Typography', 'profundcore' ), 'selector' => '{{WRAPPER}} .campaign-box .readmore-btn', ] ); $this->add_responsive_control( 'readmore_margin', [ 'label' => __( 'Margin', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .campaign-box .readmore-btn' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'readmore_padding', [ 'label' => __( 'Padding', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .campaign-box .readmore-btn' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_group_control( Group_Control_Background::get_type(), [ 'name' => 'readmore_background', 'label' => __( 'Background', 'profundcore' ), 'types' => [ 'classic', 'gradient' ], 'selector' => '{{WRAPPER}} .campaign-box .readmore-btn', ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'readmore_border', 'label' => __( 'Border', 'profundcore' ), 'selector' => '{{WRAPPER}} .campaign-box .readmore-btn', ] ); $this->add_responsive_control( 'readmore_border_radius', [ 'label' => esc_html__( 'Border Radius', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'selectors' => [ '{{WRAPPER}} .campaign-box .readmore-btn' => 'border-radius: {{TOP}}px {{RIGHT}}px {{BOTTOM}}px {{LEFT}}px;', ], ] ); $this->end_controls_tab(); $this->start_controls_tab( 'readmore_style_hover_tab', [ 'label' => __( 'Hover', 'profundcore' ), ] ); $this->add_control( 'readmore_hover_color', [ 'label' => __( 'Color', 'profundcore' ), 'type' => Controls_Manager::COLOR, 'default'=>'#55C882', 'selectors' => [ '{{WRAPPER}} .campaign-box .readmore-btn:hover' => 'color: {{VALUE}}', ], ] ); $this->add_group_control( Group_Control_Background::get_type(), [ 'name' => 'readmore_hover_background', 'label' => __( 'Background', 'profundcore' ), 'types' => [ 'classic', 'gradient' ], 'selector' => '{{WRAPPER}} .campaign-box .readmore-btn:hover', ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'readmore_hover_border', 'label' => __( 'Border', 'profundcore' ), 'selector' => '{{WRAPPER}} .campaign-box .readmore-btn:hover', ] ); $this->add_responsive_control( 'readmore_hover_border_radius', [ 'label' => esc_html__( 'Border Radius', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'selectors' => [ '{{WRAPPER}} .campaign-box .readmore-btn:hover' => 'border-radius: {{TOP}}px {{RIGHT}}px {{BOTTOM}}px {{LEFT}}px;', ], ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->end_controls_section(); // campaign Style tab section $this->start_controls_section( 'campaign_filter_section', [ 'label' => __( 'Filter Menu', 'profundcore' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => [ 'filter_on' => 'yes', ] ] ); $this->add_responsive_control( 'campaign_menu_align', [ 'label' => __( 'Alignment', 'profund' ), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' => __( 'Left', 'profund' ), 'icon' => 'fa fa-align-left', ], 'center' => [ 'title' => __( 'Center', 'profund' ), 'icon' => 'fa fa-align-center', ], 'right' => [ 'title' => __( 'Right', 'profund' ), 'icon' => 'fa fa-align-right', ], 'justify' => [ 'title' => __( 'Justified', 'profund' ), 'icon' => 'fa fa-align-justify', ], ], 'selectors' => [ '{{WRAPPER}} .campaign-filter-menu' => 'text-align: {{VALUE}};', ], 'default' => 'left' ] ); $this->add_responsive_control( 'filter_menu_width', [ 'label' => __( 'Width', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%', 'vw' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 9999, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], 'vw' => [ 'min' => 0, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .campaign-filter-menu' => 'width: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'filter_menu_margin', [ 'label' => __( 'Margin', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .campaign-filter-menu' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' =>'before', ] ); $this->add_control( 'campaign_filter_display', [ 'label' => esc_html__( 'Display Item', 'profundcore' ), 'type' => Controls_Manager::SELECT, 'default' => 'inline-block', 'options' => [ 'block' => esc_html__('Block','profundcore'), 'inline-block' => esc_html__('Inline Block','profundcore'), ], 'selectors' => [ '{{WRAPPER}} .campaign-filter-menu' => 'display: {{VALUE}};' ], ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'filter_menu_area_border', 'label' => __( 'Border', 'profundcore' ), 'selector' => '{{WRAPPER}} .campaign-filter-menu', ] ); $this->add_responsive_control( 'filter_menu_area_radius', [ 'label' => esc_html__( 'Box Radius', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'selectors' => [ '{{WRAPPER}} .campaign-filter-menu' => 'border-radius: {{TOP}}px {{RIGHT}}px {{BOTTOM}}px {{LEFT}}px;', ], ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'filter_menu_area_shadow', 'selector' => '{{WRAPPER}} .campaign-filter-menu', ] ); $this->add_group_control( Group_Control_Background::get_type(), [ 'name' => 'filter_menu_area_background', 'label' => __( 'Background', 'profundcore' ), 'types' => [ 'classic', 'gradient' ], 'selector' => '{{WRAPPER}} .campaign-filter-menu', ] ); $this->add_control( 'filter_menu_list_title_sc', [ 'label' => __( 'Filter Menu Item Style', 'profundcore' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', ] ); $this->start_controls_tabs('box_filter_style_tab'); $this->start_controls_tab( 'box_filter_normal', [ 'label' => __( 'Normal', 'profundcore' ), ] ); $this->add_control( 'campaign_filter_menu_display', [ 'label' => esc_html__( 'Display Item', 'profundcore' ), 'type' => Controls_Manager::SELECT, 'default' => 'inline-block', 'options' => [ 'block' => esc_html__('Block','profundcore'), 'inline-block' => esc_html__('Inline Block','profundcore'), ], 'selectors' => [ '{{WRAPPER}} .campaign-filter-menu li' => 'display: {{VALUE}};' ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'campaign_filter_typography', 'selector' => '{{WRAPPER}} .campaign-filter-menu li', ] ); $this->add_control( 'filter_color', [ 'label' => __( 'Color', 'profundcore' ), 'type' => Controls_Manager::COLOR, 'default' => '#63688e', 'selectors' => [ '{{WRAPPER}} .campaign-filter-menu li' => 'color: {{VALUE}};' ], ] ); $this->add_control( 'filter_bg_color', [ 'label' => __( 'Background Color', 'profundcore' ), 'type' => Controls_Manager::COLOR, 'default' => 'transparent', 'selectors' => [ '{{WRAPPER}} .campaign-filter-menu li' => 'background-color: {{VALUE}};' ], ] ); $this->add_responsive_control( 'filter_margin', [ 'label' => __( 'Margin', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .campaign-filter-menu li' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' =>'before', ] ); $this->add_responsive_control( 'filter_padding', [ 'label' => __( 'Padding', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .campaign-filter-menu li' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' =>'before', ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'filter_menu_border', 'label' => __( 'Border', 'profundcore' ), 'selector' => '{{WRAPPER}} .campaign-filter-menu li', ] ); $this->add_responsive_control( 'filter_menu_border_radius', [ 'label' => esc_html__( 'Box Radius', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'selectors' => [ '{{WRAPPER}} .campaign-filter-menu li' => 'border-radius: {{TOP}}px {{RIGHT}}px {{BOTTOM}}px {{LEFT}}px;', ], ] ); $this->add_control( 'box_filter_transition', [ 'label' => __( 'Transition Duration', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'default' => [ 'size' => 0.3, ], 'range' => [ 'px' => [ 'max' => 3, 'step' => 0.1, ], ], 'selectors' => [ '{{WRAPPER}} .campaign-filter-menu li' => 'transition-duration: {{SIZE}}s', ], ] ); $this->end_controls_tab(); // Hover Style tab end $this->start_controls_tab( 'box_filter_hover', [ 'label' => __( 'active', 'profundcore' ), ] ); $this->add_control( 'hover_filter_color', [ 'label' => __( 'Active Color', 'profundcore' ), 'type' => Controls_Manager::COLOR, 'default' => '#55c882', 'selectors' => [ '{{WRAPPER}} .campaign-filter-menu li:hover' => 'color: {{VALUE}};', '{{WRAPPER}} .campaign-filter-menu li:before' => 'background-color: {{VALUE}};', '{{WRAPPER}} .campaign-filter-menu li.active' => 'color: {{VALUE}};' ], ] ); $this->add_control( 'hover_filter_bg_color', [ 'label' => __( 'Active Background', 'profundcore' ), 'type' => Controls_Manager::COLOR, 'default' => 'transparent', 'selectors' => [ '{{WRAPPER}} .campaign-filter-menu li:hover' => 'background-color: {{VALUE}};', '{{WRAPPER}} .campaign-filter-menu li.active' => 'background-color: {{VALUE}};' ], ] ); $this->end_controls_tab(); // Hover Style tab end $this->end_controls_tabs();// Box Style tabs end $this->end_controls_section(); // Style Slider arrow style start $this->start_controls_section( 'slider_arrow_style', [ 'label' => __( 'Arrow', 'profundcore' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' =>[ 'slider_on' => 'yes', 'slarrows' => 'yes', ], ] ); $this->start_controls_tabs( 'slider_arrow_style_tabs' ); // Normal tab Start $this->start_controls_tab( 'slider_arrow_style_normal_tab', [ 'label' => __( 'Normal', 'profundcore' ), ] ); $this->add_control( 'slider_arrow_color', [ 'label' => __( 'Color', 'profundcore' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .profundcore-carousel-activation .slick-arrow' => 'color: {{VALUE}};', ], ] ); $this->add_responsive_control( 'slider_arrow_gap', [ 'label' => __( 'Arrow Gap', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px' ], 'range' => [ 'px' => [ 'min' => -100, 'max' => 100, 'step' => 1, ] ], 'default' => [ 'unit' => 'px', 'size' => 30, ], 'selectors' => [ '{{WRAPPER}} .profundcore-carousel-activation .slick-arrow.slick-prev' => 'left: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .profundcore-carousel-activation .slick-arrow.slick-next' => 'right: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'slider_arrow_fontsize', [ 'label' => __( 'Font Size', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'default' => [ 'unit' => 'px', 'size' => 16, ], 'selectors' => [ '{{WRAPPER}} .profundcore-carousel-activation .slick-arrow' => 'font-size: {{SIZE}}{{UNIT}};', ], ] ); $this->add_group_control( Group_Control_Background::get_type(), [ 'name' => 'slider_arrow_background', 'label' => __( 'Background', 'profundcore' ), 'types' => [ 'classic', 'gradient' ], 'selector' => '{{WRAPPER}} .profundcore-carousel-activation .slick-arrow', ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'slider_arrow_border', 'label' => __( 'Border', 'profundcore' ), 'selector' => '{{WRAPPER}} .profundcore-carousel-activation .slick-arrow', ] ); $this->add_responsive_control( 'slider_border_radius', [ 'label' => esc_html__( 'Border Radius', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'selectors' => [ '{{WRAPPER}} .profundcore-carousel-activation .slick-arrow' => 'border-radius: {{TOP}}px {{RIGHT}}px {{BOTTOM}}px {{LEFT}}px;', ], ] ); $this->add_responsive_control( 'slider_arrow_height', [ 'label' => __( 'Height', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 1000, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'default' => [ 'unit' => 'px', 'size' => 70, ], 'selectors' => [ '{{WRAPPER}} .profundcore-carousel-activation .slick-arrow' => 'height: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'slider_arrow_width', [ 'label' => __( 'Width', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 1000, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'default' => [ 'unit' => 'px', 'size' => 70, ], 'selectors' => [ '{{WRAPPER}} .profundcore-carousel-activation .slick-arrow' => 'width: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'slider_arrow_padding', [ 'label' => __( 'Padding', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .profundcore-carousel-activation .slick-arrow' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' =>'before', ] ); $this->end_controls_tab(); // Normal tab end // Hover tab Start $this->start_controls_tab( 'slider_arrow_style_hover_tab', [ 'label' => __( 'Hover', 'profundcore' ), ] ); $this->add_control( 'slider_arrow_hover_color', [ 'label' => __( 'Color', 'profundcore' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .profundcore-carousel-activation .slick-arrow:hover' => 'color: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Background::get_type(), [ 'name' => 'slider_arrow_hover_background', 'label' => __( 'Background', 'profundcore' ), 'types' => [ 'classic', 'gradient' ], 'selector' => '{{WRAPPER}} .profundcore-carousel-activation .slick-arrow:hover', ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'slider_arrow_hover_border', 'label' => __( 'Border', 'profundcore' ), 'selector' => '{{WRAPPER}} .profundcore-carousel-activation .slick-arrow:hover', ] ); $this->add_responsive_control( 'slider_arrow_hover_border_radius', [ 'label' => esc_html__( 'Border Radius', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'selectors' => [ '{{WRAPPER}} .profundcore-carousel-activation .slick-arrow:hover' => 'border-radius: {{TOP}}px {{RIGHT}}px {{BOTTOM}}px {{LEFT}}px;', ], ] ); $this->end_controls_tab(); // Hover tab end $this->end_controls_tabs(); $this->end_controls_section(); // Style Slider arrow style end // Style Pagination button tab section $this->start_controls_section( 'post_slider_pagination_style_section', [ 'label' => __( 'Pagination', 'profundcore' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition'=>[ 'slider_on' => 'yes', 'sldots'=>'yes', ] ] ); $this->start_controls_tabs('pagination_style_tabs'); $this->add_responsive_control( 'pagination_alignment', [ 'label' => __( 'Alignment', 'profundcore' ), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' => __( 'Left', 'profundcore' ), 'icon' => 'fa fa-align-left', ], 'center' => [ 'title' => __( 'Center', 'profundcore' ), 'icon' => 'fa fa-align-center', ], 'right' => [ 'title' => __( 'Right', 'profundcore' ), 'icon' => 'fa fa-align-right', ], ], 'selectors' => [ '{{WRAPPER}} .slick-dots' => 'text-align: {{VALUE}};' ], 'default' => 'center', 'separator' =>'before', ] ); $this->start_controls_tab( 'pagination_style_normal_tab', [ 'label' => __( 'Normal', 'profundcore' ), ] ); $this->add_responsive_control( 'slider_pagination_height', [ 'label' => __( 'Height', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 1000, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'default' => [ 'unit' => 'px', 'size' => 15, ], 'selectors' => [ '{{WRAPPER}} .profundcore-carousel-activation .slick-dots li button' => 'height: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'slider_pagination_width', [ 'label' => __( 'Width', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 1000, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'default' => [ 'unit' => 'px', 'size' => 15, ], 'selectors' => [ '{{WRAPPER}} .profundcore-carousel-activation .slick-dots li button' => 'width: {{SIZE}}{{UNIT}};', ], ] ); $this->add_group_control( Group_Control_Background::get_type(), [ 'name' => 'pagination_background', 'label' => __( 'Background', 'profundcore' ), 'types' => [ 'classic', 'gradient' ], 'selector' => '{{WRAPPER}} .profundcore-carousel-activation .slick-dots li button', ] ); $this->add_responsive_control( 'pagination_margin', [ 'label' => __( 'Margin', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .profundcore-carousel-activation .slick-dots li' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'pagination_border', 'label' => __( 'Border', 'profundcore' ), 'selector' => '{{WRAPPER}} .profundcore-carousel-activation .slick-dots li button', ] ); $this->add_responsive_control( 'pagination_border_radius', [ 'label' => esc_html__( 'Border Radius', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'selectors' => [ '{{WRAPPER}} .profundcore-carousel-activation .slick-dots li button' => 'border-radius: {{TOP}}px {{RIGHT}}px {{BOTTOM}}px {{LEFT}}px;', ], ] ); $this->add_responsive_control( 'pagination_opacity', [ 'label' => __( 'Opacity (%)', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'default' => [ 'size' => 1, ], 'range' => [ 'px' => [ 'max' => 1, 'step' => 0.01, ], ], 'selectors' => [ '{{WRAPPER}} .profundcore-carousel-activation .slick-dots li button' => 'opacity: {{SIZE}}', ], ] ); $this->end_controls_tab(); // Normal Tab end $this->start_controls_tab( 'pagination_style_active_tab', [ 'label' => __( 'Active', 'profundcore' ), ] ); $this->add_group_control( Group_Control_Background::get_type(), [ 'name' => 'pagination_hover_background', 'label' => __( 'Background', 'profundcore' ), 'types' => [ 'classic', 'gradient' ], 'selector' => '{{WRAPPER}} .profundcore-carousel-activation .slick-dots li button:hover, {{WRAPPER}} .profundcore-carousel-activation .slick-dots li.slick-active button', ] ); $this->add_responsive_control( 'slider_pagination_active_width', [ 'label' => __( 'Width', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 1000, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'default' => [ 'unit' => 'px', 'size' => 15, ], 'selectors' => [ '{{WRAPPER}} .profundcore-carousel-activation .slick-dots li.slick-active button' => 'width: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'pagination_active_opacity', [ 'label' => __( 'Opacity (%)', 'profundcore' ), 'type' => Controls_Manager::SLIDER, 'default' => [ 'size' => 1, ], 'range' => [ 'px' => [ 'max' => 1, 'step' => 0.01, ], ], 'selectors' => [ '{{WRAPPER}} .profundcore-carousel-activation .slick-dots li.slick-active button' => 'opacity: {{SIZE}}', ], ] ); $this->end_controls_tab(); // Hover Tab end $this->end_controls_tabs(); $this->end_controls_section(); $this->start_controls_section( 'button_style_section', [ 'label' => __( 'Button', 'profundcore' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => [ 'load_more' => 'yes', 'slider_on!' => 'yes', ] ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'button_typography', 'selector' => '{{WRAPPER}} .load-more', ] ); $this->start_controls_tabs( 'tabs_button_style' ); $this->start_controls_tab( 'tab_button_normal', [ 'label' => __( 'Normal', 'profundcore' ), ] ); $this->add_control( 'button_text_color', [ 'label' => __( 'Text Color', 'profundcore' ), 'type' => Controls_Manager::COLOR, 'default' => '#ffffff', 'selectors' => [ '{{WRAPPER}} .load-more' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'button_background_color', [ 'label' => __( 'Background Color', 'profundcore' ), 'type' => Controls_Manager::COLOR, 'default' => '#55c882', 'selectors' => [ '{{WRAPPER}} .load-more' => 'background-color: {{VALUE}};', ], ] ); $this->add_responsive_control( 'button_margin', [ 'label' => __( 'Margin', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .load-more' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' =>'before', ] ); $this->add_responsive_control( 'button_padding', [ 'label' => __( 'Padding', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'default' => [ 'top' => '13', 'right' => '40', 'bottom' => '13', 'left' => '40', 'isLinked' => false ], 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .load-more' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'separator' =>'before', ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'button_border', 'selector' => '{{WRAPPER}} .load-more', ] ); $this->add_control( 'button_radius', [ 'label' => __( 'Border Radius', 'profundcore' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'default' => [ 'top' => '5', 'right' => '5', 'bottom' => '5', 'left' => '5', 'isLinked' => false ], 'selectors' => [ '{{WRAPPER}} .load-more' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'button_box_shadow', 'selector' => '{{WRAPPER}} .load-more', ] ); $this->end_controls_tab(); $this->start_controls_tab( 'tab_button_hover', [ 'label' => __( 'Hover', 'profundcore' ), ] ); $this->add_control( 'button_hover_color', [ 'label' => __( 'Text Color', 'profundcore' ), 'type' => Controls_Manager::COLOR, 'default' => '#55c882', 'selectors' => [ '{{WRAPPER}} .load-more:hover' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'button_background_hover_color', [ 'label' => __( 'Hover BG Color', 'profundcore' ), 'type' => Controls_Manager::COLOR, 'default' => '#ffffff', 'selectors' => [ '{{WRAPPER}} .load-more:hover' => 'background-color: {{VALUE}};', ], ] ); $this->add_control( 'button_hover_border_color', [ 'label' => __( 'Border Color', 'profundcore' ), 'type' => Controls_Manager::COLOR, 'condition' => [ 'border_border!' => '', ], 'selectors' => [ '{{WRAPPER}} .load-more:hover' => 'border-color: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'button_hover_box_shadow', 'selector' => '{{WRAPPER}} .load-more:hover', ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->end_controls_section(); } protected function render() { $settings = $this->get_settings_for_display(); $html = ''; $custom_order_ck = $this->get_settings_for_display('custom_order'); $orderby = $this->get_settings_for_display('orderby'); $postorder = $this->get_settings_for_display('postorder'); $this->add_render_attribute( 'profund_campaign_attr', 'class', 'campaign-box-area' ); if( $settings['load_more'] == 'yes' ){ $load_settings = [ 'loaded_item' => $settings['loaded_item'], 'load_slice' => $settings['load_slice'] ]; $this->add_render_attribute( 'profund_campaign_attr', 'class', 'load-more-content' ); $this->add_render_attribute( 'profund_campaign_attr', 'data-load', wp_json_encode( $load_settings ) ); } if( $settings['slider_on'] == 'yes' ){ $slider_settings = [ 'arrows' => ('yes' === $settings['slarrows']), 'arrow_prev_txt' => $settings['slprevicon'], 'arrow_next_txt' => $settings['slnexticon'], 'dots' => ('yes' === $settings['sldots']), 'autoplay' => ('yes' === $settings['slautolay']), 'autoplay_speed' => absint($settings['slautoplay_speed']), 'animation_speed' => absint($settings['slanimation_speed']), 'pause_on_hover' => ('yes' === $settings['slpause_on_hover']), 'center_mode' => ( 'yes' === $settings['slcentermode']), 'center_padding' => $settings['slcenterpadding'].'px', ]; $slider_responsive_settings = [ 'display_columns' => $settings['slitems'], 'scroll_columns' => $settings['slscroll_columns'], 'tablet_width' => $settings['sltablet_width'], 'tablet_display_columns' => $settings['sltablet_display_columns'], 'tablet_scroll_columns' => $settings['sltablet_scroll_columns'], 'mobile_width' => $settings['slmobile_width'], 'mobile_display_columns' => $settings['slmobile_display_columns'], 'mobile_scroll_columns' => $settings['slmobile_scroll_columns'], ]; $this->add_render_attribute( 'profund_campaign_attr', 'class', 'profundcore-carousel-activation' ); $slider_settings = array_merge( $slider_settings, $slider_responsive_settings ); $this->add_render_attribute( 'profund_campaign_attr', 'data-settings', wp_json_encode( $slider_settings ) ); }else{ $this->add_render_attribute( 'profund_campaign_attr', 'class', ['campaign-grid'] ); } // Query $args = array( 'post_type' => 'give_forms', 'post_status' => 'publish', 'ignore_sticky_posts' => 1, 'posts_per_page' => !empty( $settings['post_limit'] ) ? $settings['post_limit'] : 3, 'order' => $postorder ); // Custom Order if( $custom_order_ck == 'yes' ){ $args['orderby'] = $orderby; } if( !empty($settings['category_list']) ){ $get_categories = array(); foreach ($settings['category_list'] as $key => $value) { $get_categories[] = $value['camp_post_categories']; } }else{ $get_categories = ''; } $campaign_cats = str_replace(' ', '', $get_categories); if ( !empty( $get_categories ) ) { if( is_array($campaign_cats) and count($campaign_cats) > 0 ){ $field_name = is_numeric( $campaign_cats[0] ) ? 'term_id' : 'slug'; $args['tax_query'] = array( array( 'taxonomy' => 'campaigncats', 'terms' => $campaign_cats, 'field' => $field_name, 'include_children' => false ) ); } } $campaign_post = new \WP_Query( $args ); if( $settings['filter_on'] == 'yes' and $settings['slider_on'] != 'yes' and !empty($settings['category_list'])){ $this->add_render_attribute( 'profund_campaign_attr', 'class', 'campaign_filter_items' ); $html .= '<ul class="campaign-filter-menu">'; $html .= '<li data-filter="*" class="active" >'; $html .= '<i class="flaticon-search-interface-symbol"></i>'; $html .= esc_html__( 'All','profundcore' ); $html .= '</li>'; foreach( $settings['category_list'] as $value ){ $html .= '<li data-filter=".'.esc_attr($value['camp_post_categories']).'">'; if(!empty($value['camp_post_categories_icon'])){ $html .= '<i class="'.$value['camp_post_categories_icon'].'"></i>'; } $html .= esc_html(str_replace('-', ' ', $value['camp_post_categories'])); $html .= '</li>'; } $html .= '</ul>'; } if ( $campaign_post->have_posts() ) { $html .= '<div '.$this->get_render_attribute_string( "profund_campaign_attr" ).' >'; while ( $campaign_post->have_posts() ) { $campaign_post->the_post(); $camp_author_name = get_the_author(); $camp_author_photo = get_avatar( get_the_author_meta('user_email') ); if ( has_excerpt( get_the_ID() ) ) { // Get excerpt from the form post's excerpt field. $raw_content = get_the_excerpt( get_the_ID() ); $stripped_content = wp_strip_all_tags( strip_shortcodes( $raw_content ) ); } else { // Get content from the form post's content field. $raw_content = give_get_meta( get_the_ID(), '_give_form_content', true ); if ( ! empty( $raw_content ) ) { $stripped_content = wp_strip_all_tags( strip_shortcodes( $raw_content ) ); } } $form = new \Give_Donate_Form( get_the_ID() ); $goal_progress_stats = give_goal_progress_stats( $form ); $income = $goal_progress_stats['raw_actual']; $goal = $goal_progress_stats['raw_goal']; $progress = $goal ? round( ( $income / $goal ) * 100, 2 ) : 0; $progress_bar_value = $income >= $goal ? 100 : $progress; $sales = $form->get_sales(); $sales = ( !empty($sales) ? $sales : 0 ); $terms = get_the_terms( $form->ID , 'campaigncats' ); $cat = $terms[array_rand($terms)]; $form_currency = apply_filters( 'give_goal_form_currency', give_get_currency( get_the_ID() ), get_the_ID() ); $income_format_args = apply_filters( 'give_goal_income_format_args', array( 'sanitize' => false, 'currency' => $form_currency, 'decimal' => false, ), get_the_ID() ); $goal_format_args = apply_filters( 'give_goal_amount_format_args', array( 'sanitize' => false, 'currency' => $form_currency, 'decimal' => false, ), get_the_ID() ); $income = give_human_format_large_amount( give_format_amount( $income, $income_format_args ), array( 'currency' => $form_currency ) ); $goal = give_human_format_large_amount( give_format_amount( $goal, $goal_format_args ), array( 'currency' => $form_currency ) ); $camp_raised = give_currency_filter( $income, array( 'form_id' => get_the_ID() ) ); $camp_pledged = give_currency_filter( $goal, array( 'form_id' => get_the_ID() ) ); $html .= '<div class="campaign-item '.campaign_single_cat( ' ', 'slug' ).' ">'; $html .= '<div class="campaign-box">'; if( has_post_thumbnail() and $settings['show_thumb'] == true ){ $html .= '<div class="box-image">'; $html .= get_the_post_thumbnail(); $html .= '</div>'; } $html .= '<div class="box-content">'; if( $settings['show_author'] == 'yes' and (!empty($camp_author_photo) or !empty($camp_author_name)) ){ $html .= '<div class="author_details">'; if( !empty($camp_author_photo) ){ $html .= '<div class="author-photo">'.$camp_author_photo.'</div>';; } if( !empty($camp_author_name) ){ $html .= '<span class="author-name">'.esc_html($camp_author_name).'</span>'; } if($settings['show_cat'] == 'yes'){ $html .= sprintf('<a class="profund-cat" href="%s" > %s </a>', get_term_link($cat->term_id,'campaigncats'), $cat->name ); } $html .= '</div>'; } if( $settings['show_title'] == 'yes' ){ $html .= '<h3 class="main-title"><a href="'.get_the_permalink().'">'. wp_trim_words( get_the_title(), $settings['title_length'], '' ).'</a></h3>'; } if( isset($progress_bar_value) ){ $html .= '<div class="skillbar" data-percent="'.esc_attr($progress_bar_value).'%">'; $html .= '<div class="count-bar"></div>'; $html .= '<div class="count"></div>'; $html .= '</div>'; } if( $settings['show_content'] == 'yes' ){ $html .= '<div class="desc"><p>'.wp_trim_words( $stripped_content, $settings['content_length'], '' ).'</p></div>'; } if( $settings['show_read_more_btn'] == 'yes' ){ $html .= '<a href="'.get_the_permalink().'" class="readmore-btn" >'.esc_html($settings['read_more_txt']).'<span class="icon"><i class="'.esc_attr($settings['readmore_button']).'"></i></span></a>'; } if( !empty($camp_raised) or !empty($camp_pledged) ){ $html .= '<ul class="box-footer">'; if( !empty($camp_raised) ){ $html .= '<li>'; $html .= '<span class="title">'.esc_html__('Raised','profundcore').'</span>'; $html .= '<span class="content">'.esc_html($camp_raised).'</span>'; $html .= '</li>'; } if( !empty($camp_pledged) ){ $html .= '<li>'; $html .= '<span class="title">'.esc_html__('Pledged','profundcore').'</span>'; $html .= '<span class="content">'.esc_html($camp_pledged).'</span>'; $html .= '</li>'; } if( isset($sales) ){ $html .= '<li>'; $html .= '<span class="title">'.esc_html__('Donators','profundcore').'</span>'; $html .= '<span class="content">'.esc_html($sales).'</span>'; $html .= '</li>'; } $html .= '</ul>'; } $html .= '</div>'; $html .= '</div>'; $html .= '</div>'; } $html .= '</div>'; if( $settings['load_more'] == 'yes' ){ $html .= '<div class="load-button" >'; $html .= '<button type="button" class="load-more" >'.esc_html__( 'Load More','profundcore' ).'</button>'; $html .= '</div>'; } } echo $html; }// End Rendar }// End Class Plugin::instance()->widgets_manager->register_widget_type( new profund_Campaign_Boxes );
Save
Cancel