WP init
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
namespace Elementor;
|
||||
|
||||
|
||||
class ElementsKit_Widget_Accordion_Handler extends \ElementsKit_Lite\Core\Handler_Widget {
|
||||
|
||||
static function get_name() {
|
||||
return 'elementskit-accordion';
|
||||
}
|
||||
|
||||
static function get_title() {
|
||||
return esc_html__( 'Accordion', 'elementskit-lite' );
|
||||
}
|
||||
|
||||
static function get_icon() {
|
||||
return 'ekit ekit-widget-icon ekit-accordion';
|
||||
}
|
||||
|
||||
static function get_categories() {
|
||||
return [ 'elementskit' ];
|
||||
}
|
||||
|
||||
static function get_keywords() {
|
||||
return ['ekit', 'accordion', 'faq', 'faq schema'];
|
||||
}
|
||||
|
||||
static function get_dir() {
|
||||
return \ElementsKit_Lite::widget_dir() . 'accordion/';
|
||||
}
|
||||
|
||||
static function get_url() {
|
||||
return \ElementsKit_Lite::widget_url() . 'accordion/';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
namespace Elementor;
|
||||
|
||||
class ElementsKit_Widget_Back_To_Top_Handler extends \ElementsKit_Lite\Core\Handler_Widget {
|
||||
|
||||
static function get_name() {
|
||||
return 'elementskit-back-to-top';
|
||||
}
|
||||
|
||||
static function get_title() {
|
||||
return esc_html__( 'Back to Top', 'elementskit-lite' );
|
||||
}
|
||||
|
||||
static function get_icon() {
|
||||
return ' ekit-widget-icon eicon-arrow-up';
|
||||
}
|
||||
|
||||
static function get_categories() {
|
||||
return [ 'elementskit' ];
|
||||
}
|
||||
|
||||
static function get_keywords() {
|
||||
return ['ekit', 'back to top', 'scroll', 'scroll to top', 'back', 'top'];
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,500 @@
|
||||
<?php
|
||||
namespace Elementor;
|
||||
|
||||
use \Elementor\ElementsKit_Widget_Back_To_Top_Handler as Handler;
|
||||
use \ElementsKit_Lite\Modules\Controls\Controls_Manager as ElementsKit_Controls_Manager;
|
||||
|
||||
if (! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
class ElementsKit_Widget_Back_To_Top extends Widget_Base {
|
||||
use \ElementsKit_Lite\Widgets\Widget_Notice;
|
||||
|
||||
public $base;
|
||||
|
||||
public function get_name() {
|
||||
return Handler::get_name();
|
||||
}
|
||||
|
||||
public function get_title() {
|
||||
return Handler::get_title();
|
||||
}
|
||||
|
||||
public function get_icon() {
|
||||
return Handler::get_icon();
|
||||
}
|
||||
|
||||
public function get_categories() {
|
||||
return Handler::get_categories();
|
||||
}
|
||||
|
||||
public function get_keywords() {
|
||||
return Handler::get_keywords();
|
||||
}
|
||||
|
||||
public function get_help_url() {
|
||||
return 'https://wpmet.com/doc/back-to-top/';
|
||||
}
|
||||
|
||||
public function get_script_depends() {
|
||||
return ['animate-circle'];
|
||||
}
|
||||
|
||||
protected function is_dynamic_content(): bool {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function has_widget_inner_wrapper(): bool {
|
||||
return ! Plugin::$instance->experiments->is_feature_active( 'e_optimized_markup' );
|
||||
}
|
||||
|
||||
protected function register_controls() {
|
||||
/*
|
||||
Content Tab section
|
||||
---------------------
|
||||
-> Select appearane of back to top button
|
||||
-> Icon control
|
||||
-> Text control
|
||||
-> Aligment
|
||||
*/
|
||||
|
||||
$this->start_controls_section(
|
||||
'ekit_back_to_top_content_section',
|
||||
[
|
||||
'label' => esc_html__( 'Layout and Content', 'elementskit-lite' )
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_button_appearance',
|
||||
[
|
||||
'label' => esc_html__( 'Appearance', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'icon_only',
|
||||
'options' => [
|
||||
'icon_only' => esc_html__( 'Icon Only', 'elementskit-lite' ),
|
||||
'text_only' => esc_html__( 'Text Only', 'elementskit-lite' ),
|
||||
'progress_indicator' => esc_html__( 'Progress Indicator', 'elementskit-lite' ),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
// back to top icon show when user select icon only appearance
|
||||
$this->add_control(
|
||||
'ekit_btn_icons',
|
||||
[
|
||||
'label' => esc_html__( 'Icon', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::ICONS,
|
||||
'default' => [
|
||||
'value' => 'fas fa-arrow-up',
|
||||
'library' => 'fa-solid',
|
||||
],
|
||||
'condition' => [
|
||||
'ekit_button_appearance' => ['icon_only', 'progress_indicator']
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
// back to top text input control when user select text only appearance
|
||||
$this->add_control(
|
||||
'ekit_btn_text',
|
||||
[
|
||||
'label' => esc_html__( 'Button Text', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'default' => esc_html__( 'Top', 'elementskit-lite' ),
|
||||
'placeholder' => esc_html__( 'Type button label here', 'elementskit-lite' ),
|
||||
'condition' => [
|
||||
'ekit_button_appearance' => 'text_only'
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_button_alignment',
|
||||
[
|
||||
'label' => esc_html__('Alignment', 'elementskit-lite'),
|
||||
'type' => Controls_Manager::CHOOSE,
|
||||
'default' => 'left',
|
||||
'options' => [
|
||||
'left' => [
|
||||
'description' => esc_html__('Left', 'elementskit-lite'),
|
||||
'icon' => 'eicon-text-align-left',
|
||||
],
|
||||
'center' => [
|
||||
'description' => esc_html__('Center', 'elementskit-lite'),
|
||||
'icon' => 'eicon-text-align-center',
|
||||
],
|
||||
'right' => [
|
||||
'description' => esc_html__('Right', 'elementskit-lite'),
|
||||
'icon' => 'eicon-text-align-right',
|
||||
],
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-btt' => 'text-align: {{VALUE}};',
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$this->end_controls_section(); // end of content tab section
|
||||
|
||||
/* ---------------------
|
||||
Settings Tab
|
||||
-> Scroll Top Offset
|
||||
------------------------*/
|
||||
$this->start_controls_section(
|
||||
'ekit_back_to_top_setting_section',
|
||||
[
|
||||
'label' => esc_html__( 'Setting', 'elementskit-lite' )
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_offset_top',
|
||||
[
|
||||
'label' => esc_html__( 'Offset Top (px)', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::NUMBER,
|
||||
'min' => 0,
|
||||
'step' => 1,
|
||||
'default' => 0,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_show_button_after_switch',
|
||||
[
|
||||
'label' => esc_html__( 'Show button on scroll', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label_on' => esc_html__( 'Yes', 'elementskit-lite' ),
|
||||
'label_off' => esc_html__( 'No', 'elementskit-lite' ),
|
||||
'default' => 'no',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_show_button_after',
|
||||
[
|
||||
'label' => esc_html__( 'Enter scrolled value (px)', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::NUMBER,
|
||||
'min' => 0,
|
||||
'step' => 1,
|
||||
'default' => 400,
|
||||
'condition' => [
|
||||
'ekit_show_button_after_switch' => 'yes'
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section(); // end of content tab section
|
||||
|
||||
/* -------------------------
|
||||
back to top style tab
|
||||
-> Typogaphy
|
||||
-> Width
|
||||
-> Height
|
||||
-> Border radius
|
||||
-> Border control
|
||||
-> Stroke foreground and backgorund color
|
||||
-> Size of button (width and height together)
|
||||
----------------------------*/
|
||||
$this->start_controls_section(
|
||||
'ekit_back_to_top_style_section',
|
||||
[
|
||||
'label' => esc_html__( 'Button Style', 'elementskit-lite' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
array(
|
||||
'name' => 'ekit_btn_typography',
|
||||
'label' => esc_html__('Typography', 'elementskit-lite'),
|
||||
'selector' => '{{WRAPPER}} .ekit-btt__button',
|
||||
'exclude' => ['letter_spacing', 'font_style', 'text_decoration', 'line_height'], // PHPCS:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude
|
||||
'fields_options' => [
|
||||
'typography' => [
|
||||
'default' => 'custom',
|
||||
],
|
||||
'font_weight' => [
|
||||
'default' => '400',
|
||||
],
|
||||
'font_size' => [
|
||||
'default' => [
|
||||
'size' => '16',
|
||||
'unit' => 'px'
|
||||
],
|
||||
'size_units' => ['px']
|
||||
],
|
||||
'text_transform' => [
|
||||
'default' => 'uppercase',
|
||||
],
|
||||
],
|
||||
)
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_button_size',
|
||||
[
|
||||
'label' => esc_html__('Button Size (px)', 'elementskit-lite'),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => ['px'],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'min' => 0,
|
||||
'max' => 200,
|
||||
'step' => 1,
|
||||
],
|
||||
],
|
||||
'default' => [
|
||||
'unit' => 'px',
|
||||
'size' => 50,
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-btt__button' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
'condition' => [
|
||||
'ekit_button_appearance' => 'progress_indicator'
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_button_width',
|
||||
[
|
||||
'label' => esc_html__('Width (px)', 'elementskit-lite'),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => ['px'],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'min' => 0,
|
||||
'max' => 200,
|
||||
'step' => 1,
|
||||
],
|
||||
],
|
||||
'default' => [
|
||||
'unit' => 'px',
|
||||
'size' => 50,
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-btt__button' => 'width: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
'condition' => [
|
||||
'ekit_button_appearance!' => 'progress_indicator'
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
|
||||
$this->add_control(
|
||||
'ekit_button_height',
|
||||
[
|
||||
'label' => esc_html__('Height (px)', 'elementskit-lite'),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => ['px'],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'min' => 0,
|
||||
'max' => 200,
|
||||
'step' => 1,
|
||||
],
|
||||
],
|
||||
'default' => [
|
||||
'unit' => 'px',
|
||||
'size' => 50,
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-btt__button' => 'height: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
'condition' => [
|
||||
'ekit_button_appearance!' => 'progress_indicator'
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Border::get_type(),
|
||||
[
|
||||
'name' => 'ekit_button_border',
|
||||
'label' => esc_html__( 'Border', 'elementskit-lite' ),
|
||||
'selector' => '{{WRAPPER}} .ekit-btt__button',
|
||||
'exclude' => ['border_color'], // PHPCS:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude
|
||||
'condition' => [
|
||||
'ekit_button_appearance!' => 'progress_indicator'
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_button_radius',
|
||||
[
|
||||
'label' => esc_html__('Border Radius', 'elementskit-lite'),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => ['px'],
|
||||
'default' => [
|
||||
'unit' => 'px',
|
||||
'top' => 50,
|
||||
'right' => 50,
|
||||
'bottom' => 50,
|
||||
'left' => 50,
|
||||
'isLinked' => true
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} :is( .ekit-btt__button, #canvas )' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
'condition' => [
|
||||
'ekit_button_appearance!' => 'progress_indicator'
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_button_prgoress_foreground',
|
||||
[
|
||||
'label' => esc_html__('Line Foreground color', 'elementskit-lite'),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'alpha' => false,
|
||||
'default' => '#FF5050',
|
||||
'condition' => [
|
||||
'ekit_button_appearance' => 'progress_indicator'
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_button_prgoress_background',
|
||||
[
|
||||
'label' => esc_html__('Line Background Color', 'elementskit-lite'),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'alpha' => false,
|
||||
'default' => '#eee',
|
||||
'condition' => [
|
||||
'ekit_button_appearance' => 'progress_indicator'
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
$this->start_controls_tabs('ekit_button_tabs');
|
||||
|
||||
$this->start_controls_tab(
|
||||
'ekit_button_normal',
|
||||
[
|
||||
'label' => esc_html__('Normal', 'elementskit-lite'),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_button_normal_color',
|
||||
[
|
||||
'label' => esc_html__('Color', 'elementskit-lite'),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'alpha' => false,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-btt__button' => 'color: {{VALUE}}; fill: {{VALUE}}; border-color: {{VALUE}}'
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_button_normal_bg_color',
|
||||
[
|
||||
'label' => esc_html__('Background', 'elementskit-lite'),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-btt__button' => 'background: {{VALUE}};'
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_tab();
|
||||
|
||||
$this->start_controls_tab(
|
||||
'ekit_button_hover',
|
||||
[
|
||||
'label' => esc_html__('Hover', 'elementskit-lite'),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_button_hover_clr',
|
||||
[
|
||||
'label' => esc_html__('Color', 'elementskit-lite'),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'alpha' => false,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-btt__button:hover' => 'color: {{VALUE}}; fill: {{VALUE}}; border-color: {{VALUE}}',
|
||||
'{{WRAPPER}} .ekit-btt__button:focus' => 'color: {{VALUE}}; fill: {{VALUE}}; border-color: {{VALUE}}'
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_button_hover_bg_clr',
|
||||
[
|
||||
'label' => esc_html__('Background', 'elementskit-lite'),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-btt__button:hover' => 'background: {{VALUE}}',
|
||||
'{{WRAPPER}} .ekit-btt__button:focus' => 'background: {{VALUE}}'
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$this->end_controls_tab();
|
||||
$this->end_controls_tabs();
|
||||
|
||||
$this->end_controls_section(); // end of back to style tab
|
||||
}
|
||||
|
||||
protected function render( ) {
|
||||
echo '<div class="ekit-wid-con" >';
|
||||
$this->render_raw();
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
protected function render_raw() {
|
||||
$settings = $this->get_settings_for_display();
|
||||
$appearance = $settings['ekit_button_appearance'];
|
||||
$is_scroll = $settings['ekit_show_button_after_switch'] === 'yes' ? 'yes' : '';
|
||||
|
||||
$args = [
|
||||
'offset_top' => $settings['ekit_offset_top'],
|
||||
'show_after' => $settings['ekit_show_button_after'],
|
||||
'show_scroll' => $is_scroll,
|
||||
'style' => $appearance,
|
||||
'foreground' => $settings['ekit_button_prgoress_foreground'],
|
||||
'background' => $settings['ekit_button_prgoress_background']
|
||||
];
|
||||
?>
|
||||
<div class="ekit-back-to-top-container ekit-btt <?php echo esc_attr( $appearance ) ?>" data-settings="<?php echo esc_attr( wp_json_encode($args) ) ?>">
|
||||
<span class="ekit-btt__button <?php echo esc_attr( $is_scroll ) ?>">
|
||||
<?php // start container
|
||||
switch( $appearance ) {
|
||||
// show icon style by default
|
||||
case 'icon_only':
|
||||
Icons_Manager::render_icon($settings['ekit_btn_icons'], [ 'aria-hidden' => 'true' ]);
|
||||
break;
|
||||
|
||||
// show text only style
|
||||
case 'text_only':
|
||||
echo esc_html($settings['ekit_btn_text']);
|
||||
break;
|
||||
|
||||
// show progress indicator style (pro feature)
|
||||
case 'progress_indicator': ?>
|
||||
<div class="progress_indicator" >
|
||||
<canvas id="canvas-<?php echo esc_attr( $this->get_id()); ?>" class="canvas" data-canvas="<?php echo esc_attr( $this->get_id()); ?>"></canvas>
|
||||
<span><?php Icons_Manager::render_icon($settings['ekit_btn_icons'], [ 'aria-hidden' => 'true' ]); ?></span>
|
||||
</div>
|
||||
<?php break;
|
||||
} ?>
|
||||
</span>
|
||||
</div>
|
||||
<?php // end container
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
namespace Elementor;
|
||||
|
||||
class ElementsKit_Widget_Blog_Posts_Handler extends \ElementsKit_Lite\Core\Handler_Widget{
|
||||
|
||||
static function get_name() {
|
||||
return 'elementskit-blog-posts';
|
||||
}
|
||||
|
||||
static function get_title() {
|
||||
return esc_html__( 'Blog Posts', 'elementskit-lite' );
|
||||
}
|
||||
|
||||
static function get_icon() {
|
||||
return ' ekit-widget-icon eicon-posts-grid';
|
||||
}
|
||||
|
||||
static function get_categories() {
|
||||
return [ 'elementskit' ];
|
||||
}
|
||||
|
||||
static function get_keywords() {
|
||||
return ['ekit', 'blog', 'post', 'grid', 'recent post', 'recent', 'category post', 'category'];
|
||||
}
|
||||
|
||||
static function get_dir() {
|
||||
return \ElementsKit_Lite::widget_dir() . 'blog-posts/';
|
||||
}
|
||||
|
||||
static function get_url() {
|
||||
return \ElementsKit_Lite::widget_url() . 'blog-posts/';
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
namespace Elementor;
|
||||
|
||||
class ElementsKit_Widget_Business_Hours_Handler extends \ElementsKit_Lite\Core\Handler_Widget{
|
||||
|
||||
static function get_name() {
|
||||
return 'elementskit-business-hours';
|
||||
}
|
||||
|
||||
static function get_title() {
|
||||
return esc_html__( 'Business Hours', 'elementskit-lite' );
|
||||
}
|
||||
|
||||
static function get_icon() {
|
||||
return 'ekit-widget-icon eicon-clock-o';
|
||||
}
|
||||
|
||||
static function get_categories() {
|
||||
return [ 'elementskit' ];
|
||||
}
|
||||
|
||||
static function get_keywords() {
|
||||
return ['ekit', 'business hours', 'opening hours', 'hours', 'opening times', 'times', 'currently open', 'watch'];
|
||||
}
|
||||
|
||||
static function get_dir() {
|
||||
return \ElementsKit_Lite::widget_dir() . 'business-hours/';
|
||||
}
|
||||
|
||||
static function get_url() {
|
||||
return \ElementsKit_Lite::widget_url() . 'business-hours/';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,410 @@
|
||||
<?php
|
||||
namespace Elementor;
|
||||
|
||||
use \Elementor\ElementsKit_Widget_Business_Hours_Handler as Handler;
|
||||
use \ElementsKit_Lite\Modules\Controls\Controls_Manager as ElementsKit_Controls_Manager;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
|
||||
class ElementsKit_Widget_Business_Hours extends Widget_Base {
|
||||
use \ElementsKit_Lite\Widgets\Widget_Notice;
|
||||
|
||||
public $base;
|
||||
|
||||
public function get_name() {
|
||||
return Handler::get_name();
|
||||
}
|
||||
|
||||
public function get_title() {
|
||||
return Handler::get_title();
|
||||
}
|
||||
|
||||
public function get_icon() {
|
||||
return Handler::get_icon();
|
||||
}
|
||||
|
||||
public function get_categories() {
|
||||
return Handler::get_categories();
|
||||
}
|
||||
|
||||
public function get_keywords() {
|
||||
return Handler::get_keywords();
|
||||
}
|
||||
|
||||
public function get_help_url() {
|
||||
return 'https://wpmet.com/doc/business-hours/';
|
||||
}
|
||||
protected function is_dynamic_content(): bool {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function has_widget_inner_wrapper(): bool {
|
||||
return ! Plugin::$instance->experiments->is_feature_active( 'e_optimized_markup' );
|
||||
}
|
||||
|
||||
protected function register_controls() {
|
||||
|
||||
|
||||
$this->start_controls_section(
|
||||
'ekit_btn_section_content',
|
||||
array(
|
||||
'label' => esc_html__( 'Content', 'elementskit-lite' ),
|
||||
)
|
||||
);
|
||||
|
||||
$repeater = new Repeater();
|
||||
|
||||
$repeater->add_control(
|
||||
'ekit_business_day',
|
||||
[
|
||||
'label' => esc_html__( 'Day', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'default' => esc_html__( 'Saturday', 'elementskit-lite' ),
|
||||
]
|
||||
);
|
||||
|
||||
$repeater->add_control(
|
||||
'ekit_business_time',
|
||||
[
|
||||
'label' => esc_html__( 'Time', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::TEXTAREA,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'default' => esc_html__( '9:00 AM - 6:00 PM', 'elementskit-lite' ),
|
||||
]
|
||||
);
|
||||
|
||||
$repeater->add_control(
|
||||
'ekit_highlight_this_day',
|
||||
[
|
||||
'label' => esc_html__( 'Highlight this day', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'return_value' => 'yes',
|
||||
'default' => 'no',
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
|
||||
$repeater->add_responsive_control(
|
||||
'ekit_single_business_day_color',
|
||||
[
|
||||
'label' => esc_html__( 'Day Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'default' => '#fa2d2d',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-wid-con {{CURRENT_ITEM}}.ekit-closed-day.ekit-single-day .ekit-business-day' => 'color: {{VALUE}}',
|
||||
],
|
||||
'condition' => [
|
||||
'ekit_highlight_this_day' => 'yes',
|
||||
],
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
|
||||
$repeater->add_responsive_control(
|
||||
'ekit_single_business_time_color',
|
||||
[
|
||||
'label' => esc_html__( 'Time Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'default' => '#fa2d2d',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-wid-con {{CURRENT_ITEM}}.ekit-closed-day.ekit-single-day .ekit-business-time' => 'color: {{VALUE}}',
|
||||
],
|
||||
'condition' => [
|
||||
'ekit_highlight_this_day' => 'yes',
|
||||
],
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
|
||||
$repeater->add_responsive_control(
|
||||
'ekit_single_business_background_color',
|
||||
[
|
||||
'label' => esc_html__( 'Background Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-wid-con {{CURRENT_ITEM}}.ekit-closed-day' => 'background-color: {{VALUE}}',
|
||||
],
|
||||
'condition' => [
|
||||
'ekit_highlight_this_day' => 'yes',
|
||||
],
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_business_openday_list',
|
||||
[
|
||||
'type' => Controls_Manager::REPEATER,
|
||||
'fields' => $repeater->get_controls(),
|
||||
'default' => [
|
||||
[
|
||||
'ekit_business_day' => esc_html__( 'Sunday', 'elementskit-lite' ),
|
||||
'ekit_business_time' => esc_html__( 'Close','elementskit-lite' ),
|
||||
'ekit_highlight_this_day' => esc_html__( 'yes','elementskit-lite' ),
|
||||
],
|
||||
|
||||
[
|
||||
'ekit_business_day' => esc_html__( 'Saturday', 'elementskit-lite' ),
|
||||
'ekit_business_time' => esc_html__( '10:00 AM to 7:00 PM','elementskit-lite' ),
|
||||
'ekit_highlight_this_day' => esc_html__( 'yes','elementskit-lite' ),
|
||||
],
|
||||
|
||||
[
|
||||
'ekit_business_day' => esc_html__( 'Monday', 'elementskit-lite' ),
|
||||
'ekit_business_time' => esc_html__( '10:00 AM to 7:00 PM','elementskit-lite' ),
|
||||
],
|
||||
|
||||
[
|
||||
'ekit_business_day' => esc_html__( 'Tues Day', 'elementskit-lite' ),
|
||||
'ekit_business_time' => esc_html__( '10:00 AM to 7:00 PM','elementskit-lite' ),
|
||||
],
|
||||
|
||||
[
|
||||
'ekit_business_day' => esc_html__( 'Wednesday', 'elementskit-lite' ),
|
||||
'ekit_business_time' => esc_html__( '10:00 AM to 7:00 PM','elementskit-lite' ),
|
||||
],
|
||||
|
||||
[
|
||||
'ekit_business_day' => esc_html__( 'Thursday', 'elementskit-lite' ),
|
||||
'ekit_business_time' => esc_html__( '10:00 AM to 7:00 PM','elementskit-lite' ),
|
||||
],
|
||||
|
||||
[
|
||||
'ekit_business_day' => esc_html__( 'Friday', 'elementskit-lite' ),
|
||||
'ekit_business_time' => esc_html__( '10:00 AM to 7:00 PM','elementskit-lite' ),
|
||||
]
|
||||
],
|
||||
'title_field' => '{{{ ekit_business_day }}}',
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
|
||||
// Style Item section
|
||||
$this->start_controls_section(
|
||||
'ekit_business_item_style_section',
|
||||
[
|
||||
'label' => esc_html__( 'Item', 'elementskit-lite' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_business_item_margin',
|
||||
[
|
||||
'label' => esc_html__( 'Margin', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-wid-con .ekit-single-day' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
'separator' =>'before',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_business_item_padding',
|
||||
[
|
||||
'label' => esc_html__( 'Padding', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-wid-con .ekit-single-day' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
'separator' =>'after',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Background::get_type(),
|
||||
[
|
||||
'name' => 'ekit_business_item_background',
|
||||
'label' => esc_html__( 'Background', 'elementskit-lite' ),
|
||||
'types' => [ 'classic', 'gradient' ],
|
||||
'selector' => '{{WRAPPER}} .ekit-wid-con .ekit-single-day',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_business_item_item_radius',
|
||||
[
|
||||
'label' => esc_html__( 'Border Radius', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-wid-con .ekit-single-day' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Border::get_type(),
|
||||
[
|
||||
'name' => 'ekit_business_item_border',
|
||||
'label' => esc_html__( 'Border', 'elementskit-lite' ),
|
||||
'selector' => '{{WRAPPER}} .ekit-wid-con .ekit-single-day:not(:last-child)',
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
// Style Business day section
|
||||
$this->start_controls_section(
|
||||
'ekit_business_day_style_section',
|
||||
[
|
||||
'label' => esc_html__( 'Day', 'elementskit-lite' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_business_day_color',
|
||||
[
|
||||
'label' => esc_html__( 'Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-wid-con .ekit-single-day .ekit-business-day' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'ekit_business_day_typography',
|
||||
'selector' => '{{WRAPPER}} .ekit-wid-con .ekit-single-day .ekit-business-day',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Background::get_type(),
|
||||
[
|
||||
'name' => 'ekit_business_day_background',
|
||||
'label' => esc_html__( 'Background', 'elementskit-lite' ),
|
||||
'types' => [ 'classic', 'gradient' ],
|
||||
'selector' => '{{WRAPPER}} .ekit-wid-con .ekit-single-day .ekit-business-day',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_business_item_day_radius',
|
||||
[
|
||||
'label' => esc_html__( 'Border Radius', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-wid-con .ekit-single-day .ekit-business-day' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_business_item_day_padding',
|
||||
[
|
||||
'label' => esc_html__( 'Padding', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-wid-con .ekit-single-day .ekit-business-day' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
// Style Business Time section
|
||||
$this->start_controls_section(
|
||||
'ekit_business_time_style_section',
|
||||
[
|
||||
'label' => esc_html__( 'Time', 'elementskit-lite' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_business_time_color',
|
||||
[
|
||||
'label' => esc_html__( 'Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-wid-con .ekit-single-day .ekit-business-time' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'ekit_business_time_typography',
|
||||
'selector' => '{{WRAPPER}} .ekit-wid-con .ekit-single-day .ekit-business-time',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Background::get_type(),
|
||||
[
|
||||
'name' => 'ekit_business_time_background',
|
||||
'label' => esc_html__( 'Background', 'elementskit-lite' ),
|
||||
'types' => [ 'classic', 'gradient' ],
|
||||
'selector' => '{{WRAPPER}} .ekit-wid-con .ekit-single-day .ekit-business-time',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_business_item_time_radius',
|
||||
[
|
||||
'label' => esc_html__( 'Border Radius', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-wid-con .ekit-single-day .ekit-business-time' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_business_item_time_padding',
|
||||
[
|
||||
'label' => esc_html__( 'Padding', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-wid-con .ekit-single-day .ekit-business-time' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
$this->insert_pro_message();
|
||||
}
|
||||
|
||||
protected function render( ) {
|
||||
echo '<div class="ekit-wid-con" >';
|
||||
$this->render_raw();
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
protected function render_raw( ) {
|
||||
$settings = $this->get_settings_for_display();
|
||||
?>
|
||||
<div class="ekit-business-hours-inner">
|
||||
<?php foreach ($settings['ekit_business_openday_list'] as $item) : ?>
|
||||
<div class="ekit-single-day elementor-repeater-item-<?php echo esc_attr($item['_id']); ?> <?php if( $item['ekit_highlight_this_day'] == 'yes' ){ echo esc_attr( 'ekit-closed-day','elementskit-lite'); }?>">
|
||||
<?php if( !empty( $item['ekit_business_day'] ) ) : ?>
|
||||
<span class="ekit-business-day"><?php echo esc_html($item['ekit_business_day']); ?></span>
|
||||
<?php endif; if( !empty( $item['ekit_business_time'] ) ): ?>
|
||||
<span class="ekit-business-time"><?php echo esc_html($item['ekit_business_time']); ?></span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
namespace Elementor;
|
||||
|
||||
class ElementsKit_Widget_Button_Handler extends \ElementsKit_Lite\Core\Handler_Widget{
|
||||
|
||||
static function get_name() {
|
||||
return 'elementskit-button';
|
||||
}
|
||||
|
||||
static function get_title() {
|
||||
return esc_html__( 'Button', 'elementskit-lite' );
|
||||
}
|
||||
|
||||
static function get_icon() {
|
||||
return ' ekit-widget-icon eicon-button';
|
||||
}
|
||||
|
||||
static function get_categories() {
|
||||
return [ 'elementskit' ];
|
||||
}
|
||||
|
||||
static function get_keywords() {
|
||||
return ['ekit', 'button', 'call', 'call button'];
|
||||
}
|
||||
|
||||
static function get_dir() {
|
||||
return \ElementsKit_Lite::widget_dir() . 'button/';
|
||||
}
|
||||
|
||||
static function get_url() {
|
||||
return \ElementsKit_Lite::widget_url() . 'button/';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,614 @@
|
||||
<?php
|
||||
namespace Elementor;
|
||||
|
||||
use \Elementor\ElementsKit_Widget_Button_Handler as Handler;
|
||||
use \ElementsKit_Lite\Modules\Controls\Controls_Manager as ElementsKit_Controls_Manager;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
|
||||
class ElementsKit_Widget_Button extends Widget_Base {
|
||||
use \ElementsKit_Lite\Widgets\Widget_Notice;
|
||||
|
||||
public $base;
|
||||
|
||||
public function get_name() {
|
||||
return Handler::get_name();
|
||||
}
|
||||
|
||||
public function get_title() {
|
||||
return Handler::get_title();
|
||||
}
|
||||
|
||||
public function get_icon() {
|
||||
return Handler::get_icon();
|
||||
}
|
||||
|
||||
public function get_categories() {
|
||||
return Handler::get_categories();
|
||||
}
|
||||
|
||||
public function get_keywords() {
|
||||
return Handler::get_keywords();
|
||||
}
|
||||
|
||||
public function get_help_url() {
|
||||
return 'https://wpmet.com/doc/button/';
|
||||
}
|
||||
protected function is_dynamic_content(): bool {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function has_widget_inner_wrapper(): bool {
|
||||
return ! Plugin::$instance->experiments->is_feature_active( 'e_optimized_markup' );
|
||||
}
|
||||
|
||||
protected function register_controls() {
|
||||
|
||||
|
||||
$this->start_controls_section(
|
||||
'ekit_btn_section_content',
|
||||
array(
|
||||
'label' => esc_html__( 'Content', 'elementskit-lite' ),
|
||||
)
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_btn_text',
|
||||
[
|
||||
'label' =>esc_html__( 'Label', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'default' =>esc_html__( 'Learn more ', 'elementskit-lite' ),
|
||||
'placeholder' =>esc_html__( 'Learn more ', 'elementskit-lite' ),
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$this->add_control(
|
||||
'ekit_btn_url',
|
||||
[
|
||||
'label' =>esc_html__( 'URL', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::URL,
|
||||
'placeholder' =>esc_url('https://wpmet.com'),
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'default' => [
|
||||
'url' => '#',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_btn_section_settings',
|
||||
[
|
||||
'label' => esc_html__( 'Settings', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::HEADING,
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_btn_icons__switch',
|
||||
[
|
||||
'label' => esc_html__('Add icon? ', 'elementskit-lite'),
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'default' => 'yes',
|
||||
'label_on' =>esc_html__( 'Yes', 'elementskit-lite' ),
|
||||
'label_off' =>esc_html__( 'No', 'elementskit-lite' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_btn_icons',
|
||||
[
|
||||
'label' =>esc_html__( 'Icon', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::ICONS,
|
||||
'fa4compatibility' => 'ekit_btn_icon',
|
||||
'label_block' => true,
|
||||
'default' => [
|
||||
'value' => '',
|
||||
],
|
||||
'condition' => [
|
||||
'ekit_btn_icons__switch' => 'yes'
|
||||
]
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'ekit_btn_icon_align',
|
||||
[
|
||||
'label' =>esc_html__( 'Icon Position', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'left',
|
||||
'options' => [
|
||||
'left' =>esc_html__( 'Before', 'elementskit-lite' ),
|
||||
'right' =>esc_html__( 'After', 'elementskit-lite' ),
|
||||
],
|
||||
'condition' => [
|
||||
'ekit_btn_icons__switch' => 'yes'
|
||||
]
|
||||
]
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'ekit_btn_align',
|
||||
[
|
||||
'label' =>esc_html__( 'Alignment', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::CHOOSE,
|
||||
'default' => 'center',
|
||||
'options' => [
|
||||
'left' => [
|
||||
'title' =>esc_html__( 'Left', 'elementskit-lite' ),
|
||||
'icon' => 'eicon-text-align-left',
|
||||
],
|
||||
'center' => [
|
||||
'title' =>esc_html__( 'Center', 'elementskit-lite' ),
|
||||
'icon' => 'eicon-text-align-center',
|
||||
],
|
||||
'right' => [
|
||||
'title' =>esc_html__( 'Right', 'elementskit-lite' ),
|
||||
'icon' => 'eicon-text-align-right',
|
||||
],
|
||||
],
|
||||
'selectors_dictionary' => [
|
||||
'left' => 'justify-content: flex-start;',
|
||||
'center' => 'justify-content: center;',
|
||||
'right' => 'justify-content: flex-end;',
|
||||
],
|
||||
'prefix_class' => 'elementor-align-%s',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-btn-wraper .elementskit-btn' => '{{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'ekit_btn_class',
|
||||
[
|
||||
'label' => esc_html__( 'Class', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => esc_html__( 'Class Name', 'elementskit-lite' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_btn_id',
|
||||
[
|
||||
'label' => esc_html__( 'id', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'placeholder' => esc_html__( 'ID', 'elementskit-lite' ),
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
|
||||
$this->start_controls_section(
|
||||
'ekit_btn_section_style',
|
||||
[
|
||||
'label' =>esc_html__( 'Button', 'elementskit-lite' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'width',
|
||||
[
|
||||
'label' => esc_html__( 'Width (%)', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .elementskit-btn' => 'width: {{SIZE}}%;',
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_btn_text_padding',
|
||||
[
|
||||
'label' =>esc_html__( 'Padding', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', 'em', '%' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .elementskit-btn' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'ekit_btn_typography',
|
||||
'label' =>esc_html__( 'Typography', 'elementskit-lite' ),
|
||||
'selector' => '{{WRAPPER}} .elementskit-btn',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Text_Shadow::get_type(),
|
||||
[
|
||||
'name' => 'ekit_btn_shadow',
|
||||
'selector' => '{{WRAPPER}} .elementskit-btn',
|
||||
]
|
||||
);
|
||||
|
||||
$this->start_controls_tabs( 'ekit_btn_tabs_style' );
|
||||
|
||||
$this->start_controls_tab(
|
||||
'ekit_btn_tabnormal',
|
||||
[
|
||||
'label' =>esc_html__( 'Normal', 'elementskit-lite' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_btn_text_color',
|
||||
[
|
||||
'label' =>esc_html__( 'Text Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'default' => '',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .elementskit-btn' => 'color: {{VALUE}}; fill: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Background::get_type(),
|
||||
array(
|
||||
'name' => 'ekit_btn_bg_color',
|
||||
'selector' => '{{WRAPPER}} .elementskit-btn',
|
||||
)
|
||||
);
|
||||
|
||||
$this->end_controls_tab();
|
||||
|
||||
$this->start_controls_tab(
|
||||
'ekit_btn_tab_button_hover',
|
||||
[
|
||||
'label' =>esc_html__( 'Hover', 'elementskit-lite' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_btn_hover_color',
|
||||
[
|
||||
'label' =>esc_html__( 'Text Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'default' => '#ffffff',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .elementskit-btn:hover' => 'color: {{VALUE}}; fill: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Background::get_type(),
|
||||
array(
|
||||
'name' => 'ekit_btn_bg_hover_color',
|
||||
'selector' => '{{WRAPPER}} .elementskit-btn:hover',
|
||||
)
|
||||
);
|
||||
|
||||
$this->end_controls_tab();
|
||||
$this->end_controls_tabs();
|
||||
$this->end_controls_section();
|
||||
|
||||
$this->start_controls_section(
|
||||
'ekit_btn_border_style_tabs',
|
||||
[
|
||||
'label' =>esc_html__( 'Border', 'elementskit-lite' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_btn_border_style',
|
||||
[
|
||||
'label' => esc_html_x( 'Border Type', 'Border Control', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'options' => [
|
||||
'none' => esc_html__( 'None', 'elementskit-lite' ),
|
||||
'solid' => esc_html_x( 'Solid', 'Border Control', 'elementskit-lite' ),
|
||||
'double' => esc_html_x( 'Double', 'Border Control', 'elementskit-lite' ),
|
||||
'dotted' => esc_html_x( 'Dotted', 'Border Control', 'elementskit-lite' ),
|
||||
'dashed' => esc_html_x( 'Dashed', 'Border Control', 'elementskit-lite' ),
|
||||
'groove' => esc_html_x( 'Groove', 'Border Control', 'elementskit-lite' ),
|
||||
],
|
||||
'default' => 'none',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .elementskit-btn' => 'border-style: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'ekit_btn_border_dimensions',
|
||||
[
|
||||
'label' => esc_html_x( 'Width', 'Border Control', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'condition' => [
|
||||
'ekit_btn_border_style!' => 'none'
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .elementskit-btn' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->start_controls_tabs( 'xs_tabs_button_border_style' );
|
||||
$this->start_controls_tab(
|
||||
'ekit_btn_tab_border_normal',
|
||||
[
|
||||
'label' =>esc_html__( 'Normal', 'elementskit-lite' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_btn_border_color',
|
||||
[
|
||||
'label' => esc_html_x( 'Color', 'Border Control', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'default' => '',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .elementskit-btn' => 'border-color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'ekit_btn_border_radius',
|
||||
[
|
||||
'label' =>esc_html__( 'Border Radius', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%'],
|
||||
'default' => [
|
||||
'top' => '',
|
||||
'right' => '',
|
||||
'bottom' => '' ,
|
||||
'left' => '',
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .elementskit-btn' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->end_controls_tab();
|
||||
|
||||
$this->start_controls_tab(
|
||||
'ekit_btn_tab_button_border_hover',
|
||||
[
|
||||
'label' =>esc_html__( 'Hover', 'elementskit-lite' ),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'ekit_btn_hover_border_color',
|
||||
[
|
||||
'label' => esc_html_x( 'Color', 'Border Control', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'default' => '',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .elementskit-btn:hover' => 'border-color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'ekit_btn_border_radius_h',
|
||||
[
|
||||
'label' =>esc_html__( 'Border Radius', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%'],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .elementskit-btn:hover' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->end_controls_tab();
|
||||
$this->end_controls_tabs();
|
||||
$this->end_controls_section();
|
||||
|
||||
$this->start_controls_section(
|
||||
'ekit_btn_box_shadow_style',
|
||||
[
|
||||
'label' =>esc_html__( 'Shadow', 'elementskit-lite' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Box_Shadow::get_type(),
|
||||
[
|
||||
'name' => 'ekit_btn_box_shadow_group',
|
||||
'selector' => '{{WRAPPER}} .elementskit-btn',
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Box_Shadow::get_type(),
|
||||
[
|
||||
'name' => 'ekit_btn_hover_box_shadow_group',
|
||||
'label' => esc_html__( 'Hover Box Shadow', 'elementskit-lite' ),
|
||||
'selector' => '{{WRAPPER}} .elementskit-btn:hover',
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
$this->start_controls_section(
|
||||
'ekit_btn_iconw_style',
|
||||
[
|
||||
'label' =>esc_html__( 'Icon', 'elementskit-lite' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
'condition' => [
|
||||
'ekit_btn_icons__switch' => 'yes'
|
||||
]
|
||||
]
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'ekit_btn_normal_icon_font_size',
|
||||
array(
|
||||
'label' => esc_html__( 'Font Size', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => array(
|
||||
'px', 'em', 'rem',
|
||||
),
|
||||
'range' => array(
|
||||
'px' => array(
|
||||
'min' => 1,
|
||||
'max' => 100,
|
||||
),
|
||||
),
|
||||
'default' => [
|
||||
'unit' => 'px',
|
||||
'size' => 14,
|
||||
],
|
||||
'selectors' => array(
|
||||
'{{WRAPPER}} .elementskit-btn > :is(i, svg)' => 'font-size: {{SIZE}}{{UNIT}};',
|
||||
),
|
||||
)
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'ekit_btn_normal_icon_padding_left',
|
||||
[
|
||||
'label' => esc_html__( 'Add space after icon', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => [ 'px' ],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'min' => 0,
|
||||
'max' => 100,
|
||||
'step' => 1,
|
||||
],
|
||||
],
|
||||
'default' => [
|
||||
'unit' => 'px',
|
||||
'size' => 5,
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .elementskit-btn > i, {{WRAPPER}} .elementskit-btn > svg' => 'margin-right: {{SIZE}}{{UNIT}};',
|
||||
'.rtl {{WRAPPER}} .elementskit-btn > i, .rtl {{WRAPPER}} .elementskit-btn > svg' => 'margin-left: {{SIZE}}{{UNIT}}; margin-right: 0;',
|
||||
],
|
||||
'condition' => [
|
||||
'ekit_btn_icon_align' => 'left'
|
||||
]
|
||||
]
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'ekit_btn_normal_icon_padding_right',
|
||||
[
|
||||
'label' => esc_html__( 'Add space before icon', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => [ 'px' ],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'min' => 0,
|
||||
'max' => 100,
|
||||
'step' =>1,
|
||||
],
|
||||
],
|
||||
'default' => [
|
||||
'unit' => 'px',
|
||||
'size' => 5,
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .elementskit-btn > i, {{WRAPPER}} .elementskit-btn > svg' => 'margin-left: {{SIZE}}{{UNIT}};',
|
||||
'.rtl {{WRAPPER}} .elementskit-btn > i, .rtl {{WRAPPER}} .elementskit-btn > svg' => 'margin-left: 0; margin-right: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
'condition' => [
|
||||
'ekit_btn_icon_align' => 'right'
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_btn_normal_icon_vertical_align',
|
||||
array(
|
||||
'label' => esc_html__( 'Move icon Vertically', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => array(
|
||||
'px', 'em', 'rem',
|
||||
),
|
||||
'range' => array(
|
||||
'px' => array(
|
||||
'min' => -20,
|
||||
'max' => 20,
|
||||
),
|
||||
'em' => array(
|
||||
'min' => -5,
|
||||
'max' => 5,
|
||||
),
|
||||
'rem' => array(
|
||||
'min' => -5,
|
||||
'max' => 5,
|
||||
),
|
||||
),
|
||||
'selectors' => array(
|
||||
'{{WRAPPER}} .elementskit-btn i, {{WRAPPER}} .elementskit-btn svg' => ' -webkit-transform: translateY({{SIZE}}{{UNIT}}); -ms-transform: translateY({{SIZE}}{{UNIT}}); transform: translateY({{SIZE}}{{UNIT}})',
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
$this->insert_pro_message();
|
||||
}
|
||||
|
||||
protected function render( ) {
|
||||
echo '<div class="ekit-wid-con" >';
|
||||
$this->render_raw();
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
protected function render_raw( ) {
|
||||
$settings = $this->get_settings_for_display();
|
||||
|
||||
$btn_text = $settings['ekit_btn_text'];
|
||||
$btn_class = ($settings['ekit_btn_class'] != '') ? $settings['ekit_btn_class'] : '';
|
||||
$btn_id = ($settings['ekit_btn_id'] != '') ? $settings['ekit_btn_id'] : '';
|
||||
|
||||
$options_ekit_btn_icon_align = array_keys([
|
||||
'left' => esc_html__( 'Before', 'elementskit-lite' ),
|
||||
'right' => esc_html__( 'After', 'elementskit-lite' ),
|
||||
]);
|
||||
|
||||
$icon_align = \ElementsKit_Lite\Utils::esc_options($settings['ekit_btn_icon_align'], $options_ekit_btn_icon_align, 'left');
|
||||
|
||||
if ( ! empty( $settings['ekit_btn_url']['url'] ) ) {
|
||||
$this->add_link_attributes( 'button', $settings['ekit_btn_url'] );
|
||||
}
|
||||
|
||||
// Reset Whitespace for this specific widget
|
||||
$btn_class .= ' whitespace--normal';
|
||||
|
||||
$this->add_render_attribute('button', [
|
||||
'class' => 'elementskit-btn ' . $btn_class,
|
||||
'id' => $btn_id
|
||||
]);
|
||||
?>
|
||||
<div class="ekit-btn-wraper">
|
||||
<?php if($icon_align == 'right'): ?>
|
||||
<a <?php $this->print_render_attribute_string( 'button' ); ?>>
|
||||
<?php
|
||||
echo esc_html( $btn_text );
|
||||
Icons_Manager::render_icon($settings['ekit_btn_icons']);
|
||||
?>
|
||||
</a>
|
||||
<?php elseif ($icon_align == 'left') : ?>
|
||||
<a <?php $this->print_render_attribute_string( 'button' ); ?>>
|
||||
<?php
|
||||
Icons_Manager::render_icon($settings['ekit_btn_icons']);
|
||||
echo esc_html( $btn_text );
|
||||
?>
|
||||
</a>
|
||||
<?php else : ?>
|
||||
<a <?php $this->print_render_attribute_string( 'button' ); ?>>
|
||||
<?php echo esc_html( $btn_text ); ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
namespace Elementor;
|
||||
|
||||
|
||||
class ElementsKit_Widget_Caldera_Forms_Handler extends \ElementsKit_Lite\Core\Handler_Widget{
|
||||
|
||||
static function get_name() {
|
||||
return 'elementskit-caldera-forms';
|
||||
}
|
||||
|
||||
static function get_title() {
|
||||
return esc_html__( 'Caldera Forms', 'elementskit-lite' );
|
||||
}
|
||||
|
||||
static function get_icon() {
|
||||
return 'eicon-mail ekit-widget-icon';
|
||||
}
|
||||
|
||||
static function get_categories() {
|
||||
return [ 'elementskit' ];
|
||||
}
|
||||
|
||||
static function get_keywords() {
|
||||
return ['ekit', 'caldera', 'wpf', 'wpform' , 'weform', 'fluent form', 'form', 'contact', 'cf7', 'contact form', 'ninja'];
|
||||
}
|
||||
|
||||
static function get_dir() {
|
||||
return \ElementsKit_Lite::widget_dir() . 'caldera-forms/';
|
||||
}
|
||||
|
||||
static function get_url() {
|
||||
return \ElementsKit_Lite::widget_url() . 'caldera-forms/';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,903 @@
|
||||
<?php
|
||||
namespace Elementor;
|
||||
|
||||
use \Elementor\ElementsKit_Widget_Caldera_Forms_Handler as Handler;
|
||||
use \ElementsKit_Lite\Modules\Controls\Controls_Manager as ElementsKit_Controls_Manager;
|
||||
|
||||
if (! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
class ElementsKit_Widget_Caldera_Forms extends Widget_Base {
|
||||
use \ElementsKit_Lite\Widgets\Widget_Notice;
|
||||
|
||||
public $base;
|
||||
|
||||
public function get_name() {
|
||||
return Handler::get_name();
|
||||
}
|
||||
|
||||
public function get_title() {
|
||||
return Handler::get_title();
|
||||
}
|
||||
|
||||
public function get_icon() {
|
||||
return Handler::get_icon();
|
||||
}
|
||||
|
||||
public function get_categories() {
|
||||
return Handler::get_categories();
|
||||
}
|
||||
|
||||
public function get_keywords() {
|
||||
return Handler::get_keywords();
|
||||
}
|
||||
|
||||
public function get_help_url() {
|
||||
return 'https://wpmet.com/doc/caldera-form/';
|
||||
}
|
||||
|
||||
protected function is_dynamic_content(): bool {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function has_widget_inner_wrapper(): bool {
|
||||
return ! Plugin::$instance->experiments->is_feature_active( 'e_optimized_markup' );
|
||||
}
|
||||
|
||||
function elementskit_caldera_forms_options() {
|
||||
if ( class_exists( 'Caldera_Forms' ) ) {
|
||||
$caldera_forms = \Caldera_Forms_Forms::get_forms( true, true );
|
||||
$form_options = ['0' => esc_html__( 'Select Form', 'elementskit-lite' )];
|
||||
$form = array();
|
||||
if ( ! empty( $caldera_forms ) && ! is_wp_error( $caldera_forms ) ) {
|
||||
foreach ( $caldera_forms as $form ) {
|
||||
if ( isset($form['ID']) and isset($form['name'])) {
|
||||
$form_options[$form['ID']] = $form['name'];
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$form_options = ['0' => esc_html__( 'Form Not Found!', 'elementskit-lite' ) ];
|
||||
}
|
||||
return $form_options;
|
||||
}
|
||||
|
||||
protected function register_controls() {
|
||||
$this->start_controls_section(
|
||||
'ekit_caldera_form_section_tab', [
|
||||
'label' =>esc_html__( 'Caldera Forms', 'elementskit-lite' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_caldera_form_list',
|
||||
[
|
||||
'label' => esc_html__( 'Select Form', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '0',
|
||||
'options' => $this->elementskit_caldera_forms_options(),
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
// label
|
||||
$this->start_controls_section(
|
||||
'ekit_contact_form_input_label_style',
|
||||
[
|
||||
'label' => esc_html__( 'Label', 'elementskit-lite' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'ekit_contact_form_input_label_typography',
|
||||
'label' => esc_html__( 'Typography', 'elementskit-lite' ),
|
||||
'selector' => '{{WRAPPER}} .ekit-form form label',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_input_label_color',
|
||||
[
|
||||
'label' => esc_html__( 'Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'default' => '#000000',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form label' => 'color: {{VALUE}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_input_label_margin',
|
||||
[
|
||||
'label' => esc_html__( 'Margin', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form label' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_contact_form_input_label_hint_heading',
|
||||
[
|
||||
'label' => esc_html__( 'Hint', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::HEADING,
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'ekit_contact_form_input_label_hint_typography',
|
||||
'label' => esc_html__( 'Typography', 'elementskit-lite' ),
|
||||
'selector' => '{{WRAPPER}} .ekit-form form label span',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_input_label_hint_color',
|
||||
[
|
||||
'label' => esc_html__( 'Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'default' => '#777777',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form label span' => 'color: {{VALUE}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
// input style
|
||||
$this->start_controls_section(
|
||||
'ekit_contact_form_input_style',
|
||||
[
|
||||
'label' => esc_html__( 'Input', 'elementskit-lite' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_input_style_padding',
|
||||
[
|
||||
'label' => esc_html__( 'Padding', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form input.form-control:not([type="submit"])' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_input_style_width',
|
||||
[
|
||||
'label' => esc_html__( 'Width', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => [ 'px', '%' ],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'min' => 0,
|
||||
'max' => 1000,
|
||||
'step' => 5,
|
||||
],
|
||||
'%' => [
|
||||
'min' => 0,
|
||||
'max' => 100,
|
||||
],
|
||||
],
|
||||
'default' => [
|
||||
'unit' => '%',
|
||||
'size' => 100,
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form input.form-control:not([type="submit"])' => 'width: {{SIZE}}{{UNIT}};',
|
||||
'{{WRAPPER}} .ekit-form form textarea' => 'width: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_input_style_height',
|
||||
[
|
||||
'label' => esc_html__( 'Height', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => [ 'px' ],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'min' => 0,
|
||||
'max' => 200,
|
||||
'step' => 1,
|
||||
],
|
||||
],
|
||||
'default' => [
|
||||
'unit' => 'px',
|
||||
'size' => 50,
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form input.form-control:not([type="submit"])' => 'height: {{SIZE}}px;',
|
||||
'{{WRAPPER}} .ekit-form form textarea' => 'height: {{SIZE}}px;',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_input_style_margin_bottom',
|
||||
[
|
||||
'label' => esc_html__( 'Margin Bottom', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => [ 'px' ],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'min' => 0,
|
||||
'max' => 100,
|
||||
'step' => 1,
|
||||
],
|
||||
],
|
||||
'default' => [
|
||||
'unit' => 'px',
|
||||
'size' => 20,
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form .form-group' => 'margin-bottom: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_contact_form_input_style_textarea_heading',
|
||||
[
|
||||
'label' => esc_html__( 'Textarea', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::HEADING,
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_input_style_textarea_height',
|
||||
[
|
||||
'label' => esc_html__( 'Height', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => [ 'px', '%' ],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'min' => 176,
|
||||
'max' => 300,
|
||||
'step' => 1,
|
||||
],
|
||||
'%' => [
|
||||
'min' => 0,
|
||||
'max' => 100,
|
||||
],
|
||||
],
|
||||
'default' => [
|
||||
'unit' => 'px',
|
||||
'size' => 176,
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form textarea' => 'height: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_input_style_padding_textarea',
|
||||
[
|
||||
'label' => esc_html__( 'Padding', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form textarea' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_contact_form_input_style_padding_textarea_hr',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->start_controls_tabs(
|
||||
'ekit_contact_form_input_normal_and_hover_tabs'
|
||||
);
|
||||
$this->start_controls_tab(
|
||||
'ekit_contact_form_input_normal_tab',
|
||||
[
|
||||
'label' => esc_html__( 'Normal', 'elementskit-lite' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Background::get_type(),
|
||||
[
|
||||
'name' => 'ekit_contact_form_input_style_background',
|
||||
'label' => esc_html__( 'Background', 'elementskit-lite' ),
|
||||
'types' => [ 'classic', 'gradient' ],
|
||||
'selector' => '{{WRAPPER}} .ekit-form form.caldera_forms_form .form-group input.form-control:not([type="submit"]), {{WRAPPER}} .ekit-form form textarea',
|
||||
'exclude' => ['image'] // PHPCS:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_input_style_radius',
|
||||
[
|
||||
'label' => esc_html__( 'Border Radius', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form input:not([type="submit"])' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
'{{WRAPPER}} .ekit-form form textarea' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Border::get_type(),
|
||||
[
|
||||
'name' => 'ekit_contact_form_input_style_border',
|
||||
'label' => esc_html__( 'Border', 'elementskit-lite' ),
|
||||
'selector' => '{{WRAPPER}} .ekit-form form input.form-control:not([type="submit"]), {{WRAPPER}} .ekit-form form textarea',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Box_Shadow::get_type(),
|
||||
[
|
||||
'name' => 'ekit_contact_form_input_style_box_shadow',
|
||||
'label' => esc_html__( 'Box Shadow', 'elementskit-lite' ),
|
||||
'selector' => '
|
||||
{{WRAPPER}} .ekit-form form input:not([type="submit"]),
|
||||
{{WRAPPER}} .ekit-form form textarea'
|
||||
,
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_tab();
|
||||
$this->start_controls_tab(
|
||||
'ekit_contact_form_input_hover_tab',
|
||||
[
|
||||
'label' => esc_html__( 'Hover', 'elementskit-lite' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Background::get_type(),
|
||||
[
|
||||
'name' => 'ekit_contact_form_input_hover_style_background',
|
||||
'label' => esc_html__( 'Background', 'elementskit-lite' ),
|
||||
'types' => [ 'classic', 'gradient' ],
|
||||
'selector' => '{{WRAPPER}} .ekit-form form.caldera_forms_form .form-group input.form-control:not([type="submit"]):hover, {{WRAPPER}} .ekit-form form textarea:hover',
|
||||
'exclude' => ['image'] // PHPCS:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_input_hover_style_radius',
|
||||
[
|
||||
'label' => esc_html__( 'Border Radius', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form input:not([type="submit"]):hover' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
'{{WRAPPER}} .ekit-form form textarea:hover' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Border::get_type(),
|
||||
[
|
||||
'name' => 'ekit_contact_form_input_hover_style_border',
|
||||
'label' => esc_html__( 'Border', 'elementskit-lite' ),
|
||||
'selector' => '{{WRAPPER}} .ekit-form form input.form-control:not([type="submit"]):hover, {{WRAPPER}} .ekit-form form textarea:hover',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Box_Shadow::get_type(),
|
||||
[
|
||||
'name' => 'ekit_contact_form_input_hover_style_box_shadow',
|
||||
'label' => esc_html__( 'Box Shadow', 'elementskit-lite' ),
|
||||
'selector' => '
|
||||
{{WRAPPER}} .ekit-form form input.form-control:not([type="submit"]):hover,
|
||||
{{WRAPPER}} .ekit-form form textarea:hover'
|
||||
,
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_tab();
|
||||
$this->start_controls_tab(
|
||||
'ekit_contact_form_input_focus_tab',
|
||||
[
|
||||
'label' => esc_html__( 'Focus', 'elementskit-lite' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Background::get_type(),
|
||||
[
|
||||
'name' => 'ekit_contact_form_input_focus_style_background',
|
||||
'label' => esc_html__( 'Background', 'elementskit-lite' ),
|
||||
'types' => [ 'classic', 'gradient' ],
|
||||
'selector' => '{{WRAPPER}} .ekit-form form.caldera_forms_form .form-group input.form-control:not([type="submit"]):focus, {{WRAPPER}} .ekit-form form textarea:focus',
|
||||
'exclude' => ['image'] // PHPCS:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_input_focus_style_radius',
|
||||
[
|
||||
'label' => esc_html__( 'Border Radius', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form input:not([type="submit"]):focus' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
'{{WRAPPER}} .ekit-form form textarea:focus' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Border::get_type(),
|
||||
[
|
||||
'name' => 'ekit_contact_form_input_focus_style_border',
|
||||
'label' => esc_html__( 'Border', 'elementskit-lite' ),
|
||||
'selector' => '{{WRAPPER}} .ekit-form form input.form-control:not([type="submit"]):focus, {{WRAPPER}} .ekit-form form textarea.form-control:focus',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Box_Shadow::get_type(),
|
||||
[
|
||||
'name' => 'ekit_contact_form_input_focus_style_box_shadow',
|
||||
'label' => esc_html__( 'Box Shadow', 'elementskit-lite' ),
|
||||
'selector' => '
|
||||
{{WRAPPER}} .ekit-form form input:not([type="submit"]):focus,
|
||||
{{WRAPPER}} .ekit-form form textarea.form-control:focus'
|
||||
,
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_tab();
|
||||
|
||||
$this->end_controls_tabs();
|
||||
|
||||
$this->add_control(
|
||||
'ekit_contact_form_input_style_typography_heading',
|
||||
[
|
||||
'label' => esc_html__( 'Typography', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::HEADING,
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'ekit_contact_form_input_typography',
|
||||
'label' => esc_html__( 'Typography', 'elementskit-lite' ),
|
||||
'selector' => '{{WRAPPER}} .ekit-form form input:not([type="submit"]), .wpcf7-form input:not([type="submit"]), .wpcf7-form textarea, .ekit-wid-con .ekit-form form textarea',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_input_style_font_color',
|
||||
[
|
||||
'label' => esc_html__( 'Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'default' => '#000000',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form input:not([type="submit"])' => 'color: {{VALUE}}',
|
||||
'{{WRAPPER}} .wpcf7-form textarea' => 'color: {{VALUE}}',
|
||||
'{{WRAPPER}} .ekit-wid-con .ekit-form form textarea' => 'color: {{VALUE}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_contact_form_input_style_placeholder_heading',
|
||||
[
|
||||
'label' => esc_html__( 'Placeholder', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::HEADING,
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_input_style_placeholder_font_size',
|
||||
[
|
||||
'label' => esc_html__( 'Font Size', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => [ 'px' ],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'min' => 0,
|
||||
'max' => 100,
|
||||
'step' => 1,
|
||||
],
|
||||
],
|
||||
'default' => [
|
||||
'unit' => 'px',
|
||||
'size' => 14,
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form input:not([type="submit"])::-webkit-input-placeholder' => 'font-size: {{SIZE}}{{UNIT}};',
|
||||
'{{WRAPPER}} .ekit-form form input:not([type="submit"])::-moz-placeholder' => 'font-size: {{SIZE}}{{UNIT}};',
|
||||
'{{WRAPPER}} .ekit-form form input:not([type="submit"]):-ms-input-placeholder' => 'font-size: {{SIZE}}{{UNIT}};',
|
||||
'{{WRAPPER}} .ekit-form form input:not([type="submit"]):-moz-placeholder' => 'font-size: {{SIZE}}{{UNIT}};',
|
||||
|
||||
'{{WRAPPER}} .ekit-form form textarea::-webkit-input-placeholder' => 'font-size: {{SIZE}}{{UNIT}};',
|
||||
'{{WRAPPER}} .ekit-form form textarea::-moz-placeholder' => 'font-size: {{SIZE}}{{UNIT}};',
|
||||
'{{WRAPPER}} .ekit-form form textarea:-ms-input-placeholder' => 'font-size: {{SIZE}}{{UNIT}};',
|
||||
'{{WRAPPER}} .ekit-form form textarea:-moz-placeholder' => 'font-size: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_input_placeholder_font_color',
|
||||
[
|
||||
'label' => esc_html__( 'Placeholder Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'default' => '#000000',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form input:not([type="submit"])::-webkit-input-placeholder' => 'color: {{VALUE}}',
|
||||
'{{WRAPPER}} .ekit-form form input:not([type="submit"])::-moz-placeholder' => 'color: {{VALUE}}',
|
||||
'{{WRAPPER}} .ekit-form form input:not([type="submit"]):-ms-input-placeholder' => 'color: {{VALUE}}',
|
||||
'{{WRAPPER}} .ekit-form form input:not([type="submit"]):-moz-placeholder' => 'color: {{VALUE}}',
|
||||
|
||||
'{{WRAPPER}} .ekit-form form textarea::-webkit-input-placeholder' => 'color: {{VALUE}}',
|
||||
'{{WRAPPER}} .ekit-form form textarea::-moz-placeholder' => 'color: {{VALUE}}',
|
||||
'{{WRAPPER}} .ekit-form form textarea:-ms-input-placeholder' => 'color: {{VALUE}}',
|
||||
'{{WRAPPER}} .ekit-form form textarea:-moz-placeholder' => 'color: {{VALUE}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
|
||||
|
||||
$this->start_controls_section(
|
||||
'ekit_contact_form_button_style_holder',
|
||||
[
|
||||
'label' => esc_html__( 'Button', 'elementskit-lite' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_button_alignment',
|
||||
[
|
||||
'label' => esc_html__( 'Alignment', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::CHOOSE,
|
||||
'options' => [
|
||||
'left' => [
|
||||
'title' => esc_html__( 'Left', 'elementskit-lite' ),
|
||||
'icon' => 'eicon-text-align-left',
|
||||
],
|
||||
'center' => [
|
||||
'title' => esc_html__( 'Center', 'elementskit-lite' ),
|
||||
'icon' => 'eicon-text-align-center',
|
||||
],
|
||||
'right' => [
|
||||
'title' => esc_html__( 'Right', 'elementskit-lite' ),
|
||||
'icon' => 'eicon-text-align-right',
|
||||
],
|
||||
],
|
||||
'default' => 'left',
|
||||
'selectors'=> [
|
||||
'{{WRAPPER}} .ekit-form form input[type="submit"]' => 'text-align: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'ekit_contact_form_button_typography',
|
||||
'label' => esc_html__( 'Typography', 'elementskit-lite' ),
|
||||
'selector' => '{{WRAPPER}} .ekit-form form input[type="submit"]',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_button_border_radius',
|
||||
[
|
||||
'label' => esc_html__( 'Border Radius', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form input[type="submit"]' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_button_border_padding',
|
||||
[
|
||||
'label' => esc_html__( 'Padding', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form input[type="submit"]' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_button_style_margin',
|
||||
[
|
||||
'label' => esc_html__( 'Margin', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form input[type="submit"]' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$this->add_control(
|
||||
'ekit_contact_form_button_style_use_width_height',
|
||||
[
|
||||
'label' => esc_html__( 'Use Height Width', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label_on' => esc_html__( 'Show', 'elementskit-lite' ),
|
||||
'label_off' => esc_html__( 'Hide', 'elementskit-lite' ),
|
||||
'return_value' => 'yes',
|
||||
'default' => 'no',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_button_width',
|
||||
[
|
||||
'label' => esc_html__( 'Width', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => [ 'px', '%' ],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'min' => 50,
|
||||
'max' => 200,
|
||||
'step' => 1,
|
||||
],
|
||||
'%' => [
|
||||
'min' => 10,
|
||||
'max' => 100,
|
||||
],
|
||||
],
|
||||
'default' => [
|
||||
'unit' => 'px',
|
||||
'size' => 50,
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form input[type="submit"]' => 'width: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
'condition' => [
|
||||
'ekit_contact_form_button_style_use_width_height' => 'yes'
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_button_style_height',
|
||||
[
|
||||
'label' => esc_html__( 'Height', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => [ 'px' ],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'min' => 50,
|
||||
'max' => 200,
|
||||
'step' => 1,
|
||||
],
|
||||
'%' => [
|
||||
'min' => 10,
|
||||
'max' => 100,
|
||||
],
|
||||
],
|
||||
'default' => [
|
||||
'unit' => 'px',
|
||||
'size' => 50,
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form input[type="submit"]' => 'height: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
'condition' => [
|
||||
'ekit_contact_form_button_style_use_width_height' => 'yes'
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_button_style_line_height',
|
||||
[
|
||||
'label' => esc_html__( 'Line Height', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => [ 'px' ],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'min' => 50,
|
||||
'max' => 200,
|
||||
'step' => 1,
|
||||
],
|
||||
'%' => [
|
||||
'min' => 10,
|
||||
'max' => 100,
|
||||
],
|
||||
],
|
||||
'default' => [
|
||||
'unit' => 'px',
|
||||
'size' => 50,
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form input[type="submit"]' => 'line-height: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
'condition' => [
|
||||
'ekit_contact_form_button_style_use_width_height' => 'yes'
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
$this->start_controls_tabs(
|
||||
'ekit_contact_form_button_normal_and_hover_tabs'
|
||||
);
|
||||
$this->start_controls_tab(
|
||||
'ekit_contact_form_button_normal_tab',
|
||||
[
|
||||
'label' => esc_html__( 'Normal', 'elementskit-lite' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_button_color',
|
||||
[
|
||||
'label' => esc_html__( 'Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'default' => '#ffffff',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form input[type="submit"]' => 'color: {{VALUE}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Background::get_type(),
|
||||
[
|
||||
'name' => 'ekit_contact_form_button_background',
|
||||
'label' => esc_html__( 'Background', 'elementskit-lite' ),
|
||||
'types' => [ 'classic', 'gradient', ],
|
||||
'selector' => '{{WRAPPER}} .ekit-form form input[type="submit"]',
|
||||
'exclude' => ['image'] // PHPCS:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Box_Shadow::get_type(),
|
||||
[
|
||||
'name' => 'ekit_contact_form_button_box_shadow',
|
||||
'label' => esc_html__( 'Box Shadow', 'elementskit-lite' ),
|
||||
'selector' => '{{WRAPPER}} .ekit-form form input[type="submit"]',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Border::get_type(),
|
||||
[
|
||||
'name' => 'ekit_contact_form_button_border',
|
||||
'label' => esc_html__( 'Border', 'elementskit-lite' ),
|
||||
'selector' => '{{WRAPPER}} .ekit-form form input[type="submit"]',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Text_Shadow::get_type(),
|
||||
[
|
||||
'name' => 'ekit_contact_form_button_title_shadow',
|
||||
'selector' => '{{WRAPPER}} .ekit-form form input[type="submit"]' ,
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_tab();
|
||||
$this->start_controls_tab(
|
||||
'ekit_contact_form_button_hover_tab',
|
||||
[
|
||||
'label' => esc_html__( 'Hover', 'elementskit-lite' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_button_color_hover',
|
||||
[
|
||||
'label' => esc_html__( 'Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'default' => '#ffffff',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form input[type="submit"]:hover' => 'color: {{VALUE}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Background::get_type(),
|
||||
[
|
||||
'name' => 'ekit_contact_form_button_hover_background',
|
||||
'label' => esc_html__( 'Background', 'elementskit-lite' ),
|
||||
'types' => [ 'classic', 'gradient', ],
|
||||
'selector' => '{{WRAPPER}} .ekit-form form input[type="submit"]:hover',
|
||||
'exclude' => ['image'] // PHPCS:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Box_Shadow::get_type(),
|
||||
[
|
||||
'name' => 'ekit_contact_form_button_box_shadow_hover',
|
||||
'label' => esc_html__( 'Box Shadow', 'elementskit-lite' ),
|
||||
'selector' => '{{WRAPPER}} .ekit-form form input[type="submit"]:hover',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Border::get_type(),
|
||||
[
|
||||
'name' => 'ekit_contact_form_button_border_hover',
|
||||
'label' => esc_html__( 'Border', 'elementskit-lite' ),
|
||||
'selector' => '{{WRAPPER}} .ekit-form form input[type="submit"]:hover',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Text_Shadow::get_type(),
|
||||
[
|
||||
'name' => 'ekit_contact_form_button_title_shadow_hover',
|
||||
'selector' => '{{WRAPPER}} .ekit-form form input[type="submit"]:hover' ,
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_tab();
|
||||
|
||||
$this->end_controls_tabs();
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
$this->insert_pro_message();
|
||||
}
|
||||
|
||||
protected function render( ) {
|
||||
echo '<div class="ekit-wid-con" >';
|
||||
$this->render_raw();
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
protected function render_raw( ) {
|
||||
|
||||
$settings = $this->get_settings();
|
||||
$calderaform_attributes = [
|
||||
'id' => $settings['ekit_caldera_form_list'],
|
||||
];
|
||||
$this->add_render_attribute( 'shortcode', $calderaform_attributes );
|
||||
?>
|
||||
<div class="ekit-form">
|
||||
<div class="caldera-form-wrap">
|
||||
<?php
|
||||
if ( !$settings['ekit_caldera_form_list'] ) {
|
||||
echo '<div class="elementskit-notices"><p>'.esc_html__('Please select a Contact Form From Setting!', 'elementskit-lite').'</p></div>';
|
||||
}else{
|
||||
echo do_shortcode( sprintf( '[caldera_form %s]', $this->get_render_attribute_string( 'shortcode' ) ) );
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
namespace Elementor;
|
||||
|
||||
class ElementsKit_Widget_Category_List_Handler extends \ElementsKit_Lite\Core\Handler_Widget{
|
||||
|
||||
static function get_name() {
|
||||
return 'elementskit-category-list';
|
||||
}
|
||||
|
||||
static function get_title() {
|
||||
return esc_html__( 'Category List', 'elementskit-lite' );
|
||||
}
|
||||
|
||||
static function get_icon() {
|
||||
return 'ekit ekit-widget-icon ekit-category-list';
|
||||
}
|
||||
|
||||
|
||||
static function get_keywords() {
|
||||
return ['ekit', 'list', 'category list', 'category', 'post category'];
|
||||
}
|
||||
|
||||
static function get_categories() {
|
||||
return [ 'elementskit_headerfooter' ];
|
||||
}
|
||||
|
||||
static function get_dir() {
|
||||
return \ElementsKit_Lite::widget_dir() . 'category-list/';
|
||||
}
|
||||
|
||||
static function get_url() {
|
||||
return \ElementsKit_Lite::widget_url() . 'category-list/';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,511 @@
|
||||
<?php
|
||||
namespace Elementor;
|
||||
|
||||
use \Elementor\ElementsKit_Widget_Category_List_Handler as Handler;
|
||||
use \ElementsKit_Lite\Modules\Controls\Controls_Manager as ElementsKit_Controls_Manager;
|
||||
|
||||
if (! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
class ElementsKit_Widget_Category_List extends Widget_Base {
|
||||
use \ElementsKit_Lite\Widgets\Widget_Notice;
|
||||
|
||||
public $base;
|
||||
|
||||
public function get_name() {
|
||||
return Handler::get_name();
|
||||
}
|
||||
|
||||
public function get_title() {
|
||||
return Handler::get_title();
|
||||
}
|
||||
|
||||
public function get_icon() {
|
||||
return Handler::get_icon();
|
||||
}
|
||||
|
||||
public function get_keywords() {
|
||||
return Handler::get_keywords();
|
||||
}
|
||||
|
||||
public function get_categories() {
|
||||
return Handler::get_categories();
|
||||
}
|
||||
|
||||
public function get_help_url() {
|
||||
return 'https://wpmet.com/doc/category-list/';
|
||||
}
|
||||
|
||||
public function get_style_depends(): array {
|
||||
return [ 'widget-icon-list' ];
|
||||
}
|
||||
|
||||
protected function is_dynamic_content(): bool {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function has_widget_inner_wrapper(): bool {
|
||||
return ! Plugin::$instance->experiments->is_feature_active( 'e_optimized_markup' );
|
||||
}
|
||||
|
||||
protected function register_controls() {
|
||||
$this->start_controls_section(
|
||||
'section_icon',
|
||||
[
|
||||
'label' => esc_html__( 'List', 'elementskit-lite' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'view',
|
||||
[
|
||||
'label' => esc_html__( 'Layout', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::CHOOSE,
|
||||
'default' => 'traditional',
|
||||
'options' => [
|
||||
'traditional' => [
|
||||
'title' => esc_html__( 'Default', 'elementskit-lite' ),
|
||||
'icon' => 'eicon-editor-list-ul',
|
||||
],
|
||||
'inline' => [
|
||||
'title' => esc_html__( 'Inline', 'elementskit-lite' ),
|
||||
'icon' => 'eicon-ellipsis-h',
|
||||
],
|
||||
],
|
||||
'render_type' => 'template',
|
||||
'classes' => 'elementor-control-start-end',
|
||||
'label_block' => false,
|
||||
'style_transfer' => true,
|
||||
]
|
||||
);
|
||||
|
||||
$repeater = new Repeater();
|
||||
|
||||
$repeater->add_control(
|
||||
'text',
|
||||
[
|
||||
'label' => esc_html__( 'Text', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'label_block' => true,
|
||||
'placeholder' => esc_html__( 'List Title', 'elementskit-lite' ),
|
||||
]
|
||||
);
|
||||
|
||||
$repeater->add_control(
|
||||
'icons',
|
||||
[
|
||||
'label' => esc_html__( 'Icon', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::ICONS,
|
||||
'default' => [
|
||||
'value' => 'fas fa-check',
|
||||
'library' => 'fa-solid',
|
||||
],
|
||||
'label_block' => true,
|
||||
]
|
||||
);
|
||||
|
||||
$repeater->add_control(
|
||||
'list_bg_color',
|
||||
[
|
||||
'label' => esc_html__( 'Background Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
]
|
||||
);
|
||||
|
||||
$repeater->add_control(
|
||||
'link',
|
||||
[
|
||||
'label' =>esc_html__('Select Category', 'elementskit-lite'),
|
||||
'type' => ElementsKit_Controls_Manager::AJAXSELECT2,
|
||||
'options' =>'ajaxselect2/category',
|
||||
'label_block' => true,
|
||||
'multiple' => false,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'icon_list',
|
||||
[
|
||||
'label' => '',
|
||||
'type' => Controls_Manager::REPEATER,
|
||||
'fields' => $repeater->get_controls(),
|
||||
'title_field' => '<i class="{{ icons.value }}" aria-hidden="true"></i> {{{ text }}}',
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
$this->start_controls_section(
|
||||
'section_icon_list',
|
||||
[
|
||||
'label' => esc_html__( 'List', 'elementskit-lite' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'space_between',
|
||||
[
|
||||
'label' => esc_html__( 'Space Between', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'range' => [
|
||||
'px' => [
|
||||
'max' => 50,
|
||||
],
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .elementor-icon-list-items:not(.elementor-inline-items) .elementor-icon-list-item:not(:last-child)' => 'padding-bottom: calc({{SIZE}}{{UNIT}}/2)',
|
||||
'{{WRAPPER}} .elementor-icon-list-items:not(.elementor-inline-items) .elementor-icon-list-item:not(:first-child)' => 'margin-top: calc({{SIZE}}{{UNIT}}/2)',
|
||||
'{{WRAPPER}} .elementor-icon-list-items.elementor-inline-items .elementor-icon-list-item' => 'margin-right: calc({{SIZE}}{{UNIT}}/2); margin-left: calc({{SIZE}}{{UNIT}}/2)',
|
||||
'{{WRAPPER}} .elementor-icon-list-items.elementor-inline-items' => 'margin-right: calc(-{{SIZE}}{{UNIT}}/2); margin-left: calc(-{{SIZE}}{{UNIT}}/2)',
|
||||
'body.rtl {{WRAPPER}} .elementor-icon-list-items.elementor-inline-items .elementor-icon-list-item:after' => 'left: calc(-{{SIZE}}{{UNIT}}/2)',
|
||||
'body:not(.rtl) {{WRAPPER}} .elementor-icon-list-items.elementor-inline-items .elementor-icon-list-item:after' => 'right: calc(-{{SIZE}}{{UNIT}}/2)',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'icon_align',
|
||||
[
|
||||
'label' => esc_html__( 'Alignment', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::CHOOSE,
|
||||
'options' => [
|
||||
'left' => [
|
||||
'title' => esc_html__( 'Left', 'elementskit-lite' ),
|
||||
'icon' => 'eicon-text-align-left',
|
||||
],
|
||||
'center' => [
|
||||
'title' => esc_html__( 'Center', 'elementskit-lite' ),
|
||||
'icon' => 'eicon-text-align-center',
|
||||
],
|
||||
'right' => [
|
||||
'title' => esc_html__( 'Right', 'elementskit-lite' ),
|
||||
'icon' => 'eicon-text-align-right',
|
||||
],
|
||||
],
|
||||
'prefix_class' => 'elementor%s-align-',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider',
|
||||
[
|
||||
'label' => esc_html__( 'Divider', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label_off' => esc_html__( 'Off', 'elementskit-lite' ),
|
||||
'label_on' => esc_html__( 'On', 'elementskit-lite' ),
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .elementor-icon-list-item:not(:last-child):after' => 'content: "";',
|
||||
'{{WRAPPER}} .elementor-inline-items .elementor-icon-list-item:not(:last-child):after' => 'bottom: unset;',
|
||||
],
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider_style',
|
||||
[
|
||||
'label' => esc_html__( 'Style', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'options' => [
|
||||
'solid' => esc_html__( 'Solid', 'elementskit-lite' ),
|
||||
'dotted' => esc_html__( 'Dotted', 'elementskit-lite' ),
|
||||
'dashed' => esc_html__( 'Dashed', 'elementskit-lite' ),
|
||||
],
|
||||
'default' => 'solid',
|
||||
'condition' => [
|
||||
'divider' => 'yes',
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .elementor-icon-list-items:not(.elementor-inline-items) .elementor-icon-list-item:not(:last-child):after' => 'border-top-style: {{VALUE}}',
|
||||
'{{WRAPPER}} .elementor-icon-list-items.elementor-inline-items .elementor-icon-list-item:not(:last-child):after' => 'border-left-style: {{VALUE}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider_weight',
|
||||
[
|
||||
'label' => esc_html__( 'Weight', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'default' => [
|
||||
'size' => 1,
|
||||
],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'min' => 1,
|
||||
'max' => 20,
|
||||
],
|
||||
],
|
||||
'condition' => [
|
||||
'divider' => 'yes',
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .elementor-icon-list-items:not(.elementor-inline-items) .elementor-icon-list-item:not(:last-child):after' => 'border-top-width: {{SIZE}}{{UNIT}}',
|
||||
'{{WRAPPER}} .elementor-inline-items .elementor-icon-list-item:not(:last-child):after' => 'border-left-width: {{SIZE}}{{UNIT}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider_width',
|
||||
[
|
||||
'label' => esc_html__( 'Width', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'default' => [
|
||||
'unit' => '%',
|
||||
],
|
||||
'condition' => [
|
||||
'divider' => 'yes',
|
||||
'view!' => 'inline',
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .elementor-icon-list-item:not(:last-child):after' => 'width: {{SIZE}}{{UNIT}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider_height',
|
||||
[
|
||||
'label' => esc_html__( 'Height', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => [ '%', 'px' ],
|
||||
'default' => [
|
||||
'unit' => '%',
|
||||
],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'min' => 1,
|
||||
'max' => 100,
|
||||
],
|
||||
'%' => [
|
||||
'min' => 1,
|
||||
'max' => 100,
|
||||
],
|
||||
],
|
||||
'condition' => [
|
||||
'divider' => 'yes',
|
||||
'view' => 'inline',
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .elementor-icon-list-item:not(:last-child):after' => 'height: {{SIZE}}{{UNIT}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider_color',
|
||||
[
|
||||
'label' => esc_html__( 'Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'default' => '#ddd',
|
||||
'condition' => [
|
||||
'divider' => 'yes',
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .elementor-icon-list-item:not(:last-child):after' => 'border-color: {{VALUE}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'list_padding',
|
||||
[
|
||||
'label' => esc_html__('Padding (px)', 'elementskit-lite'),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .elementor-icon-list-item a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'list_border_radius',
|
||||
[
|
||||
'label' => esc_html__('Border Radius', 'elementskit-lite'),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => [ 'px', '%' ],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'min' => 0,
|
||||
'max' => 100,
|
||||
],
|
||||
'%' => [
|
||||
'min' => 0,
|
||||
'max' => 100,
|
||||
],
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .elementor-icon-list-item a' => 'border-radius: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
$this->start_controls_section(
|
||||
'section_icon_style',
|
||||
[
|
||||
'label' => esc_html__( 'Icon', 'elementskit-lite' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'icon_color',
|
||||
[
|
||||
'label' => esc_html__( 'Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'default' => '',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .elementor-icon-list-icon' => 'color: {{VALUE}}; fill: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'icon_color_hover',
|
||||
[
|
||||
'label' => esc_html__( 'Hover', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'default' => '',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .elementor-icon-list-item:hover .elementor-icon-list-icon' => 'color: {{VALUE}}; fill: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'icon_size',
|
||||
[
|
||||
'label' => esc_html__( 'Size', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'default' => [
|
||||
'size' => 14,
|
||||
],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'min' => 6,
|
||||
],
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .elementor-icon-list-icon' => 'font-size: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
$this->start_controls_section(
|
||||
'section_text_style',
|
||||
[
|
||||
'label' => esc_html__( 'Text', 'elementskit-lite' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'text_color',
|
||||
[
|
||||
'label' => esc_html__( 'Text Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'default' => '',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .elementor-icon-list-item a' => 'color: {{VALUE}}; fill: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'text_color_hover',
|
||||
[
|
||||
'label' => esc_html__( 'Hover', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'default' => '',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .elementor-icon-list-item:hover a' => 'color: {{VALUE}}; fill: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'text_indent',
|
||||
[
|
||||
'label' => esc_html__( 'Left Padding', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'range' => [
|
||||
'px' => [
|
||||
'max' => 50,
|
||||
],
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .elementor-icon-list-text' => is_rtl() ? 'padding-right: {{SIZE}}{{UNIT}};' : 'padding-left: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'icon_typography',
|
||||
'selector' => '{{WRAPPER}} .elementor-icon-list-item',
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
$this->insert_pro_message();
|
||||
}
|
||||
|
||||
protected function render( ) {
|
||||
echo '<div class="ekit-wid-con" >';
|
||||
$this->render_raw();
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
protected function render_raw( ) {
|
||||
$settings = $this->get_settings_for_display();
|
||||
|
||||
$this->add_render_attribute( 'icon_list', 'class', 'elementor-icon-list-items' );
|
||||
$this->add_render_attribute( 'list_item', 'class', 'elementor-icon-list-item' );
|
||||
|
||||
if ( 'inline' === $settings['view'] ) {
|
||||
$this->add_render_attribute( 'icon_list', 'class', 'elementor-inline-items' );
|
||||
$this->add_render_attribute( 'list_item', 'class', 'elementor-inline-item' );
|
||||
}
|
||||
?>
|
||||
<ul <?php echo $this->get_render_attribute_string( 'icon_list' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Already escaped by elementor ?>>
|
||||
<?php
|
||||
foreach ( $settings['icon_list'] as $index => $item ) :
|
||||
$post = !empty( $item['link'] ) ? get_category($item['link']) : 0;
|
||||
$text = empty($item['text']) ? (!empty($post) ? $post->name : '') : $item['text'];
|
||||
if(!empty($item['list_bg_color'])) {
|
||||
$this->add_render_attribute('list_bg_' . $index, 'style', 'background: ' . esc_attr($item['list_bg_color']) . ';');
|
||||
}
|
||||
|
||||
if($post != null):
|
||||
?>
|
||||
<li class="elementor-icon-list-item">
|
||||
<a href="<?php echo esc_url(get_category_link($post->term_id)); ?>" <?php echo $this->get_render_attribute_string('list_bg_' . $index); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Already escaped by elementor ?>>
|
||||
<?php if (!empty($item['icons']['value'])) : ?>
|
||||
<span class="elementor-icon-list-icon">
|
||||
<?php Icons_Manager::render_icon($item['icons'], [ 'aria-hidden' => 'true' ]); ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
<span class="elementor-icon-list-text"><?php echo esc_html($text); ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php
|
||||
endif;
|
||||
endforeach;
|
||||
?>
|
||||
</ul>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
namespace Elementor;
|
||||
|
||||
class ElementsKit_Widget_Client_Logo_Handler extends \ElementsKit_Lite\Core\Handler_Widget{
|
||||
|
||||
static function get_name() {
|
||||
return 'elementskit-client-logo';
|
||||
}
|
||||
|
||||
static function get_title() {
|
||||
|
||||
return esc_html__( 'Client Logo', 'elementskit-lite' );
|
||||
}
|
||||
|
||||
static function get_icon() {
|
||||
return 'eicon-slider-push ekit-widget-icon';
|
||||
}
|
||||
|
||||
static function get_categories() {
|
||||
return [ 'elementskit' ];
|
||||
}
|
||||
|
||||
static function get_keywords() {
|
||||
return ['ekit', 'client', 'logo', 'brand', 'partner logo'];
|
||||
}
|
||||
|
||||
static function get_dir() {
|
||||
return \ElementsKit_Lite::widget_dir() . 'client-logo/';
|
||||
}
|
||||
|
||||
static function get_url() {
|
||||
return \ElementsKit_Lite::widget_url() . 'client-logo/';
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
namespace Elementor;
|
||||
|
||||
class ElementsKit_Widget_Contact_Form7_Handler extends \ElementsKit_Lite\Core\Handler_Widget{
|
||||
|
||||
static function get_name() {
|
||||
return 'elementskit-contact-form7';
|
||||
}
|
||||
|
||||
static function get_title() {
|
||||
return esc_html__( 'Contact Form 7', 'elementskit-lite' );
|
||||
}
|
||||
|
||||
static function get_icon() {
|
||||
return 'eicon-mail ekit-widget-icon';
|
||||
}
|
||||
|
||||
static function get_categories() {
|
||||
return [ 'elementskit' ];
|
||||
}
|
||||
|
||||
static function get_keywords() {
|
||||
return ['ekit', 'wpf', 'wpform' , 'weform', 'form', 'contact', 'cf7', 'contact form'];
|
||||
}
|
||||
|
||||
static function get_dir() {
|
||||
return \ElementsKit_Lite::widget_dir() . 'contact-form7/';
|
||||
}
|
||||
|
||||
static function get_url() {
|
||||
return \ElementsKit_Lite::widget_url() . 'contact-form7/';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,888 @@
|
||||
<?php
|
||||
namespace Elementor;
|
||||
|
||||
use \Elementor\ElementsKit_Widget_Contact_Form7_Handler as Handler;
|
||||
|
||||
if (! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
class ElementsKit_Widget_Contact_Form7 extends Widget_Base {
|
||||
use \ElementsKit_Lite\Widgets\Widget_Notice;
|
||||
|
||||
public $base;
|
||||
|
||||
public function get_name() {
|
||||
return Handler::get_name();
|
||||
}
|
||||
|
||||
public function get_title() {
|
||||
return Handler::get_title();
|
||||
}
|
||||
|
||||
public function get_icon() {
|
||||
return Handler::get_icon();
|
||||
}
|
||||
|
||||
public function get_categories() {
|
||||
return Handler::get_categories();
|
||||
}
|
||||
|
||||
public function get_keywords() {
|
||||
return Handler::get_keywords();
|
||||
}
|
||||
|
||||
public function get_help_url() {
|
||||
return 'https://wpmet.com/doc/contact-form-7/';
|
||||
}
|
||||
|
||||
protected function is_dynamic_content(): bool {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function has_widget_inner_wrapper(): bool {
|
||||
return ! Plugin::$instance->experiments->is_feature_active( 'e_optimized_markup' );
|
||||
}
|
||||
|
||||
function ekit_cf7form() {
|
||||
$wpcf7_form_list = get_posts( array(
|
||||
'post_type' => 'wpcf7_contact_form',
|
||||
'showposts' => 999,
|
||||
) );
|
||||
$posts = array();
|
||||
if ( !empty( $wpcf7_form_list ) && !is_wp_error( $wpcf7_form_list ) ) {
|
||||
foreach ( $wpcf7_form_list as $post ) {
|
||||
$options[ $post->ID ] = $post->post_title;
|
||||
}
|
||||
return $options;
|
||||
}
|
||||
}
|
||||
|
||||
protected function register_controls() {
|
||||
$this->start_controls_section(
|
||||
'section_tab', [
|
||||
'label' =>esc_html__( 'Contact Form 7', 'elementskit-lite' ),
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
|
||||
$this->add_control(
|
||||
'ekit_contact_form7',
|
||||
[
|
||||
'label' =>esc_html__( 'Style', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'accoedion-primary',
|
||||
'options' => $this->ekit_cf7form()
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
// label
|
||||
$this->start_controls_section(
|
||||
'ekit_contact_form_input_label_style',
|
||||
[
|
||||
'label' => esc_html__( 'Label', 'elementskit-lite' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'ekit_contact_form_input_label_typography',
|
||||
'label' => esc_html__( 'Typography', 'elementskit-lite' ),
|
||||
'selector' => '{{WRAPPER}} .ekit-form form label',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_input_label_color',
|
||||
[
|
||||
'label' => esc_html__( 'Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'default' => '#000000',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form label' => 'color: {{VALUE}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_input_label_margin',
|
||||
[
|
||||
'label' => esc_html__( 'Margin', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form label' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_contact_form_input_label_hint_heading',
|
||||
[
|
||||
'label' => esc_html__( 'Hint', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::HEADING,
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'ekit_contact_form_input_label_hint_typography',
|
||||
'label' => esc_html__( 'Typography', 'elementskit-lite' ),
|
||||
'selector' => '{{WRAPPER}} .ekit-form form label span',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_input_label_hint_color',
|
||||
[
|
||||
'label' => esc_html__( 'Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'default' => '#777777',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form label span' => 'color: {{VALUE}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
// input style
|
||||
$this->start_controls_section(
|
||||
'ekit_contact_form_input_style',
|
||||
[
|
||||
'label' => esc_html__( 'Input', 'elementskit-lite' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_input_style_padding',
|
||||
[
|
||||
'label' => esc_html__( 'Padding', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]), {{WRAPPER}} .ekit-form form select' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_input_style_width',
|
||||
[
|
||||
'label' => esc_html__( 'Width', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => [ 'px', '%' ],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'min' => 0,
|
||||
'max' => 1000,
|
||||
'step' => 5,
|
||||
],
|
||||
'%' => [
|
||||
'min' => 0,
|
||||
'max' => 100,
|
||||
],
|
||||
],
|
||||
'default' => [
|
||||
'unit' => '%',
|
||||
'size' => 100,
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]), {{WRAPPER}} .ekit-form form select' => 'width: {{SIZE}}{{UNIT}};',
|
||||
'{{WRAPPER}} .ekit-form form textarea' => 'width: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_input_style_height',
|
||||
[
|
||||
'label' => esc_html__( 'Height', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => [ 'px' ],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'min' => 0,
|
||||
'max' => 200,
|
||||
'step' => 1,
|
||||
],
|
||||
],
|
||||
'default' => [
|
||||
'unit' => 'px',
|
||||
'size' => 50,
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]), {{WRAPPER}} .ekit-form form select' => 'height: {{SIZE}}px;',
|
||||
'{{WRAPPER}} .ekit-form form textarea' => 'height: {{SIZE}}px;',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_input_style_margin_bottom',
|
||||
[
|
||||
'label' => esc_html__( 'Margin Bottom', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => [ 'px' ],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'min' => 0,
|
||||
'max' => 100,
|
||||
'step' => 1,
|
||||
],
|
||||
],
|
||||
'default' => [
|
||||
'unit' => 'px',
|
||||
'size' => 20,
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form .ekit-form-input, {{WRAPPER}} .ekit-form form select, {{WRAPPER}} .ekit-form form input' => 'margin-bottom: {{SIZE}}{{UNIT}};',
|
||||
'{{WRAPPER}} .ekit-form form textarea' => 'margin-bottom: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_contact_form_input_style_textarea_heading',
|
||||
[
|
||||
'label' => esc_html__( 'Textarea', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::HEADING,
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_input_style_textarea_height',
|
||||
[
|
||||
'label' => esc_html__( 'Height', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => [ 'px', '%' ],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'min' => 176,
|
||||
'max' => 300,
|
||||
'step' => 1,
|
||||
],
|
||||
'%' => [
|
||||
'min' => 0,
|
||||
'max' => 100,
|
||||
],
|
||||
],
|
||||
'default' => [
|
||||
'unit' => 'px',
|
||||
'size' => 176,
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form textarea' => 'height: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_input_style_padding_textarea',
|
||||
[
|
||||
'label' => esc_html__( 'Padding', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form textarea' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_contact_form_input_style_padding_textarea_hr',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->start_controls_tabs(
|
||||
'ekit_contact_form_input_normal_and_hover_tabs'
|
||||
);
|
||||
$this->start_controls_tab(
|
||||
'ekit_contact_form_input_normal_tab',
|
||||
[
|
||||
'label' => esc_html__( 'Normal', 'elementskit-lite' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Background::get_type(),
|
||||
[
|
||||
'name' => 'ekit_contact_form_input_style_background',
|
||||
'label' => esc_html__( 'Background', 'elementskit-lite' ),
|
||||
'types' => [ 'classic', 'gradient' ],
|
||||
'selector' => '{{WRAPPER}} .ekit-form form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]) ,{{WRAPPER}} .ekit-form form textarea, {{WRAPPER}} .ekit-form form select',
|
||||
'exclude' => ['image'] // PHPCS:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_input_style_radius',
|
||||
[
|
||||
'label' => esc_html__( 'Border Radius', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]), {{WRAPPER}} .ekit-form form select' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
'{{WRAPPER}} .ekit-form form textarea' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Border::get_type(),
|
||||
[
|
||||
'name' => 'ekit_contact_form_input_style_border',
|
||||
'label' => esc_html__( 'Border', 'elementskit-lite' ),
|
||||
'selector' => '{{WRAPPER}} .ekit-form form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]), {{WRAPPER}} .ekit-form form textarea, {{WRAPPER}} .ekit-form form select',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Box_Shadow::get_type(),
|
||||
[
|
||||
'name' => 'ekit_contact_form_input_style_box_shadow',
|
||||
'label' => esc_html__( 'Box Shadow', 'elementskit-lite' ),
|
||||
'selector' => '
|
||||
{{WRAPPER}} .ekit-form form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
|
||||
{{WRAPPER}} .ekit-form form textarea, {{WRAPPER}} .ekit-form form select'
|
||||
,
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_tab();
|
||||
$this->start_controls_tab(
|
||||
'ekit_contact_form_input_hover_tab',
|
||||
[
|
||||
'label' => esc_html__( 'Hover', 'elementskit-lite' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Background::get_type(),
|
||||
[
|
||||
'name' => 'ekit_contact_form_input_hover_style_background',
|
||||
'label' => esc_html__( 'Background', 'elementskit-lite' ),
|
||||
'types' => [ 'classic', 'gradient' ],
|
||||
'selector' => '{{WRAPPER}} .ekit-form form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]):hover ,{{WRAPPER}} .ekit-form form textarea:hover, {{WRAPPER}} .ekit-form form select:hover',
|
||||
'exclude' => ['image'] // PHPCS:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_input_hover_style_radius',
|
||||
[
|
||||
'label' => esc_html__( 'Border Radius', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]):hover, {{WRAPPER}} .ekit-form form select:hover' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
'{{WRAPPER}} .ekit-form form textarea:hover' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Border::get_type(),
|
||||
[
|
||||
'name' => 'ekit_contact_form_input_hover_style_border',
|
||||
'label' => esc_html__( 'Border', 'elementskit-lite' ),
|
||||
'selector' => '{{WRAPPER}} .ekit-form form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]):hover, {{WRAPPER}} .ekit-form form textarea:hover, {{WRAPPER}} .ekit-form form select:hover',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Box_Shadow::get_type(),
|
||||
[
|
||||
'name' => 'ekit_contact_form_input_hover_style_box_shadow',
|
||||
'label' => esc_html__( 'Box Shadow', 'elementskit-lite' ),
|
||||
'selector' => '
|
||||
{{WRAPPER}} .ekit-form form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]):hover,
|
||||
{{WRAPPER}} .ekit-form form textarea:hover, {{WRAPPER}} .ekit-form form select:hover'
|
||||
,
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_tab();
|
||||
$this->start_controls_tab(
|
||||
'ekit_contact_form_input_focus_tab',
|
||||
[
|
||||
'label' => esc_html__( 'Focus', 'elementskit-lite' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Background::get_type(),
|
||||
[
|
||||
'name' => 'ekit_contact_form_input_focus_style_background',
|
||||
'label' => esc_html__( 'Background', 'elementskit-lite' ),
|
||||
'types' => [ 'classic', 'gradient' ],
|
||||
'selector' => '{{WRAPPER}} .ekit-form form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]):focus ,{{WRAPPER}} .ekit-form form textarea:focus, {{WRAPPER}} .ekit-form form select:focus',
|
||||
'exclude' => ['image'] // PHPCS:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_input_focus_style_radius',
|
||||
[
|
||||
'label' => esc_html__( 'Border Radius', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]):focus, {{WRAPPER}} .ekit-form form select:focus' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
'{{WRAPPER}} .ekit-form form textarea:focus' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Border::get_type(),
|
||||
[
|
||||
'name' => 'ekit_contact_form_input_focus_style_border',
|
||||
'label' => esc_html__( 'Border', 'elementskit-lite' ),
|
||||
'selector' => '{{WRAPPER}} .ekit-form form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]):focus, {{WRAPPER}} .ekit-form form textarea:focus, {{WRAPPER}} .ekit-form form select:focus',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Box_Shadow::get_type(),
|
||||
[
|
||||
'name' => 'ekit_contact_form_input_focus_style_box_shadow',
|
||||
'label' => esc_html__( 'Box Shadow', 'elementskit-lite' ),
|
||||
'selector' => '
|
||||
{{WRAPPER}} .ekit-form form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]):focus,
|
||||
{{WRAPPER}} .ekit-form form textarea:focus, {{WRAPPER}} .ekit-form form select:focus'
|
||||
,
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_tab();
|
||||
|
||||
$this->end_controls_tabs();
|
||||
|
||||
$this->add_control(
|
||||
'ekit_contact_form_input_style_typography_heading',
|
||||
[
|
||||
'label' => esc_html__( 'Typography', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::HEADING,
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'ekit_contact_form_input_typography',
|
||||
'label' => esc_html__( 'Typography', 'elementskit-lite' ),
|
||||
'selector' => '{{WRAPPER}} .ekit-form form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]), .wpcf7-form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]), {{WRAPPER}} .wpcf7-form textarea, {{WRAPPER}} .ekit-wid-con .ekit-form form textarea, {{WRAPPER}} .ekit-form form select',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_input_style_font_color',
|
||||
[
|
||||
'label' => esc_html__( 'Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'default' => '#000000',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]), {{WRAPPER}} .ekit-form form select' => 'color: {{VALUE}}',
|
||||
'{{WRAPPER}} .wpcf7-form textarea' => 'color: {{VALUE}}',
|
||||
'{{WRAPPER}} .ekit-wid-con .ekit-form form textarea' => 'color: {{VALUE}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_contact_form_input_style_placeholder_heading',
|
||||
[
|
||||
'label' => esc_html__( 'Placeholder', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::HEADING,
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_input_style_placeholder_font_size',
|
||||
[
|
||||
'label' => esc_html__( 'Font Size', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => [ 'px' ],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'min' => 0,
|
||||
'max' => 100,
|
||||
'step' => 1,
|
||||
],
|
||||
],
|
||||
'default' => [
|
||||
'unit' => 'px',
|
||||
'size' => 14,
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"])::-webkit-input-placeholder' => 'font-size: {{SIZE}}{{UNIT}};',
|
||||
'{{WRAPPER}} .ekit-form form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"])::-moz-placeholder' => 'font-size: {{SIZE}}{{UNIT}};',
|
||||
'{{WRAPPER}} .ekit-form form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]):-ms-input-placeholder' => 'font-size: {{SIZE}}{{UNIT}};',
|
||||
'{{WRAPPER}} .ekit-form form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]):-moz-placeholder' => 'font-size: {{SIZE}}{{UNIT}};',
|
||||
|
||||
'{{WRAPPER}} .ekit-form form textarea::-webkit-input-placeholder' => 'font-size: {{SIZE}}{{UNIT}};',
|
||||
'{{WRAPPER}} .ekit-form form textarea::-moz-placeholder' => 'font-size: {{SIZE}}{{UNIT}};',
|
||||
'{{WRAPPER}} .ekit-form form textarea:-ms-input-placeholder' => 'font-size: {{SIZE}}{{UNIT}};',
|
||||
'{{WRAPPER}} .ekit-form form textarea:-moz-placeholder' => 'font-size: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_input_placeholder_font_color',
|
||||
[
|
||||
'label' => esc_html__( 'Placeholder Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'default' => '#000000',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"])::-webkit-input-placeholder' => 'color: {{VALUE}}',
|
||||
'{{WRAPPER}} .ekit-form form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"])::-moz-placeholder' => 'color: {{VALUE}}',
|
||||
'{{WRAPPER}} .ekit-form form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]):-ms-input-placeholder' => 'color: {{VALUE}}',
|
||||
'{{WRAPPER}} .ekit-form form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]):-moz-placeholder' => 'color: {{VALUE}}',
|
||||
|
||||
'{{WRAPPER}} .ekit-form form textarea::-webkit-input-placeholder' => 'color: {{VALUE}}',
|
||||
'{{WRAPPER}} .ekit-form form textarea::-moz-placeholder' => 'color: {{VALUE}}',
|
||||
'{{WRAPPER}} .ekit-form form textarea:-ms-input-placeholder' => 'color: {{VALUE}}',
|
||||
'{{WRAPPER}} .ekit-form form textarea:-moz-placeholder' => 'color: {{VALUE}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
|
||||
|
||||
$this->start_controls_section(
|
||||
'ekit_contact_form_button_style_holder',
|
||||
[
|
||||
'label' => esc_html__( 'Button', 'elementskit-lite' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_button_alignment',
|
||||
[
|
||||
'label' => esc_html__( 'Alignment', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::CHOOSE,
|
||||
'options' => [
|
||||
'left' => [
|
||||
'title' => esc_html__( 'Left', 'elementskit-lite' ),
|
||||
'icon' => 'eicon-text-align-left',
|
||||
],
|
||||
'center' => [
|
||||
'title' => esc_html__( 'Center', 'elementskit-lite' ),
|
||||
'icon' => 'eicon-text-align-center',
|
||||
],
|
||||
'right' => [
|
||||
'title' => esc_html__( 'Right', 'elementskit-lite' ),
|
||||
'icon' => 'eicon-text-align-right',
|
||||
],
|
||||
],
|
||||
'default' => 'left',
|
||||
'selectors'=> [
|
||||
'{{WRAPPER}} .ekit-form form > p' => 'text-align: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'ekit_contact_form_button_typography',
|
||||
'label' => esc_html__( 'Typography', 'elementskit-lite' ),
|
||||
'selector' => '{{WRAPPER}} .ekit-form form input[type="submit"]',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_button_border_radius',
|
||||
[
|
||||
'label' => esc_html__( 'Border Radius', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form input[type="submit"]' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_button_border_padding',
|
||||
[
|
||||
'label' => esc_html__( 'Padding', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form input[type="submit"]' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_button_style_margin',
|
||||
[
|
||||
'label' => esc_html__( 'Margin', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form input[type="submit"]' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$this->add_control(
|
||||
'ekit_contact_form_button_style_use_width_height',
|
||||
[
|
||||
'label' => esc_html__( 'Use Height Width', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label_on' => esc_html__( 'Show', 'elementskit-lite' ),
|
||||
'label_off' => esc_html__( 'Hide', 'elementskit-lite' ),
|
||||
'return_value' => 'yes',
|
||||
'default' => 'no',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_button_width',
|
||||
[
|
||||
'label' => esc_html__( 'Width', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => [ 'px', '%' ],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'min' => 50,
|
||||
'max' => 200,
|
||||
'step' => 1,
|
||||
],
|
||||
'%' => [
|
||||
'min' => 10,
|
||||
'max' => 100,
|
||||
],
|
||||
],
|
||||
'default' => [
|
||||
'unit' => 'px',
|
||||
'size' => 50,
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form input[type="submit"]' => 'width: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
'condition' => [
|
||||
'ekit_contact_form_button_style_use_width_height' => 'yes'
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_button_style_height',
|
||||
[
|
||||
'label' => esc_html__( 'Height', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => [ 'px' ],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'min' => 50,
|
||||
'max' => 200,
|
||||
'step' => 1,
|
||||
],
|
||||
'%' => [
|
||||
'min' => 10,
|
||||
'max' => 100,
|
||||
],
|
||||
],
|
||||
'default' => [
|
||||
'unit' => 'px',
|
||||
'size' => 50,
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form input[type="submit"]' => 'height: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
'condition' => [
|
||||
'ekit_contact_form_button_style_use_width_height' => 'yes'
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_button_style_line_height',
|
||||
[
|
||||
'label' => esc_html__( 'Line Height', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => [ 'px' ],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'min' => 50,
|
||||
'max' => 200,
|
||||
'step' => 1,
|
||||
],
|
||||
'%' => [
|
||||
'min' => 10,
|
||||
'max' => 100,
|
||||
],
|
||||
],
|
||||
'default' => [
|
||||
'unit' => 'px',
|
||||
'size' => 50,
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form input[type="submit"]' => 'line-height: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
'condition' => [
|
||||
'ekit_contact_form_button_style_use_width_height' => 'yes'
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
$this->start_controls_tabs(
|
||||
'ekit_contact_form_button_normal_and_hover_tabs'
|
||||
);
|
||||
$this->start_controls_tab(
|
||||
'ekit_contact_form_button_normal_tab',
|
||||
[
|
||||
'label' => esc_html__( 'Normal', 'elementskit-lite' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_button_color',
|
||||
[
|
||||
'label' => esc_html__( 'Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'default' => '#ffffff',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form input[type="submit"]' => 'color: {{VALUE}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Background::get_type(),
|
||||
[
|
||||
'name' => 'ekit_contact_form_button_background',
|
||||
'label' => esc_html__( 'Background', 'elementskit-lite' ),
|
||||
'types' => [ 'classic', 'gradient', ],
|
||||
'selector' => '{{WRAPPER}} .ekit-form form input[type="submit"]',
|
||||
'exclude' => ['image'] // PHPCS:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Box_Shadow::get_type(),
|
||||
[
|
||||
'name' => 'ekit_contact_form_button_box_shadow',
|
||||
'label' => esc_html__( 'Box Shadow', 'elementskit-lite' ),
|
||||
'selector' => '{{WRAPPER}} .ekit-form form input[type="submit"]',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Border::get_type(),
|
||||
[
|
||||
'name' => 'ekit_contact_form_button_border',
|
||||
'label' => esc_html__( 'Border', 'elementskit-lite' ),
|
||||
'selector' => '{{WRAPPER}} .ekit-form form input[type="submit"]',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Text_Shadow::get_type(),
|
||||
[
|
||||
'name' => 'ekit_contact_form_button_title_shadow',
|
||||
'selector' => '{{WRAPPER}} .ekit-form form input[type="submit"]' ,
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_tab();
|
||||
$this->start_controls_tab(
|
||||
'ekit_contact_form_button_hover_tab',
|
||||
[
|
||||
'label' => esc_html__( 'Hover', 'elementskit-lite' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_contact_form_button_color_hover',
|
||||
[
|
||||
'label' => esc_html__( 'Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'default' => '#ffffff',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-form form input[type="submit"]:hover' => 'color: {{VALUE}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Background::get_type(),
|
||||
[
|
||||
'name' => 'ekit_contact_form_button_hover_background',
|
||||
'label' => esc_html__( 'Background', 'elementskit-lite' ),
|
||||
'types' => [ 'classic', 'gradient', ],
|
||||
'selector' => '{{WRAPPER}} .ekit-form form input[type="submit"]:hover',
|
||||
'exclude' => ['image'] // PHPCS:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Box_Shadow::get_type(),
|
||||
[
|
||||
'name' => 'ekit_contact_form_button_box_shadow_hover',
|
||||
'label' => esc_html__( 'Box Shadow', 'elementskit-lite' ),
|
||||
'selector' => '{{WRAPPER}} .ekit-form form input[type="submit"]:hover',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Border::get_type(),
|
||||
[
|
||||
'name' => 'ekit_contact_form_button_border_hover',
|
||||
'label' => esc_html__( 'Border', 'elementskit-lite' ),
|
||||
'selector' => '{{WRAPPER}} .ekit-form form input[type="submit"]:hover',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Text_Shadow::get_type(),
|
||||
[
|
||||
'name' => 'ekit_contact_form_button_title_shadow_hover',
|
||||
'selector' => '{{WRAPPER}} .ekit-form form input[type="submit"]:hover' ,
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_tab();
|
||||
|
||||
$this->end_controls_tabs();
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
$this->insert_pro_message();
|
||||
}
|
||||
|
||||
protected function render( ) {
|
||||
echo '<div class="ekit-wid-con" >';
|
||||
$this->render_raw();
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
protected function render_raw( ) {
|
||||
|
||||
$settings = $this->get_settings();
|
||||
|
||||
echo '<div class="ekit-form">';
|
||||
echo do_shortcode('[contact-form-7 id="'.intval($settings['ekit_contact_form7']).'"]' );
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 7.1 KiB |
|
After Width: | Height: | Size: 27 KiB |
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
namespace Elementor;
|
||||
|
||||
class ElementsKit_Widget_Countdown_Timer_Handler extends \ElementsKit_Lite\Core\Handler_Widget{
|
||||
|
||||
static function get_name() {
|
||||
return 'elementskit-countdown-timer';
|
||||
}
|
||||
|
||||
static function get_title() {
|
||||
return esc_html__( 'Countdown Timer', 'elementskit-lite' );
|
||||
}
|
||||
|
||||
static function get_icon() {
|
||||
return 'ekit ekit-widget-icon ekit-countdown-timer';
|
||||
}
|
||||
|
||||
static function get_categories() {
|
||||
return [ 'elementskit' ];
|
||||
}
|
||||
|
||||
static function get_keywords() {
|
||||
return ['ekit', 'countdown', 'deadline', 'timer' ];
|
||||
}
|
||||
|
||||
static function get_dir() {
|
||||
return \ElementsKit_Lite::widget_dir() . 'countdown-timer/';
|
||||
}
|
||||
|
||||
static function get_url() {
|
||||
return \ElementsKit_Lite::widget_url() . 'countdown-timer/';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
namespace Elementor;
|
||||
|
||||
class ElementsKit_Widget_Drop_Caps_Handler extends \ElementsKit_Lite\Core\Handler_Widget{
|
||||
|
||||
static function get_name() {
|
||||
return 'elementskit-drop-caps';
|
||||
}
|
||||
|
||||
static function get_title() {
|
||||
return esc_html__( 'Drop Caps', 'elementskit-lite' );
|
||||
}
|
||||
|
||||
static function get_icon() {
|
||||
return ' ekit-widget-icon eicon-typography';
|
||||
}
|
||||
|
||||
static function get_categories() {
|
||||
return [ 'elementskit' ];
|
||||
}
|
||||
|
||||
static function get_keywords() {
|
||||
return ['ekit', 'drop', 'caps', 'initial', 'versal', 'letter'];
|
||||
}
|
||||
|
||||
static function get_dir() {
|
||||
return \ElementsKit_Lite::widget_dir() . 'drop-caps/';
|
||||
}
|
||||
|
||||
static function get_url() {
|
||||
return \ElementsKit_Lite::widget_url() . 'drop-caps/';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,208 @@
|
||||
<?php
|
||||
namespace Elementor;
|
||||
|
||||
use \Elementor\ElementsKit_Widget_Drop_Caps_Handler as Handler;
|
||||
use \ElementsKit_Lite\Modules\Controls\Controls_Manager as ElementsKit_Controls_Manager;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
|
||||
class ElementsKit_Widget_Drop_Caps extends Widget_Base {
|
||||
use \ElementsKit_Lite\Widgets\Widget_Notice;
|
||||
|
||||
public $base;
|
||||
|
||||
public function get_name() {
|
||||
return Handler::get_name();
|
||||
}
|
||||
|
||||
public function get_title() {
|
||||
return Handler::get_title();
|
||||
}
|
||||
|
||||
public function get_icon() {
|
||||
return Handler::get_icon();
|
||||
}
|
||||
|
||||
public function get_categories() {
|
||||
return Handler::get_categories();
|
||||
}
|
||||
|
||||
public function get_keywords() {
|
||||
return Handler::get_keywords();
|
||||
}
|
||||
|
||||
public function get_help_url() {
|
||||
return 'https://wpmet.com/doc/dropcaps/';
|
||||
}
|
||||
|
||||
protected function is_dynamic_content(): bool {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function has_widget_inner_wrapper(): bool {
|
||||
return ! Plugin::$instance->experiments->is_feature_active( 'e_optimized_markup' );
|
||||
}
|
||||
|
||||
protected function register_controls() {
|
||||
|
||||
$this->start_controls_section(
|
||||
'ekit_dropcaps_content',
|
||||
[
|
||||
'label' => esc_html__( 'Dropcaps', 'elementskit-lite' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_dropcaps_text',
|
||||
[
|
||||
'label' => esc_html__( 'Content', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::TEXTAREA,
|
||||
'default' => esc_html__( 'Lorem ipsum dolor sit amet, consec adipisicing elit, sed do eiusmod tempor incidid ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip exl Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incidid ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip.', 'elementskit-lite' ),
|
||||
'placeholder' => esc_html__( 'Enter Your Drop Caps Content.', 'elementskit-lite' ),
|
||||
'separator'=>'before',
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
$this->start_controls_section(
|
||||
'ekit_dropcaps_style_section',
|
||||
[
|
||||
'label' => esc_html__( 'Style', 'elementskit-lite' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_content_color',
|
||||
[
|
||||
'label' => esc_html__( 'Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'default' => '#333333',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-dropcap-cotnent' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'ekit_content_typography',
|
||||
'selector' => '{{WRAPPER}} .ekit-dropcap-cotnent',
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
// Style dropcaps latter tab section
|
||||
$this->start_controls_section(
|
||||
'ekit_dropcaps_latter_style_section',
|
||||
[
|
||||
'label' => esc_html__( 'Dropcap Latter', 'elementskit-lite' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_content_dropcaps_color',
|
||||
[
|
||||
'label' => esc_html__( 'Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'default' => '#903',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-dropcap-cotnent:first-child:first-letter' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'ekit_content_dropcaps_typography',
|
||||
'selector' => '{{WRAPPER}} .ekit-dropcap-cotnent:first-child:first-letter',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Background::get_type(),
|
||||
[
|
||||
'name' => 'ekit_content_dropcaps_background',
|
||||
'label' => esc_html__( 'Background', 'elementskit-lite' ),
|
||||
'types' => [ 'classic', 'gradient' ],
|
||||
'selector' => '{{WRAPPER}} .ekit-dropcap-cotnent:first-child:first-letter',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_content_dropcaps_padding',
|
||||
[
|
||||
'label' => esc_html__( 'Padding', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-dropcap-cotnent:first-child:first-letter' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
'separator' =>'before',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_content_dropcaps_margin',
|
||||
[
|
||||
'label' => esc_html__( 'Margin', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-dropcap-cotnent:first-child:first-letter' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Border::get_type(),
|
||||
[
|
||||
'name' => 'ekit_content_dropcaps_border',
|
||||
'label' => esc_html__( 'Border', 'elementskit-lite' ),
|
||||
'selector' => '{{WRAPPER}} .ekit-dropcap-cotnent:first-child:first-letter',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_content_dropcaps_border_radius',
|
||||
[
|
||||
'label' => esc_html__( 'Border Radius', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-dropcap-cotnent:first-child:first-letter' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
$this->insert_pro_message();
|
||||
}
|
||||
|
||||
protected function render( ) {
|
||||
echo '<div class="ekit-wid-con" >';
|
||||
$this->render_raw();
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
protected function render_raw( ) {
|
||||
$settings = $this->get_settings_for_display();
|
||||
?>
|
||||
<div class="ekit-dropcap-wraper">
|
||||
<?php if( !empty( $settings['ekit_dropcaps_text'] ) ) : ?>
|
||||
<p class="ekit-dropcap-cotnent"><?php echo wp_kses($settings['ekit_dropcaps_text'], \ElementsKit_Lite\Utils::get_kses_array()); ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
namespace Elementor;
|
||||
|
||||
class ElementsKit_Widget_Dual_Button_Handler extends \ElementsKit_Lite\Core\Handler_Widget{
|
||||
|
||||
static function get_name() {
|
||||
return 'elementskit-dual-button';
|
||||
}
|
||||
|
||||
static function get_title() {
|
||||
return esc_html__( 'Dual Button', 'elementskit-lite' );
|
||||
}
|
||||
|
||||
static function get_icon() {
|
||||
return ' ekit-widget-icon eicon-dual-button';
|
||||
}
|
||||
|
||||
static function get_categories() {
|
||||
return [ 'elementskit' ];
|
||||
}
|
||||
|
||||
static function get_keywords() {
|
||||
return ['ekit', 'button', 'btn', 'dual', 'advance', 'link'];
|
||||
}
|
||||
|
||||
static function get_dir() {
|
||||
return \ElementsKit_Lite::widget_dir() . 'dual-button/';
|
||||
}
|
||||
|
||||
static function get_url() {
|
||||
return \ElementsKit_Lite::widget_url() . 'dual-button/';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
namespace Elementor;
|
||||
|
||||
|
||||
class ElementsKit_Widget_FAQ_Handler extends \ElementsKit_Lite\Core\Handler_Widget{
|
||||
|
||||
static function get_name() {
|
||||
return 'elementskit-faq';
|
||||
}
|
||||
|
||||
static function get_title() {
|
||||
return esc_html__( 'FAQ', 'elementskit-lite' );
|
||||
}
|
||||
|
||||
static function get_icon() {
|
||||
return 'ekit ekit-faq ekit-widget-icon';
|
||||
}
|
||||
|
||||
static function get_categories() {
|
||||
return [ 'elementskit' ];
|
||||
}
|
||||
|
||||
static function get_keywords() {
|
||||
return ['ekit', 'faq', 'faq schema'];
|
||||
}
|
||||
|
||||
static function get_dir() {
|
||||
return \ElementsKit_Lite::widget_dir() . 'faq/';
|
||||
}
|
||||
|
||||
static function get_url() {
|
||||
return \ElementsKit_Lite::widget_url() . 'faq/';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,366 @@
|
||||
<?php
|
||||
|
||||
namespace Elementor;
|
||||
|
||||
use \Elementor\ElementsKit_Widget_FAQ_Handler as Handler;
|
||||
use \ElementsKit_Lite\Modules\Controls\Controls_Manager as ElementsKit_Controls_Manager;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
class ElementsKit_Widget_FAQ extends Widget_Base {
|
||||
use \ElementsKit_Lite\Widgets\Widget_Notice;
|
||||
|
||||
public $base;
|
||||
|
||||
public function get_name() {
|
||||
return Handler::get_name();
|
||||
}
|
||||
|
||||
public function get_title() {
|
||||
return Handler::get_title();
|
||||
}
|
||||
|
||||
public function get_icon() {
|
||||
return Handler::get_icon();
|
||||
}
|
||||
|
||||
public function get_categories() {
|
||||
return Handler::get_categories();
|
||||
}
|
||||
|
||||
public function get_keywords() {
|
||||
return Handler::get_keywords();
|
||||
}
|
||||
|
||||
public function get_help_url() {
|
||||
return 'https://wpmet.com/doc/faq/';
|
||||
}
|
||||
|
||||
protected function is_dynamic_content(): bool {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function has_widget_inner_wrapper(): bool {
|
||||
return ! Plugin::$instance->experiments->is_feature_active( 'e_optimized_markup' );
|
||||
}
|
||||
|
||||
protected function register_controls() {
|
||||
$this->start_controls_section(
|
||||
'ekit_faq_section_tab', [
|
||||
'label' =>esc_html__( 'FAQ', 'elementskit-lite' ),
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$repeater = new Repeater();
|
||||
|
||||
$repeater->add_control(
|
||||
'ekit_faq_title',
|
||||
[
|
||||
'label' =>esc_html__( 'Title', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'label_block' => true,
|
||||
'placeholder' =>esc_html__( 'Title type here', 'elementskit-lite' ),
|
||||
'default' =>esc_html__( 'How to Change my Photo from Admin Dashboard?', 'elementskit-lite' ),
|
||||
]
|
||||
);
|
||||
$repeater->add_control(
|
||||
'ekit_faq_content',
|
||||
[
|
||||
'label' =>esc_html__( 'Content', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::TEXTAREA,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'label_block' => true,
|
||||
'placeholder' =>esc_html__( 'Description type here', 'elementskit-lite' ),
|
||||
'default' =>esc_html__( 'Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts. Separated they live in Bookmarksgrove right at the coast', 'elementskit-lite' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_faq_content_items',
|
||||
[
|
||||
'label' => esc_html__('Tab content', 'elementskit-lite'),
|
||||
'type' => Controls_Manager::REPEATER,
|
||||
'separator' => 'before',
|
||||
'title_field' => '{{ ekit_faq_title }}',
|
||||
'default' => [
|
||||
[
|
||||
'ekit_faq_title' => 'Wait. What is WordPress?',
|
||||
'ekit_faq_content' => 'Far far away, behind the word Mountains far from the countries Vokalia and Consonantia, there live the blind texts. Separated they live in Bookmark',
|
||||
],
|
||||
[
|
||||
'ekit_faq_title' => 'How long do I get support?',
|
||||
'ekit_faq_content' => 'Even the all-powerful Pointing has no control about the blind texts it is an almost unorthographic life One day however a small line',
|
||||
],
|
||||
[
|
||||
'ekit_faq_title' => 'Do I need to renew my license?',
|
||||
'ekit_faq_content' => 'Marks and devious Semikoli but the Little Blind Text didn’t listen. She packed her seven versalia, put her initial into the belt and made herself on the way.',
|
||||
],
|
||||
],
|
||||
'fields' => $repeater->get_controls(),
|
||||
]
|
||||
);
|
||||
|
||||
//faq schema
|
||||
$this->add_control(
|
||||
'ekit_faq_schema',
|
||||
[
|
||||
'label' => esc_html__( 'FAQ Schema', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
//Title Style Section
|
||||
|
||||
$this->start_controls_section(
|
||||
'ekit_faq_section_title_style', [
|
||||
'label' =>esc_html__( 'Title', 'elementskit-lite' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_faq_title_color', [
|
||||
'label' =>esc_html__( 'Title Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .elementskit-single-faq .elementskit-faq-title' => 'color: {{VALUE}};'
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(), [
|
||||
'name' => 'ekit_faq_title_typography_group',
|
||||
'selector' => '{{WRAPPER}} .elementskit-single-faq .elementskit-faq-title',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Background::get_type(),
|
||||
[
|
||||
'name' => 'ekit_faq_title_background_group',
|
||||
'label' => esc_html__( 'Background', 'elementskit-lite' ),
|
||||
'types' => [ 'classic', 'gradient' ],
|
||||
'selector' => '{{WRAPPER}} .elementskit-single-faq .elementskit-faq-header',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Border::get_type(),
|
||||
[
|
||||
'name' => 'ekit_faq_title_border_group',
|
||||
'label' => esc_html__( 'Border', 'elementskit-lite' ),
|
||||
'selector' => '{{WRAPPER}} .elementskit-single-faq .elementskit-faq-header',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_faq_border_radious',
|
||||
[
|
||||
'label' => esc_html__( 'Title Border Radius', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .elementskit-single-faq .elementskit-faq-header' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_faq_title_padding',
|
||||
[
|
||||
'label' => esc_html__( 'Title Padding', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'default' => [
|
||||
'top' => '21',
|
||||
'right' => '40',
|
||||
'bottom' => '21',
|
||||
'left' => '40',
|
||||
'unit' => 'px',
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .elementskit-single-faq .elementskit-faq-header' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_faq_title_margin',
|
||||
[
|
||||
'label' => esc_html__( 'Title Margin', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .elementskit-single-faq .elementskit-faq-header' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
//Content Style Section
|
||||
$this->start_controls_section(
|
||||
'ekit_faq_section_content_style', [
|
||||
'label' =>esc_html__( 'Content', 'elementskit-lite' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_faq_content_color', [
|
||||
'label' =>esc_html__( 'Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .elementskit-single-faq .elementskit-faq-body' => 'color: {{VALUE}};'
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(), [
|
||||
'name' => 'ekit_faq_content_typography_group',
|
||||
'selector' => '{{WRAPPER}} .elementskit-single-faq .elementskit-faq-body',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Background::get_type(),
|
||||
[
|
||||
'name' => 'ekit_faq_content_background_group',
|
||||
'label' => esc_html__( 'Content Background', 'elementskit-lite' ),
|
||||
'types' => [ 'classic', 'gradient' ],
|
||||
'selector' => '{{WRAPPER}} .elementskit-single-faq .elementskit-faq-body',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Border::get_type(),
|
||||
[
|
||||
'name' => 'ekit_faq_content_border_group',
|
||||
'label' => esc_html__( 'Content Border', 'elementskit-lite' ),
|
||||
'selector' => '{{WRAPPER}} .elementskit-single-faq .elementskit-faq-body',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_faq_content_border_radious',
|
||||
[
|
||||
'label' => esc_html__( 'Border Radius', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .elementskit-single-faq .elementskit-faq-body' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_faq_content_padding',
|
||||
[
|
||||
'label' => esc_html__( 'Content Padding', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'default' => [
|
||||
'top' => '30',
|
||||
'right' => '40',
|
||||
'bottom' => '30',
|
||||
'left' => '40',
|
||||
'unit' => 'px',
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .elementskit-single-faq .elementskit-faq-body' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_faq_content_margin',
|
||||
[
|
||||
'label' => esc_html__( 'Content Margin', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .elementskit-single-faq .elementskit-faq-body' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_faq_container_margin',
|
||||
[
|
||||
'label' => esc_html__( 'Container Margin', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .elementskit-single-faq:not(:last-child)' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
$this->insert_pro_message();
|
||||
}
|
||||
|
||||
protected function render( ) {
|
||||
echo '<div class="ekit-wid-con" >';
|
||||
$this->render_raw();
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
protected function render_raw( ) {
|
||||
$settings = $this->get_settings_for_display();
|
||||
extract($settings);
|
||||
?>
|
||||
|
||||
<?php if($ekit_faq_content_items > 0) : foreach($ekit_faq_content_items as $ekit_faq_content_item) : ?>
|
||||
<div class="elementskit-single-faq elementor-repeater-item-<?php echo esc_attr( $ekit_faq_content_item[ '_id' ] ); ?>">
|
||||
<div class="elementskit-faq-header">
|
||||
<h2 class="elementskit-faq-title"><?php echo esc_html($ekit_faq_content_item['ekit_faq_title']); ?></h2>
|
||||
</div>
|
||||
<div class="elementskit-faq-body">
|
||||
<?php if(!empty($ekit_faq_content_item['ekit_faq_content'])) {
|
||||
echo wp_kses($ekit_faq_content_item['ekit_faq_content'], \ElementsKit_Lite\Utils::get_kses_array());
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; endif; ?>
|
||||
<?php
|
||||
if ( isset( $settings['ekit_faq_schema'] ) && 'yes' === $settings['ekit_faq_schema'] ) {
|
||||
$json = [
|
||||
'@context' => 'https://schema.org',
|
||||
'@type' => 'FAQPage',
|
||||
'mainEntity' => [],
|
||||
];
|
||||
|
||||
foreach ( $settings['ekit_faq_content_items'] as $index => $item ) {
|
||||
$faq_schema_text = !empty( $item['ekit_faq_content'] ) ? $item['ekit_faq_content'] : '';
|
||||
$json['mainEntity'][] = [
|
||||
'@type' => 'Question',
|
||||
'name' => esc_html($item['ekit_faq_title']),
|
||||
'acceptedAnswer' => [
|
||||
'@type' => 'Answer',
|
||||
'text' => \ElementsKit_Lite\Utils::kses( $faq_schema_text ),
|
||||
],
|
||||
];
|
||||
}
|
||||
?>
|
||||
<script type="application/ld+json"><?php echo wp_json_encode( $json, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE ); ?></script>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
namespace Elementor;
|
||||
|
||||
|
||||
class ElementsKit_Widget_Fluent_Forms_Handler extends \ElementsKit_Lite\Core\Handler_Widget{
|
||||
|
||||
static function get_name() {
|
||||
return 'elementskit-fluent-forms';
|
||||
}
|
||||
|
||||
static function get_title() {
|
||||
return esc_html__( 'Fluent Forms', 'elementskit-lite' );
|
||||
}
|
||||
|
||||
static function get_icon() {
|
||||
return 'eicon-mail ekit-widget-icon';
|
||||
}
|
||||
|
||||
static function get_categories() {
|
||||
return [ 'elementskit' ];
|
||||
}
|
||||
|
||||
static function get_keywords() {
|
||||
return ['ekit', 'wpf', 'wpform' , 'weform', 'fluent form', 'form', 'contact'];
|
||||
}
|
||||
|
||||
static function get_dir() {
|
||||
return \ElementsKit_Lite::widget_dir() . 'fluent-forms/';
|
||||
}
|
||||
|
||||
static function get_url() {
|
||||
return \ElementsKit_Lite::widget_url() . 'fluent-forms/';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
namespace Elementor;
|
||||
|
||||
|
||||
class ElementsKit_Widget_Funfact_Handler extends \ElementsKit_Lite\Core\Handler_Widget{
|
||||
|
||||
static function get_name() {
|
||||
return 'elementskit-funfact';
|
||||
}
|
||||
|
||||
static function get_title() {
|
||||
return esc_html__( 'Funfact', 'elementskit-lite' );
|
||||
}
|
||||
|
||||
static function get_icon() {
|
||||
return 'ekit ekit-widget-icon ekit-progress-bar';
|
||||
}
|
||||
|
||||
static function get_categories() {
|
||||
return [ 'elementskit' ];
|
||||
}
|
||||
|
||||
static function get_keywords() {
|
||||
return ['ekit', 'fun', 'factor', 'animation', 'info' , 'number', 'animated'];
|
||||
}
|
||||
|
||||
static function get_dir() {
|
||||
return \ElementsKit_Lite::widget_dir() . 'funfact/';
|
||||
}
|
||||
|
||||
static function get_url() {
|
||||
return \ElementsKit_Lite::widget_url() . 'funfact/';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
namespace Elementor;
|
||||
|
||||
class ElementsKit_Widget_Header_Info_Handler extends \ElementsKit_Lite\Core\Handler_Widget{
|
||||
|
||||
static function get_name()
|
||||
{
|
||||
return 'elementskit-header-info';
|
||||
}
|
||||
|
||||
static function get_title()
|
||||
{
|
||||
return esc_html__('Header Info', 'elementskit-lite');
|
||||
}
|
||||
|
||||
static function get_icon()
|
||||
{
|
||||
return 'eicon-form-vertical ekit-widget-icon ';
|
||||
}
|
||||
|
||||
static function get_categories()
|
||||
{
|
||||
return ['elementskit_headerfooter'];
|
||||
}
|
||||
|
||||
static function get_keywords() {
|
||||
return ['ekit', 'header-info', 'info-list', 'info', 'list'];
|
||||
}
|
||||
|
||||
static function get_dir() {
|
||||
return \ElementsKit_Lite::widget_dir() . 'header-info/';
|
||||
}
|
||||
|
||||
static function get_url() {
|
||||
return \ElementsKit_Lite::widget_url() . 'header-info/';
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,283 @@
|
||||
<?php
|
||||
namespace Elementor;
|
||||
|
||||
use \Elementor\ElementsKit_Widget_Header_Info_Handler as Handler;
|
||||
use \ElementsKit_Lite\Modules\Controls\Controls_Manager as ElementsKit_Controls_Manager;
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
class ElementsKit_Widget_Header_Info extends Widget_Base
|
||||
{
|
||||
use \ElementsKit_Lite\Widgets\Widget_Notice;
|
||||
|
||||
public $base;
|
||||
|
||||
public function get_name() {
|
||||
return Handler::get_name();
|
||||
}
|
||||
|
||||
public function get_title() {
|
||||
return Handler::get_title();
|
||||
}
|
||||
|
||||
public function get_icon() {
|
||||
return Handler::get_icon();
|
||||
}
|
||||
|
||||
public function get_categories() {
|
||||
return Handler::get_categories();
|
||||
}
|
||||
|
||||
public function get_keywords() {
|
||||
return Handler::get_keywords();
|
||||
}
|
||||
|
||||
public function get_help_url() {
|
||||
return 'https://wpmet.com/doc/header-info/';
|
||||
}
|
||||
|
||||
protected function is_dynamic_content(): bool {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function has_widget_inner_wrapper(): bool {
|
||||
return ! Plugin::$instance->experiments->is_feature_active( 'e_optimized_markup' );
|
||||
}
|
||||
|
||||
protected function register_controls()
|
||||
{
|
||||
|
||||
$this->start_controls_section(
|
||||
'ekit_header_info',
|
||||
[
|
||||
'label' => esc_html__('Header Info', 'elementskit-lite'),
|
||||
]
|
||||
);
|
||||
|
||||
$headerinfogroup = new Repeater();
|
||||
$headerinfogroup->add_control(
|
||||
'ekit_headerinfo_icons',
|
||||
[
|
||||
'label' => esc_html__('Icon', 'elementskit-lite'),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::ICONS,
|
||||
'default' => [
|
||||
'value' => 'icon icon-map',
|
||||
'library' => 'ekiticons',
|
||||
],
|
||||
|
||||
]
|
||||
);
|
||||
|
||||
$headerinfogroup->add_control(
|
||||
'ekit_headerinfo_text',
|
||||
[
|
||||
'label' => esc_html__('Text', 'elementskit-lite'),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'default' => '463 7th Ave, NY 10018, USA',
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
]
|
||||
);
|
||||
$headerinfogroup->add_control(
|
||||
'ekit_headerinfo_link',
|
||||
[
|
||||
'label' => esc_html__( 'Link', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::URL,
|
||||
'placeholder' => esc_html__( 'https://wpmet.com', 'elementskit-lite' ),
|
||||
'show_external' => true,
|
||||
'default' => [
|
||||
'url' => '',
|
||||
'is_external' => true,
|
||||
'nofollow' => true,
|
||||
],
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_headerinfo_group',
|
||||
[
|
||||
'label' => esc_html__( 'Header Info', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::REPEATER,
|
||||
'fields' => $headerinfogroup->get_controls(),
|
||||
'default' => [
|
||||
[
|
||||
'ekit_headerinfo_text' => esc_html__( '463 7th Ave, NY 10018, USA', 'elementskit-lite' ),
|
||||
],
|
||||
|
||||
],
|
||||
'title_field' => '{{{ ekit_headerinfo_text }}}',
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
$this->start_controls_section(
|
||||
'ekit_header_icon_style',
|
||||
[
|
||||
'label' => esc_html__( 'Header Info', 'elementskit-lite' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_info_item_margin',
|
||||
[
|
||||
'label' => esc_html__( 'Margin', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-header-info > li' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_info_item_padding',
|
||||
[
|
||||
'label' => esc_html__( 'Padding', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-header-info > li' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_info_text_color',
|
||||
[
|
||||
'label' => esc_html__( 'Text Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'default' => '',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-header-info > li > a' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'item_bg',
|
||||
[
|
||||
'label' => esc_html__( 'Background Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-header-info > li' => 'background-color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'elementskit_content_typography',
|
||||
'label' => esc_html__( 'Typography', 'elementskit-lite' ),
|
||||
'selector' => '{{WRAPPER}} .ekit-header-info > li > a',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'icon',
|
||||
[
|
||||
'label' => __( 'Icon', 'elementskit-lite' ),
|
||||
'type' => \Elementor\Controls_Manager::HEADING,
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_info_icon_color',
|
||||
[
|
||||
'label' => esc_html__( 'Icon Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'default' => '',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-header-info > li > a i' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .ekit-header-info > li > a svg path' => 'stroke: {{VALUE}}; fill: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'ekit_simple_tab_title_icon_size',
|
||||
[
|
||||
'label' => esc_html__( 'Icon Size', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => [ 'px', '%' ],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'min' => 1,
|
||||
'max' => 100,
|
||||
'step' => 5,
|
||||
]
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-header-info > li > a i' => 'font-size: {{SIZE}}{{UNIT}};',
|
||||
'{{WRAPPER}} .ekit-header-info > li > a svg' => 'max-width: {{SIZE}}{{UNIT}}; height: auto',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'ekit_info_icon_spacing',
|
||||
[
|
||||
'label' => esc_html__( 'Icon Spacing', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'default' => [
|
||||
'size' => 10,
|
||||
'unit' => 'px',
|
||||
],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'min' => 0,
|
||||
'max' => 100,
|
||||
],
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-header-info > li > a i, {{WRAPPER}} .ekit-header-info > li > a svg' => 'margin-right: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
$this->insert_pro_message();
|
||||
}
|
||||
|
||||
|
||||
protected function render( ) {
|
||||
echo '<div class="ekit-wid-con" >';
|
||||
$this->render_raw();
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
protected function render_raw( ) {
|
||||
$settings = $this->get_settings_for_display();
|
||||
?>
|
||||
<ul class="ekit-header-info">
|
||||
<?php
|
||||
if ( $settings['ekit_headerinfo_group'] ){
|
||||
foreach ( $settings['ekit_headerinfo_group'] as $key => $item ){
|
||||
if ( ! empty( $item['ekit_headerinfo_link']['url'] ) ) {
|
||||
$this->add_link_attributes( 'button-' . $key, $item['ekit_headerinfo_link'] );
|
||||
}
|
||||
?>
|
||||
<li>
|
||||
<a <?php echo $this->get_render_attribute_string( 'button-' . $key ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Already escaped by elementor ?>>
|
||||
<?php Icons_Manager::render_icon( $item['ekit_headerinfo_icons'], [ 'aria-hidden' => 'true' ] ); ?>
|
||||
<?php echo esc_html($item['ekit_headerinfo_text']);?>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
namespace Elementor;
|
||||
|
||||
class ElementsKit_Widget_Header_Offcanvas_Handler extends \ElementsKit_Lite\Core\Handler_Widget{
|
||||
|
||||
static function get_name()
|
||||
{
|
||||
return 'elementskit-header-offcanvas';
|
||||
}
|
||||
|
||||
static function get_title()
|
||||
{
|
||||
return esc_html__('Header Offcanvas', 'elementskit-lite');
|
||||
}
|
||||
|
||||
static function get_icon()
|
||||
{
|
||||
return 'eicon-sidebar ekit-widget-icon ';
|
||||
}
|
||||
|
||||
static function get_categories()
|
||||
{
|
||||
return ['elementskit_headerfooter'];
|
||||
}
|
||||
|
||||
static function get_keywords() {
|
||||
return [ 'ekit', 'header', 'offcanvas', 'side menu', 'side info'];
|
||||
}
|
||||
|
||||
static function get_dir() {
|
||||
return \ElementsKit_Lite::widget_dir() . 'header-offcanvas/';
|
||||
}
|
||||
|
||||
static function get_url() {
|
||||
return \ElementsKit_Lite::widget_url() . 'header-offcanvas/';
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,920 @@
|
||||
<?php
|
||||
namespace Elementor;
|
||||
|
||||
use \Elementor\ElementsKit_Widget_Header_Offcanvas_Handler as Handler;
|
||||
use \ElementsKit_Lite\Modules\Controls\Controls_Manager as ElementsKit_Controls_Manager;
|
||||
use \ElementsKit_Lite\Modules\Controls\Widget_Area_Utils as Widget_Area_Utils;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
class ElementsKit_Widget_Header_Offcanvas extends Widget_Base
|
||||
{
|
||||
use \ElementsKit_Lite\Widgets\Widget_Notice;
|
||||
|
||||
public $base;
|
||||
|
||||
public function get_name() {
|
||||
return Handler::get_name();
|
||||
}
|
||||
|
||||
public function get_title() {
|
||||
return Handler::get_title();
|
||||
}
|
||||
|
||||
public function get_icon() {
|
||||
return Handler::get_icon();
|
||||
}
|
||||
|
||||
public function get_categories() {
|
||||
return Handler::get_categories();
|
||||
}
|
||||
|
||||
public function get_keywords() {
|
||||
return Handler::get_keywords();
|
||||
}
|
||||
|
||||
public function get_help_url() {
|
||||
return 'https://wpmet.com/doc/header-offcanvas/';
|
||||
}
|
||||
|
||||
protected function is_dynamic_content(): bool {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function has_widget_inner_wrapper(): bool {
|
||||
return ! Plugin::$instance->experiments->is_feature_active( 'e_optimized_markup' );
|
||||
}
|
||||
|
||||
protected function register_controls()
|
||||
{
|
||||
|
||||
$this->start_controls_section(
|
||||
'ekit_header_search',
|
||||
[
|
||||
'label' => esc_html__('Header Offcanvas', 'elementskit-lite'),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_offcanvas_content', [
|
||||
'label' => esc_html__('Content', 'elementskit-lite'),
|
||||
'type' => ElementsKit_Controls_Manager::WIDGETAREA,
|
||||
'label_block' => true,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit__offcanvas_seacrh_overlay_bg_color',
|
||||
[
|
||||
'label' =>esc_html__( 'Overlay color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-bg-black' => 'background-color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
// Hamburger and Close tabs
|
||||
$this->start_controls_tabs('ekit_offcanvas_hamburber_close_tabs');
|
||||
// Hamburger tab
|
||||
$this->start_controls_tab(
|
||||
'ekit_offcanvas_hamburger_tab',
|
||||
[
|
||||
'label' => esc_html__( 'Hamburger', 'elementskit-lite' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_offcanvas_menu_type',
|
||||
[
|
||||
'label' => esc_html__('Menu Type:', 'elementskit-lite'),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'icon',
|
||||
'options' => [
|
||||
'icon' => esc_html__('Icon', 'elementskit-lite'),
|
||||
'text' => esc_html__('Text', 'elementskit-lite'),
|
||||
'icon_with_text' => esc_html__('Icon with Text', 'elementskit-lite'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_offcanvas_menu_icons',
|
||||
[
|
||||
'label' => esc_html__('Icon', 'elementskit-lite'),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::ICONS,
|
||||
'fa4compatibility' => 'ekit_offcanvas_menu_icon',
|
||||
'default' => [
|
||||
'value' => 'icon icon-burger-menu',
|
||||
'library' => 'ekiticons',
|
||||
],
|
||||
'condition' => [
|
||||
'ekit_offcanvas_menu_type' => [ 'icon', 'icon_with_text' ],
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_offcanvas_menu_icons_position',
|
||||
[
|
||||
'label' => esc_html__('Icon Positioin', 'elementskit-lite'),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'before',
|
||||
'options' => [
|
||||
'before' => esc_html__('Before', 'elementskit-lite'),
|
||||
'after' => esc_html__('After', 'elementskit-lite'),
|
||||
],
|
||||
'selectors_dictionary' => [
|
||||
'after' => 'display: flex; flex-direction: row-reverse;',
|
||||
'before' => 'display: flex; flex-direction: row;',
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-offcanvas-toggle-wraper a.ekit_offcanvas-sidebar' => '{{VALUE}}; width: fit-content;',
|
||||
],
|
||||
'condition' => [
|
||||
'ekit_offcanvas_menu_type' => 'icon_with_text',
|
||||
]
|
||||
]
|
||||
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_offcanvas_menu_text',
|
||||
[
|
||||
'label' => esc_html__('Text', 'elementskit-lite'),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'condition' => [
|
||||
'ekit_offcanvas_menu_type' => [ 'text', 'icon_with_text' ],
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_tab();
|
||||
|
||||
|
||||
// Close
|
||||
$this->start_controls_tab(
|
||||
'ekit_offcanvas_close_tab',
|
||||
[
|
||||
'label' => esc_html__( 'Closed', 'elementskit-lite' )
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_offcanvas_menu_close_type',
|
||||
[
|
||||
'label' => esc_html__('Close Menu Type:', 'elementskit-lite'),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'icon',
|
||||
'options' => [
|
||||
'icon' => esc_html__('Icon', 'elementskit-lite'),
|
||||
'text' => esc_html__('Text', 'elementskit-lite'),
|
||||
'icon_with_text' => esc_html__('Icon with Text', 'elementskit-lite'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_offcanvas_menu_close_icons',
|
||||
[
|
||||
'label' => esc_html__('Close Icon', 'elementskit-lite'),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::ICONS,
|
||||
'fa4compatibility' => 'ekit_offcanvas_menu_close_icon',
|
||||
'default' => [
|
||||
'value' => 'fas fa-times',
|
||||
'library' => 'fa-solid',
|
||||
],
|
||||
'condition' => [
|
||||
'ekit_offcanvas_menu_close_type' => [ 'icon', 'icon_with_text' ],
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_offcanvas_menu_close_icons_position',
|
||||
[
|
||||
'label' => esc_html__('Icon Positioin', 'elementskit-lite'),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'before',
|
||||
'options' => [
|
||||
'before' => esc_html__('Before', 'elementskit-lite'),
|
||||
'after' => esc_html__('After', 'elementskit-lite'),
|
||||
],
|
||||
'selectors_dictionary' => [
|
||||
'after' => 'display: flex; flex-direction: row-reverse;',
|
||||
'before' => 'display: flex; flex-direction: row;',
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-sidebar-group a.ekit_close-side-widget' => '{{VALUE}};',
|
||||
],
|
||||
'condition' => [
|
||||
'ekit_offcanvas_menu_close_type' => 'icon_with_text',
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_offcanvas_menu_close_text',
|
||||
[
|
||||
'label' => esc_html__('Text', 'elementskit-lite'),
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'default' => esc_html__( 'Close', 'elementskit-lite' ),
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'condition' => [
|
||||
'ekit_offcanvas_menu_close_type' => [ 'text', 'icon_with_text' ],
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_tab();
|
||||
|
||||
$this->end_controls_tabs();
|
||||
// end tabs
|
||||
|
||||
$this->add_control(
|
||||
'ekit_offcanvas_icons_spacing',
|
||||
[
|
||||
'label' => esc_html__( 'Icons Gap', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ],
|
||||
'separator' => 'before',
|
||||
'render_type' => 'template',
|
||||
'range' => [
|
||||
'px' => [
|
||||
'min' => 0,
|
||||
'max' => 1000,
|
||||
],
|
||||
'%' => [
|
||||
'min' => 0,
|
||||
'max' => 100,
|
||||
],
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-wid-con .ekit-offcanvas-toggle-wraper.before .ekit_navSidebar-button :is(svg, i)' => 'margin-right:{{SIZE}}{{UNIT}};',
|
||||
'{{WRAPPER}} .ekit-wid-con .ekit-offcanvas-toggle-wraper.after .ekit_navSidebar-button :is(svg, i)' => 'margin-left:{{SIZE}}{{UNIT}};',
|
||||
'{{WRAPPER}} .ekit-wid-con .ekit-sidebar-widget .ekit_widget-heading.before :is(svg, i)' => 'margin-right:{{SIZE}}{{UNIT}};',
|
||||
'{{WRAPPER}} .ekit-wid-con .ekit-sidebar-widget .ekit_widget-heading.after :is(svg, i)' => 'margin-left:{{SIZE}}{{UNIT}};',
|
||||
],
|
||||
'conditions' => [
|
||||
'relation' => 'or',
|
||||
'terms' => [
|
||||
[
|
||||
'name' => 'ekit_offcanvas_menu_close_type',
|
||||
'value' => 'icon_with_text',
|
||||
],
|
||||
[
|
||||
'name' => 'ekit_offcanvas_menu_type',
|
||||
'value' => 'icon_with_text',
|
||||
],
|
||||
],
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_offcanvas_disable_bodyscroll',
|
||||
[
|
||||
'label' => esc_html__( 'Disable Scroll', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'description' => esc_html__('To disable body scrolling when an offcanvas menu is open', 'elementskit-lite'),
|
||||
'label_on' => esc_html__( 'Yes', 'elementskit-lite' ),
|
||||
'label_off' => esc_html__( 'No', 'elementskit-lite' ),
|
||||
'return_value' => 'yes',
|
||||
'default' => '',
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
$this->start_controls_section(
|
||||
'ekit_header_search_setting',
|
||||
[
|
||||
'label' => esc_html__('Offcanvas Settings', 'elementskit-lite'),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_header_search_style',
|
||||
[
|
||||
'label' => esc_html__( 'Offcanvas Style', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'ekit-slide',
|
||||
'options' => [
|
||||
'ekit-slide' => esc_html__( 'Slide', 'elementskit-lite' ),
|
||||
'ekit-fade' => esc_html__( 'Fade', 'elementskit-lite' ),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_header_search_transition',
|
||||
[
|
||||
'label' => esc_html__( 'Transition Duration (s)', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::NUMBER,
|
||||
'max' => 50,
|
||||
'step' => 5,
|
||||
'step' => 0.5,
|
||||
'default' => 0.5,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-sidebar-group' => '--transition-duration: {{SIZE}}s',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
$this->start_controls_section(
|
||||
'ekit_header_offcanvas_section_tab_style',
|
||||
[
|
||||
'label' => esc_html__('Offcanvas', 'elementskit-lite'),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
|
||||
$this->start_controls_tabs('ekit_header_offcanvas_style_tabs');
|
||||
$this->start_controls_tab(
|
||||
'ekit_header_offcanvas_style_hamburger_tab',
|
||||
[
|
||||
'label' => esc_html__( 'Hamburger', 'elementskit-lite' )
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_offcanvas_icon_color',
|
||||
[
|
||||
'label' =>esc_html__( 'Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'default' => '#333',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit_navSidebar-button' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .ekit_navSidebar-button svg path' => 'stroke: {{VALUE}}; fill: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_offcanvas_icon_bg_color',
|
||||
[
|
||||
'label' =>esc_html__( 'Background Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit_navSidebar-button' => 'background-color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_offcanvas_icon_hover_title',
|
||||
[
|
||||
'label' => __( 'Hover', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::HEADING,
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_offcanvas_icon_color_hover',
|
||||
[
|
||||
'label' =>esc_html__( 'Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit_navSidebar-button:hover' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .ekit_navSidebar-button:hover svg path' => 'stroke: {{VALUE}}; fill: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_offcanvas_icon_bg_color_hover',
|
||||
[
|
||||
'label' =>esc_html__( 'Background Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit_navSidebar-button:hover' => 'background-color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_offcanvas_icon_border_color_hover',
|
||||
[
|
||||
'label' => esc_html__( 'Border Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit_navSidebar-button:hover' => 'border-color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_offcanvas_text_font_hr',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_offcanvas_icon_font_size',
|
||||
[
|
||||
'label' => esc_html__('Icon Size', 'elementskit-lite'),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => ['px', 'em'],
|
||||
'default' => [
|
||||
'unit' => 'px',
|
||||
'size' => '20',
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit_navSidebar-button i' => 'font-size: {{SIZE}}{{UNIT}};',
|
||||
'{{WRAPPER}} .ekit_navSidebar-button svg' => 'max-width: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
'condition' => [
|
||||
'ekit_offcanvas_menu_type!' => [ 'text' ],
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'ekit_offcanvas_text_typo',
|
||||
'label' => esc_html__('Text Typography', 'elementskit-lite'),
|
||||
'selector' => '{{WRAPPER}} .ekit_navSidebar-button',
|
||||
'fields_options' => [
|
||||
'typography' => [
|
||||
'default' => 'custom',
|
||||
],
|
||||
'font_weight' => [
|
||||
'default' => '400',
|
||||
],
|
||||
'font_size' => [
|
||||
'label' => esc_html__('Font Size (px)', 'elementskit-lite'),
|
||||
'responsive' => false,
|
||||
'size_units' => ['px']
|
||||
],
|
||||
],
|
||||
'condition' => [
|
||||
'ekit_offcanvas_menu_type' => [ 'text', 'icon_with_text' ],
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Border::get_type(),
|
||||
[
|
||||
'name' => 'ekit_border',
|
||||
'selector' => '{{WRAPPER}} .ekit_navSidebar-button',
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_offcanvas_humburger_text_align',
|
||||
[
|
||||
'label' => __( 'Alignment', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::CHOOSE,
|
||||
'options' => [
|
||||
'left' => [
|
||||
'title' => __( 'Left', 'elementskit-lite' ),
|
||||
'icon' => 'eicon-text-align-left',
|
||||
],
|
||||
'center' => [
|
||||
'title' => __( 'Center', 'elementskit-lite' ),
|
||||
'icon' => 'eicon-text-align-center',
|
||||
],
|
||||
'right' => [
|
||||
'title' => __( 'Right', 'elementskit-lite' ),
|
||||
'icon' => 'eicon-text-align-right',
|
||||
],
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-offcanvas-toggle-wraper' => 'text-align: {{VALUE}}',
|
||||
],
|
||||
'toggle' => true,
|
||||
]
|
||||
);
|
||||
|
||||
// box shadow
|
||||
$this->add_group_control(
|
||||
Group_Control_Box_Shadow::get_type(), [
|
||||
'name' => 'ekit_header_search',
|
||||
'selector' => '{{WRAPPER}} .ekit_navSidebar-button',
|
||||
|
||||
]
|
||||
);
|
||||
// border radius
|
||||
$this->add_control(
|
||||
'ekit_offcanvas_border_radius',
|
||||
[
|
||||
'label' => esc_html__( 'Border radius', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'default' => [
|
||||
'top' => '',
|
||||
'right' => '',
|
||||
'bottom' => '' ,
|
||||
'left' => '',
|
||||
'unit' => '%',
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit_navSidebar-button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_offcanvas_padding',
|
||||
[
|
||||
'label' => esc_html__('Padding', 'elementskit-lite'),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => ['px', 'em'],
|
||||
'default' => [
|
||||
'top' => '4',
|
||||
'right' => '7',
|
||||
'bottom' => '5' ,
|
||||
'left' => '7',
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit_navSidebar-button, {{WRAPPER}} .ekit_social_media ul > li:last-child' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_offcanvas_margin',
|
||||
[
|
||||
'label' => esc_html__('Margin', 'elementskit-lite'),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => ['px', 'em'],
|
||||
'default' => [
|
||||
'top' => '',
|
||||
'right' => '',
|
||||
'bottom' => '' ,
|
||||
'left' => '',
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit_navSidebar-button, {{WRAPPER}} .ekit_social_media ul > li:last-child' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_tab();
|
||||
|
||||
$this->start_controls_tab(
|
||||
'ekit_header_offcanvas_style_close_tab',
|
||||
[
|
||||
'label' => esc_html__( 'Closed', 'elementskit-lite' )
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_offcanvas_close_icon_color',
|
||||
[
|
||||
'label' =>esc_html__( 'Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'default' => '#333',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit_close-side-widget' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .ekit_close-side-widget svg path' => 'stroke: {{VALUE}}; fill:{{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_offcanvas_close_icon_bg_color',
|
||||
[
|
||||
'label' =>esc_html__( 'Background Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit_close-side-widget' => 'background-color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_offcanvas_close_icon_hover_title',
|
||||
[
|
||||
'label' => __( 'Hover', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::HEADING,
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_offcanvas_close_icon_color_hover',
|
||||
[
|
||||
'label' =>esc_html__( 'Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit_close-side-widget:hover' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .ekit_close-side-widget:hover svg path' => 'stroke: {{VALUE}}; fill: {{VALUE}};'
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_offcanvas_close_icon_bg_color_hover',
|
||||
[
|
||||
'label' =>esc_html__( 'Background Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit_close-side-widget:hover' => 'background-color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_offcanvas_close_icon_border_color_hover',
|
||||
[
|
||||
'label' =>esc_html__( 'Border Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit_close-side-widget:hover' => 'border-color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_offcanvas_close_icon_font_size',
|
||||
[
|
||||
'label' => esc_html__('Icon Size', 'elementskit-lite'),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => ['px', 'em'],
|
||||
'separator' => 'before',
|
||||
'default' => [
|
||||
'unit' => 'px',
|
||||
'size' => '20',
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit_close-side-widget i' => 'font-size: {{SIZE}}{{UNIT}};',
|
||||
'{{WRAPPER}} .ekit_close-side-widget svg' => 'max-width: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'ekit_offcanvas_close_typography',
|
||||
'selector' => '{{WRAPPER}} .ekit_close-side-widget',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'close_btn_size',
|
||||
[
|
||||
'label' => esc_html__('Box Size (px)', 'elementskit-lite'),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit_close-side-widget' => 'width: {{SIZE}}px; height: {{SIZE}}px; line-height: calc({{SIZE}}px - 4px);',
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Border::get_type(),
|
||||
[
|
||||
'name' => 'ekit_close_border',
|
||||
'selector' => '{{WRAPPER}} .ekit_close-side-widget',
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
|
||||
// box shadow
|
||||
$this->add_group_control(
|
||||
Group_Control_Box_Shadow::get_type(), [
|
||||
'name' => 'ekit_header_search_close',
|
||||
'selector' => '{{WRAPPER}} .ekit_close-side-widget',
|
||||
|
||||
]
|
||||
);
|
||||
// border radius
|
||||
$this->add_control(
|
||||
'ekit_offcanvas_close_border_radius',
|
||||
[
|
||||
'label' => esc_html__( 'Border radius', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'default' => [
|
||||
'top' => '50',
|
||||
'right' => '50',
|
||||
'bottom' => '50' ,
|
||||
'left' => '50',
|
||||
'unit' => '%',
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit_close-side-widget' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_offcanvas_close_padding',
|
||||
[
|
||||
'label' => esc_html__('Padding', 'elementskit-lite'),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => ['px', 'em'],
|
||||
'default' => [
|
||||
'top' => '4',
|
||||
'right' => '7',
|
||||
'bottom' => '5' ,
|
||||
'left' => '7',
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit_close-side-widget' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_offcanvas_close_margin',
|
||||
[
|
||||
'label' => esc_html__('Margin', 'elementskit-lite'),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => ['px', 'em'],
|
||||
'default' => [
|
||||
'top' => '',
|
||||
'right' => '',
|
||||
'bottom' => '' ,
|
||||
'left' => '',
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit_close-side-widget' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_tab();
|
||||
$this->end_controls_tabs();
|
||||
|
||||
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
$this->start_controls_section(
|
||||
'ekit_offcanvas_panel_style_tab',
|
||||
[
|
||||
'label' => __( 'Offcanvas Panel', 'elementskit-lite' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'eit_offcanvas_width',
|
||||
[
|
||||
'label' => __( 'Width', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => [ 'px', '%' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-wid-con .ekit-sidebar-widget' => 'max-width: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Background::get_type(),
|
||||
[
|
||||
'name' => 'ekit_offcanvas_background',
|
||||
'label' => __( 'Background', 'elementskit-lite' ),
|
||||
'types' => [ 'classic', 'gradient' ],
|
||||
'selector' => '{{WRAPPER}} .ekit-wid-con .ekit-sidebar-widget',
|
||||
]
|
||||
);
|
||||
|
||||
// Position
|
||||
$this->add_control(
|
||||
'ekit_offcanvas_position',
|
||||
[
|
||||
'label' => esc_html__( 'Position', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::CHOOSE,
|
||||
'options' => [
|
||||
'left' => [
|
||||
'title' => esc_html__( 'Left', 'elementskit-lite' ),
|
||||
'icon' => 'eicon-chevron-left',
|
||||
],
|
||||
'right' => [
|
||||
'title' => esc_html__( 'Right', 'elementskit-lite' ),
|
||||
'icon' => 'eicon-chevron-right',
|
||||
],
|
||||
],
|
||||
'default' => 'right',
|
||||
'toggle' => false,
|
||||
'prefix_class' => 'ekit-off-canvas-position-',
|
||||
]
|
||||
);
|
||||
|
||||
// Padding
|
||||
$this->add_control(
|
||||
'ekit_offcanvas_panel_padding',
|
||||
[
|
||||
'label' => esc_html__('Padding', 'elementskit-lite'),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => ['px', 'em'],
|
||||
'default' => [
|
||||
'top' => '',
|
||||
'right' => '',
|
||||
'bottom' => '' ,
|
||||
'left' => '',
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit-wid-con .ekit_sidebar-textwidget' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
$this->insert_pro_message();
|
||||
}
|
||||
|
||||
|
||||
protected function render( ) {
|
||||
echo '<div class="ekit-wid-con" >';
|
||||
$this->render_raw();
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
protected function render_raw( ) {
|
||||
$settings = $this->get_settings();
|
||||
|
||||
$data_settings = [
|
||||
'disable_bodyscroll' => $settings['ekit_offcanvas_disable_bodyscroll'],
|
||||
];
|
||||
|
||||
$menu_icons_position = isset($settings['ekit_offcanvas_menu_icons_position']) ? $settings['ekit_offcanvas_menu_icons_position'] : 'before';
|
||||
$close_icons_position = isset($settings['ekit_offcanvas_menu_close_icons_position']) ? $settings['ekit_offcanvas_menu_close_icons_position'] : 'before';
|
||||
?>
|
||||
<div class="ekit-offcanvas-toggle-wraper <?php echo esc_attr($menu_icons_position); ?>">
|
||||
<a href="#" class="ekit_navSidebar-button ekit_offcanvas-sidebar" aria-label="offcanvas-menu">
|
||||
<?php
|
||||
if($settings['ekit_offcanvas_menu_type'] !== 'text') {
|
||||
// new icon
|
||||
$migrated = isset( $settings['__fa4_migrated']['ekit_offcanvas_menu_icons'] );
|
||||
// Check if its a new widget without previously selected icon using the old Icon control
|
||||
$is_new = empty( $settings['ekit_offcanvas_menu_icon'] );
|
||||
|
||||
if ( $is_new || $migrated ) {
|
||||
// new icon
|
||||
Icons_Manager::render_icon( $settings['ekit_offcanvas_menu_icons'], [ 'aria-hidden' => 'true' ] );
|
||||
} else {
|
||||
?>
|
||||
<i class="<?php echo esc_attr($settings['ekit_offcanvas_menu_icon']); ?>" aria-hidden="true"></i>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
if($settings['ekit_offcanvas_menu_type'] == 'icon_with_text' || $settings['ekit_offcanvas_menu_type'] == 'text'){
|
||||
echo esc_html($settings['ekit_offcanvas_menu_text']);
|
||||
}
|
||||
?>
|
||||
</a>
|
||||
</div>
|
||||
<!-- offset cart strart -->
|
||||
<!-- sidebar cart item -->
|
||||
<div class="ekit-sidebar-group info-group <?php echo esc_attr($settings['ekit_header_search_style']); ?>" data-settings="<?php echo esc_attr( wp_json_encode($data_settings)); ?>">
|
||||
<div class="ekit-overlay ekit-bg-black"></div>
|
||||
<div class="ekit-sidebar-widget">
|
||||
<div class="ekit_sidebar-widget-container">
|
||||
<div class="ekit_widget-heading <?php echo esc_attr($close_icons_position); ?>">
|
||||
<a href="#" class="ekit_close-side-widget" aria-label="close-icon">
|
||||
|
||||
<?php
|
||||
// new icon
|
||||
$migrated = isset($settings['__fa4_migrated']['ekit_offcanvas_menu_close_icons']);
|
||||
// Check if its a new widget without previously selected icon using the old Icon control
|
||||
$is_new = empty($settings['ekit_offcanvas_menu_close_icon']);
|
||||
|
||||
if($settings['ekit_offcanvas_menu_close_type'] !== 'text'){
|
||||
if ($is_new || $migrated) {
|
||||
Icons_Manager::render_icon($settings['ekit_offcanvas_menu_close_icons'], ['aria-hidden' => 'true']);
|
||||
} else {
|
||||
?>
|
||||
<i class="<?php echo esc_attr($settings['ekit_offcanvas_menu_close_icon']); ?>" aria-hidden="true"></i>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
if($settings['ekit_offcanvas_menu_close_type'] == 'icon_with_text' || $settings['ekit_offcanvas_menu_close_type'] == 'text' ){
|
||||
echo esc_html($settings['ekit_offcanvas_menu_close_text']);
|
||||
}
|
||||
?>
|
||||
|
||||
</a>
|
||||
</div>
|
||||
<div class="ekit_sidebar-textwidget">
|
||||
<?php echo Widget_Area_Utils::parse( $settings['ekit_offcanvas_content'], $this->get_id(), 99 ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Displaying with Elementor content rendering ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- END sidebar widget item -->
|
||||
<!-- END offset cart strart -->
|
||||
<?php
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
namespace Elementor;
|
||||
|
||||
class ElementsKit_Widget_Header_Search_Handler extends \ElementsKit_Lite\Core\Handler_Widget{
|
||||
|
||||
static function get_name()
|
||||
{
|
||||
return 'elementskit-header-search';
|
||||
}
|
||||
|
||||
static function get_title()
|
||||
{
|
||||
return esc_html__('Header Search', 'elementskit-lite');
|
||||
}
|
||||
|
||||
static function get_icon()
|
||||
{
|
||||
return 'eicon-search ekit-widget-icon ';
|
||||
}
|
||||
|
||||
static function get_categories()
|
||||
{
|
||||
return ['elementskit_headerfooter'];
|
||||
}
|
||||
|
||||
static function get_keywords() {
|
||||
return [ 'ekit', 'header', 'search', 'search box'];
|
||||
}
|
||||
|
||||
static function get_dir() {
|
||||
return \ElementsKit_Lite::widget_dir() . 'header-search/';
|
||||
}
|
||||
|
||||
static function get_url() {
|
||||
return \ElementsKit_Lite::widget_url() . 'header-search/';
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,737 @@
|
||||
<?php
|
||||
namespace Elementor;
|
||||
|
||||
use \Elementor\ElementsKit_Widget_Header_Search_Handler as Handler;
|
||||
use \ElementsKit_Lite\Modules\Controls\Controls_Manager as ElementsKit_Controls_Manager;
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
class ElementsKit_Widget_Header_Search extends Widget_Base
|
||||
{
|
||||
use \ElementsKit_Lite\Widgets\Widget_Notice;
|
||||
|
||||
public $base;
|
||||
|
||||
public function __construct( $data = [], $args = null ) {
|
||||
parent::__construct( $data, $args );
|
||||
$this->add_script_depends('magnific-popup');
|
||||
}
|
||||
|
||||
public function get_name() {
|
||||
return Handler::get_name();
|
||||
}
|
||||
|
||||
public function get_title() {
|
||||
return Handler::get_title();
|
||||
}
|
||||
|
||||
public function get_icon() {
|
||||
return Handler::get_icon();
|
||||
}
|
||||
|
||||
public function get_categories() {
|
||||
return Handler::get_categories();
|
||||
}
|
||||
|
||||
public function get_keywords() {
|
||||
return Handler::get_keywords();
|
||||
}
|
||||
|
||||
public function get_help_url() {
|
||||
return 'https://wpmet.com/doc/search-2/';
|
||||
}
|
||||
|
||||
protected function is_dynamic_content(): bool {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function has_widget_inner_wrapper(): bool {
|
||||
return ! Plugin::$instance->experiments->is_feature_active( 'e_optimized_markup' );
|
||||
}
|
||||
|
||||
protected function register_controls()
|
||||
{
|
||||
|
||||
$this->start_controls_section(
|
||||
'ekit_header_search',
|
||||
[
|
||||
'label' => esc_html__('Header Search', 'elementskit-lite'),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_search_placeholder_text', [
|
||||
'label' => esc_html__('Placeholder Text', 'elementskit-lite'),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'default' => 'Search...',
|
||||
'label_block' => true,
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$this->add_control(
|
||||
'ekit_search_icons',
|
||||
[
|
||||
'label' => esc_html__('Select Icon', 'elementskit-lite'),
|
||||
'fa4compatibility' => 'ekit_search_icon',
|
||||
'default' => [
|
||||
'value' => 'icon icon-search',
|
||||
'library' => 'ekiticons',
|
||||
],
|
||||
'label_block' => true,
|
||||
'type' => Controls_Manager::ICONS,
|
||||
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_search_icon_font_size',
|
||||
[
|
||||
'label' => esc_html__('Font Size', 'elementskit-lite'),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => ['px', 'em'],
|
||||
'default' => [
|
||||
'unit' => 'px',
|
||||
'size' => '20',
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit_navsearch-button :is(i, svg)' => 'font-size: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
|
||||
$this->start_controls_section(
|
||||
'ekit_header_search_section_tab_style',
|
||||
[
|
||||
'label' => esc_html__('Header Search', 'elementskit-lite'),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
|
||||
$this->start_controls_tabs( 'ekit_search_tab_search_tabs' );
|
||||
$this->start_controls_tab(
|
||||
'ekit_search_tab_search_normal',
|
||||
[
|
||||
'label' =>esc_html__( 'Normal', 'elementskit-lite' ),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'ekit_searech_icon_color',
|
||||
[
|
||||
'label' =>esc_html__( 'Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit_navsearch-button, {{WRAPPER}} .ekit_search-button' => 'color: {{VALUE}}; fill: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_seacrh_icon_bg_color',
|
||||
[
|
||||
'label' =>esc_html__( 'Background Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit_navsearch-button' => 'background-color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->end_controls_tab();
|
||||
|
||||
$this->start_controls_tab(
|
||||
'ekit_search_tab_search_hover',
|
||||
[
|
||||
'label' =>esc_html__( 'Hover', 'elementskit-lite' ),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'ekit_searech_icon_hover_color',
|
||||
[
|
||||
'label' =>esc_html__( 'Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit_navsearch-button:hover, {{WRAPPER}} .ekit_search-button:hover' => 'color: {{VALUE}}; fill: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_seacrh_icon_hover_bg_color',
|
||||
[
|
||||
'label' =>esc_html__( 'Background Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit_navsearch-button:hover' => 'background-color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->end_controls_tab();
|
||||
$this->end_controls_tabs();
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Border::get_type(),
|
||||
[
|
||||
'name' => 'ekit_border',
|
||||
'selector' => '{{WRAPPER}} .ekit_navsearch-button',
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
|
||||
// box shadow
|
||||
$this->add_group_control(
|
||||
Group_Control_Box_Shadow::get_type(), [
|
||||
'name' => 'ekit_header_search',
|
||||
'selector' => '{{WRAPPER}} .ekit_navsearch-button',
|
||||
]
|
||||
);
|
||||
// border radius
|
||||
$this->add_control(
|
||||
'ekit_header_border_radius',
|
||||
[
|
||||
'label' => esc_html__( 'Border radius', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit_navsearch-button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_search_margin',
|
||||
[
|
||||
'label' => esc_html__('Margin', 'elementskit-lite'),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => ['px', 'em'],
|
||||
'default' => [
|
||||
'top' => '5',
|
||||
'right' => '5',
|
||||
'bottom' => '5' ,
|
||||
'left' => '5',
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit_navsearch-button' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_search_padding',
|
||||
[
|
||||
'label' => esc_html__( 'Padding', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'default' => [
|
||||
'top' => '0',
|
||||
'right' => '0',
|
||||
'bottom' => '0' ,
|
||||
'left' => '0',
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit_navsearch-button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$this->add_control(
|
||||
'ekit_search_height_width_socher',
|
||||
[
|
||||
'label' => esc_html__( 'Use Height Width', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label_on' => esc_html__( 'Show', 'elementskit-lite' ),
|
||||
'label_off' => esc_html__( 'Hide', 'elementskit-lite' ),
|
||||
'return_value' => 'yes',
|
||||
'default' => 'yes',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_search_width',
|
||||
[
|
||||
'label' => esc_html__('Width', 'elementskit-lite'),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => ['px', 'em', '%'],
|
||||
'default' => [
|
||||
'unit' => 'px',
|
||||
'size' => '40',
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit_navsearch-button' => 'width: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
'condition' => [
|
||||
'ekit_search_height_width_socher' => 'yes'
|
||||
]
|
||||
]
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'ekit_search_height',
|
||||
[
|
||||
'label' => esc_html__('Height', 'elementskit-lite'),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => ['px', 'em', '%'],
|
||||
'default' => [
|
||||
'unit' => 'px',
|
||||
'size' => '40',
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit_navsearch-button' => 'height: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
'condition' => [
|
||||
'ekit_search_height_width_socher' => 'yes'
|
||||
]
|
||||
]
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'ekit_search_line_height',
|
||||
[
|
||||
'label' => esc_html__('Line Height', 'elementskit-lite'),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => ['px', 'em', '%'],
|
||||
'default' => [
|
||||
'unit' => 'px',
|
||||
'size' => '40',
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit_navsearch-button' => 'line-height: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
'condition' => [
|
||||
'ekit_search_height_width_socher' => 'yes'
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_search_icon_text_align',
|
||||
[
|
||||
'label' => esc_html__( 'Alignment', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::CHOOSE,
|
||||
'options' => [
|
||||
'left' => [
|
||||
'title' => esc_html__( 'Left', 'elementskit-lite' ),
|
||||
'icon' => 'eicon-text-align-left',
|
||||
],
|
||||
'center' => [
|
||||
'title' => esc_html__( 'Center', 'elementskit-lite' ),
|
||||
'icon' => 'eicon-text-align-center',
|
||||
],
|
||||
'right' => [
|
||||
'title' => esc_html__( 'Right', 'elementskit-lite' ),
|
||||
'icon' => 'eicon-text-align-right',
|
||||
],
|
||||
],
|
||||
'default' => 'center',
|
||||
'toggle' => true,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .ekit_navsearch-button' => 'text-align: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
$this->start_controls_section(
|
||||
'ekit_search_container_style_tabs',
|
||||
[
|
||||
'label' => __( 'Search Container', 'elementskit-lite' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Background::get_type(),
|
||||
[
|
||||
'name' => 'ekit_search_backdrop_background',
|
||||
'label' => __( 'Background', 'elementskit-lite' ),
|
||||
'types' => [ 'classic', 'gradient' ],
|
||||
'selector' => '.ekit-popup-{{ID}} .ekit_modal-searchPanel .ekit-search-group input:not([type="submit"])',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_search_content_title_color',
|
||||
[
|
||||
'label' => __( 'Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'.ekit-popup-{{ID}} .ekit_modal-searchPanel .ekit-search-group input:not([type=submit]), .ekit-popup-{{ID}} button.mfp-close' => 'border-color: {{VALUE}}',
|
||||
'.ekit-popup-{{ID}} .ekit_modal-searchPanel .ekit-search-group .ekit_search-button, .ekit-popup-{{ID}} .ekit-promo-popup .mfp-close, .ekit-popup-{{ID}} .ekit_search-field' => 'color: {{VALUE}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_search_placeholder_title_color',
|
||||
[
|
||||
'label' => __( 'Placeholder Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'.ekit-popup-{{ID}} .ekit_modal-searchPanel .ekit-search-group .ekit_search-field::-webkit-input-placeholder' => 'color: {{VALUE}}',
|
||||
'.ekit-popup-{{ID}} .ekit_modal-searchPanel .ekit-search-group .ekit_search-field::-moz-placeholder' => 'color: {{VALUE}}',
|
||||
'.ekit-popup-{{ID}} .ekit_modal-searchPanel .ekit-search-group .ekit_search-field:-ms-input-placeholder' => 'color: {{VALUE}}',
|
||||
'.ekit-popup-{{ID}} .ekit_modal-searchPanel .ekit-search-group .ekit_search-field:-moz-placeholder' => 'color: {{VALUE}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'ekit_search_input_typography',
|
||||
'label' => esc_html__( 'Typography', 'elementskit-lite' ),
|
||||
'exclude' => [ 'line_height', 'text_decoration', 'text_transform', 'font_style' ],
|
||||
'selector' => '.ekit-popup-{{ID}} .ekit_modal-searchPanel .ekit_search-field',
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'ekit_search_border_heading',
|
||||
[
|
||||
'label' => esc_html__( 'Border', 'elementskit-lite' ),
|
||||
'type' => \Elementor\Controls_Manager::HEADING,
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Border::get_type(),
|
||||
[
|
||||
'name' => 'ekit_search_border',
|
||||
'label' => esc_html__( 'Border Type', 'elementskit-lite' ),
|
||||
'default' =>'',
|
||||
'selector' => '.ekit-popup-{{ID}} .ekit_modal-searchPanel .ekit-search-group input:not([type="submit"])',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_search_border_radius',
|
||||
[
|
||||
'label' => esc_html__( 'Border radius', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'selectors' => [
|
||||
'.ekit-popup-{{ID}} .ekit_modal-searchPanel .ekit-search-group input:not([type="submit"])' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
'separator' => 'after',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_search_input_height',
|
||||
[
|
||||
'label' => esc_html__( 'Height (px)', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => [ 'px' ],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'min' => 0,
|
||||
'max' => 100,
|
||||
'step' => 1,
|
||||
],
|
||||
],
|
||||
'selectors' => [
|
||||
'.ekit-popup-{{ID}} .ekit_modal-searchPanel .ekit-search-group input:not([type="submit"])' => 'height: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_search_input_width',
|
||||
[
|
||||
'label' => esc_html__( 'Width', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => [ 'px' ],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'min' => 350,
|
||||
'max' => 900
|
||||
],
|
||||
],
|
||||
'selectors' => [
|
||||
'.ekit-popup-{{ID}} .ekit_modal-searchPanel .ekit-search-panel' => 'max-width: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_search_input_icon_size',
|
||||
[
|
||||
'label' => esc_html__('Icon Size (px)', 'elementskit-lite'),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => ['px'],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'min' => 10,
|
||||
'max' => 150,
|
||||
'step' => 1,
|
||||
],
|
||||
],
|
||||
'selectors' => [
|
||||
'.ekit-popup-{{ID}} .ekit_modal-searchPanel .ekit-search-group .ekit_search-button i' => 'font-size: {{SIZE}}{{UNIT}}; max-width: {{SIZE}}{{UNIT}};',
|
||||
'.ekit-popup-{{ID}} .ekit_modal-searchPanel .ekit-search-group .ekit_search-button svg' => 'font-size: {{SIZE}}{{UNIT}}; max-width: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_search_input_left',
|
||||
[
|
||||
'label' => esc_html__( 'Icon Left Position (px)', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => [ 'px' ],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'min' => 0,
|
||||
'max' => 100,
|
||||
'step' => 1,
|
||||
],
|
||||
],
|
||||
'selectors' => [
|
||||
'.ekit-popup-{{ID}} .ekit_modal-searchPanel .ekit-search-group .ekit_search-button' => 'right: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_search_background_overlay_color',
|
||||
[
|
||||
'label' => esc_html__( 'Background Overlay Color', 'elementskit-lite' ),
|
||||
'type' => \Elementor\Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'.ekit-popup-{{ID}} ' => 'background-color: {{VALUE}}',
|
||||
],
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_search_box_align',
|
||||
[
|
||||
'label' => esc_html__( 'Alignment', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::CHOOSE,
|
||||
'options' => [
|
||||
'top' => [
|
||||
'title' => esc_html__( 'Top', 'elementskit-lite' ),
|
||||
'icon' => 'eicon-v-align-top',
|
||||
],
|
||||
'middle' => [
|
||||
'title' => esc_html__( 'Middle', 'elementskit-lite' ),
|
||||
'icon' => 'eicon-v-align-middle',
|
||||
],
|
||||
'bottom' => [
|
||||
'title' => esc_html__( 'Bottom', 'elementskit-lite' ),
|
||||
'icon' => 'eicon-v-align-bottom',
|
||||
],
|
||||
],
|
||||
'toggle' => true,
|
||||
'selectors' => [
|
||||
'.ekit-popup-{{ID}} > .mfp-container > .mfp-content' => 'vertical-align: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_search_box_padding',
|
||||
[
|
||||
'label' => esc_html__( 'Padding', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'selectors' => [
|
||||
'.ekit-popup-{{ID}} > .mfp-container > .mfp-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
$this->start_controls_section(
|
||||
'ekit_search_close_button_style_tabs',
|
||||
[
|
||||
'label' => __( 'Close Button', 'elementskit-lite' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_search_close_button_border_radius',
|
||||
[
|
||||
'label' => esc_html__('Border Radius', 'elementskit-lite'),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => ['%', 'px'],
|
||||
'default' => [
|
||||
'unit' => '%'
|
||||
],
|
||||
'range' => [
|
||||
'min' => 0,
|
||||
'max' => 100,
|
||||
],
|
||||
'selectors' => [
|
||||
'.ekit-popup-{{ID}}.ekit-promo-popup .mfp-close' => 'border-radius: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_search_close_button_size',
|
||||
[
|
||||
'label' => esc_html__('Size (px)', 'elementskit-lite'),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => ['px'],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'min' => 30,
|
||||
'max' => 50,
|
||||
],
|
||||
],
|
||||
'selectors' => [
|
||||
'.ekit-popup-{{ID}}.ekit-promo-popup .mfp-close' => 'height: {{SIZE}}{{UNIT}}; width: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}};',
|
||||
'.ekit-popup-{{ID}}.ekit-promo-popup .mfp-close:hover' => 'width: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
|
||||
]
|
||||
);
|
||||
|
||||
$this->start_controls_tabs( 'ekit_search_close_button_tabs' );
|
||||
|
||||
$this->start_controls_tab(
|
||||
'ekit_search_close_button_normal',
|
||||
[
|
||||
'label' =>esc_html__( 'Normal', 'elementskit-lite' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_search_close_button_color',
|
||||
[
|
||||
'label' =>esc_html__( 'Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'.ekit-popup-{{ID}}.ekit-promo-popup .mfp-close' => 'color: {{VALUE}}; border-color: {{VALUE}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_search_close_button_bg_color',
|
||||
[
|
||||
'label' =>esc_html__( 'Background Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'.ekit-popup-{{ID}}.ekit-promo-popup .mfp-close' => 'background-color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->end_controls_tab();
|
||||
|
||||
$this->start_controls_tab(
|
||||
'ekit_search_close_button_hover',
|
||||
[
|
||||
'label' =>esc_html__( 'Hover', 'elementskit-lite' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_search_close_button_hover_color',
|
||||
[
|
||||
'label' =>esc_html__( 'Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'.ekit-popup-{{ID}}.ekit-promo-popup .mfp-close:hover' => 'color: {{VALUE}}; border-color: {{VALUE}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_search_close_button_hover_bg_color',
|
||||
[
|
||||
'label' =>esc_html__( 'Background Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'.ekit-popup-{{ID}}.ekit-promo-popup .mfp-close:hover' => 'background-color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->end_controls_tab();
|
||||
|
||||
$this->end_controls_tabs();
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
$this->insert_pro_message();
|
||||
}
|
||||
|
||||
|
||||
protected function render( ) {
|
||||
echo '<div class="ekit-wid-con" >';
|
||||
$this->render_raw();
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
protected function render_raw( ) {
|
||||
$settings = $this->get_settings();
|
||||
/*
|
||||
*
|
||||
* Roots.io searchform.php template hack to fix Polylang search
|
||||
* https://gist.github.com/bramchi/d0767c32a772550486ea
|
||||
* Note: Polylang setting 'Hide URL language info for default language' should be enabled for this to work.
|
||||
* Soil-nice-search disabled in Roots.
|
||||
*
|
||||
*/
|
||||
$language_prefix = (!function_exists('pll_current_language') ? '' : pll_current_language());
|
||||
|
||||
$ekit_search_link = apply_filters('ekit_search_link', home_url( '/'.$language_prefix ));
|
||||
$placeholder_and_label = $settings['ekit_search_placeholder_text'];
|
||||
?>
|
||||
<a href="#ekit_modal-popup-<?php echo esc_attr($this->get_id()); ?>" class="ekit_navsearch-button ekit-modal-popup" aria-label="navsearch-button">
|
||||
<?php
|
||||
// new icon
|
||||
$migrated = isset( $settings['__fa4_migrated']['ekit_search_icons'] );
|
||||
// Check if its a new widget without previously selected icon using the old Icon control
|
||||
$is_new = empty( $settings['ekit_search_icon'] );
|
||||
if ( $is_new || $migrated ) {
|
||||
// new icon
|
||||
Icons_Manager::render_icon( $settings['ekit_search_icons'], [ 'aria-hidden' => 'true' ] );
|
||||
} else {
|
||||
?>
|
||||
<i class="<?php echo esc_attr($settings['ekit_search_icon']); ?>" aria-hidden="true"></i>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</a>
|
||||
<!-- language switcher strart -->
|
||||
<!-- xs modal -->
|
||||
<div class="zoom-anim-dialog mfp-hide ekit_modal-searchPanel" id="ekit_modal-popup-<?php echo esc_attr($this->get_id()); ?>">
|
||||
<div class="ekit-search-panel">
|
||||
<!-- Polylang search - thanks to Alain Melsens -->
|
||||
<form role="search" method="get" class="ekit-search-group" action="<?php echo esc_url( $ekit_search_link ); ?>">
|
||||
<input type="search" class="ekit_search-field" aria-label="search-form" placeholder="<?php echo esc_attr($placeholder_and_label); ?>" value="<?php echo esc_attr(get_search_query()); ?>" name="s">
|
||||
<button type="submit" class="ekit_search-button" aria-label="search-button">
|
||||
<?php
|
||||
// new icon
|
||||
$migrated = isset( $settings['__fa4_migrated']['ekit_search_icons'] );
|
||||
// Check if its a new widget without previously selected icon using the old Icon control
|
||||
$is_new = empty( $settings['ekit_search_icon'] );
|
||||
if ( $is_new || $migrated ) {
|
||||
// new icon
|
||||
Icons_Manager::render_icon( $settings['ekit_search_icons'], [ 'aria-hidden' => 'true' ] );
|
||||
} else {
|
||||
?>
|
||||
<i class="<?php echo esc_attr($settings['ekit_search_icon']); ?>" title="Search" aria-hidden="true"></i>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div><!-- End xs modal -->
|
||||
<!-- end language switcher strart -->
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 6.1 KiB |
|
After Width: | Height: | Size: 6.5 KiB |
|
After Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
namespace Elementor;
|
||||
|
||||
class ElementsKit_Widget_Heading_Handler extends \ElementsKit_Lite\Core\Handler_Widget{
|
||||
|
||||
static function get_name() {
|
||||
return 'elementskit-heading';
|
||||
}
|
||||
|
||||
static function get_title() {
|
||||
return esc_html__( 'Heading', 'elementskit-lite' );
|
||||
}
|
||||
|
||||
static function get_icon() {
|
||||
return 'ekit ekit-widget-icon ekit-heading-style';
|
||||
}
|
||||
|
||||
static function get_categories() {
|
||||
return [ 'elementskit' ];
|
||||
}
|
||||
|
||||
static function get_keywords() {
|
||||
return ['ekit', 'heading', 'title', 'text'];
|
||||
}
|
||||
static function get_dir() {
|
||||
return \ElementsKit_Lite::widget_dir() . 'heading/';
|
||||
}
|
||||
|
||||
static function get_url() {
|
||||
return \ElementsKit_Lite::widget_url() . 'heading/';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
namespace Elementor;
|
||||
|
||||
class ElementsKit_Widget_Icon_Box_Handler extends \ElementsKit_Lite\Core\Handler_Widget{
|
||||
|
||||
static function get_name() {
|
||||
return 'elementskit-icon-box';
|
||||
}
|
||||
|
||||
static function get_title() {
|
||||
return esc_html__( 'Icon Box', 'elementskit-lite' );
|
||||
}
|
||||
|
||||
static function get_icon() {
|
||||
return 'eicon-info-box ekit-widget-icon ';
|
||||
}
|
||||
|
||||
static function get_categories() {
|
||||
return [ 'elementskit' ];
|
||||
}
|
||||
|
||||
static function get_keywords() {
|
||||
return ['ekit', 'icon', 'box', 'box icon'];
|
||||
}
|
||||
|
||||
static function get_dir() {
|
||||
return \ElementsKit_Lite::widget_dir() . 'icon-box/';
|
||||
}
|
||||
|
||||
static function get_url() {
|
||||
return \ElementsKit_Lite::widget_url() . 'icon-box/';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
namespace Elementor;
|
||||
|
||||
|
||||
class ElementsKit_Widget_Icon_Hover_Handler extends \ElementsKit_Lite\Core\Handler_Widget{
|
||||
|
||||
static function get_name() {
|
||||
return 'elementskit-icon-hover';
|
||||
}
|
||||
|
||||
static function get_title() {
|
||||
return esc_html__( 'Icon Hover', 'elementskit-lite' );
|
||||
}
|
||||
|
||||
static function get_icon() {
|
||||
return 'eicon-image-hotspot ekit-widget-icon ';
|
||||
}
|
||||
|
||||
static function get_categories() {
|
||||
return [ 'elementskit' ];
|
||||
}
|
||||
|
||||
static function get_dir() {
|
||||
return \ElementsKit_Lite::widget_dir() . 'icon-hover/';
|
||||
}
|
||||
|
||||
static function get_url() {
|
||||
return \ElementsKit_Lite::widget_url() . 'icon-hover/';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
namespace Elementor;
|
||||
|
||||
use \Elementor\ElementsKit_Widget_Icon_Hover_Handler as Handler;
|
||||
use \ElementsKit_Lite\Modules\Controls\Controls_Manager as ElementsKit_Controls_Manager;
|
||||
|
||||
if (! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
class ElementsKit_Widget_Icon_Hover extends Widget_Base {
|
||||
use \ElementsKit_Lite\Widgets\Widget_Notice;
|
||||
|
||||
public $base;
|
||||
|
||||
public function get_name() {
|
||||
return Handler::get_name();
|
||||
}
|
||||
|
||||
public function get_title() {
|
||||
return Handler::get_title();
|
||||
}
|
||||
|
||||
public function get_icon() {
|
||||
return Handler::get_icon();
|
||||
}
|
||||
|
||||
public function get_categories() {
|
||||
return Handler::get_categories();
|
||||
}
|
||||
|
||||
public function get_help_url() {
|
||||
return '';
|
||||
}
|
||||
|
||||
protected function register_controls() {
|
||||
$this->start_controls_section(
|
||||
'section_tab', [
|
||||
'label' =>esc_html__( 'Icon Hover', 'elementskit-lite' ),
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
$this->insert_pro_message();
|
||||
}
|
||||
|
||||
protected function render( ) {
|
||||
echo '<div class="ekit-wid-con" >';
|
||||
$this->render_raw();
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
protected function render_raw( ) {
|
||||
|
||||
$settings = $this->get_settings_for_display();
|
||||
|
||||
extract($settings);
|
||||
|
||||
?>
|
||||
<span class="ekit_creative_icon_box ekit_hover_grow">
|
||||
<i class="fa fa-facebook"></i>
|
||||
</span>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
Icon Hover widget ta incomplete. eita niye future e kaj kora hote pare.
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
namespace Elementor;
|
||||
|
||||
class ElementsKit_Widget_Image_Accordion_Handler extends \ElementsKit_Lite\Core\Handler_Widget{
|
||||
|
||||
static function get_name() {
|
||||
return 'elementskit-image-accordion';
|
||||
}
|
||||
|
||||
static function get_title() {
|
||||
return esc_html__( 'Image Accordion', 'elementskit-lite' );
|
||||
}
|
||||
|
||||
static function get_icon() {
|
||||
return 'ekit ekit-widget-icon ekit-accordion';
|
||||
}
|
||||
|
||||
static function get_categories() {
|
||||
return [ 'elementskit' ];
|
||||
}
|
||||
|
||||
static function get_keywords() {
|
||||
return ['ekit', 'image', 'accordion', 'image faq', 'faq'];
|
||||
}
|
||||
|
||||
static function get_dir() {
|
||||
return \ElementsKit_Lite::widget_dir() . 'image-accordion/';
|
||||
}
|
||||
|
||||
static function get_url() {
|
||||
return \ElementsKit_Lite::widget_url() . 'image-accordion/';
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
namespace Elementor;
|
||||
|
||||
class ElementsKit_Widget_Image_Box_Handler extends \ElementsKit_Lite\Core\Handler_Widget{
|
||||
|
||||
static function get_name() {
|
||||
return 'elementskit-image-box';
|
||||
}
|
||||
|
||||
static function get_title() {
|
||||
return esc_html__( 'Image Box', 'elementskit-lite' );
|
||||
}
|
||||
|
||||
static function get_icon() {
|
||||
return 'ekit ekit-widget-icon ekit-image-box';
|
||||
}
|
||||
|
||||
static function get_categories() {
|
||||
return [ 'elementskit' ];
|
||||
}
|
||||
|
||||
static function get_keywords() {
|
||||
return ['ekit', 'image', 'image box', 'box'];
|
||||
}
|
||||
|
||||
static function get_dir() {
|
||||
return \ElementsKit_Lite::widget_dir() . 'image-box/';
|
||||
}
|
||||
|
||||
static function get_url() {
|
||||
return \ElementsKit_Lite::widget_url() . 'image-box/';
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
namespace Elementor;
|
||||
|
||||
class ElementsKit_Widget_Image_Comparison_Handler extends \ElementsKit_Lite\Core\Handler_Widget{
|
||||
|
||||
static function get_name() {
|
||||
return 'elementskit-image-comparison';
|
||||
}
|
||||
|
||||
static function get_title() {
|
||||
return esc_html__( 'Image Comparison', 'elementskit-lite' );
|
||||
}
|
||||
|
||||
static function get_icon() {
|
||||
return 'ekit ekit-widget-icon ekit-image-comparison';
|
||||
}
|
||||
|
||||
static function get_categories() {
|
||||
return [ 'elementskit' ];
|
||||
}
|
||||
|
||||
static function get_keywords() {
|
||||
return ['compare', 'image', 'before image', 'after image', 'comparison'];
|
||||
}
|
||||
|
||||
static function get_dir() {
|
||||
return \ElementsKit_Lite::widget_dir() . 'image-comparison/';
|
||||
}
|
||||
|
||||
static function get_url() {
|
||||
return \ElementsKit_Lite::widget_url() . 'image-comparison/';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,682 @@
|
||||
<?php
|
||||
namespace Elementor;
|
||||
|
||||
use \Elementor\ElementsKit_Widget_Image_Comparison_Handler as Handler;
|
||||
use \ElementsKit_Lite\Modules\Controls\Controls_Manager as ElementsKit_Controls_Manager;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
class ElementsKit_Widget_Image_Comparison extends Widget_Base {
|
||||
use \ElementsKit_Lite\Widgets\Widget_Notice;
|
||||
|
||||
public $base;
|
||||
|
||||
public function __construct( $data = [], $args = null ) {
|
||||
|
||||
parent::__construct( $data, $args );
|
||||
|
||||
$this->add_script_depends('event.move');
|
||||
$this->add_script_depends('twentytwenty');
|
||||
$this->add_script_depends('imagesloaded');
|
||||
}
|
||||
|
||||
public function get_name() {
|
||||
return Handler::get_name();
|
||||
}
|
||||
|
||||
public function get_title() {
|
||||
return Handler::get_title();
|
||||
}
|
||||
|
||||
public function get_icon() {
|
||||
return Handler::get_icon();
|
||||
}
|
||||
|
||||
public function get_categories() {
|
||||
return Handler::get_categories();
|
||||
}
|
||||
|
||||
public function get_keywords() {
|
||||
return Handler::get_keywords();
|
||||
}
|
||||
|
||||
public function get_help_url() {
|
||||
return 'https://wpmet.com/doc/image-comparisn/';
|
||||
}
|
||||
protected function is_dynamic_content(): bool {
|
||||
return false;
|
||||
}
|
||||
|
||||
protected function register_controls() {
|
||||
|
||||
$this->start_controls_section(
|
||||
'ekit_img_comparison_section_items',
|
||||
[
|
||||
'label' => esc_html__( 'Items', 'elementskit-lite' ),
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$this->add_control(
|
||||
'ekit_img_comparison_container_style',
|
||||
[
|
||||
'label' => esc_html__( 'Container Style', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'options' => [
|
||||
'horizontal' => esc_html__( 'Horizontal', 'elementskit-lite' ),
|
||||
'vertical' => esc_html__( 'Vertical', 'elementskit-lite' ),
|
||||
],
|
||||
'default' => 'vertical',
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'ekit_img_comparison_before_heading_section',
|
||||
[
|
||||
'label' => esc_html__( 'Before', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::HEADING,
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'ekit_img_comparison_image_before',
|
||||
[
|
||||
'label' => esc_html__( 'Choose Image', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::MEDIA,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'default' => [
|
||||
'url' => Utils::get_placeholder_image_src(),
|
||||
'id' => -1
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'ekit_img_comparison_label_before',
|
||||
[
|
||||
'label' => esc_html__( 'Label', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'default' => 'Before',
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'ekit_img_comparison_after_heading_section',
|
||||
[
|
||||
'label' => esc_html__( 'After', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::HEADING,
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'ekit_img_comparison_image_after',
|
||||
[
|
||||
'label' => esc_html__( 'Choose Image', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::MEDIA,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'default' => [
|
||||
'url' => Utils::get_placeholder_image_src(),
|
||||
'id' => -1
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'ekit_img_comparison_label_after',
|
||||
[
|
||||
'label' => esc_html__( 'Label', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'dynamic' => [
|
||||
'active' => true,
|
||||
],
|
||||
'default' => 'After',
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
$this->start_controls_section(
|
||||
'ekit_img_comparison_section_settings',
|
||||
[
|
||||
'label' => esc_html__( 'Settings', 'elementskit-lite' ),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'ekit_img_comparison_offset',
|
||||
[
|
||||
'label' => esc_html__( 'Offset', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => [ '%' ],
|
||||
'range' => [
|
||||
'%' => [
|
||||
'min' => 0,
|
||||
'max' => 100,
|
||||
],
|
||||
],
|
||||
'default' => [
|
||||
'unit' => '%',
|
||||
'size' => 50,
|
||||
],
|
||||
'description' => esc_html__('How much of the before image is visible when the page loads', 'elementskit-lite'),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'ekit_img_comparison_overlay',
|
||||
[
|
||||
'label' => esc_html__( 'Remove overlay?', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label_on' => esc_html__( 'Yes', 'elementskit-lite' ),
|
||||
'label_off' => esc_html__( 'No', 'elementskit-lite' ),
|
||||
'return_value' => true,
|
||||
'default' => false,
|
||||
'description' => esc_html__('Do not show the overlay with before and after', 'elementskit-lite'),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'ekit_img_comparison_move_slider_on_hover',
|
||||
[
|
||||
'label' => esc_html__( 'Move slider on hover?', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label_on' => esc_html__( 'Yes', 'elementskit-lite' ),
|
||||
'label_off' => esc_html__( 'No', 'elementskit-lite' ),
|
||||
'return_value' => true,
|
||||
'default' => false,
|
||||
'description' => esc_html__('Move slider on mouse hover?', 'elementskit-lite'),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'ekit_img_comparison_click_to_move',
|
||||
[
|
||||
'label' => esc_html__( 'Click to move?', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label_on' => esc_html__( 'Yes', 'elementskit-lite' ),
|
||||
'label_off' => esc_html__( 'No', 'elementskit-lite' ),
|
||||
'return_value' => true,
|
||||
'default' => false,
|
||||
'description' => esc_html__('Allow a user to click (or tap) anywhere on the image to move the slider to that location.', 'elementskit-lite'),
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
/**
|
||||
* General Style Section
|
||||
*/
|
||||
$this->start_controls_section(
|
||||
'ekit_img_comparison_general_style',
|
||||
array(
|
||||
'label' => esc_html__( 'General', 'elementskit-lite' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
'show_label' => false,
|
||||
)
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Border::get_type(),
|
||||
array(
|
||||
'name' => 'ekit_img_comparison_container_border',
|
||||
'label' => esc_html__( 'Border', 'elementskit-lite' ),
|
||||
'placeholder' => '1px',
|
||||
'default' => '1px',
|
||||
'selector' => '{{WRAPPER}} .elementskit-image-comparison',
|
||||
)
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_img_comparison_container_border_radius',
|
||||
array(
|
||||
'label' => esc_html__( 'Border Radius', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => array( 'px', '%' ),
|
||||
'selectors' => array(
|
||||
'{{WRAPPER}} .elementskit-image-comparison' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_img_comparison_container_padding',
|
||||
array(
|
||||
'label' => esc_html__( 'Padding', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => array( 'px', '%' ),
|
||||
'selectors' => array(
|
||||
'{{WRAPPER}} .elementskit-image-comparison' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Box_Shadow::get_type(),
|
||||
array(
|
||||
'name' => 'ekit_img_comparison_container_box_shadow',
|
||||
'exclude' => array('box_shadow_position'), // PHPCS:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude
|
||||
'selector' => '{{WRAPPER}} .elementskit-image-comparison',
|
||||
)
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
/**
|
||||
* Label Style Section
|
||||
*/
|
||||
$this->start_controls_section(
|
||||
'ekit_img_comparison_label_style',
|
||||
array(
|
||||
'label' => esc_html__( 'Label', 'elementskit-lite' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
'show_label' => false,
|
||||
'condition' => ['ekit_img_comparison_overlay!' => 'true'],
|
||||
)
|
||||
);
|
||||
|
||||
$this->start_controls_tabs( 'ekit_img_comparison_tabs_label_styles' );
|
||||
|
||||
$this->start_controls_tab(
|
||||
'ekit_img_comparison_tab_label_before',
|
||||
array(
|
||||
'label' => esc_html__( 'Before', 'elementskit-lite' ),
|
||||
)
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_img_comparison_before_label_color',
|
||||
array(
|
||||
'label' => esc_html__( 'Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => array(
|
||||
'{{WRAPPER}} .elementskit-image-comparison .twentytwenty-before-label:before' => 'color: {{VALUE}}',
|
||||
'{{WRAPPER}} .elementskit-image-comparison .twentytwenty-after-label:before' => 'color: {{VALUE}}',
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
array(
|
||||
'name' => 'ekit_img_comparison_before_label_typography_group',
|
||||
'selector' => '{{WRAPPER}} .elementskit-image-comparison .twentytwenty-before-label:before',
|
||||
)
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Background::get_type(),
|
||||
array(
|
||||
'name' => 'ekit_img_comparison_before_label_background_group',
|
||||
'selector' => '{{WRAPPER}} .elementskit-image-comparison .twentytwenty-before-label:before',
|
||||
)
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_img_comparison_before_label_margin',
|
||||
array(
|
||||
'label' => esc_html__( 'Margin', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => array( 'px', '%' ),
|
||||
'selectors' => array(
|
||||
'{{WRAPPER}} .elementskit-image-comparison .twentytwenty-before-label:before' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_img_comparison_before_label_padding',
|
||||
array(
|
||||
'label' => esc_html__( 'Padding', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => array( 'px', '%' ),
|
||||
'selectors' => array(
|
||||
'{{WRAPPER}} .elementskit-image-comparison .twentytwenty-before-label:before' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
),
|
||||
)
|
||||
);
|
||||
$this->end_controls_tab();
|
||||
|
||||
$this->start_controls_tab(
|
||||
'ekit_img_comparison_tab_label_after',
|
||||
array(
|
||||
'label' => esc_html__( 'After', 'elementskit-lite' ),
|
||||
)
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_img_comparison_after_label_color',
|
||||
array(
|
||||
'label' => esc_html__( 'Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => array(
|
||||
'{{WRAPPER}} .elementskit-image-comparison .twentytwenty-after-label:before' => 'color: {{VALUE}}',
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
array(
|
||||
'name' => 'ekit_img_comparison_after_label_typography_group',
|
||||
'selector' => '{{WRAPPER}} .elementskit-image-comparison .twentytwenty-after-label:before',
|
||||
)
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Background::get_type(),
|
||||
array(
|
||||
'name' => 'ekit_img_comparison_after_label_background_group',
|
||||
'selector' => '{{WRAPPER}} .elementskit-image-comparison .twentytwenty-after-label:before',
|
||||
)
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_img_comparison_after_label_margin',
|
||||
array(
|
||||
'label' => esc_html__( 'Margin', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => array( 'px', '%' ),
|
||||
'selectors' => array(
|
||||
'{{WRAPPER}} .elementskit-image-comparison .twentytwenty-after-label:before' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_img_comparison_after_label_padding',
|
||||
array(
|
||||
'label' => esc_html__( 'Padding', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => array( 'px', '%' ),
|
||||
'selectors' => array(
|
||||
'{{WRAPPER}} .elementskit-image-comparison .twentytwenty-after-label:before' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
$this->end_controls_tab();
|
||||
|
||||
$this->end_controls_tabs();
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
/**
|
||||
* Handle Style Section
|
||||
*/
|
||||
$this->start_controls_section(
|
||||
'ekit_img_comparison_handle_style',
|
||||
array(
|
||||
'label' => esc_html__( 'Handle', 'elementskit-lite' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
'show_label' => false,
|
||||
)
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_img_comparison_handle_control_width',
|
||||
array(
|
||||
'label' => esc_html__( 'Control Width', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => array( 'px' ),
|
||||
'range' => array(
|
||||
'px' => array(
|
||||
'min' => 20,
|
||||
'max' => 100,
|
||||
),
|
||||
),
|
||||
'selectors' => array(
|
||||
'{{WRAPPER}} .elementskit-image-comparison .twentytwenty-handle' => 'width: {{SIZE}}{{UNIT}}; margin-left: calc( {{SIZE}}{{UNIT}} / -2 );',
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_img_comparison_handle_control_height',
|
||||
array(
|
||||
'label' => esc_html__( 'Height', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => array( 'px' ),
|
||||
'range' => array(
|
||||
'px' => array(
|
||||
'min' => 20,
|
||||
'max' => 100,
|
||||
),
|
||||
),
|
||||
'selectors' => array(
|
||||
'{{WRAPPER}} .elementskit-image-comparison .twentytwenty-handle' => 'height: {{SIZE}}{{UNIT}};margin-top: calc( {{SIZE}}{{UNIT}} / -2 );',
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
$this->start_controls_tabs( 'ekit_img_comparison_tabs_handle_styles' );
|
||||
|
||||
$this->start_controls_tab(
|
||||
'ekit_img_comparison_tab_handle_normal',
|
||||
array(
|
||||
'label' => esc_html__( 'Normal', 'elementskit-lite' ),
|
||||
)
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Background::get_type(),
|
||||
array(
|
||||
'name' => 'ekit_img_comparison_handle_control_background_group',
|
||||
'selector' => '{{WRAPPER}} .elementskit-image-comparison .twentytwenty-handle',
|
||||
)
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_img_comparison_handle_arrow_color',
|
||||
array(
|
||||
'label' => esc_html__( 'Arrow Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'default' => '#000',
|
||||
'selectors' => array(
|
||||
'{{WRAPPER}} .elementskit-image-comparison .twentytwenty-handle .twentytwenty-left-arrow' => 'border-right-color: {{VALUE}}',
|
||||
'{{WRAPPER}} .elementskit-image-comparison .twentytwenty-handle .twentytwenty-right-arrow' => 'border-left-color: {{VALUE}}',
|
||||
),
|
||||
'condition' => [
|
||||
'ekit_img_comparison_container_style' => 'horizontal'
|
||||
]
|
||||
)
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_img_comparison_handle_arrow_color_vertical',
|
||||
array(
|
||||
'label' => esc_html__( 'Arrow Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'default' => '#000',
|
||||
'selectors' => array(
|
||||
'{{WRAPPER}} .elementskit-image-comparison .twentytwenty-handle .twentytwenty-up-arrow' => 'border-bottom-color: {{VALUE}}',
|
||||
'{{WRAPPER}} .elementskit-image-comparison .twentytwenty-handle .twentytwenty-down-arrow' => 'border-top-color: {{VALUE}}',
|
||||
),
|
||||
'condition' => [
|
||||
'ekit_img_comparison_container_style' => 'vertical'
|
||||
]
|
||||
)
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Box_Shadow::get_type(),
|
||||
array(
|
||||
'name' => 'ekit_img_comparison_handle_control_box_shadow_group',
|
||||
'selector' => '{{WRAPPER}} .elementskit-image-comparison .twentytwenty-handle',
|
||||
)
|
||||
);
|
||||
|
||||
$this->end_controls_tab();
|
||||
|
||||
$this->start_controls_tab(
|
||||
'ekit_img_comparison_tab_handle_hover',
|
||||
array(
|
||||
'label' => esc_html__( 'Hover', 'elementskit-lite' ),
|
||||
)
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Background::get_type(),
|
||||
array(
|
||||
'name' => 'ekit_img_comparison_handle_control_background_hover_group',
|
||||
'selector' => '{{WRAPPER}} .elementskit-image-comparison:hover .twentytwenty-handle',
|
||||
)
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_img_comparison_handle_arrow_color_hover',
|
||||
array(
|
||||
'label' => esc_html__( 'Arrow Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
|
||||
'selectors' => array(
|
||||
'{{WRAPPER}} .elementskit-image-comparison:hover .twentytwenty-handle .twentytwenty-left-arrow' => 'border-right-color: {{VALUE}}',
|
||||
'{{WRAPPER}} .elementskit-image-comparison:hover .twentytwenty-handle .twentytwenty-right-arrow' => 'border-left-color: {{VALUE}}',
|
||||
),
|
||||
'condition' => [
|
||||
'ekit_img_comparison_container_style' => 'horizontal'
|
||||
]
|
||||
)
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_img_comparison_handle_arrow_color_hover_vertical',
|
||||
array(
|
||||
'label' => esc_html__( 'Arrow Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
|
||||
'selectors' => array(
|
||||
'{{WRAPPER}} .elementskit-image-comparison:hover .twentytwenty-handle .twentytwenty-up-arrow' => 'border-bottom-color: {{VALUE}}',
|
||||
'{{WRAPPER}} .elementskit-image-comparison:hover .twentytwenty-handle .twentytwenty-down-arrow' => 'border-top-color: {{VALUE}}',
|
||||
),
|
||||
'condition' => [
|
||||
'ekit_img_comparison_container_style' => 'vertical'
|
||||
]
|
||||
)
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Box_Shadow::get_type(),
|
||||
array(
|
||||
'name' => 'ekit_img_comparison_handle_control_box_shadow_hover_group',
|
||||
'selector' => '{{WRAPPER}} .elementskit-image-comparison:hover .twentytwenty-handle',
|
||||
)
|
||||
);
|
||||
|
||||
$this->end_controls_tab();
|
||||
|
||||
$this->end_controls_tabs();
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_img_comparison_handle_divider_margin',
|
||||
array(
|
||||
'label' => esc_html__( 'Margin', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => array( 'px', '%' ),
|
||||
'selectors' => array(
|
||||
'{{WRAPPER}} .elementskit-image-comparison .twentytwenty-handle' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
),
|
||||
'separator' => 'before',
|
||||
)
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_img_comparison_handle_divider_radius',
|
||||
array(
|
||||
'label' => esc_html__( 'Border Radius', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => array( 'px', '%' ),
|
||||
'selectors' => array(
|
||||
'{{WRAPPER}} .elementskit-image-comparison .twentytwenty-handle' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'ekit_img_comparison_heading_handle_divider_style',
|
||||
array(
|
||||
'label' => esc_html__( 'Handle Divider', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::HEADING,
|
||||
'separator' => 'before',
|
||||
)
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_img_comparison_handle_divider_width',
|
||||
array(
|
||||
'label' => esc_html__( 'Divider Thickness', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => array( 'px' ),
|
||||
'range' => array(
|
||||
'px' => array(
|
||||
'min' => 1,
|
||||
'max' => 10,
|
||||
),
|
||||
),
|
||||
'selectors' => array(
|
||||
'{{WRAPPER}} .twentytwenty-horizontal .twentytwenty-handle:before, {{WRAPPER}} .twentytwenty-horizontal .twentytwenty-handle:after' => 'width: {{SIZE}}{{UNIT}};',
|
||||
'{{WRAPPER}} .twentytwenty-vertical .twentytwenty-handle:before, {{WRAPPER}} .twentytwenty-vertical .twentytwenty-handle:after' => 'height: {{SIZE}}{{UNIT}};',
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'ekit_img_comparison_handle_divider_color',
|
||||
array(
|
||||
'label' => esc_html__( 'Divider Color', 'elementskit-lite' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => array(
|
||||
'{{WRAPPER}} .elementskit-image-comparison .twentytwenty-handle:before, {{WRAPPER}} .elementskit-image-comparison .twentytwenty-handle:after' => 'background-color: {{VALUE}};',
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
$this->insert_pro_message();
|
||||
}
|
||||
|
||||
protected function render( ) {
|
||||
echo '<div class="ekit-wid-con" >';
|
||||
$this->render_raw();
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
protected function render_raw( ) {
|
||||
$settings = $this->get_settings_for_display();
|
||||
|
||||
if($settings['ekit_img_comparison_container_style'] == 'vertical') :
|
||||
$this->add_render_attribute( 'image_comparison_wrapper', 'class', 'elementskit-image-comparison image-comparison-container-vertical');
|
||||
else :
|
||||
$this->add_render_attribute( 'image_comparison_wrapper', 'class', 'elementskit-image-comparison image-comparison-container');
|
||||
endif;
|
||||
|
||||
$label_after = \ElementsKit_Lite\Utils::remove_special_chars($settings['ekit_img_comparison_label_after']);
|
||||
$label_before = \ElementsKit_Lite\Utils::remove_special_chars($settings['ekit_img_comparison_label_before']);
|
||||
|
||||
$this->add_render_attribute(
|
||||
'image_comparison_wrapper',
|
||||
[
|
||||
'data-offset' => esc_attr($settings['ekit_img_comparison_offset']['size'] / 100),
|
||||
'data-overlay' => esc_attr($settings['ekit_img_comparison_overlay']),
|
||||
'data-label_after' => esc_attr($label_after),
|
||||
'data-label_before' => esc_attr($label_before),
|
||||
'data-move_slider_on_hover' => esc_attr($settings['ekit_img_comparison_move_slider_on_hover']),
|
||||
'data-click_to_move' => esc_attr($settings['ekit_img_comparison_click_to_move']),
|
||||
]
|
||||
);
|
||||
|
||||
$image_html = '';
|
||||
if ( ! empty( $settings['ekit_img_comparison_image_before']['url'] ) ) {
|
||||
$image_html .= Group_Control_Image_Size::get_attachment_image_html( $settings, 'thumbnail', 'ekit_img_comparison_image_before' );
|
||||
}
|
||||
|
||||
$image_before_html = '';
|
||||
if ( ! empty( $settings['ekit_img_comparison_image_after']['url'] ) ) {
|
||||
$image_html .= Group_Control_Image_Size::get_attachment_image_html( $settings, 'thumbnail', 'ekit_img_comparison_image_after' );
|
||||
}
|
||||
?>
|
||||
|
||||
<div <?php $this->print_render_attribute_string( 'image_comparison_wrapper' ); ?>>
|
||||
<?php echo wp_kses($image_html, \ElementsKit_Lite\Utils::get_kses_array()); ?>
|
||||
</div>
|
||||
|
||||
<?php }
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
.odometer.odometer-auto-theme,.odometer.odometer-theme-default{display:inline-block;vertical-align:middle;position:relative}.odometer.odometer-auto-theme .odometer-digit,.odometer.odometer-theme-default .odometer-digit{display:inline-block;vertical-align:middle;position:relative}.odometer.odometer-auto-theme .odometer-digit .odometer-digit-spacer,.odometer.odometer-theme-default .odometer-digit .odometer-digit-spacer{display:inline-block;vertical-align:middle;visibility:hidden}.odometer.odometer-auto-theme .odometer-digit .odometer-digit-inner,.odometer.odometer-theme-default .odometer-digit .odometer-digit-inner{text-align:left;display:block;position:absolute;top:0;left:0;right:0;bottom:0;overflow:hidden}.odometer.odometer-auto-theme .odometer-digit .odometer-ribbon,.odometer.odometer-theme-default .odometer-digit .odometer-ribbon{display:block}.odometer.odometer-auto-theme .odometer-digit .odometer-ribbon-inner,.odometer.odometer-theme-default .odometer-digit .odometer-ribbon-inner{display:block;-webkit-backface-visibility:hidden}.odometer.odometer-auto-theme .odometer-digit .odometer-value,.odometer.odometer-theme-default .odometer-digit .odometer-value{display:block;-webkit-transform:translateZ(0)}.odometer.odometer-auto-theme .odometer-digit .odometer-value.odometer-last-value,.odometer.odometer-theme-default .odometer-digit .odometer-value.odometer-last-value{position:absolute}.odometer.odometer-auto-theme.odometer-animating-up .odometer-ribbon-inner,.odometer.odometer-theme-default.odometer-animating-up .odometer-ribbon-inner{-webkit-transition:-webkit-transform 2s;transition:-webkit-transform 2s;transition:transform 2s;transition:transform 2s,-webkit-transform 2s}.odometer.odometer-auto-theme.odometer-animating-up.odometer-animating .odometer-ribbon-inner,.odometer.odometer-theme-default.odometer-animating-up.odometer-animating .odometer-ribbon-inner{-webkit-transform:translateY(-100%);transform:translateY(-100%)}.odometer.odometer-auto-theme.odometer-animating-down .odometer-ribbon-inner,.odometer.odometer-theme-default.odometer-animating-down .odometer-ribbon-inner{-webkit-transform:translateY(-100%);transform:translateY(-100%)}.odometer.odometer-auto-theme.odometer-animating-down.odometer-animating .odometer-ribbon-inner,.odometer.odometer-theme-default.odometer-animating-down.odometer-animating .odometer-ribbon-inner{-webkit-transition:-webkit-transform 2s;transition:-webkit-transform 2s;transition:transform 2s;transition:transform 2s,-webkit-transform 2s;-webkit-transform:translateY(0);transform:translateY(0)}.odometer.odometer-auto-theme,.odometer.odometer-theme-default{font-family:"Helvetica Neue",sans-serif;line-height:1.1em}.odometer.odometer-auto-theme .odometer-value,.odometer.odometer-theme-default .odometer-value{text-align:center}
|
||||
|
After Width: | Height: | Size: 434 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 201 B |
|
After Width: | Height: | Size: 190 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g transform="translate(-0.005)"><path d="M24,.748,23.258,0,12,11.252.753,0,0,.748,11.257,12,0,23.252.753,24,12,12.747,23.258,24,24,23.252,12.753,12Z" fill="#fff"/></g></svg>
|
||||
|
After Width: | Height: | Size: 257 B |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 99 KiB |
|
After Width: | Height: | Size: 160 B |
|
After Width: | Height: | Size: 148 B |
|
After Width: | Height: | Size: 158 B |
|
After Width: | Height: | Size: 146 B |
@@ -0,0 +1 @@
|
||||
function animateCircle({percentage:e=100,onScroll:t=!1,speed:i=1,element:n,size:o=50,backgroundClr:r="white",color:l="blue",strokeWidth:a=5}){let c=Math.ceil(document.body.scrollHeight-window.innerHeight);if(!n)return void console.error("Invalid element:",n);let d=n,h=d.getContext("2d"),s=2*o+a,g=s,m=s/2,u=g/2;d.width=s,d.height=g;let k=()=>{let n=t?Math.floor(window.pageYOffset/c*100):e>100?100:e+i;h.clearRect(0,0,s,g),h.beginPath(),h.lineWidth=a,h.arc(m,u,o,0,2*Math.PI),h.strokeStyle=r,h.stroke(),(e=>{h.beginPath(),h.lineWidth=a,h.strokeStyle=l,h.arc(m,u,o,0,2*Math.PI*e/100),h.stroke()})(n),(!t||n<e)&&requestAnimationFrame(k)};t?document.addEventListener("scroll",k):k()}
|
||||