Done !
| Server IP : 46.105.57.169 / Your IP : 216.73.216.67 Web Server : Apache System : Linux webm002.cluster120.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : verseaumee ( 152031) PHP Version : 8.5.7 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/verseaumee/123click/assets/ |
Upload File : |
modules/role-manager/module.php 0000644 00000004700 15075500430 0012563 0 ustar 00 <?php
namespace ElementorPro\Modules\RoleManager;
use ElementorPro\Plugin;
use ElementorPro\Base\Module_Base;
use Elementor\Core\RoleManager\Role_Manager as RoleManagerBase;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
class Module extends Module_Base {
const ROLE_MANAGER_OPTION_NAME = 'role-manager';
public function get_role_manager_options() {
return get_option( 'elementor_' . self::ROLE_MANAGER_OPTION_NAME, [] );
}
public function get_name() {
return 'role-manager';
}
public function save_advanced_options( $input ) {
return $input;
}
public function get_user_restrictions() {
return $this->get_role_manager_options();
}
public function display_role_controls( $role_slug, $role_data ) {
static $options = false;
if ( ! $options ) {
$options = [
'excluded_options' => Plugin::elementor()->role_manager->get_role_manager_options(),
'advanced_options' => $this->get_role_manager_options(),
];
}
$id = self::ROLE_MANAGER_OPTION_NAME . '_' . $role_slug . '_design';
$name = 'elementor_' . self::ROLE_MANAGER_OPTION_NAME . '[' . $role_slug . '][]';
$checked = isset( $options['advanced_options'][ $role_slug ] ) ? $options['advanced_options'][ $role_slug ] : [];
?>
<label for="<?php echo esc_attr( $id ); ?>">
<input type="checkbox" name="<?php echo esc_attr( $name ); ?>" id="<?php echo esc_attr( $id ); ?>" value="design" <?php checked( in_array( 'design', $checked ), true ); ?>>
<?php esc_html_e( 'Access to edit content only', 'elementor-pro' ); ?>
</label>
<?php
}
public function register_admin_fields( RoleManagerBase $role_manager ) {
$role_manager->add_section( 'general', 'advanced-role-manager', [
'fields' => [
self::ROLE_MANAGER_OPTION_NAME => [
'field_args' => [
'type' => 'raw_html',
'html' => '',
],
'setting_args' => [
'sanitize_callback' => [ $this, 'save_advanced_options' ],
],
],
],
] );
}
public function __construct() {
parent::__construct();
if ( is_admin() ) {
add_action( 'elementor/admin/after_create_settings/' . RoleManagerBase::PAGE_ID, [ $this, 'register_admin_fields' ], 100 );
}
remove_action( 'elementor/role/restrictions/controls', [ Plugin::elementor()->role_manager, 'get_go_pro_link_html' ] );
add_action( 'elementor/role/restrictions/controls', [ $this, 'display_role_controls' ], 10, 2 );
add_filter( 'elementor/editor/user/restrictions', [ $this, 'get_user_restrictions' ] );
}
}
modules/scroll-snap/module.php 0000644 00000007714 15075500430 0012457 0 ustar 00 <?php
namespace ElementorPro\Modules\ScrollSnap;
use Elementor\Core\DocumentTypes\PageBase;
use Elementor\Controls_Manager;
use ElementorPro\Base\Module_Base;
use Elementor\Controls_Stack;
use Elementor\Core\Experiments\Manager;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
class Module extends Module_Base {
public function __construct() {
parent::__construct();
$this->add_actions();
}
public function get_name() {
return 'scroll-snap';
}
public static function get_experimental_data() {
return [
'name' => 'e_scroll_snap',
'title' => esc_html__( 'Scroll Snap', 'elementor-pro' ),
'description' => esc_html__( 'Customize how visitors scroll through your site. Scroll Snap makes the viewport stop or pause on a specific position of a section when scrolling ends.', 'elementor-pro' )
. ' <a href="https://go.elementor.com/wp-dash-scroll-snap" target="_blank">'
. esc_html__( 'Learn More', 'elementor-pro' ) . '</a>',
'release_status' => Manager::RELEASE_STATUS_BETA,
'new_site' => [
'default_active' => true,
'minimum_installation_version' => '3.5.0-beta',
],
];
}
public function register_controls( Controls_Stack $controls_stack, $section_id ) {
if ( ! $controls_stack instanceof PageBase || 'section_custom_css_pro' !== $section_id ) {
return;
}
$scroll_snap_children = '.elementor-section:not(.elementor-inner-section), .elementor-location-header, .elementor-location-footer, .page-header, .site-header, .elementor-add-section';
$controls_stack->start_controls_section(
'section_scroll_snap',
[
'label' => esc_html__( 'Scroll Snap', 'elementor-pro' ),
'tab' => Controls_Manager::TAB_ADVANCED,
]
);
$controls_stack->add_control(
'scroll_snap',
[
'label' => esc_html__( 'Scroll Snap', 'elementor-pro' ),
'type' => Controls_Manager::SWITCHER,
'label_on' => esc_html__( 'On', 'elementor-pro' ),
'label_off' => esc_html__( 'Off', 'elementor-pro' ),
'description' => esc_html__( 'Scroll Snap makes the viewport stop on a specific position of a section when scrolling ends.', 'elementor-pro' ),
'selectors' => [
'html' => 'height: 100vh; margin: 0; overflow: hidden;',
'body' => 'height: 100vh; overflow: auto; scroll-snap-type: y mandatory;',
],
'frontend_available' => true,
]
);
$controls_stack->add_responsive_control(
'scroll_snap_position',
[
'label' => esc_html__( 'Snap Position', 'elementor-pro' ),
'type' => Controls_Manager::SELECT,
'options' => [
'' => esc_html__( 'Top', 'elementor-pro' ),
'center' => esc_html__( 'Center', 'elementor-pro' ),
'end' => esc_html__( 'Bottom', 'elementor-pro' ),
],
'selectors_dictionary' => [
'' => 'start',
],
'condition' => [
'scroll_snap!' => '',
],
'selectors' => [
$scroll_snap_children => 'scroll-snap-align: {{VALUE}}',
],
]
);
$controls_stack->add_responsive_control(
'scroll_snap_padding',
[
'label' => esc_html__( 'Scroll Padding', 'elementor-pro' ),
'type' => Controls_Manager::SLIDER,
'range' => [
'px' => [
'min' => 0,
'max' => 200,
],
],
'condition' => [
'scroll_snap!' => '',
],
'selectors' => [
'body' => 'scroll-padding: {{SIZE}}{{UNIT}}',
],
]
);
$controls_stack->add_responsive_control(
'force_stop',
[
'label' => esc_html__( 'Scroll Snap Stop', 'elementor-pro' ),
'type' => Controls_Manager::SELECT,
'options' => [
'' => esc_html__( 'Normal', 'elementor-pro' ),
'always' => esc_html__( 'Always', 'elementor-pro' ),
],
'selectors_dictionary' => [
'' => 'normal',
],
'condition' => [
'scroll_snap!' => '',
],
'selectors' => [
$scroll_snap_children => 'scroll-snap-stop: {{VALUE}}',
],
]
);
$controls_stack->end_controls_section();
}
private function add_actions() {
add_action( 'elementor/element/after_section_end', [ $this, 'register_controls' ], 10, 2 );
}
}
modules/flip-box/widgets/flip-box.php 0000644 00000120432 15075500430 0013634 0 ustar 00 <?php
namespace ElementorPro\Modules\FlipBox\Widgets;
use Elementor\Controls_Manager;
use Elementor\Core\Kits\Documents\Tabs\Global_Typography;
use Elementor\Group_Control_Background;
use Elementor\Group_Control_Css_Filter;
use Elementor\Group_Control_Border;
use Elementor\Group_Control_Image_Size;
use Elementor\Group_Control_Typography;
use Elementor\Icons_Manager;
use Elementor\Utils;
use ElementorPro\Base\Base_Widget;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
class Flip_Box extends Base_Widget {
public function get_name() {
return 'flip-box';
}
public function get_title() {
return esc_html__( 'Flip Box', 'elementor-pro' );
}
public function get_icon() {
return 'eicon-flip-box';
}
protected function register_controls() {
$this->start_controls_section(
'section_side_a_content',
[
'label' => esc_html__( 'Front', 'elementor-pro' ),
]
);
$this->start_controls_tabs( 'side_a_content_tabs' );
$this->start_controls_tab( 'side_a_content_tab', [ 'label' => esc_html__( 'Content', 'elementor-pro' ) ] );
$this->add_control(
'graphic_element',
[
'label' => esc_html__( 'Graphic Element', 'elementor-pro' ),
'type' => Controls_Manager::CHOOSE,
'options' => [
'none' => [
'title' => esc_html__( 'None', 'elementor-pro' ),
'icon' => 'eicon-ban',
],
'image' => [
'title' => esc_html__( 'Image', 'elementor-pro' ),
'icon' => 'fa fa-picture-o',
],
'icon' => [
'title' => esc_html__( 'Icon', 'elementor-pro' ),
'icon' => 'eicon-star',
],
],
'default' => 'icon',
]
);
$this->add_control(
'image',
[
'label' => esc_html__( 'Choose Image', 'elementor-pro' ),
'type' => Controls_Manager::MEDIA,
'default' => [
'url' => Utils::get_placeholder_image_src(),
],
'dynamic' => [
'active' => true,
],
'condition' => [
'graphic_element' => 'image',
],
]
);
$this->add_group_control(
Group_Control_Image_Size::get_type(),
[
'name' => 'image', // Actually its `image_size`
'default' => 'thumbnail',
'condition' => [
'graphic_element' => 'image',
],
]
);
$this->add_control(
'selected_icon',
[
'label' => esc_html__( 'Icon', 'elementor-pro' ),
'type' => Controls_Manager::ICONS,
'fa4compatibility' => 'icon',
'default' => [
'value' => 'fas fa-star',
'library' => 'fa-solid',
],
'condition' => [
'graphic_element' => 'icon',
],
]
);
$this->add_control(
'icon_view',
[
'label' => esc_html__( 'View', 'elementor-pro' ),
'type' => Controls_Manager::SELECT,
'options' => [
'default' => esc_html__( 'Default', 'elementor-pro' ),
'stacked' => esc_html__( 'Stacked', 'elementor-pro' ),
'framed' => esc_html__( 'Framed', 'elementor-pro' ),
],
'default' => 'default',
'condition' => [
'graphic_element' => 'icon',
],
]
);
$this->add_control(
'icon_shape',
[
'label' => esc_html__( 'Shape', 'elementor-pro' ),
'type' => Controls_Manager::SELECT,
'options' => [
'circle' => esc_html__( 'Circle', 'elementor-pro' ),
'square' => esc_html__( 'Square', 'elementor-pro' ),
],
'default' => 'circle',
'condition' => [
'icon_view!' => 'default',
'graphic_element' => 'icon',
],
]
);
$this->add_control(
'title_text_a',
[
'label' => esc_html__( 'Title & Description', 'elementor-pro' ),
'type' => Controls_Manager::TEXT,
'default' => esc_html__( 'This is the heading', 'elementor-pro' ),
'placeholder' => esc_html__( 'Enter your title', 'elementor-pro' ),
'dynamic' => [
'active' => true,
],
'label_block' => true,
'separator' => 'before',
]
);
$this->add_control(
'description_text_a',
[
'label' => esc_html__( 'Description', 'elementor-pro' ),
'type' => Controls_Manager::TEXTAREA,
'default' => esc_html__( 'Lorem ipsum dolor sit amet consectetur adipiscing elit dolor', 'elementor-pro' ),
'placeholder' => esc_html__( 'Enter your description', 'elementor-pro' ),
'separator' => 'none',
'dynamic' => [
'active' => true,
],
'rows' => 10,
'show_label' => false,
]
);
$this->end_controls_tab();
$this->start_controls_tab( 'side_a_background_tab', [ 'label' => esc_html__( 'Background', 'elementor-pro' ) ] );
$this->add_group_control(
Group_Control_Background::get_type(),
[
'name' => 'background_a',
'types' => [ 'classic', 'gradient' ],
'selector' => '{{WRAPPER}} .elementor-flip-box__front',
]
);
$this->add_control(
'background_overlay_a',
[
'label' => esc_html__( 'Background Overlay', 'elementor-pro' ),
'type' => Controls_Manager::COLOR,
'default' => '',
'selectors' => [
'{{WRAPPER}} .elementor-flip-box__front .elementor-flip-box__layer__overlay' => 'background-color: {{VALUE}};',
],
'separator' => 'before',
'condition' => [
'background_a_image[id]!' => '',
],
]
);
$this->add_group_control(
Group_Control_Css_Filter::get_type(),
[
'name' => 'background_overlay_a_filters',
'selector' => '{{WRAPPER}} .elementor-flip-box__front .elementor-flip-box__layer__overlay',
'condition' => [
'background_overlay_a!' => '',
],
]
);
$this->add_control(
'background_overlay_a_blend_mode',
[
'label' => esc_html__( 'Blend Mode', 'elementor-pro' ),
'type' => Controls_Manager::SELECT,
'options' => [
'' => esc_html__( 'Normal', 'elementor-pro' ),
'multiply' => 'Multiply',
'screen' => 'Screen',
'overlay' => 'Overlay',
'darken' => 'Darken',
'lighten' => 'Lighten',
'color-dodge' => 'Color Dodge',
'color-burn' => 'Color Burn',
'hue' => 'Hue',
'saturation' => 'Saturation',
'color' => 'Color',
'exclusion' => 'Exclusion',
'luminosity' => 'Luminosity',
],
'selectors' => [
'{{WRAPPER}} .elementor-flip-box__front .elementor-flip-box__layer__overlay' => 'mix-blend-mode: {{VALUE}}',
],
'condition' => [
'background_overlay_a!' => '',
],
]
);
$this->end_controls_tab();
$this->end_controls_tabs();
$this->end_controls_section();
$this->start_controls_section(
'section_side_b_content',
[
'label' => esc_html__( 'Back', 'elementor-pro' ),
]
);
$this->start_controls_tabs( 'side_b_content_tabs' );
$this->start_controls_tab( 'side_b_content_tab', [ 'label' => esc_html__( 'Content', 'elementor-pro' ) ] );
$this->add_control(
'title_text_b',
[
'label' => esc_html__( 'Title & Description', 'elementor-pro' ),
'type' => Controls_Manager::TEXT,
'default' => esc_html__( 'This is the heading', 'elementor-pro' ),
'placeholder' => esc_html__( 'Enter your title', 'elementor-pro' ),
'dynamic' => [
'active' => true,
],
'label_block' => true,
]
);
$this->add_control(
'description_text_b',
[
'label' => esc_html__( 'Description', 'elementor-pro' ),
'type' => Controls_Manager::TEXTAREA,
'default' => esc_html__( 'Lorem ipsum dolor sit amet consectetur adipiscing elit dolor', 'elementor-pro' ),
'placeholder' => esc_html__( 'Enter your description', 'elementor-pro' ),
'separator' => 'none',
'dynamic' => [
'active' => true,
],
'rows' => 10,
'show_label' => false,
]
);
$this->add_control(
'button_text',
[
'label' => esc_html__( 'Button Text', 'elementor-pro' ),
'type' => Controls_Manager::TEXT,
'default' => esc_html__( 'Click Here', 'elementor-pro' ),
'dynamic' => [
'active' => true,
],
'separator' => 'before',
]
);
$this->add_control(
'link',
[
'label' => esc_html__( 'Link', 'elementor-pro' ),
'type' => Controls_Manager::URL,
'dynamic' => [
'active' => true,
],
'placeholder' => esc_html__( 'https://your-link.com', 'elementor-pro' ),
]
);
$this->add_control(
'link_click',
[
'label' => esc_html__( 'Apply Link On', 'elementor-pro' ),
'type' => Controls_Manager::SELECT,
'options' => [
'box' => esc_html__( 'Whole Box', 'elementor-pro' ),
'button' => esc_html__( 'Button Only', 'elementor-pro' ),
],
'default' => 'button',
'condition' => [
'link[url]!' => '',
],
]
);
$this->end_controls_tab();
$this->start_controls_tab( 'side_b_background_tab', [ 'label' => esc_html__( 'Background', 'elementor-pro' ) ] );
$this->add_group_control(
Group_Control_Background::get_type(),
[
'name' => 'background_b',
'types' => [ 'classic', 'gradient' ],
'selector' => '{{WRAPPER}} .elementor-flip-box__back',
]
);
$this->add_control(
'background_overlay_b',
[
'label' => esc_html__( 'Background Overlay', 'elementor-pro' ),
'type' => Controls_Manager::COLOR,
'default' => '',
'selectors' => [
'{{WRAPPER}} .elementor-flip-box__back .elementor-flip-box__layer__overlay' => 'background-color: {{VALUE}};',
],
'separator' => 'before',
'condition' => [
'background_b_image[id]!' => '',
],
]
);
$this->add_group_control(
Group_Control_Css_Filter::get_type(),
[
'name' => 'background_overlay_b_filters',
'selector' => '{{WRAPPER}} .elementor-flip-box__back .elementor-flip-box__layer__overlay',
'condition' => [
'background_overlay_b!' => '',
],
]
);
$this->add_control(
'background_overlay_b_blend_mode',
[
'label' => esc_html__( 'Blend Mode', 'elementor-pro' ),
'type' => Controls_Manager::SELECT,
'options' => [
'' => esc_html__( 'Normal', 'elementor-pro' ),
'multiply' => 'Multiply',
'screen' => 'Screen',
'overlay' => 'Overlay',
'darken' => 'Darken',
'lighten' => 'Lighten',
'color-dodge' => 'Color Dodge',
'color-burn' => 'Color Burn',
'hue' => 'Hue',
'saturation' => 'Saturation',
'color' => 'Color',
'exclusion' => 'Exclusion',
'luminosity' => 'Luminosity',
],
'selectors' => [
'{{WRAPPER}} .elementor-flip-box__back .elementor-flip-box__layer__overlay' => 'mix-blend-mode: {{VALUE}}',
],
'condition' => [
'background_overlay_b!' => '',
],
]
);
$this->end_controls_tab();
$this->end_controls_tabs();
$this->end_controls_section();
$this->start_controls_section(
'section_box_settings',
[
'label' => esc_html__( 'Settings', 'elementor-pro' ),
]
);
$this->add_responsive_control(
'height',
[
'label' => esc_html__( 'Height', 'elementor-pro' ),
'type' => Controls_Manager::SLIDER,
'range' => [
'px' => [
'min' => 100,
'max' => 1000,
],
'vh' => [
'min' => 10,
'max' => 100,
],
],
'size_units' => [ 'px', 'vh' ],
'selectors' => [
'{{WRAPPER}} .elementor-flip-box' => 'height: {{SIZE}}{{UNIT}};',
],
]
);
$this->add_control(
'border_radius',
[
'label' => esc_html__( 'Border Radius', 'elementor-pro' ),
'type' => Controls_Manager::SLIDER,
'size_units' => [ 'px', '%' ],
'range' => [
'px' => [
'min' => 0,
'max' => 200,
],
],
'separator' => 'after',
'selectors' => [
'{{WRAPPER}} .elementor-flip-box__layer, {{WRAPPER}} .elementor-flip-box__layer__overlay' => 'border-radius: {{SIZE}}{{UNIT}}',
],
]
);
$this->add_control(
'flip_effect',
[
'label' => esc_html__( 'Flip Effect', 'elementor-pro' ),
'type' => Controls_Manager::SELECT,
'default' => 'flip',
'options' => [
'flip' => 'Flip',
'slide' => 'Slide',
'push' => 'Push',
'zoom-in' => 'Zoom In',
'zoom-out' => 'Zoom Out',
'fade' => 'Fade',
],
'prefix_class' => 'elementor-flip-box--effect-',
]
);
$this->add_control(
'flip_direction',
[
'label' => esc_html__( 'Flip Direction', 'elementor-pro' ),
'type' => Controls_Manager::SELECT,
'default' => 'up',
'options' => [
'left' => esc_html__( 'Left', 'elementor-pro' ),
'right' => esc_html__( 'Right', 'elementor-pro' ),
'up' => esc_html__( 'Up', 'elementor-pro' ),
'down' => esc_html__( 'Down', 'elementor-pro' ),
],
'condition' => [
'flip_effect!' => [
'fade',
'zoom-in',
'zoom-out',
],
],
'prefix_class' => 'elementor-flip-box--direction-',
]
);
$this->add_control(
'flip_3d',
[
'label' => esc_html__( '3D Depth', 'elementor-pro' ),
'type' => Controls_Manager::SWITCHER,
'label_on' => esc_html__( 'On', 'elementor-pro' ),
'label_off' => esc_html__( 'Off', 'elementor-pro' ),
'return_value' => 'elementor-flip-box--3d',
'default' => '',
'prefix_class' => '',
'condition' => [
'flip_effect' => 'flip',
],
]
);
$this->end_controls_section();
$this->start_controls_section(
'section_style_a',
[
'label' => esc_html__( 'Front', 'elementor-pro' ),
'tab' => Controls_Manager::TAB_STYLE,
]
);
$this->add_responsive_control(
'padding_a',
[
'label' => esc_html__( 'Padding', 'elementor-pro' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => [ 'px', 'em', '%' ],
'selectors' => [
'{{WRAPPER}} .elementor-flip-box__front .elementor-flip-box__layer__overlay' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
]
);
$this->add_control(
'alignment_a',
[
'label' => esc_html__( 'Alignment', 'elementor-pro' ),
'type' => Controls_Manager::CHOOSE,
'options' => [
'left' => [
'title' => esc_html__( 'Left', 'elementor-pro' ),
'icon' => 'eicon-text-align-left',
],
'center' => [
'title' => esc_html__( 'Center', 'elementor-pro' ),
'icon' => 'eicon-text-align-center',
],
'right' => [
'title' => esc_html__( 'Right', 'elementor-pro' ),
'icon' => 'eicon-text-align-right',
],
],
'default' => 'center',
'selectors' => [
'{{WRAPPER}} .elementor-flip-box__front .elementor-flip-box__layer__overlay' => 'text-align: {{VALUE}}',
],
]
);
$this->add_control(
'vertical_position_a',
[
'label' => esc_html__( 'Vertical Position', 'elementor-pro' ),
'type' => Controls_Manager::CHOOSE,
'options' => [
'top' => [
'title' => esc_html__( 'Top', 'elementor-pro' ),
'icon' => 'eicon-v-align-top',
],
'middle' => [
'title' => esc_html__( 'Middle', 'elementor-pro' ),
'icon' => 'eicon-v-align-middle',
],
'bottom' => [
'title' => esc_html__( 'Bottom', 'elementor-pro' ),
'icon' => 'eicon-v-align-bottom',
],
],
'selectors_dictionary' => [
'top' => 'flex-start',
'middle' => 'center',
'bottom' => 'flex-end',
],
'selectors' => [
'{{WRAPPER}} .elementor-flip-box__front .elementor-flip-box__layer__overlay' => 'justify-content: {{VALUE}}',
],
'separator' => 'after',
]
);
$this->add_group_control(
Group_Control_Border::get_type(),
[
'name' => 'border_a',
'selector' => '{{WRAPPER}} .elementor-flip-box__front',
'separator' => 'before',
]
);
$this->add_control(
'heading_image_style',
[
'type' => Controls_Manager::HEADING,
'label' => esc_html__( 'Image', 'elementor-pro' ),
'condition' => [
'graphic_element' => 'image',
],
'separator' => 'before',
]
);
$this->add_control(
'image_spacing',
[
'label' => esc_html__( 'Spacing', 'elementor-pro' ),
'type' => Controls_Manager::SLIDER,
'range' => [
'px' => [
'min' => 0,
'max' => 100,
],
],
'selectors' => [
'{{WRAPPER}} .elementor-flip-box__image' => 'margin-bottom: {{SIZE}}{{UNIT}};',
],
'condition' => [
'graphic_element' => 'image',
],
]
);
$this->add_control(
'image_width',
[
'label' => esc_html__( 'Size', 'elementor-pro' ) . ' (%)',
'type' => Controls_Manager::SLIDER,
'size_units' => [ '%' ],
'default' => [
'unit' => '%',
],
'range' => [
'%' => [
'min' => 5,
'max' => 100,
],
],
'selectors' => [
'{{WRAPPER}} .elementor-flip-box__image img' => 'width: {{SIZE}}{{UNIT}}',
],
'condition' => [
'graphic_element' => 'image',
],
]
);
$this->add_control(
'image_opacity',
[
'label' => esc_html__( 'Opacity', 'elementor-pro' ),
'type' => Controls_Manager::SLIDER,
'default' => [
'size' => 1,
],
'range' => [
'px' => [
'max' => 1,
'min' => 0.10,
'step' => 0.01,
],
],
'selectors' => [
'{{WRAPPER}} .elementor-flip-box__image' => 'opacity: {{SIZE}};',
],
'condition' => [
'graphic_element' => 'image',
],
]
);
$this->add_group_control(
Group_Control_Border::get_type(),
[
'name' => 'image_border',
'selector' => '{{WRAPPER}} .elementor-flip-box__image img',
'condition' => [
'graphic_element' => 'image',
],
'separator' => 'before',
]
);
$this->add_control(
'image_border_radius',
[
'label' => esc_html__( 'Border Radius', 'elementor-pro' ),
'type' => Controls_Manager::SLIDER,
'range' => [
'px' => [
'min' => 0,
'max' => 200,
],
],
'selectors' => [
'{{WRAPPER}} .elementor-flip-box__image img' => 'border-radius: {{SIZE}}{{UNIT}}',
],
'condition' => [
'graphic_element' => 'image',
],
]
);
$this->add_control(
'heading_icon_style',
[
'type' => Controls_Manager::HEADING,
'label' => esc_html__( 'Icon', 'elementor-pro' ),
'condition' => [
'graphic_element' => 'icon',
],
'separator' => 'before',
]
);
$this->add_control(
'icon_spacing',
[
'label' => esc_html__( 'Spacing', 'elementor-pro' ),
'type' => Controls_Manager::SLIDER,
'range' => [
'px' => [
'min' => 0,
'max' => 100,
],
],
'selectors' => [
'{{WRAPPER}} .elementor-icon-wrapper' => 'margin-bottom: {{SIZE}}{{UNIT}};',
],
'condition' => [
'graphic_element' => 'icon',
],
]
);
$this->add_control(
'icon_primary_color',
[
'label' => esc_html__( 'Primary Color', 'elementor-pro' ),
'type' => Controls_Manager::COLOR,
'default' => '',
'selectors' => [
'{{WRAPPER}} .elementor-view-stacked .elementor-icon' => 'background-color: {{VALUE}}',
'{{WRAPPER}} .elementor-view-stacked .elementor-icon svg' => 'stroke: {{VALUE}}',
'{{WRAPPER}} .elementor-view-framed .elementor-icon, {{WRAPPER}} .elementor-view-default .elementor-icon' => 'color: {{VALUE}}; border-color: {{VALUE}}',
'{{WRAPPER}} .elementor-view-framed .elementor-icon svg, {{WRAPPER}} .elementor-view-default .elementor-icon svg' => 'fill: {{VALUE}}; border-color: {{VALUE}}',
],
'condition' => [
'graphic_element' => 'icon',
],
]
);
$this->add_control(
'icon_secondary_color',
[
'label' => esc_html__( 'Secondary Color', 'elementor-pro' ),
'type' => Controls_Manager::COLOR,
'default' => '',
'condition' => [
'graphic_element' => 'icon',
'icon_view!' => 'default',
],
'selectors' => [
'{{WRAPPER}} .elementor-view-framed .elementor-icon' => 'background-color: {{VALUE}};',
'{{WRAPPER}} .elementor-view-framed .elementor-icon svg' => 'stroke: {{VALUE}};',
'{{WRAPPER}} .elementor-view-stacked .elementor-icon' => 'color: {{VALUE}};',
'{{WRAPPER}} .elementor-view-stacked .elementor-icon svg' => 'fill: {{VALUE}};',
],
]
);
$this->add_control(
'icon_size',
[
'label' => esc_html__( 'Icon Size', 'elementor-pro' ),
'type' => Controls_Manager::SLIDER,
'range' => [
'px' => [
'min' => 6,
'max' => 300,
],
],
'selectors' => [
'{{WRAPPER}} .elementor-icon' => 'font-size: {{SIZE}}{{UNIT}};',
'{{WRAPPER}} .elementor-icon svg' => 'width: {{SIZE}}{{UNIT}};',
],
'condition' => [
'graphic_element' => 'icon',
],
]
);
$this->add_control(
'icon_padding',
[
'label' => esc_html__( 'Icon Padding', 'elementor-pro' ),
'type' => Controls_Manager::SLIDER,
'selectors' => [
'{{WRAPPER}} .elementor-icon' => 'padding: {{SIZE}}{{UNIT}};',
],
'range' => [
'em' => [
'min' => 0,
'max' => 5,
],
],
'condition' => [
'graphic_element' => 'icon',
'icon_view!' => 'default',
],
]
);
$this->add_control(
'icon_rotate',
[
'label' => esc_html__( 'Icon Rotate', 'elementor-pro' ),
'type' => Controls_Manager::SLIDER,
'default' => [
'size' => 0,
'unit' => 'deg',
],
'selectors' => [
'{{WRAPPER}} .elementor-icon i' => 'transform: rotate({{SIZE}}{{UNIT}});',
'{{WRAPPER}} .elementor-icon svg' => 'transform: rotate({{SIZE}}{{UNIT}});',
],
'condition' => [
'graphic_element' => 'icon',
],
]
);
$this->add_control(
'icon_border_width',
[
'label' => esc_html__( 'Border Width', 'elementor-pro' ),
'type' => Controls_Manager::SLIDER,
'selectors' => [
'{{WRAPPER}} .elementor-icon' => 'border-width: {{SIZE}}{{UNIT}}',
],
'condition' => [
'graphic_element' => 'icon',
'icon_view' => 'framed',
],
]
);
$this->add_control(
'icon_border_radius',
[
'label' => esc_html__( 'Border Radius', 'elementor-pro' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => [ 'px', '%' ],
'selectors' => [
'{{WRAPPER}} .elementor-icon' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
'condition' => [
'graphic_element' => 'icon',
'icon_view!' => 'default',
],
]
);
$this->add_control(
'heading_title_style_a',
[
'type' => Controls_Manager::HEADING,
'label' => esc_html__( 'Title', 'elementor-pro' ),
'separator' => 'before',
'condition' => [
'title_text_a!' => '',
],
]
);
$this->add_control(
'title_spacing_a',
[
'label' => esc_html__( 'Spacing', 'elementor-pro' ),
'type' => Controls_Manager::SLIDER,
'range' => [
'px' => [
'min' => 0,
'max' => 100,
],
],
'selectors' => [
'{{WRAPPER}} .elementor-flip-box__front .elementor-flip-box__layer__title' => 'margin-bottom: {{SIZE}}{{UNIT}};',
],
'condition' => [
'description_text_a!' => '',
'title_text_a!' => '',
],
]
);
$this->add_control(
'title_color_a',
[
'label' => esc_html__( 'Text Color', 'elementor-pro' ),
'type' => Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .elementor-flip-box__front .elementor-flip-box__layer__title' => 'color: {{VALUE}}',
],
'condition' => [
'title_text_a!' => '',
],
]
);
$this->add_group_control(
Group_Control_Typography::get_type(),
[
'name' => 'title_typography_a',
'global' => [
'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
],
'selector' => '{{WRAPPER}} .elementor-flip-box__front .elementor-flip-box__layer__title',
'condition' => [
'title_text_a!' => '',
],
]
);
$this->add_control(
'heading_description_style_a',
[
'type' => Controls_Manager::HEADING,
'label' => esc_html__( 'Description', 'elementor-pro' ),
'separator' => 'before',
'condition' => [
'description_text_a!' => '',
],
]
);
$this->add_control(
'description_color_a',
[
'label' => esc_html__( 'Text Color', 'elementor-pro' ),
'type' => Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .elementor-flip-box__front .elementor-flip-box__layer__description' => 'color: {{VALUE}}',
],
'condition' => [
'description_text_a!' => '',
],
]
);
$this->add_group_control(
Group_Control_Typography::get_type(),
[
'name' => 'description_typography_a',
'global' => [
'default' => Global_Typography::TYPOGRAPHY_TEXT,
],
'selector' => '{{WRAPPER}} .elementor-flip-box__front .elementor-flip-box__layer__description',
'condition' => [
'description_text_a!' => '',
],
]
);
$this->end_controls_section();
$this->start_controls_section(
'section_style_b',
[
'label' => esc_html__( 'Back', 'elementor-pro' ),
'tab' => Controls_Manager::TAB_STYLE,
]
);
$this->add_responsive_control(
'padding_b',
[
'label' => esc_html__( 'Padding', 'elementor-pro' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => [ 'px', 'em', '%' ],
'selectors' => [
'{{WRAPPER}} .elementor-flip-box__back .elementor-flip-box__layer__overlay' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
]
);
$this->add_control(
'alignment_b',
[
'label' => esc_html__( 'Alignment', 'elementor-pro' ),
'type' => Controls_Manager::CHOOSE,
'options' => [
'left' => [
'title' => esc_html__( 'Left', 'elementor-pro' ),
'icon' => 'eicon-text-align-left',
],
'center' => [
'title' => esc_html__( 'Center', 'elementor-pro' ),
'icon' => 'eicon-text-align-center',
],
'right' => [
'title' => esc_html__( 'Right', 'elementor-pro' ),
'icon' => 'eicon-text-align-right',
],
],
'default' => 'center',
'selectors' => [
'{{WRAPPER}} .elementor-flip-box__back .elementor-flip-box__layer__overlay' => 'text-align: {{VALUE}}',
'{{WRAPPER}} .elementor-flip-box__button' => 'margin-{{VALUE}}: 0',
],
]
);
$this->add_control(
'vertical_position_b',
[
'label' => esc_html__( 'Vertical Position', 'elementor-pro' ),
'type' => Controls_Manager::CHOOSE,
'options' => [
'top' => [
'title' => esc_html__( 'Top', 'elementor-pro' ),
'icon' => 'eicon-v-align-top',
],
'middle' => [
'title' => esc_html__( 'Middle', 'elementor-pro' ),
'icon' => 'eicon-v-align-middle',
],
'bottom' => [
'title' => esc_html__( 'Bottom', 'elementor-pro' ),
'icon' => 'eicon-v-align-bottom',
],
],
'selectors_dictionary' => [
'top' => 'flex-start',
'middle' => 'center',
'bottom' => 'flex-end',
],
'selectors' => [
'{{WRAPPER}} .elementor-flip-box__back .elementor-flip-box__layer__overlay' => 'justify-content: {{VALUE}}',
],
'separator' => 'after',
]
);
$this->add_group_control(
Group_Control_Border::get_type(),
[
'name' => 'border_b',
'selector' => '{{WRAPPER}} .elementor-flip-box__back',
'separator' => 'before',
]
);
$this->add_control(
'heading_title_style_b',
[
'type' => Controls_Manager::HEADING,
'label' => esc_html__( 'Title', 'elementor-pro' ),
'separator' => 'before',
'condition' => [
'title_text_b!' => '',
],
]
);
$this->add_control(
'title_spacing_b',
[
'label' => esc_html__( 'Spacing', 'elementor-pro' ),
'type' => Controls_Manager::SLIDER,
'range' => [
'px' => [
'min' => 0,
'max' => 100,
],
],
'selectors' => [
'{{WRAPPER}} .elementor-flip-box__back .elementor-flip-box__layer__title' => 'margin-bottom: {{SIZE}}{{UNIT}};',
],
'condition' => [
'title_text_b!' => '',
],
]
);
$this->add_control(
'title_color_b',
[
'label' => esc_html__( 'Text Color', 'elementor-pro' ),
'type' => Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .elementor-flip-box__back .elementor-flip-box__layer__title' => 'color: {{VALUE}}',
],
'condition' => [
'title_text_b!' => '',
],
]
);
$this->add_group_control(
Group_Control_Typography::get_type(),
[
'name' => 'title_typography_b',
'global' => [
'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
],
'selector' => '{{WRAPPER}} .elementor-flip-box__back .elementor-flip-box__layer__title',
'condition' => [
'title_text_b!' => '',
],
]
);
$this->add_control(
'heading_description_style_b',
[
'type' => Controls_Manager::HEADING,
'label' => esc_html__( 'Description', 'elementor-pro' ),
'separator' => 'before',
'condition' => [
'description_text_b!' => '',
],
]
);
$this->add_control(
'description_spacing_b',
[
'label' => esc_html__( 'Spacing', 'elementor-pro' ),
'type' => Controls_Manager::SLIDER,
'range' => [
'px' => [
'min' => 0,
'max' => 100,
],
],
'selectors' => [
'{{WRAPPER}} .elementor-flip-box__back .elementor-flip-box__layer__description' => 'margin-bottom: {{SIZE}}{{UNIT}};',
],
'condition' => [
'description_text_b!' => '',
'button_text!' => '',
],
]
);
$this->add_control(
'description_color_b',
[
'label' => esc_html__( 'Text Color', 'elementor-pro' ),
'type' => Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .elementor-flip-box__back .elementor-flip-box__layer__description' => 'color: {{VALUE}}',
],
'condition' => [
'description_text_b!' => '',
],
]
);
$this->add_group_control(
Group_Control_Typography::get_type(),
[
'name' => 'description_typography_b',
'global' => [
'default' => Global_Typography::TYPOGRAPHY_TEXT,
],
'selector' => '{{WRAPPER}} .elementor-flip-box__back .elementor-flip-box__layer__description',
'condition' => [
'description_text_b!' => '',
],
]
);
$this->add_control(
'heading_button',
[
'type' => Controls_Manager::HEADING,
'label' => esc_html__( 'Button', 'elementor-pro' ),
'separator' => 'before',
'condition' => [
'button_text!' => '',
],
]
);
$this->add_control(
'button_size',
[
'label' => esc_html__( 'Size', 'elementor-pro' ),
'type' => Controls_Manager::SELECT,
'default' => 'sm',
'options' => [
'xs' => esc_html__( 'Extra Small', 'elementor-pro' ),
'sm' => esc_html__( 'Small', 'elementor-pro' ),
'md' => esc_html__( 'Medium', 'elementor-pro' ),
'lg' => esc_html__( 'Large', 'elementor-pro' ),
'xl' => esc_html__( 'Extra Large', 'elementor-pro' ),
],
'condition' => [
'button_text!' => '',
],
]
);
$this->add_group_control(
Group_Control_Typography::get_type(),
[
'name' => 'button_typography',
'selector' => '{{WRAPPER}} .elementor-flip-box__button',
'global' => [
'default' => Global_Typography::TYPOGRAPHY_ACCENT,
],
'condition' => [
'button_text!' => '',
],
]
);
$this->start_controls_tabs( 'button_tabs' );
$this->start_controls_tab( 'normal',
[
'label' => esc_html__( 'Normal', 'elementor-pro' ),
'condition' => [
'button_text!' => '',
],
]
);
$this->add_control(
'button_text_color',
[
'label' => esc_html__( 'Text Color', 'elementor-pro' ),
'type' => Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .elementor-flip-box__button' => 'color: {{VALUE}};',
],
]
);
$this->add_group_control(
Group_Control_Background::get_type(),
[
'name' => 'button_background',
'types' => [ 'classic', 'gradient' ],
'exclude' => [ 'image' ],
'selector' => '{{WRAPPER}} .elementor-flip-box__button',
'fields_options' => [
'background' => [
'default' => 'classic',
],
],
]
);
$this->add_control(
'button_border_color',
[
'label' => esc_html__( 'Border Color', 'elementor-pro' ),
'type' => Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .elementor-flip-box__button' => 'border-color: {{VALUE}};',
],
]
);
$this->end_controls_tab();
$this->start_controls_tab(
'hover',
[
'label' => esc_html__( 'Hover', 'elementor-pro' ),
'condition' => [
'button_text!' => '',
],
]
);
$this->add_control(
'button_hover_text_color',
[
'label' => esc_html__( 'Text Color', 'elementor-pro' ),
'type' => Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .elementor-flip-box__button:hover' => 'color: {{VALUE}};',
],
]
);
$this->add_group_control(
Group_Control_Background::get_type(),
[
'name' => 'button_hover_background',
'types' => [ 'classic', 'gradient' ],
'exclude' => [ 'image' ],
'selector' => '{{WRAPPER}} .elementor-flip-box__button:hover',
'fields_options' => [
'background' => [
'default' => 'classic',
],
],
]
);
$this->add_control(
'button_hover_border_color',
[
'label' => esc_html__( 'Border Color', 'elementor-pro' ),
'type' => Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .elementor-flip-box__button:hover' => 'border-color: {{VALUE}};',
],
]
);
$this->end_controls_tab();
$this->end_controls_tabs();
$this->add_control(
'button_border_width',
[
'label' => esc_html__( 'Border Width', 'elementor-pro' ),
'type' => Controls_Manager::SLIDER,
'range' => [
'px' => [
'min' => 0,
'max' => 20,
],
],
'selectors' => [
'{{WRAPPER}} .elementor-flip-box__button' => 'border-width: {{SIZE}}{{UNIT}};',
],
'separator' => 'before',
'condition' => [
'button_text!' => '',
],
]
);
$this->add_control(
'button_border_radius',
[
'label' => esc_html__( 'Border Radius', 'elementor-pro' ),
'type' => Controls_Manager::SLIDER,
'range' => [
'px' => [
'min' => 0,
'max' => 100,
],
],
'selectors' => [
'{{WRAPPER}} .elementor-flip-box__button' => 'border-radius: {{SIZE}}{{UNIT}};',
],
'separator' => 'after',
'condition' => [
'button_text!' => '',
],
]
);
$this->end_controls_section();
}
protected function render() {
$settings = $this->get_settings_for_display();
$wrapper_tag = 'div';
$button_tag = 'a';
$migration_allowed = Icons_Manager::is_migration_allowed();
$this->add_render_attribute( 'button', 'class', [
'elementor-flip-box__button',
'elementor-button',
'elementor-size-' . $settings['button_size'],
] );
$this->add_render_attribute( 'wrapper', 'class', 'elementor-flip-box__layer elementor-flip-box__back' );
if ( ! empty( $settings['link']['url'] ) ) {
$link_element = 'button';
if ( 'box' === $settings['link_click'] ) {
$wrapper_tag = 'a';
$button_tag = 'span';
$link_element = 'wrapper';
}
$this->add_link_attributes( $link_element, $settings['link'] );
}
if ( 'icon' === $settings['graphic_element'] ) {
$this->add_render_attribute( 'icon-wrapper', 'class', 'elementor-icon-wrapper' );
$this->add_render_attribute( 'icon-wrapper', 'class', 'elementor-view-' . $settings['icon_view'] );
if ( 'default' != $settings['icon_view'] ) {
$this->add_render_attribute( 'icon-wrapper', 'class', 'elementor-shape-' . $settings['icon_shape'] );
}
if ( ! isset( $settings['icon'] ) && ! $migration_allowed ) {
// add old default
$settings['icon'] = 'fa fa-star';
}
if ( ! empty( $settings['icon'] ) ) {
$this->add_render_attribute( 'icon', 'class', $settings['icon'] );
}
}
$has_icon = ! empty( $settings['icon'] ) || ! empty( $settings['selected_icon'] );
$migrated = isset( $settings['__fa4_migrated']['selected_icon'] );
$is_new = empty( $settings['icon'] ) && $migration_allowed;
?>
<div class="elementor-flip-box">
<div class="elementor-flip-box__layer elementor-flip-box__front">
<div class="elementor-flip-box__layer__overlay">
<div class="elementor-flip-box__layer__inner">
<?php if ( 'image' === $settings['graphic_element'] && ! empty( $settings['image']['url'] ) ) : ?>
<div class="elementor-flip-box__image">
<?php Group_Control_Image_Size::print_attachment_image_html( $settings ); ?>
</div>
<?php elseif ( 'icon' === $settings['graphic_element'] && $has_icon ) : ?>
<div <?php $this->print_render_attribute_string( 'icon-wrapper' ); ?>>
<div class="elementor-icon">
<?php if ( $is_new || $migrated ) :
Icons_Manager::render_icon( $settings['selected_icon'] );
else : ?>
<i <?php $this->print_render_attribute_string( 'icon' ); ?>></i>
<?php endif; ?>
</div>
</div>
<?php endif; ?>
<?php if ( ! empty( $settings['title_text_a'] ) ) : ?>
<h3 class="elementor-flip-box__layer__title">
<?php $this->print_unescaped_setting( 'title_text_a' ); ?>
</h3>
<?php endif; ?>
<?php if ( ! empty( $settings['description_text_a'] ) ) : ?>
<div class="elementor-flip-box__layer__description">
<?php $this->print_unescaped_setting( 'description_text_a' ); ?>
</div>
<?php endif; ?>
</div>
</div>
</div>
<<?php Utils::print_validated_html_tag( $wrapper_tag ); ?> <?php $this->print_render_attribute_string( 'wrapper' ); ?>>
<div class="elementor-flip-box__layer__overlay">
<div class="elementor-flip-box__layer__inner">
<?php if ( ! empty( $settings['title_text_b'] ) ) : ?>
<h3 class="elementor-flip-box__layer__title">
<?php $this->print_unescaped_setting( 'title_text_b' ); ?>
</h3>
<?php endif; ?>
<?php if ( ! empty( $settings['description_text_b'] ) ) : ?>
<div class="elementor-flip-box__layer__description">
<?php $this->print_unescaped_setting( 'description_text_b' ); ?>
</div>
<?php endif; ?>
<?php if ( ! empty( $settings['button_text'] ) ) : ?>
<<?php Utils::print_validated_html_tag( $button_tag ); ?> <?php $this->print_render_attribute_string( 'button' ); ?>>
<?php $this->print_unescaped_setting( 'button_text' ); ?>
</<?php Utils::print_validated_html_tag( $button_tag ); ?>>
<?php endif; ?>
</div>
</div>
</<?php Utils::print_validated_html_tag( $wrapper_tag ); ?>>
</div>
<?php
}
/**
* Render Flip Box widget output in the editor.
*
* Written as a Backbone JavaScript template and used to generate the live preview.
*
* @since 2.9.0
* @access protected
*/
protected function content_template() {
?>
<#
var btnClasses = 'elementor-flip-box__button elementor-button elementor-size-' + settings.button_size;
if ( 'image' === settings.graphic_element && '' !== settings.image.url ) {
var image = {
id: settings.image.id,
url: settings.image.url,
size: settings.image_size,
dimension: settings.image_custom_dimension,
model: view.getEditModel()
};
var imageUrl = elementor.imagesManager.getImageUrl( image );
}
var wrapperTag = 'div',
buttonTag = 'a';
if ( 'box' === settings.link_click ) {
wrapperTag = 'a';
buttonTag = 'span';
}
if ( 'icon' === settings.graphic_element ) {
var iconWrapperClasses = 'elementor-icon-wrapper';
iconWrapperClasses += ' elementor-view-' + settings.icon_view;
if ( 'default' !== settings.icon_view ) {
iconWrapperClasses += ' elementor-shape-' + settings.icon_shape;
}
}
var hasIcon = settings.icon || settings.selected_icon,
iconHTML = elementor.helpers.renderIcon( view, settings.selected_icon, { 'aria-hidden': true }, 'i' , 'object' ),
migrated = elementor.helpers.isIconMigrated( settings, 'selected_icon' );
#>
<div class="elementor-flip-box">
<div class="elementor-flip-box__layer elementor-flip-box__front">
<div class="elementor-flip-box__layer__overlay">
<div class="elementor-flip-box__layer__inner">
<# if ( 'image' === settings.graphic_element && '' !== settings.image.url ) { #>
<div class="elementor-flip-box__image">
<img src="{{ imageUrl }}">
</div>
<# } else if ( 'icon' === settings.graphic_element && hasIcon ) { #>
<div class="{{ iconWrapperClasses }}" >
<div class="elementor-icon">
<# if ( iconHTML && iconHTML.rendered && ( ! settings.icon || migrated ) ) { #>
{{{ iconHTML.value }}}
<# } else { #>
<i class="{{ settings.icon }}"></i>
<# } #>
</div>
</div>
<# } #>
<# if ( settings.title_text_a ) { #>
<h3 class="elementor-flip-box__layer__title">{{{ settings.title_text_a }}}</h3>
<# } #>
<# if ( settings.description_text_a ) { #>
<div class="elementor-flip-box__layer__description">{{{ settings.description_text_a }}}</div>
<# } #>
</div>
</div>
</div>
<{{ wrapperTag }} class="elementor-flip-box__layer elementor-flip-box__back">
<div class="elementor-flip-box__layer__overlay">
<div class="elementor-flip-box__layer__inner">
<# if ( settings.title_text_b ) { #>
<h3 class="elementor-flip-box__layer__title">{{{ settings.title_text_b }}}</h3>
<# } #>
<# if ( settings.description_text_b ) { #>
<div class="elementor-flip-box__layer__description">{{{ settings.description_text_b }}}</div>
<# } #>
<# if ( settings.button_text ) { #>
<{{ buttonTag }} href="#" class="{{ btnClasses }}">{{{ settings.button_text }}}</{{ buttonTag }}>
<# } #>
</div>
</div>
</{{ wrapperTag }}>
</div>
<?php
}
}
modules/flip-box/module.php 0000644 00000000472 15075500430 0011734 0 ustar 00 <?php
namespace ElementorPro\Modules\FlipBox;
use ElementorPro\Base\Module_Base;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
class Module extends Module_Base {
public function get_widgets() {
return [
'Flip_Box',
];
}
public function get_name() {
return 'flip-box';
}
}
modules/gallery/module.php 0000644 00000000706 15075500430 0011653 0 ustar 00 <?php
namespace ElementorPro\Modules\Gallery;
use ElementorPro\Base\Module_Base;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
class Module extends Module_Base {
/**
* Get module name.
*
* Retrieve the module name.
*
* @since 2.7.0
* @access public
*
* @return string Module name.
*/
public function get_name() {
return 'gallery';
}
public function get_widgets() {
return [
'gallery',
];
}
}
modules/gallery/widgets/gallery.php 0000644 00000116540 15075500430 0013477 0 ustar 00 <?php
namespace ElementorPro\Modules\Gallery\Widgets;
use Elementor\Controls_Manager;
use Elementor\Core\Breakpoints\Manager as Breakpoints_Manager;
use Elementor\Core\Kits\Documents\Tabs\Global_Colors;
use Elementor\Core\Kits\Documents\Tabs\Global_Typography;
use Elementor\Group_Control_Background;
use Elementor\Group_Control_Css_Filter;
use Elementor\Group_Control_Image_Size;
use Elementor\Group_Control_Typography;
use Elementor\Repeater;
use Elementor\Utils;
use ElementorPro\Base\Base_Widget;
use ElementorPro\Plugin;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
class Gallery extends Base_Widget {
/**
* Get element name.
*
* Retrieve the element name.
*
* @return string The name.
* @since 2.7.0
* @access public
*
*/
public function get_name() {
return 'gallery';
}
public function get_title() {
return esc_html__( 'Gallery', 'elementor-pro' );
}
public function get_script_depends() {
return [ 'elementor-gallery' ];
}
public function get_style_depends() {
return [ 'elementor-gallery' ];
}
public function get_icon() {
return 'eicon-gallery-justified';
}
public function get_inline_css_depends() {
if ( 'multiple' === $this->get_settings_for_display( 'gallery_type' ) ) {
return [ 'nav-menu' ];
}
return [];
}
protected function register_controls() {
$this->start_controls_section( 'settings', [ 'label' => esc_html__( 'Settings', 'elementor-pro' ) ] );
$this->add_control(
'gallery_type',
[
'type' => Controls_Manager::SELECT,
'label' => esc_html__( 'Type', 'elementor-pro' ),
'default' => 'single',
'options' => [
'single' => esc_html__( 'Single', 'elementor-pro' ),
'multiple' => esc_html__( 'Multiple', 'elementor-pro' ),
],
]
);
$this->add_control(
'gallery',
[
'type' => Controls_Manager::GALLERY,
'condition' => [
'gallery_type' => 'single',
],
'dynamic' => [
'active' => true,
],
]
);
$repeater = new Repeater();
$repeater->add_control(
'gallery_title',
[
'type' => Controls_Manager::TEXT,
'label' => esc_html__( 'Title', 'elementor-pro' ),
'default' => esc_html__( 'New Gallery', 'elementor-pro' ),
'dynamic' => [
'active' => true,
],
]
);
$repeater->add_control(
'multiple_gallery',
[
'type' => Controls_Manager::GALLERY,
'dynamic' => [
'active' => true,
],
]
);
$this->add_control(
'galleries',
[
'type' => Controls_Manager::REPEATER,
'label' => esc_html__( 'Galleries', 'elementor-pro' ),
'fields' => $repeater->get_controls(),
'title_field' => '{{{ gallery_title }}}',
'default' => [
[
'gallery_title' => esc_html__( 'New Gallery', 'elementor-pro' ),
],
],
'condition' => [
'gallery_type' => 'multiple',
],
]
);
$this->add_control(
'order_by',
[
'type' => Controls_Manager::SELECT,
'label' => esc_html__( 'Order By', 'elementor-pro' ),
'options' => [
'' => esc_html__( 'Default', 'elementor-pro' ),
'random' => esc_html__( 'Random', 'elementor-pro' ),
],
'default' => '',
]
);
$this->add_control(
'lazyload',
[
'type' => Controls_Manager::SWITCHER,
'label' => esc_html__( 'Lazy Load', 'elementor-pro' ),
'return_value' => 'yes',
'default' => 'yes',
'frontend_available' => true,
]
);
$this->add_control(
'gallery_layout',
[
'type' => Controls_Manager::SELECT,
'label' => esc_html__( 'Layout', 'elementor-pro' ),
'default' => 'grid',
'options' => [
'grid' => esc_html__( 'Grid', 'elementor-pro' ),
'justified' => esc_html__( 'Justified', 'elementor-pro' ),
'masonry' => esc_html__( 'Masonry', 'elementor-pro' ),
],
'separator' => 'before',
'frontend_available' => true,
]
);
$this->add_responsive_control(
'columns',
[
'label' => esc_html__( 'Columns', 'elementor-pro' ),
'type' => Controls_Manager::NUMBER,
'default' => 4,
'tablet_default' => 2,
'mobile_default' => 1,
'min' => 1,
'max' => 24,
'condition' => [
'gallery_layout!' => 'justified',
],
'render_type' => 'none',
'frontend_available' => true,
]
);
$active_breakpoints = Plugin::elementor()->breakpoints->get_active_breakpoints();
$ideal_row_height_device_args = [];
$gap_device_args = [];
// Add default values for all active breakpoints.
foreach ( $active_breakpoints as $breakpoint_name => $breakpoint_instance ) {
if ( 'widescreen' !== $breakpoint_name ) {
$ideal_row_height_device_args[ $breakpoint_name ] = [
'default' => [
'size' => 150,
],
];
$gap_device_args[ $breakpoint_name ] = [
'default' => [
'size' => 10,
],
];
}
}
$this->add_responsive_control(
'ideal_row_height',
[
'label' => esc_html__( 'Row Height', 'elementor-pro' ),
'type' => Controls_Manager::SLIDER,
'range' => [
'px' => [
'min' => 50,
'max' => 500,
],
],
'default' => [
'size' => 200,
],
'device_args' => $ideal_row_height_device_args,
'condition' => [
'gallery_layout' => 'justified',
],
'required' => true,
'render_type' => 'none',
'frontend_available' => true,
]
);
$this->add_responsive_control(
'gap',
[
'label' => esc_html__( 'Spacing', 'elementor-pro' ),
'type' => Controls_Manager::SLIDER,
'default' => [
'size' => 10,
],
'device_args' => $gap_device_args,
'required' => true,
'render_type' => 'none',
'frontend_available' => true,
]
);
$this->add_control(
'link_to',
[
'label' => esc_html__( 'Link', 'elementor-pro' ),
'type' => Controls_Manager::SELECT,
'default' => 'file',
'options' => [
'' => esc_html__( 'None', 'elementor-pro' ),
'file' => esc_html__( 'Media File', 'elementor-pro' ),
'custom' => esc_html__( 'Custom URL', 'elementor-pro' ),
],
'frontend_available' => true,
]
);
$this->add_control(
'url',
[
'label' => esc_html__( 'URL', 'elementor-pro' ),
'type' => Controls_Manager::URL,
'condition' => [
'link_to' => 'custom',
],
'frontend_available' => true,
]
);
$this->add_control(
'aspect_ratio',
[
'type' => Controls_Manager::SELECT,
'label' => esc_html__( 'Aspect Ratio', 'elementor-pro' ),
'default' => '3:2',
'options' => [
'1:1' => '1:1',
'3:2' => '3:2',
'4:3' => '4:3',
'9:16' => '9:16',
'16:9' => '16:9',
'21:9' => '21:9',
],
'condition' => [
'gallery_layout' => 'grid',
],
'render_type' => 'none',
'frontend_available' => true,
]
);
$this->add_group_control(
Group_Control_Image_Size::get_type(),
[
'name' => 'thumbnail_image',
'default' => 'medium',
]
);
$this->end_controls_section(); // settings
$this->start_controls_section(
'section_filter_bar_content',
[
'label' => esc_html__( 'Filter Bar', 'elementor-pro' ),
'condition' => [
'gallery_type' => 'multiple',
],
]
);
$this->add_control(
'show_all_galleries',
[
'type' => Controls_Manager::SWITCHER,
'label' => esc_html__( '"All" Filter', 'elementor-pro' ),
'default' => 'yes',
'frontend_available' => true,
]
);
$this->add_control(
'show_all_galleries_label',
[
'type' => Controls_Manager::TEXT,
'label' => esc_html__( '"All" Filter Label', 'elementor-pro' ),
'default' => esc_html__( 'All', 'elementor-pro' ),
'condition' => [
'show_all_galleries' => 'yes',
],
]
);
$this->add_control(
'pointer',
[
'label' => esc_html__( 'Pointer', 'elementor-pro' ),
'type' => Controls_Manager::SELECT,
'default' => 'underline',
'options' => [
'none' => esc_html__( 'None', 'elementor-pro' ),
'underline' => esc_html__( 'Underline', 'elementor-pro' ),
'overline' => esc_html__( 'Overline', 'elementor-pro' ),
'double-line' => esc_html__( 'Double Line', 'elementor-pro' ),
'framed' => esc_html__( 'Framed', 'elementor-pro' ),
'background' => esc_html__( 'Background', 'elementor-pro' ),
'text' => esc_html__( 'Text', 'elementor-pro' ),
],
'style_transfer' => true,
]
);
$this->add_control(
'animation_line',
[
'label' => esc_html__( 'Animation', 'elementor-pro' ),
'type' => Controls_Manager::SELECT,
'default' => 'fade',
'options' => [
'fade' => 'Fade',
'slide' => 'Slide',
'grow' => 'Grow',
'drop-in' => 'Drop In',
'drop-out' => 'Drop Out',
'none' => 'None',
],
'condition' => [
'pointer' => [ 'underline', 'overline', 'double-line' ],
],
]
);
$this->add_control(
'animation_framed',
[
'label' => esc_html__( 'Animation', 'elementor-pro' ),
'type' => Controls_Manager::SELECT,
'default' => 'fade',
'options' => [
'fade' => 'Fade',
'grow' => 'Grow',
'shrink' => 'Shrink',
'draw' => 'Draw',
'corners' => 'Corners',
'none' => 'None',
],
'condition' => [
'pointer' => 'framed',
],
]
);
$this->add_control(
'animation_background',
[
'label' => esc_html__( 'Animation', 'elementor-pro' ),
'type' => Controls_Manager::SELECT,
'default' => 'fade',
'options' => [
'fade' => 'Fade',
'grow' => 'Grow',
'shrink' => 'Shrink',
'sweep-left' => 'Sweep Left',
'sweep-right' => 'Sweep Right',
'sweep-up' => 'Sweep Up',
'sweep-down' => 'Sweep Down',
'shutter-in-vertical' => 'Shutter In Vertical',
'shutter-out-vertical' => 'Shutter Out Vertical',
'shutter-in-horizontal' => 'Shutter In Horizontal',
'shutter-out-horizontal' => 'Shutter Out Horizontal',
'none' => 'None',
],
'condition' => [
'pointer' => 'background',
],
]
);
$this->add_control(
'animation_text',
[
'label' => esc_html__( 'Animation', 'elementor-pro' ),
'type' => Controls_Manager::SELECT,
'default' => 'grow',
'options' => [
'grow' => 'Grow',
'shrink' => 'Shrink',
'sink' => 'Sink',
'float' => 'Float',
'skew' => 'Skew',
'rotate' => 'Rotate',
'none' => 'None',
],
'condition' => [
'pointer' => 'text',
],
]
);
$this->end_controls_section(); // settings
$this->start_controls_section( 'overlay', [ 'label' => esc_html__( 'Overlay', 'elementor-pro' ) ] );
$this->add_control(
'overlay_background',
[
'label' => esc_html__( 'Background', 'elementor-pro' ),
'type' => Controls_Manager::SWITCHER,
'default' => 'yes',
'frontend_available' => true,
]
);
$this->add_control(
'overlay_title',
[
'label' => esc_html__( 'Title', 'elementor-pro' ),
'type' => Controls_Manager::SELECT,
'default' => '',
'options' => [
'' => esc_html__( 'None', 'elementor-pro' ),
'title' => esc_html__( 'Title', 'elementor-pro' ),
'caption' => esc_html__( 'Caption', 'elementor-pro' ),
'alt' => esc_html__( 'Alt', 'elementor-pro' ),
'description' => esc_html__( 'Description', 'elementor-pro' ),
],
'frontend_available' => true,
]
);
$this->add_control(
'overlay_description',
[
'label' => esc_html__( 'Description', 'elementor-pro' ),
'type' => Controls_Manager::SELECT,
'default' => '',
'options' => [
'' => esc_html__( 'None', 'elementor-pro' ),
'title' => esc_html__( 'Title', 'elementor-pro' ),
'caption' => esc_html__( 'Caption', 'elementor-pro' ),
'alt' => esc_html__( 'Alt', 'elementor-pro' ),
'description' => esc_html__( 'Description', 'elementor-pro' ),
],
'frontend_available' => true,
]
);
$this->end_controls_section(); // overlay
$this->start_controls_section(
'image_style',
[
'label' => esc_html__( 'Image', 'elementor-pro' ),
'tab' => Controls_Manager::TAB_STYLE,
]
);
$this->start_controls_tabs( 'image_tabs' );
$this->start_controls_tab(
'image_normal',
[
'label' => esc_html__( 'Normal', 'elementor-pro' ),
]
);
$this->add_control(
'image_border_color',
[
'label' => esc_html__( 'Border Color', 'elementor-pro' ),
'type' => Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}}' => '--image-border-color: {{VALUE}}',
],
]
);
$this->add_control(
'image_border_width',
[
'label' => esc_html__( 'Border Width', 'elementor-pro' ),
'type' => Controls_Manager::SLIDER,
'size_units' => [ 'px', 'em' ],
'selectors' => [
'{{WRAPPER}}' => '--image-border-width: {{SIZE}}{{UNIT}};',
],
]
);
$this->add_control(
'image_border_radius',
[
'label' => esc_html__( 'Border Radius', 'elementor-pro' ),
'type' => Controls_Manager::SLIDER,
'size_units' => [ 'px', '%' ],
'selectors' => [
'{{WRAPPER}}' => '--image-border-radius: {{SIZE}}{{UNIT}};',
],
]
);
$this->add_group_control(
Group_Control_Css_Filter::get_type(),
[
'name' => 'image_css_filters',
'selector' => '{{WRAPPER}} .e-gallery-image',
]
);
$this->end_controls_tab(); // overlay_background normal
$this->start_controls_tab(
'image_hover',
[
'label' => esc_html__( 'Hover', 'elementor-pro' ),
]
);
$this->add_control(
'image_border_color_hover',
[
'label' => esc_html__( 'Border Color', 'elementor-pro' ),
'type' => Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .elementor-gallery-item:hover' => 'border-color: {{VALUE}}',
],
]
);
$this->add_control(
'image_border_radius_hover',
[
'label' => esc_html__( 'Border Radius', 'elementor-pro' ),
'type' => Controls_Manager::SLIDER,
'size_units' => [ 'px', '%' ],
'selectors' => [
'{{WRAPPER}} .elementor-gallery-item:hover' => 'border-radius: {{SIZE}}{{UNIT}};',
],
]
);
$this->add_group_control(
Group_Control_Css_Filter::get_type(),
[
'name' => 'image_css_filters_hover',
'selector' => '{{WRAPPER}} .e-gallery-item:hover .e-gallery-image',
]
);
$this->end_controls_tab(); // overlay_background normal
$this->end_controls_tabs();// overlay_background tabs
$this->add_control(
'image_hover_animation',
[
'label' => esc_html__( 'Hover Animation', 'elementor-pro' ),
'type' => Controls_Manager::SELECT,
'options' => [
'' => 'None',
'grow' => 'Zoom In',
'shrink-contained' => 'Zoom Out',
'move-contained-left' => 'Move Left',
'move-contained-right' => 'Move Right',
'move-contained-top' => 'Move Up',
'move-contained-bottom' => 'Move Down',
],
'separator' => 'before',
'default' => '',
'frontend_available' => true,
'render_type' => 'ui',
]
);
$this->add_control(
'image_animation_duration',
[
'label' => esc_html__( 'Animation Duration', 'elementor-pro' ) . ' (ms)',
'type' => Controls_Manager::SLIDER,
'default' => [
'size' => 800,
],
'range' => [
'px' => [
'min' => 0,
'max' => 3000,
],
],
'selectors' => [
'{{WRAPPER}}' => '--image-transition-duration: {{SIZE}}ms',
],
]
);
$this->end_controls_section(); // overlay_background
$this->start_controls_section(
'overlay_style',
[
'label' => esc_html__( 'Overlay', 'elementor-pro' ),
'tab' => Controls_Manager::TAB_STYLE,
'condition' => [
'overlay_background' => 'yes',
],
]
);
$this->start_controls_tabs( 'overlay_background_tabs' );
$this->start_controls_tab(
'overlay_normal',
[
'label' => esc_html__( 'Normal', 'elementor-pro' ),
]
);
$this->add_group_control(
Group_Control_Background::get_type(),
[
'name' => 'overlay_background',
'types' => [ 'classic', 'gradient' ],
'exclude' => [ 'image' ],
'selector' => '{{WRAPPER}} .elementor-gallery-item__overlay',
'fields_options' => [
'background' => [
'label' => esc_html__( 'Overlay', 'elementor-pro' ),
],
],
]
);
$this->end_controls_tab(); // overlay_background normal
$this->start_controls_tab(
'overlay_hover',
[
'label' => esc_html__( 'Hover', 'elementor-pro' ),
]
);
$this->add_group_control(
Group_Control_Background::get_type(),
[
'name' => 'overlay_background_hover',
'types' => [ 'classic', 'gradient' ],
'selector' => '{{WRAPPER}} .e-gallery-item:hover .elementor-gallery-item__overlay',
'exclude' => [ 'image' ],
'fields_options' => [
'background' => [
'default' => 'classic',
],
'color' => [
'default' => 'rgba(0,0,0,0.5)',
],
],
]
);
$this->end_controls_tab(); // overlay_background normal
$this->end_controls_tabs();// overlay_background tabs
$this->add_control(
'image_blend_mode',
[
'label' => esc_html__( 'Blend Mode', 'elementor-pro' ),
'type' => Controls_Manager::SELECT,
'default' => '',
'options' => [
'' => esc_html__( 'Normal', 'elementor-pro' ),
'multiply' => 'Multiply',
'screen' => 'Screen',
'overlay' => 'Overlay',
'darken' => 'Darken',
'lighten' => 'Lighten',
'color-dodge' => 'Color Dodge',
'color-burn' => 'Color Burn',
'hue' => 'Hue',
'saturation' => 'Saturation',
'color' => 'Color',
'exclusion' => 'Exclusion',
'luminosity' => 'Luminosity',
],
'selectors' => [
'{{WRAPPER}}' => '--overlay-mix-blend-mode: {{VALUE}}',
],
'separator' => 'before',
'render_type' => 'ui',
]
);
$this->add_control(
'background_overlay_hover_animation',
[
'label' => esc_html__( 'Hover Animation', 'elementor-pro' ),
'type' => Controls_Manager::SELECT,
'groups' => [
[
'label' => esc_html__( 'None', 'elementor-pro' ),
'options' => [
'' => esc_html__( 'None', 'elementor-pro' ),
],
],
[
'label' => esc_html__( 'Entrance', 'elementor-pro' ),
'options' => [
'enter-from-right' => 'Slide In Right',
'enter-from-left' => 'Slide In Left',
'enter-from-top' => 'Slide In Up',
'enter-from-bottom' => 'Slide In Down',
'enter-zoom-in' => 'Zoom In',
'enter-zoom-out' => 'Zoom Out',
'fade-in' => 'Fade In',
],
],
[
'label' => esc_html__( 'Exit', 'elementor-pro' ),
'options' => [
'exit-to-right' => 'Slide Out Right',
'exit-to-left' => 'Slide Out Left',
'exit-to-top' => 'Slide Out Up',
'exit-to-bottom' => 'Slide Out Down',
'exit-zoom-in' => 'Zoom In',
'exit-zoom-out' => 'Zoom Out',
'fade-out' => 'Fade Out',
],
],
],
'separator' => 'before',
'default' => '',
'frontend_available' => true,
'render_type' => 'ui',
]
);
$this->add_control(
'background_overlay_animation_duration',
[
'label' => esc_html__( 'Animation Duration', 'elementor-pro' ) . ' (ms)',
'type' => Controls_Manager::SLIDER,
'default' => [
'size' => 800,
],
'range' => [
'px' => [
'min' => 0,
'max' => 3000,
],
],
'selectors' => [
'{{WRAPPER}}' => '--overlay-transition-duration: {{SIZE}}ms',
],
]
);
$this->end_controls_section(); // overlay_background
$this->start_controls_section(
'overlay_content_style',
[
'label' => esc_html__( 'Content', 'elementor-pro' ),
'tab' => Controls_Manager::TAB_STYLE,
//TODO: add conditions for this section
]
);
$this->add_control(
'content_alignment',
[
'label' => esc_html__( 'Alignment', 'elementor-pro' ),
'type' => Controls_Manager::CHOOSE,
'options' => [
'left' => [
'title' => esc_html__( 'Left', 'elementor-pro' ),
'icon' => 'eicon-text-align-left',
],
'center' => [
'title' => esc_html__( 'Center', 'elementor-pro' ),
'icon' => 'eicon-text-align-center',
],
'right' => [
'title' => esc_html__( 'Right', 'elementor-pro' ),
'icon' => 'eicon-text-align-right',
],
],
'default' => 'center',
'selectors' => [
'{{WRAPPER}}' => '--content-text-align: {{VALUE}}',
],
]
);
$this->add_control(
'content_vertical_position',
[
'label' => esc_html__( 'Vertical Position', 'elementor-pro' ),
'type' => Controls_Manager::CHOOSE,
'options' => [
'top' => [
'title' => esc_html__( 'Top', 'elementor-pro' ),
'icon' => 'eicon-v-align-top',
],
'middle' => [
'title' => esc_html__( 'Middle', 'elementor-pro' ),
'icon' => 'eicon-v-align-middle',
],
'bottom' => [
'title' => esc_html__( 'Bottom', 'elementor-pro' ),
'icon' => 'eicon-v-align-bottom',
],
],
'selectors_dictionary' => [
'top' => 'flex-start',
'middle' => 'center',
'bottom' => 'flex-end',
],
'selectors' => [
'{{WRAPPER}}' => '--content-justify-content: {{VALUE}}',
],
]
);
$this->add_responsive_control(
'content_padding',
[
'label' => esc_html__( 'Padding', 'elementor-pro' ),
'type' => Controls_Manager::SLIDER,
'size_units' => [ 'px', 'em', '%' ],
'default' => [
'size' => 20,
],
'selectors' => [
'{{WRAPPER}}' => '--content-padding: {{SIZE}}{{UNIT}}',
],
]
);
$this->add_control(
'heading_title',
[
'label' => esc_html__( 'Title', 'elementor-pro' ),
'type' => Controls_Manager::HEADING,
'separator' => 'before',
'condition' => [
'overlay_title!' => '',
],
]
);
$this->add_control(
'title_color',
[
'label' => esc_html__( 'Color', 'elementor-pro' ),
'type' => Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}}' => '--title-text-color: {{VALUE}}',
],
'condition' => [
'overlay_title!' => '',
],
]
);
$this->add_group_control(
Group_Control_Typography::get_type(),
[
'name' => 'title_typography',
'global' => [
'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
],
'selector' => '{{WRAPPER}} .elementor-gallery-item__title',
'condition' => [
'overlay_title!' => '',
],
]
);
$this->add_control(
'title_spacing',
[
'label' => esc_html__( 'Spacing', 'elementor-pro' ),
'type' => Controls_Manager::SLIDER,
'size_units' => [ 'px', 'em', '%' ],
'selectors' => [
'{{WRAPPER}}' => '--description-margin-top: {{SIZE}}{{UNIT}}',
],
'condition' => [
'overlay_title!' => '',
],
]
);
$this->add_control(
'heading_description',
[
'label' => esc_html__( 'Description', 'elementor-pro' ),
'type' => Controls_Manager::HEADING,
'separator' => 'before',
'condition' => [
'overlay_description!' => '',
],
]
);
$this->add_control(
'description_color',
[
'label' => esc_html__( 'Color', 'elementor-pro' ),
'type' => Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}}' => '--description-text-color: {{VALUE}}',
],
'condition' => [
'overlay_description!' => '',
],
]
);
$this->add_group_control(
Group_Control_Typography::get_type(),
[
'name' => 'description_typography',
'global' => [
'default' => Global_Typography::TYPOGRAPHY_TEXT,
],
'selector' => '{{WRAPPER}} .elementor-gallery-item__description',
'condition' => [
'overlay_description!' => '',
],
]
);
$this->add_control(
'content_hover_animation',
[
'label' => esc_html__( 'Hover Animation', 'elementor-pro' ),
'type' => Controls_Manager::SELECT,
'groups' => [
[
'label' => esc_html__( 'None', 'elementor-pro' ),
'options' => [
'' => esc_html__( 'None', 'elementor-pro' ),
],
],
[
'label' => esc_html__( 'Entrance', 'elementor-pro' ),
'options' => [
'enter-from-right' => 'Slide In Right',
'enter-from-left' => 'Slide In Left',
'enter-from-top' => 'Slide In Up',
'enter-from-bottom' => 'Slide In Down',
'enter-zoom-in' => 'Zoom In',
'enter-zoom-out' => 'Zoom Out',
'fade-in' => 'Fade In',
],
],
[
'label' => esc_html__( 'Reaction', 'elementor-pro' ),
'options' => [
'grow' => 'Grow',
'shrink' => 'Shrink',
'move-right' => 'Move Right',
'move-left' => 'Move Left',
'move-up' => 'Move Up',
'move-down' => 'Move Down',
],
],
[
'label' => esc_html__( 'Exit', 'elementor-pro' ),
'options' => [
'exit-to-right' => 'Slide Out Right',
'exit-to-left' => 'Slide Out Left',
'exit-to-top' => 'Slide Out Up',
'exit-to-bottom' => 'Slide Out Down',
'exit-zoom-in' => 'Zoom In',
'exit-zoom-out' => 'Zoom Out',
'fade-out' => 'Fade Out',
],
],
],
'default' => 'fade-in',
'separator' => 'before',
'render_type' => 'ui',
'frontend_available' => true,
]
);
$this->add_control(
'content_animation_duration',
[
'label' => esc_html__( 'Animation Duration', 'elementor-pro' ) . ' (ms)',
'type' => Controls_Manager::SLIDER,
'default' => [
'size' => 800,
],
'range' => [
'px' => [
'min' => 0,
'max' => 3000,
],
],
'selectors' => [
'{{WRAPPER}}' => '--content-transition-duration: {{SIZE}}ms; --content-transition-delay: {{SIZE}}ms;',
],
'condition' => [
'content_hover_animation!' => '',
],
]
);
$this->add_control(
'content_sequenced_animation',
[
'label' => esc_html__( 'Sequenced Animation', 'elementor-pro' ),
'type' => Controls_Manager::SWITCHER,
'condition' => [
'content_hover_animation!' => '',
],
'frontend_available' => true,
'render_type' => 'ui',
]
);
$this->end_controls_section(); // overlay_content
$this->start_controls_section(
'filter_bar_style',
[
'label' => esc_html__( 'Filter Bar', 'elementor-pro' ),
'tab' => Controls_Manager::TAB_STYLE,
'condition' => [
'gallery_type' => 'multiple',
],
]
);
$this->add_control(
'align_filter_bar_items',
[
'label' => esc_html__( 'Align', 'elementor-pro' ),
'type' => Controls_Manager::CHOOSE,
'options' => [
'left' => [
'title' => esc_html__( 'Left', 'elementor-pro' ),
'icon' => 'eicon-text-align-left',
],
'center' => [
'title' => esc_html__( 'Center', 'elementor-pro' ),
'icon' => 'eicon-text-align-center',
],
'right' => [
'title' => esc_html__( 'Right', 'elementor-pro' ),
'icon' => 'eicon-text-align-right',
],
],
'prefix_class' => 'elementor-gallery--filter-align-',
'selectors_dictionary' => [
'left' => 'flex-start',
'right' => 'flex-end',
],
'selectors' => [
'{{WRAPPER}}' => '--titles-container-justify-content: {{VALUE}}',
],
]
);
$this->start_controls_tabs( 'filter_bar_colors' );
$this->start_controls_tab( 'filter_bar_colors_normal',
[
'label' => esc_html__( 'Normal', 'elementor-pro' ),
]
);
$this->add_control(
'galleries_title_color_normal',
[
'label' => esc_html__( 'Text Color', 'elementor-pro' ),
'type' => Controls_Manager::COLOR,
'global' => [
'default' => Global_Colors::COLOR_PRIMARY,
],
'selectors' => [
'{{WRAPPER}}' => '--galleries-title-color-normal: {{VALUE}}',
],
]
);
$this->add_group_control(
Group_Control_Typography::get_type(),
[
'name' => 'galleries_titles_typography',
'selector' => '{{WRAPPER}} .elementor-gallery-title',
'global' => [
'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
],
]
);
$this->end_controls_tab();// filter_bar_colors_normal
$this->start_controls_tab( 'filter_bar_colors_hover',
[
'label' => esc_html__( 'Hover', 'elementor-pro' ),
]
);
$this->add_control(
'galleries_title_color_hover',
[
'label' => esc_html__( 'Text Color', 'elementor-pro' ),
'type' => Controls_Manager::COLOR,
'global' => [
'default' => Global_Colors::COLOR_SECONDARY,
],
'selectors' => [
'{{WRAPPER}}' => '--galleries-title-color-hover: {{VALUE}}',
],
'condition' => [
'pointer!' => 'background',
],
]
);
/*
When the pointer style = background, users could need a different text color.
The control handles the title color in hover state, only when the pointer style is background.
*/
$this->add_control(
'galleries_title_color_hover_pointer_bg',
[
'label' => esc_html__( 'Text Color', 'elementor-pro' ),
'type' => Controls_Manager::COLOR,
'default' => '#fff',
'selectors' => [
'{{WRAPPER}}' => '--galleries-title-color-hover: {{VALUE}}',
],
'condition' => [
'pointer' => 'background',
],
]
);
$this->add_control(
'galleries_pointer_color_hover',
[
'label' => esc_html__( 'Pointer Color', 'elementor-pro' ),
'type' => Controls_Manager::COLOR,
'global' => [
'default' => Global_Colors::COLOR_ACCENT,
],
'selectors' => [
'{{WRAPPER}}' => '--galleries-pointer-bg-color-hover: {{VALUE}}',
],
'condition' => [
'pointer!' => [ 'none', 'text' ],
],
]
);
$this->end_controls_tab();// filter_bar_colors_hover
$this->start_controls_tab( 'filter_bar_colors_active',
[
'label' => esc_html__( 'Active', 'elementor-pro' ),
]
);
$this->add_control(
'galleries_title_color_active',
[
'label' => esc_html__( 'Text Color', 'elementor-pro' ),
'type' => Controls_Manager::COLOR,
'global' => [
'default' => Global_Colors::COLOR_SECONDARY,
],
'selectors' => [
'{{WRAPPER}}' => '--gallery-title-color-active: {{VALUE}}',
],
]
);
$this->add_control(
'galleries_pointer_color_active',
[
'label' => esc_html__( 'Pointer Color', 'elementor-pro' ),
'type' => Controls_Manager::COLOR,
'global' => [
'default' => Global_Colors::COLOR_ACCENT,
],
'selectors' => [
'{{WRAPPER}}' => '--galleries-pointer-bg-color-active: {{VALUE}}',
],
'condition' => [
'pointer!' => [ 'none', 'text' ],
],
]
);
$this->end_controls_tab();// filter_bar_colors_active
$this->end_controls_tabs(); // filter_bar_colors
$this->add_control(
'pointer_width',
[
'label' => esc_html__( 'Pointer Width', 'elementor-pro' ),
'type' => Controls_Manager::SLIDER,
'devices' => [ Breakpoints_Manager::BREAKPOINT_KEY_DESKTOP, Breakpoints_Manager::BREAKPOINT_KEY_TABLET ],
'range' => [
'px' => [
'max' => 30,
],
],
'selectors' => [
'{{WRAPPER}}' => '--galleries-pointer-border-width: {{SIZE}}{{UNIT}}',
],
'separator' => 'before',
'condition' => [
'pointer' => [ 'underline', 'overline', 'double-line', 'framed' ],
],
]
);
$this->add_control(
'galleries_titles_space_between',
[
'label' => esc_html__( 'Space Between', 'elementor-pro' ),
'type' => Controls_Manager::SLIDER,
'size_units' => [ 'px', 'em', '%' ],
'selectors' => [
'{{WRAPPER}} .elementor-gallery-title' => '--space-between: {{SIZE}}{{UNIT}}',
],
]
);
$this->add_control(
'galleries_titles_gap',
[
'label' => esc_html__( 'Gap', 'elementor-pro' ),
'type' => Controls_Manager::SLIDER,
'size_units' => [ 'px', 'em', '%' ],
'selectors' => [
'{{WRAPPER}} .elementor-gallery__titles-container' => 'margin-bottom: {{SIZE}}{{UNIT}}',
],
]
);
$this->end_controls_section(); // filter_bar_style
}
protected function render_static() {
$settings = $this->get_settings_for_display();
$is_multiple = 'multiple' === $settings['gallery_type'] && ! empty( $settings['galleries'] );
$is_single = 'single' === $settings['gallery_type'] && ! empty( $settings['gallery'] );
$gap = $settings['gap']['size'] . $settings['gap']['unit'];
$ratio_percentage = '75';
$columns = 4;
if ( $settings['columns'] ) {
$columns = $settings['columns'];
}
if ( $settings['aspect_ratio'] ) {
$ratio_array = explode( ':', $settings['aspect_ratio'] );
$ratio_percentage = ( $ratio_array[1] / $ratio_array[0] ) * 100;
}
$this->add_render_attribute(
'gallery_container',
[
'style' => "--columns: {$columns}; --aspect-ratio: {$ratio_percentage}%; --hgap: {$gap}; --vgap: {$gap};",
'class' => 'e-gallery-grid',
]
);
$galleries = [];
if ( $is_multiple ) {
foreach ( array_values( $settings['galleries'] ) as $multi_gallery ) {
if ( ! $multi_gallery['multiple_gallery'] ) {
continue;
}
$galleries[] = $multi_gallery['multiple_gallery'];
}
} elseif ( $is_single ) {
$galleries[0] = $settings['gallery'];
}
foreach ( $galleries as $gallery ) {
foreach ( $gallery as $item ) {
$image_src = wp_get_attachment_image_src( $item['id'] );
$this->add_render_attribute( 'gallery_item_image_' . $item['id'], [
'style' => "background-image: url('{$image_src[0]}');",
] );
}
}
$this->render();
}
/**
*
*/
protected function render() {
$settings = $this->get_settings_for_display();
$is_multiple = 'multiple' === $settings['gallery_type'] && ! empty( $settings['galleries'] );
$is_single = 'single' === $settings['gallery_type'] && ! empty( $settings['gallery'] );
$has_description = ! empty( $settings['overlay_description'] );
$has_title = ! empty( $settings['overlay_title'] );
$has_animation = ! empty( $settings['image_hover_animation'] ) || ! empty( $settings['content_hover_animation'] ) || ! empty( $settings['background_overlay_hover_animation'] );
$gallery_item_tag = ! empty( $settings['link_to'] ) ? 'a' : 'div';
$galleries = [];
if ( $is_multiple ) {
$this->add_render_attribute( 'titles-container', 'class', 'elementor-gallery__titles-container' );
if ( $settings['pointer'] ) {
$this->add_render_attribute( 'titles-container', 'class', 'e--pointer-' . $settings['pointer'] );
foreach ( $settings as $key => $value ) {
if ( 0 === strpos( $key, 'animation' ) && $value ) {
$this->add_render_attribute( 'titles-container', 'class', 'e--animation-' . $value );
break;
}
}
} ?>
<div <?php $this->print_render_attribute_string( 'titles-container' ); ?>>
<?php if ( $settings['show_all_galleries'] ) { ?>
<a data-gallery-index="all" class="elementor-item elementor-gallery-title">
<?php $this->print_unescaped_setting( 'show_all_galleries_label' ); ?>
</a>
<?php } ?>
<?php foreach ( $settings['galleries'] as $index => $gallery ) :
if ( ! $gallery['multiple_gallery'] ) {
continue;
}
$galleries[ $index ] = $gallery['multiple_gallery'];
?>
<a data-gallery-index="<?php echo esc_attr( $index ); ?>" class="elementor-item elementor-gallery-title">
<?php $this->print_unescaped_setting( 'gallery_title', 'galleries', $index ); ?>
</a>
<?php
endforeach; ?>
</div>
<?php
} elseif ( $is_single ) {
$galleries[0] = $settings['gallery'];
} elseif ( Plugin::elementor()->editor->is_edit_mode() ) { ?>
<i class="elementor-widget-empty-icon eicon-gallery-justified"></i>
<?php }
$this->add_render_attribute( 'gallery_container', 'class', 'elementor-gallery__container' );
if ( $has_title || $has_description ) {
$this->add_render_attribute( 'gallery_item_content', 'class', 'elementor-gallery-item__content' );
if ( $has_title ) {
$this->add_render_attribute( 'gallery_item_title', 'class', 'elementor-gallery-item__title' );
}
if ( $has_description ) {
$this->add_render_attribute( 'gallery_item_description', 'class', 'elementor-gallery-item__description' );
}
}
$this->add_render_attribute( 'gallery_item_background_overlay', [ 'class' => 'elementor-gallery-item__overlay' ] );
$gallery_items = [];
$thumbnail_size = $settings['thumbnail_image_size'];
foreach ( $galleries as $gallery_index => $gallery ) {
foreach ( $gallery as $index => $item ) {
if ( in_array( $item['id'], array_keys( $gallery_items ), true ) ) {
$gallery_items[ $item['id'] ][] = $gallery_index;
} else {
$gallery_items[ $item['id'] ] = [ $gallery_index ];
}
}
}
if ( 'random' === $settings['order_by'] ) {
$shuffled_items = [];
$keys = array_keys( $gallery_items );
shuffle( $keys );
foreach ( $keys as $key ) {
$shuffled_items[ $key ] = $gallery_items[ $key ];
}
$gallery_items = $shuffled_items;
}
if ( ! empty( $galleries ) ) { ?>
<div <?php $this->print_render_attribute_string( 'gallery_container' ); ?>>
<?php
foreach ( $gallery_items as $id => $tags ) :
$unique_index = $id; //$gallery_index . '_' . $index;
$image_src = wp_get_attachment_image_src( $id, $thumbnail_size );
if ( ! $image_src ) {
continue;
}
$attachment = get_post( $id );
$image_data = [
'alt' => get_post_meta( $attachment->ID, '_wp_attachment_image_alt', true ),
'media' => wp_get_attachment_image_src( $id, 'full' )['0'],
'src' => $image_src['0'],
'width' => $image_src['1'],
'height' => $image_src['2'],
'caption' => $attachment->post_excerpt,
'description' => $attachment->post_content,
'title' => $attachment->post_title,
];
$this->add_render_attribute( 'gallery_item_' . $unique_index, [
'class' => [
'e-gallery-item',
'elementor-gallery-item',
],
] );
if ( $has_animation ) {
$this->add_render_attribute( 'gallery_item_' . $unique_index, [ 'class' => 'elementor-animated-content' ] );
}
if ( $is_multiple ) {
$this->add_render_attribute( 'gallery_item_' . $unique_index, [ 'data-e-gallery-tags' => implode( ',', $tags ) ] );
}
if ( 'a' === $gallery_item_tag ) {
if ( 'file' === $settings['link_to'] ) {
$href = $image_data['media'];
$this->add_render_attribute( 'gallery_item_' . $unique_index, [
'href' => $href,
] );
$this->add_lightbox_data_attributes( 'gallery_item_' . $unique_index, $id, 'yes', 'all-' . $this->get_id() );
} elseif ( 'custom' === $settings['link_to'] ) {
$this->add_link_attributes( 'gallery_item_' . $unique_index, $settings['url'] );
}
}
$this->add_render_attribute( 'gallery_item_image_' . $unique_index,
[
'class' => [
'e-gallery-image',
'elementor-gallery-item__image',
],
'data-thumbnail' => $image_data['src'],
'data-width' => $image_data['width'],
'data-height' => $image_data['height'],
'alt' => $image_data['alt'],
]
);?>
<<?php Utils::print_validated_html_tag( $gallery_item_tag ); ?> <?php $this->print_render_attribute_string( 'gallery_item_' . $unique_index ); ?>>
<div <?php $this->print_render_attribute_string( 'gallery_item_image_' . $unique_index ); ?> ></div>
<?php if ( ! empty( $settings['overlay_background'] ) ) : ?>
<div <?php $this->print_render_attribute_string( 'gallery_item_background_overlay' ); ?>></div>
<?php endif; ?>
<?php if ( $has_title || $has_description ) : ?>
<div <?php $this->print_render_attribute_string( 'gallery_item_content' ); ?>>
<?php if ( $has_title ) :
$title = $image_data[ $settings['overlay_title'] ];
if ( ! empty( $title ) ) : ?>
<div <?php $this->print_render_attribute_string( 'gallery_item_title' ); ?>>
<?php // PHPCS - the main text of a widget should not be escaped. ?>
<?php echo $title; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</div>
<?php endif;
endif;
if ( $has_description ) :
$description = $image_data[ $settings['overlay_description'] ];
if ( ! empty( $description ) ) :?>
<div <?php $this->print_render_attribute_string( 'gallery_item_description' ); ?>>
<?php // PHPCS - the main text of a widget should not be escaped. ?>
<?php echo $description; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</div>
<?php endif;
endif; ?>
</div>
<?php endif; ?>
</<?php Utils::print_validated_html_tag( $gallery_item_tag ); ?>>
<?php endforeach;
//endforeach; ?>
</div>
<?php }
}
}
modules/animated-headline/widgets/animated-headline.php 0000644 00000037467 15075500430 0017275 0 ustar 00 <?php
namespace ElementorPro\Modules\AnimatedHeadline\Widgets;
use Elementor\Controls_Manager;
use Elementor\Core\Kits\Documents\Tabs\Global_Colors;
use Elementor\Core\Kits\Documents\Tabs\Global_Typography;
use Elementor\Group_Control_Typography;
use Elementor\Modules\DynamicTags\Module as TagsModule;
use Elementor\Utils;
use ElementorPro\Base\Base_Widget;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
class Animated_Headline extends Base_Widget {
public function get_name() {
return 'animated-headline';
}
public function get_title() {
return esc_html__( 'Animated Headline', 'elementor-pro' );
}
public function get_icon() {
return 'eicon-animated-headline';
}
public function get_keywords() {
return [ 'headline', 'heading', 'animation', 'title', 'text' ];
}
protected function register_controls() {
$this->start_controls_section(
'text_elements',
[
'label' => esc_html__( 'Headline', 'elementor-pro' ),
]
);
$this->add_control(
'headline_style',
[
'label' => esc_html__( 'Style', 'elementor-pro' ),
'type' => Controls_Manager::SELECT,
'default' => 'highlight',
'options' => [
'highlight' => esc_html__( 'Highlighted', 'elementor-pro' ),
'rotate' => esc_html__( 'Rotating', 'elementor-pro' ),
],
'prefix_class' => 'elementor-headline--style-',
'render_type' => 'template',
'frontend_available' => true,
]
);
$this->add_control(
'animation_type',
[
'label' => esc_html__( 'Animation', 'elementor-pro' ),
'type' => Controls_Manager::SELECT,
'options' => [
'typing' => 'Typing',
'clip' => 'Clip',
'flip' => 'Flip',
'swirl' => 'Swirl',
'blinds' => 'Blinds',
'drop-in' => 'Drop-in',
'wave' => 'Wave',
'slide' => 'Slide',
'slide-down' => 'Slide Down',
],
'default' => 'typing',
'condition' => [
'headline_style' => 'rotate',
],
'frontend_available' => true,
]
);
$this->add_control(
'marker',
[
'label' => esc_html__( 'Shape', 'elementor-pro' ),
'type' => Controls_Manager::SELECT,
'default' => 'circle',
'options' => [
'circle' => _x( 'Circle', 'Shapes', 'elementor-pro' ),
'curly' => _x( 'Curly', 'Shapes', 'elementor-pro' ),
'underline' => _x( 'Underline', 'Shapes', 'elementor-pro' ),
'double' => _x( 'Double', 'Shapes', 'elementor-pro' ),
'double_underline' => _x( 'Double Underline', 'Shapes', 'elementor-pro' ),
'underline_zigzag' => _x( 'Underline Zigzag', 'Shapes', 'elementor-pro' ),
'diagonal' => _x( 'Diagonal', 'Shapes', 'elementor-pro' ),
'strikethrough' => _x( 'Strikethrough', 'Shapes', 'elementor-pro' ),
'x' => 'X',
],
'render_type' => 'template',
'condition' => [
'headline_style' => 'highlight',
],
'frontend_available' => true,
]
);
$this->add_control(
'before_text',
[
'label' => esc_html__( 'Before Text', 'elementor-pro' ),
'type' => Controls_Manager::TEXT,
'dynamic' => [
'active' => true,
'categories' => [
TagsModule::TEXT_CATEGORY,
],
],
'default' => esc_html__( 'This page is', 'elementor-pro' ),
'placeholder' => esc_html__( 'Enter your headline', 'elementor-pro' ),
'label_block' => true,
'separator' => 'before',
]
);
$this->add_control(
'highlighted_text',
[
'label' => esc_html__( 'Highlighted Text', 'elementor-pro' ),
'type' => Controls_Manager::TEXT,
'dynamic' => [
'active' => true,
'categories' => [
TagsModule::TEXT_CATEGORY,
],
],
'default' => esc_html__( 'Amazing', 'elementor-pro' ),
'label_block' => true,
'condition' => [
'headline_style' => 'highlight',
],
'separator' => 'none',
'frontend_available' => true,
]
);
$this->add_control(
'rotating_text',
[
'label' => esc_html__( 'Rotating Text', 'elementor-pro' ),
'type' => Controls_Manager::TEXTAREA,
'placeholder' => esc_html__( 'Enter each word in a separate line', 'elementor-pro' ),
'separator' => 'none',
'default' => "Better\nBigger\nFaster",
'dynamic' => [
'active' => true,
'categories' => [
TagsModule::TEXT_CATEGORY,
],
],
'condition' => [
'headline_style' => 'rotate',
],
'frontend_available' => true,
]
);
$this->add_control(
'after_text',
[
'label' => esc_html__( 'After Text', 'elementor-pro' ),
'type' => Controls_Manager::TEXT,
'dynamic' => [
'active' => true,
'categories' => [
TagsModule::TEXT_CATEGORY,
],
],
'placeholder' => esc_html__( 'Enter your headline', 'elementor-pro' ),
'label_block' => true,
'separator' => 'none',
]
);
$this->add_control(
'loop',
[
'label' => esc_html__( 'Infinite Loop', 'elementor-pro' ),
'type' => Controls_Manager::SWITCHER,
'default' => 'yes',
'render_type' => 'template',
'frontend_available' => true,
'selectors' => [
'{{WRAPPER}}' => '--iteration-count: infinite',
],
'separator' => 'before',
]
);
$this->add_control(
'highlight_animation_duration',
[
'label' => esc_html__( 'Duration', 'elementor-pro' ) . ' (ms)',
'type' => Controls_Manager::NUMBER,
'default' => 1200,
'render_type' => 'template',
'frontend_available' => true,
'selectors' => [
'{{WRAPPER}}' => '--animation-duration: {{VALUE}}ms',
],
'condition' => [
'headline_style' => 'highlight',
],
]
);
$this->add_control(
'highlight_iteration_delay',
[
'label' => esc_html__( 'Delay', 'elementor-pro' ) . ' (ms)',
'type' => Controls_Manager::NUMBER,
'default' => 8000,
'render_type' => 'template',
'frontend_available' => true,
'condition' => [
'headline_style' => 'highlight',
'loop' => 'yes',
],
]
);
$this->add_control(
'rotate_iteration_delay',
[
'label' => esc_html__( 'Duration', 'elementor-pro' ) . ' (ms)',
'type' => Controls_Manager::NUMBER,
'default' => 2500,
'render_type' => 'template',
'frontend_available' => true,
'condition' => [
'headline_style' => 'rotate',
],
]
);
$this->add_control(
'link',
[
'label' => esc_html__( 'Link', 'elementor-pro' ),
'type' => Controls_Manager::URL,
'dynamic' => [
'active' => true,
],
'separator' => 'before',
]
);
$this->add_responsive_control(
'alignment',
[
'label' => esc_html__( 'Alignment', 'elementor-pro' ),
'type' => Controls_Manager::CHOOSE,
'options' => [
'left' => [
'title' => esc_html__( 'Left', 'elementor-pro' ),
'icon' => 'eicon-text-align-left',
],
'center' => [
'title' => esc_html__( 'Center', 'elementor-pro' ),
'icon' => 'eicon-text-align-center',
],
'right' => [
'title' => esc_html__( 'Right', 'elementor-pro' ),
'icon' => 'eicon-text-align-right',
],
],
'default' => 'center',
'selectors' => [
'{{WRAPPER}} .elementor-headline' => 'text-align: {{VALUE}}',
],
]
);
$this->add_control(
'tag',
[
'label' => esc_html__( 'HTML Tag', 'elementor-pro' ),
'type' => Controls_Manager::SELECT,
'options' => [
'h1' => 'H1',
'h2' => 'H2',
'h3' => 'H3',
'h4' => 'H4',
'h5' => 'H5',
'h6' => 'H6',
'div' => 'div',
'span' => 'span',
'p' => 'p',
],
'default' => 'h3',
]
);
$this->end_controls_section();
$this->start_controls_section(
'section_style_marker',
[
'label' => esc_html__( 'Shape', 'elementor-pro' ),
'tab' => Controls_Manager::TAB_STYLE,
'condition' => [
'headline_style' => 'highlight',
],
]
);
$this->add_control(
'marker_color',
[
'label' => esc_html__( 'Color', 'elementor-pro' ),
'type' => Controls_Manager::COLOR,
'global' => [
'default' => Global_Colors::COLOR_ACCENT,
],
'selectors' => [
'{{WRAPPER}} .elementor-headline-dynamic-wrapper path' => 'stroke: {{VALUE}}',
],
]
);
$this->add_control(
'stroke_width',
[
'label' => esc_html__( 'Width', 'elementor-pro' ),
'type' => Controls_Manager::SLIDER,
'range' => [
'px' => [
'min' => 1,
'max' => 20,
],
],
'selectors' => [
'{{WRAPPER}} .elementor-headline-dynamic-wrapper path' => 'stroke-width: {{SIZE}}{{UNIT}}',
],
]
);
$this->add_control(
'above_content',
[
'label' => esc_html__( 'Bring to Front', 'elementor-pro' ),
'type' => Controls_Manager::SWITCHER,
'selectors' => [
'{{WRAPPER}} .elementor-headline-dynamic-wrapper svg' => 'z-index: 2',
'{{WRAPPER}} .elementor-headline-dynamic-text' => 'z-index: auto',
],
]
);
$this->add_control(
'rounded_edges',
[
'label' => esc_html__( 'Rounded Edges', 'elementor-pro' ),
'type' => Controls_Manager::SWITCHER,
'selectors' => [
'{{WRAPPER}} .elementor-headline-dynamic-wrapper path' => 'stroke-linecap: round; stroke-linejoin: round',
],
]
);
$this->end_controls_section();
$this->start_controls_section(
'section_style_text',
[
'label' => esc_html__( 'Headline', 'elementor-pro' ),
'tab' => Controls_Manager::TAB_STYLE,
]
);
$this->add_control(
'title_color',
[
'label' => esc_html__( 'Text Color', 'elementor-pro' ),
'type' => Controls_Manager::COLOR,
'global' => [
'default' => Global_Colors::COLOR_SECONDARY,
],
'selectors' => [
'{{WRAPPER}} .elementor-headline-plain-text' => 'color: {{VALUE}}',
],
]
);
$this->add_group_control(
Group_Control_Typography::get_type(),
[
'name' => 'title_typography',
'global' => [
'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
],
'selector' => '{{WRAPPER}} .elementor-headline',
]
);
$this->add_control(
'heading_words_style',
[
'type' => Controls_Manager::HEADING,
'label' => esc_html__( 'Animated Text', 'elementor-pro' ),
'separator' => 'before',
]
);
$this->add_control(
'words_color',
[
'label' => esc_html__( 'Text Color', 'elementor-pro' ),
'type' => Controls_Manager::COLOR,
'global' => [
'default' => Global_Colors::COLOR_SECONDARY,
],
'selectors' => [
'{{WRAPPER}}' => '--dynamic-text-color: {{VALUE}}',
],
]
);
$this->add_group_control(
Group_Control_Typography::get_type(),
[
'name' => 'words_typography',
'global' => [
'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
],
'selector' => '{{WRAPPER}} .elementor-headline-dynamic-text',
'exclude' => [ 'font_size' ],
]
);
$this->add_control(
'typing_animation_highlight_colors',
[
'type' => Controls_Manager::HEADING,
'label' => esc_html__( 'Selected Text', 'elementor-pro' ),
'separator' => 'before',
'condition' => [
'headline_style' => 'rotate',
'animation_type' => 'typing',
],
]
);
$this->add_control(
'highlighted_text_background_color',
[
'label' => esc_html__( 'Selection Color', 'elementor-pro' ),
'type' => Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}}' => '--typing-selected-bg-color: {{VALUE}}',
],
'condition' => [
'headline_style' => 'rotate',
'animation_type' => 'typing',
],
]
);
$this->add_control(
'highlighted_text_color',
[
'label' => esc_html__( 'Text Color', 'elementor-pro' ),
'type' => Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}}' => '--typing-selected-color: {{VALUE}}',
],
'condition' => [
'headline_style' => 'rotate',
'animation_type' => 'typing',
],
]
);
$this->end_controls_section();
}
protected function render() {
$settings = $this->get_settings_for_display();
$tag = Utils::validate_html_tag( $settings['tag'] );
$this->add_render_attribute( 'headline', 'class', 'elementor-headline' );
if ( 'rotate' === $settings['headline_style'] ) {
$this->add_render_attribute( 'headline', 'class', 'elementor-headline-animation-type-' . $settings['animation_type'] );
$is_letter_animation = in_array( $settings['animation_type'], [ 'typing', 'swirl', 'blinds', 'wave' ] );
if ( $is_letter_animation ) {
$this->add_render_attribute( 'headline', 'class', 'elementor-headline-letters' );
}
}
if ( ! empty( $settings['link']['url'] ) ) {
$this->add_link_attributes( 'url', $settings['link'] );
?>
<a <?php $this->print_render_attribute_string( 'url' ); ?>>
<?php
}
?>
<<?php Utils::print_validated_html_tag( $tag ); ?> <?php $this->print_render_attribute_string( 'headline' ); ?>>
<?php if ( ! empty( $settings['before_text'] ) ) : ?>
<span class="elementor-headline-plain-text elementor-headline-text-wrapper"><?php $this->print_unescaped_setting( 'before_text' ); ?></span>
<?php endif; ?>
<span class="elementor-headline-dynamic-wrapper elementor-headline-text-wrapper">
<?php if ( 'rotate' === $settings['headline_style'] && $settings['rotating_text'] ) :
$rotating_text = explode( "\n", $settings['rotating_text'] );
foreach ( $rotating_text as $key => $text ) : ?>
<span class="elementor-headline-dynamic-text<?php echo 1 > $key ? ' elementor-headline-text-active' : ''; ?>">
<?php Utils::print_unescaped_internal_string( str_replace( ' ', ' ', $text ) ); ?>
</span>
<?php endforeach; ?>
<?php elseif ( 'highlight' === $settings['headline_style'] && ! empty( $settings['highlighted_text'] ) ) : ?>
<span class="elementor-headline-dynamic-text elementor-headline-text-active"><?php $this->print_unescaped_setting( 'highlighted_text' ); ?></span>
<?php endif ?>
</span>
<?php if ( ! empty( $settings['after_text'] ) ) : ?>
<span class="elementor-headline-plain-text elementor-headline-text-wrapper"><?php $this->print_unescaped_setting( 'after_text' ); ?></span>
<?php endif; ?>
</<?php Utils::print_validated_html_tag( $tag ); ?>>
<?php
if ( ! empty( $settings['link']['url'] ) ) {
echo '</a>';
}
}
/**
* Render Animated Headline widget output in the editor.
*
* Written as a Backbone JavaScript template and used to generate the live preview.
*
* @since 2.9.0
* @access protected
*/
protected function content_template() {
?>
<#
var headlineClasses = 'elementor-headline',
tag = elementorPro.validateHTMLTag( settings.tag );
if ( 'rotate' === settings.headline_style ) {
headlineClasses += ' elementor-headline-animation-type-' + settings.animation_type;
var isLetterAnimation = -1 !== [ 'typing', 'swirl', 'blinds', 'wave' ].indexOf( settings.animation_type );
if ( isLetterAnimation ) {
headlineClasses += ' elementor-headline-letters';
}
}
if ( settings.link.url ) { #>
<a href="#">
<# } #>
<{{{ tag }}} class="{{{ headlineClasses }}}">
<# if ( settings.before_text ) { #>
<span class="elementor-headline-plain-text elementor-headline-text-wrapper">{{{ settings.before_text }}}</span>
<# } #>
<# if ( settings.rotating_text ) { #>
<span class="elementor-headline-dynamic-wrapper elementor-headline-text-wrapper">
<# if ( 'rotate' === settings.headline_style && settings.rotating_text ) {
var rotatingText = ( settings.rotating_text || '' ).split( '\n' );
for ( var i = 0; i < rotatingText.length; i++ ) {
var statusClass = 0 === i ? 'elementor-headline-text-active' : ''; #>
<span class="elementor-headline-dynamic-text {{ statusClass }}">
{{{ rotatingText[ i ].replace( ' ', ' ' ) }}}
</span>
<# }
}
else if ( 'highlight' === settings.headline_style && settings.highlighted_text ) { #>
<span class="elementor-headline-dynamic-text elementor-headline-text-active">{{{ settings.highlighted_text }}}</span>
<# } #>
</span>
<# } #>
<# if ( settings.after_text ) { #>
<span class="elementor-headline-plain-text elementor-headline-text-wrapper">{{{ settings.after_text }}}</span>
<# } #>
</{{{ tag }}}>
<# if ( settings.link.url ) { #>
</a>
<# } #>
<?php
}
}
modules/animated-headline/module.php 0000644 00000000525 15075500430 0013544 0 ustar 00 <?php
namespace ElementorPro\Modules\AnimatedHeadline;
use ElementorPro\Base\Module_Base;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
class Module extends Module_Base {
public function get_widgets() {
return [
'Animated_Headline',
];
}
public function get_name() {
return 'animated-headline';
}
}
modules/popup/module.php 0000644 00000011400 15075500430 0011350 0 ustar 00 <?php
namespace ElementorPro\Modules\Popup;
use Elementor\Core\Common\Modules\Ajax\Module as Ajax;
use Elementor\Core\Documents_Manager;
use Elementor\Core\DynamicTags\Manager as DynamicTagsManager;
use Elementor\TemplateLibrary\Source_Local;
use ElementorPro\Base\Module_Base;
use ElementorPro\Modules\ThemeBuilder\Classes\Locations_Manager;
use ElementorPro\Plugin;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
class Module extends Module_Base {
const DOCUMENT_TYPE = 'popup';
public function __construct() {
parent::__construct();
add_action( 'elementor/documents/register', [ $this, 'register_documents' ] );
add_action( 'elementor/theme/register_locations', [ $this, 'register_location' ] );
add_action( 'elementor/dynamic_tags/register_tags', [ $this, 'register_tag' ] );
add_action( 'elementor/ajax/register_actions', [ $this, 'register_ajax_actions' ] );
add_action( 'admin_menu', [ $this, 'admin_menu' ] );
add_action( 'wp_footer', [ $this, 'print_popups' ] );
add_action( 'elementor_pro/init', [ $this, 'add_form_action' ] );
add_filter( 'elementor_pro/editor/localize_settings', [ $this, 'localize_settings' ] );
add_filter( 'elementor/finder/categories', [ $this, 'add_finder_items' ] );
}
public function get_name() {
return 'popup';
}
public function add_form_action() {
$this->add_component( 'form-action', new Form_Action() );
}
public static function add_popup_to_location( $popup_id ) {
/** @var \ElementorPro\Modules\ThemeBuilder\Module $theme_builder */
$theme_builder = Plugin::instance()->modules_manager->get_modules( 'theme-builder' );
$theme_builder->get_locations_manager()->add_doc_to_location( Document::get_property( 'location' ), $popup_id );
}
public function register_documents( Documents_Manager $documents_manager ) {
$documents_manager->register_document_type( self::DOCUMENT_TYPE, Document::get_class_full_name() );
}
public function register_location( Locations_Manager $location_manager ) {
$location_manager->register_location(
'popup',
[
'label' => esc_html__( 'Popup', 'elementor-pro' ),
'multiple' => true,
'public' => false,
'edit_in_content' => false,
]
);
}
public function print_popups() {
elementor_theme_do_location( 'popup' );
}
public function register_tag( DynamicTagsManager $dynamic_tags ) {
$dynamic_tags->register_tag( __NAMESPACE__ . '\Tag' );
}
public function register_ajax_actions( Ajax $ajax ) {
$ajax->register_ajax_action( 'pro_popup_save_display_settings', [ $this, 'save_display_settings' ] );
}
public function localize_settings( array $settings ) {
$settings = array_replace_recursive( $settings, [
'i18n' => [
'popups' => esc_html__( 'Popups', 'elementor-pro' ),
'triggers' => esc_html__( 'Triggers', 'elementor-pro' ),
'timing' => esc_html__( 'Advanced Rules', 'elementor-pro' ),
'popup_publish_screen_triggers_description' => esc_html__( 'What action the user needs to do for the popup to open.', 'elementor-pro' ),
'popup_publish_screen_timing_description' => esc_html__( 'Requirements that have to be met for the popup to open.', 'elementor-pro' ),
'popup_settings_introduction_title' => esc_html__( 'Please Note', 'elementor-pro' ),
'popup_settings_introduction_message' => esc_html__( 'Popup settings are accessed via the settings icon in the bottom menu', 'elementor-pro' ),
],
] );
return $settings;
}
public function save_display_settings( $data ) {
/** @var Document $popup_document */
$popup_document = Plugin::elementor()->documents->get( $data['editor_post_id'] );
$popup_document->save_display_settings_data( $data['settings'] );
}
/**
* Add New item to admin menu.
*
* Fired by `admin_menu` action.
*
* @since 2.4.0
* @access public
*/
public function admin_menu() {
add_submenu_page( Source_Local::ADMIN_MENU_SLUG, '', esc_html__( 'Popups', 'elementor-pro' ), 'publish_posts', $this->get_admin_url( true ) );
}
public function add_finder_items( array $categories ) {
$categories['general']['items']['popups'] = [
'title' => esc_html__( 'Popups', 'elementor-pro' ),
'icon' => 'library-save',
'url' => $this->get_admin_url(),
'keywords' => [ 'template', 'popup', 'library' ],
];
$categories['create']['items']['popups'] = [
'title' => esc_html__( 'Add New Popup', 'elementor-pro' ),
'icon' => 'plus-circle-o',
'url' => $this->get_admin_url() . '#add_new',
'keywords' => [ 'template', 'theme', 'popup', 'new', 'create' ],
];
return $categories;
}
private function get_admin_url( $relative = false ) {
$base_url = Source_Local::ADMIN_MENU_SLUG;
if ( ! $relative ) {
$base_url = admin_url( $base_url );
}
return add_query_arg(
[
'tabs_group' => 'popup',
'elementor_library_type' => 'popup',
],
$base_url
);
}
}
modules/popup/tag.php 0000644 00000005762 15075500430 0010654 0 ustar 00 <?php
namespace ElementorPro\Modules\Popup;
use Elementor\Controls_Manager;
use ElementorPro\Modules\DynamicTags\Tags\Base\Tag as DynamicTagsTag;
use ElementorPro\Modules\DynamicTags\Module as DynamicTagsModule;
use ElementorPro\Modules\QueryControl\Module as QueryControlModule;
use ElementorPro\Plugin;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
class Tag extends DynamicTagsTag {
public function get_name() {
return 'popup';
}
public function get_title() {
return esc_html__( 'Popup', 'elementor-pro' );
}
public function get_group() {
return DynamicTagsModule::ACTION_GROUP;
}
public function get_categories() {
return [ DynamicTagsModule::URL_CATEGORY ];
}
public function register_controls() {
$this->add_control(
'action',
[
'label' => esc_html__( 'Action', 'elementor-pro' ),
'type' => Controls_Manager::SELECT,
'default' => 'open',
'options' => [
'open' => esc_html__( 'Open Popup', 'elementor-pro' ),
'close' => esc_html__( 'Close Popup', 'elementor-pro' ),
'toggle' => esc_html__( 'Toggle Popup', 'elementor-pro' ),
],
]
);
$this->add_control(
'popup',
[
'label' => esc_html__( 'Popup', 'elementor-pro' ),
'type' => QueryControlModule::QUERY_CONTROL_ID,
'autocomplete' => [
'object' => QueryControlModule::QUERY_OBJECT_LIBRARY_TEMPLATE,
'query' => [
'posts_per_page' => 20,
'post_status' => [ 'publish', 'private' ],
'meta_query' => [
[
'key' => Document::TYPE_META_KEY,
'value' => 'popup',
],
],
],
],
'label_block' => true,
'condition' => [
'action' => [ 'open', 'toggle' ],
],
]
);
$this->add_control(
'do_not_show_again',
[
'label' => esc_html__( 'Don\'t Show Again', 'elementor-pro' ),
'type' => Controls_Manager::SWITCHER,
'condition' => [
'action' => 'close',
],
]
);
}
public function render() {
$settings = $this->get_active_settings();
if ( 'close' === $settings['action'] ) {
$this->print_close_popup_link( $settings );
return;
}
$this->print_open_popup_link( $settings );
}
// Keep Empty to avoid default advanced section
protected function register_advanced_section() {}
private function print_open_popup_link( array $settings ) {
if ( ! $settings['popup'] ) {
return;
}
$link_action_url = Plugin::elementor()->frontend->create_action_hash( 'popup:open', [
'id' => $settings['popup'],
'toggle' => 'toggle' === $settings['action'],
] );
Module::add_popup_to_location( $settings['popup'] );
// PHPCS - `create_action_hash` is safe.
echo $link_action_url; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
private function print_close_popup_link( array $settings ) {
// PHPCS - `create_action_hash` is safe.
echo Plugin::elementor()->frontend->create_action_hash( 'popup:close', [ 'do_not_show_again' => $settings['do_not_show_again'] ] ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
}
modules/popup/document.php 0000644 00000046376 15075500430 0011725 0 ustar 00 <?php
namespace ElementorPro\Modules\Popup;
use Elementor\Controls_Manager;
use Elementor\Group_Control_Border;
use Elementor\Group_Control_Box_Shadow;
use Elementor\Group_Control_Background;
use ElementorPro\Modules\Popup\DisplaySettings\Base;
use ElementorPro\Modules\Popup\DisplaySettings\Timing;
use ElementorPro\Modules\Popup\DisplaySettings\Triggers;
use ElementorPro\Modules\ThemeBuilder\Documents\Theme_Section_Document;
use ElementorPro\Modules\ThemeBuilder\Module as ThemeBuilderModule;
use ElementorPro\Plugin;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
class Document extends Theme_Section_Document {
const DISPLAY_SETTINGS_META_KEY = '_elementor_popup_display_settings';
/**
* @var Base[]
*/
private $display_settings;
public static function get_properties() {
$properties = parent::get_properties();
$properties['admin_tab_group'] = 'popup';
$properties['location'] = 'popup';
$properties['support_kit'] = true;
$properties['support_site_editor'] = false;
return $properties;
}
public static function get_title() {
return esc_html__( 'Popup', 'elementor-pro' );
}
public static function get_plural_title() {
return esc_html__( 'Popups', 'elementor-pro' );
}
public function get_display_settings() {
if ( ! $this->display_settings ) {
$settings = $this->get_display_settings_data();
if ( ! $settings ) {
$settings = [
'triggers' => [],
'timing' => [],
];
}
$id = $this->get_main_id();
$this->display_settings = [
'triggers' => new Triggers( [
'id' => $id,
'settings' => $settings['triggers'],
] ),
'timing' => new Timing( [
'id' => $id,
'settings' => $settings['timing'],
] ),
];
}
return $this->display_settings;
}
public function get_initial_config() {
$config = parent::get_initial_config();
$display_settings = $this->get_display_settings();
$config['displaySettings'] = [
'triggers' => [
'controls' => $display_settings['triggers']->get_controls(),
'settings' => $display_settings['triggers']->get_settings(),
],
'timing' => [
'controls' => $display_settings['timing']->get_controls(),
'settings' => $display_settings['timing']->get_settings(),
],
];
$config['container'] = '.elementor-popup-modal .dialog-widget-content';
return $config;
}
public function get_name() {
return 'popup';
}
public function get_css_wrapper_selector() {
return '#elementor-popup-modal-' . $this->get_main_id();
}
public function get_display_settings_data() {
return $this->get_main_meta( self::DISPLAY_SETTINGS_META_KEY );
}
public function save_display_settings_data( $display_settings_data ) {
$this->update_main_meta( self::DISPLAY_SETTINGS_META_KEY, $display_settings_data );
}
public function get_frontend_settings() {
$settings = parent::get_frontend_settings();
$display_settings = $this->get_display_settings();
// Disable triggers if the popup is not printed by the theme builder conditions.
// avoid auto show the popup if it's enqueued by a dynamic tag and etc.)
$popups_by_condition = ThemeBuilderModule::instance()->get_conditions_manager()->get_documents_for_location( 'popup' );
if ( $popups_by_condition && isset( $popups_by_condition[ $this->get_main_id() ] ) ) {
$settings['triggers'] = $display_settings['triggers']->get_frontend_settings();
}
$settings['timing'] = $display_settings['timing']->get_frontend_settings();
return $settings;
}
public function get_export_data() {
$data = parent::get_export_data();
$display_settings = $this->get_display_settings();
$data['display_settings'] = [
'triggers' => $display_settings['triggers']->get_frontend_settings(),
'timing' => $display_settings['timing']->get_frontend_settings(),
];
return $data;
}
public function import( array $data ) {
parent::import( $data );
$this->save_display_settings_data( $data['display_settings'] );
}
protected function register_controls() {
$this->start_controls_section(
'popup_layout',
[
'label' => esc_html__( 'Layout', 'elementor-pro' ),
'tab' => Controls_Manager::TAB_SETTINGS,
]
);
$this->add_responsive_control(
'width',
[
'label' => esc_html__( 'Width', 'elementor-pro' ),
'type' => Controls_Manager::SLIDER,
'range' => [
'px' => [
'min' => 100,
'max' => 1000,
],
'vh' => [
'min' => 10,
'max' => 100,
],
],
'size_units' => [ 'px', 'vw' ],
'default' => [
'size' => 640,
],
'selectors' => [
'{{WRAPPER}} .dialog-message' => 'width: {{SIZE}}{{UNIT}};',
],
]
);
$this->add_control(
'height_type',
[
'label' => esc_html__( 'Height', 'elementor-pro' ),
'type' => Controls_Manager::SELECT,
'default' => 'auto',
'options' => [
'auto' => esc_html__( 'Fit To Content', 'elementor-pro' ),
'fit_to_screen' => esc_html__( 'Fit To Screen', 'elementor-pro' ),
'custom' => esc_html__( 'Custom', 'elementor-pro' ),
],
'selectors_dictionary' => [
'fit_to_screen' => '100vh',
],
'selectors' => [
'{{WRAPPER}} .dialog-message' => 'height: {{VALUE}};',
],
]
);
$this->add_responsive_control(
'height',
[
'label' => esc_html__( 'Custom Height', 'elementor-pro' ),
'type' => Controls_Manager::SLIDER,
'range' => [
'px' => [
'min' => 100,
'max' => 1000,
],
'vh' => [
'min' => 10,
'max' => 100,
],
],
'size_units' => [ 'px', 'vh' ],
'condition' => [
'height_type' => 'custom',
],
'default' => [
'size' => 380,
],
'selectors' => [
'{{WRAPPER}} .dialog-message' => 'height: {{SIZE}}{{UNIT}};',
],
]
);
$this->add_control(
'content_position',
[
'label' => esc_html__( 'Content Position', 'elementor-pro' ),
'type' => Controls_Manager::SELECT,
'default' => 'top',
'options' => [
'top' => esc_html__( 'Top', 'elementor-pro' ),
'center' => esc_html__( 'Center', 'elementor-pro' ),
'bottom' => esc_html__( 'Bottom', 'elementor-pro' ),
],
'condition' => [
'height_type!' => 'auto',
],
'selectors_dictionary' => [
'top' => 'flex-start',
'bottom' => 'flex-end',
],
'selectors' => [
'{{WRAPPER}} .dialog-message' => 'align-items: {{VALUE}};',
],
]
);
$this->add_control(
'position_heading',
[
'label' => esc_html__( 'Position', 'elementor-pro' ),
'type' => Controls_Manager::HEADING,
'separator' => 'before',
]
);
$this->add_responsive_control(
'horizontal_position',
[
'label' => esc_html__( 'Horizontal', 'elementor-pro' ),
'type' => Controls_Manager::CHOOSE,
'toggle' => false,
'default' => 'center',
'options' => [
'left' => [
'title' => esc_html__( 'Left', 'elementor-pro' ),
'icon' => 'eicon-h-align-left',
],
'center' => [
'title' => esc_html__( 'Center', 'elementor-pro' ),
'icon' => 'eicon-h-align-center',
],
'right' => [
'title' => esc_html__( 'Right', 'elementor-pro' ),
'icon' => 'eicon-h-align-right',
],
],
'selectors' => [
'{{WRAPPER}}' => 'justify-content: {{VALUE}}',
],
'selectors_dictionary' => [
'left' => 'flex-start',
'right' => 'flex-end',
],
]
);
$this->add_responsive_control(
'vertical_position',
[
'label' => esc_html__( 'Vertical', 'elementor-pro' ),
'type' => Controls_Manager::CHOOSE,
'toggle' => false,
'default' => 'center',
'options' => [
'top' => [
'title' => esc_html__( 'Top', 'elementor-pro' ),
'icon' => 'eicon-v-align-top',
],
'center' => [
'title' => esc_html__( 'Center', 'elementor-pro' ),
'icon' => 'eicon-v-align-middle',
],
'bottom' => [
'title' => esc_html__( 'Bottom', 'elementor-pro' ),
'icon' => 'eicon-v-align-bottom',
],
],
'selectors' => [
'{{WRAPPER}}' => 'align-items: {{VALUE}}',
],
'selectors_dictionary' => [
'top' => 'flex-start',
'bottom' => 'flex-end',
],
]
);
$this->add_control(
'overlay',
[
'label' => esc_html__( 'Overlay', 'elementor-pro' ),
'type' => Controls_Manager::SWITCHER,
'label_off' => esc_html__( 'Hide', 'elementor-pro' ),
'label_on' => esc_html__( 'Show', 'elementor-pro' ),
'default' => 'yes',
'selectors' => [
'{{WRAPPER}}' => 'pointer-events: all',
],
'separator' => 'before',
]
);
$this->add_control(
'close_button',
[
'label' => esc_html__( 'Close Button', 'elementor-pro' ),
'type' => Controls_Manager::SWITCHER,
'label_off' => esc_html__( 'Hide', 'elementor-pro' ),
'label_on' => esc_html__( 'Show', 'elementor-pro' ),
'default' => 'yes',
'selectors' => [
// Using flex to make sure that each icon type (i or SVG) will be vertically aligned.
'{{WRAPPER}} .dialog-close-button' => 'display: flex',
],
]
);
$this->add_responsive_control(
'entrance_animation',
[
'label' => esc_html__( 'Entrance Animation', 'elementor-pro' ),
'type' => Controls_Manager::ANIMATION,
'frontend_available' => true,
'separator' => 'before',
]
);
$this->add_responsive_control(
'exit_animation',
[
'label' => esc_html__( 'Exit Animation', 'elementor-pro' ),
'type' => Controls_Manager::EXIT_ANIMATION,
'frontend_available' => true,
]
);
$this->add_control(
'entrance_animation_duration',
[
'label' => esc_html__( 'Animation Duration', 'elementor-pro' ) . ' (sec)',
'type' => Controls_Manager::SLIDER,
'frontend_available' => true,
'default' => [
'size' => 1.2,
],
'range' => [
'px' => [
'min' => 0.1,
'max' => 5,
'step' => 0.1,
],
],
'selectors' => [
'{{WRAPPER}} .dialog-widget-content' => 'animation-duration: {{SIZE}}s',
],
'conditions' => [
'relation' => 'or',
'terms' => [
[
'name' => 'entrance_animation',
'operator' => '!==',
'value' => '',
],
[
'name' => 'exit_animation',
'operator' => '!==',
'value' => '',
],
],
],
]
);
$this->end_controls_section();
parent::register_controls();
$this->start_controls_section(
'section_page_style',
[
'label' => esc_html__( 'Popup', 'elementor-pro' ),
'tab' => Controls_Manager::TAB_STYLE,
]
);
$this->add_group_control(
Group_Control_Background::get_type(),
[
'name' => 'background',
'selector' => '{{WRAPPER}} .dialog-widget-content',
]
);
$this->add_group_control(
Group_Control_Border::get_type(),
[
'name' => 'border',
'selector' => '{{WRAPPER}} .dialog-widget-content',
]
);
$this->add_responsive_control(
'border_radius',
[
'label' => esc_html__( 'Border Radius', 'elementor-pro' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => [ 'px', '%' ],
'selectors' => [
'{{WRAPPER}} .dialog-widget-content' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
],
]
);
$this->add_group_control(
Group_Control_Box_Shadow::get_type(),
[
'name' => 'box_shadow',
'selector' => '{{WRAPPER}} .dialog-widget-content',
'fields_options' => [
'box_shadow_type' => [
'default' => 'yes',
],
'box_shadow' => [
'default' => [
'horizontal' => 2,
'vertical' => 8,
'blur' => 23,
'spread' => 3,
'color' => 'rgba(0,0,0,0.2)',
],
],
],
]
);
$this->end_controls_section();
$this->start_controls_section(
'section_overlay',
[
'label' => esc_html__( 'Overlay', 'elementor-pro' ),
'tab' => Controls_Manager::TAB_STYLE,
'condition' => [
'overlay' => 'yes',
],
]
);
$this->add_group_control(
Group_Control_Background::get_type(),
[
'name' => 'overlay_background',
'types' => [ 'classic', 'gradient' ],
'selector' => '{{WRAPPER}}',
'fields_options' => [
'background' => [
'default' => 'classic',
],
'color' => [
'default' => 'rgba(0,0,0,.8)',
],
],
]
);
$this->end_controls_section();
$this->start_controls_section(
'section_close_button',
[
'label' => esc_html__( 'Close Button', 'elementor-pro' ),
'tab' => Controls_Manager::TAB_STYLE,
'condition' => [
'close_button!' => '',
],
]
);
$this->add_control(
'close_button_position',
[
'label' => esc_html__( 'Position', 'elementor-pro' ),
'type' => Controls_Manager::SELECT,
'options' => [
'' => esc_html__( 'Inside', 'elementor-pro' ),
'outside' => esc_html__( 'Outside', 'elementor-pro' ),
],
'frontend_available' => true,
]
);
$this->add_responsive_control(
'close_button_vertical',
[
'label' => esc_html__( 'Vertical Position', 'elementor-pro' ),
'type' => Controls_Manager::SLIDER,
'size_units' => [ '%', 'px' ],
'range' => [
'%' => [
'max' => 100,
'min' => 0,
'step' => 0.1,
],
'px' => [
'max' => 500,
'min' => -500,
],
],
'default' => [
'unit' => '%',
],
'tablet_default' => [
'unit' => '%',
],
'mobile_default' => [
'unit' => '%',
],
'selectors' => [
'{{WRAPPER}} .dialog-close-button' => 'top: {{SIZE}}{{UNIT}}',
],
]
);
$this->add_responsive_control(
'close_button_horizontal',
[
'label' => esc_html__( 'Horizontal Position', 'elementor-pro' ),
'type' => Controls_Manager::SLIDER,
'size_units' => [ '%', 'px' ],
'range' => [
'%' => [
'max' => 100,
'min' => 0,
'step' => 0.1,
],
'px' => [
'max' => 500,
'min' => -500,
],
],
'default' => [
'unit' => '%',
],
'tablet_default' => [
'unit' => '%',
],
'mobile_default' => [
'unit' => '%',
],
'selectors' => [
'body:not(.rtl) {{WRAPPER}} .dialog-close-button' => 'right: {{SIZE}}{{UNIT}}',
'body.rtl {{WRAPPER}} .dialog-close-button' => 'left: {{SIZE}}{{UNIT}}',
],
'separator' => 'after',
]
);
$this->start_controls_tabs( 'close_button_style_tabs' );
$this->start_controls_tab(
'tab_x_button_normal',
[
'label' => esc_html__( 'Normal', 'elementor-pro' ),
]
);
$this->add_control(
'close_button_color',
[
'label' => esc_html__( 'Color', 'elementor-pro' ),
'type' => Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .dialog-close-button i' => 'color: {{VALUE}}',
'{{WRAPPER}} .dialog-close-button svg' => 'fill: {{VALUE}}',
],
]
);
$this->add_control(
'close_button_background_color',
[
'label' => esc_html__( 'Background Color', 'elementor-pro' ),
'type' => Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .dialog-close-button' => 'background-color: {{VALUE}}',
],
]
);
$this->end_controls_tab();
$this->start_controls_tab(
'tab_x_button_hover',
[
'label' => esc_html__( 'Hover', 'elementor-pro' ),
]
);
$this->add_control(
'close_button_hover_color',
[
'label' => esc_html__( 'Color', 'elementor-pro' ),
'type' => Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .dialog-close-button:hover i' => 'color: {{VALUE}}',
],
]
);
$this->add_control(
'close_button_hover_background_color',
[
'label' => esc_html__( 'Background Color', 'elementor-pro' ),
'type' => Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .dialog-close-button:hover' => 'background-color: {{VALUE}}',
],
]
);
$this->end_controls_tab();
$this->end_controls_tabs();
$this->add_responsive_control(
'icon_size',
[
'label' => esc_html__( 'Size', 'elementor-pro' ),
'type' => Controls_Manager::SLIDER,
'selectors' => [
'{{WRAPPER}} .dialog-close-button' => 'font-size: {{SIZE}}{{UNIT}}',
],
'separator' => 'before',
]
);
$this->end_controls_section();
$this->start_controls_section(
'section_advanced',
[
'label' => esc_html__( 'Advanced', 'elementor-pro' ),
'tab' => Controls_Manager::TAB_ADVANCED,
]
);
$this->add_control(
'close_button_delay',
[
'label' => esc_html__( 'Show Close Button After', 'elementor-pro' ) . ' (sec)',
'type' => Controls_Manager::NUMBER,
'min' => 0.1,
'max' => 60,
'step' => 0.1,
'condition' => [
'close_button' => 'yes',
],
'frontend_available' => true,
]
);
$this->add_control(
'close_automatically',
[
'label' => esc_html__( 'Automatically Close After', 'elementor-pro' ) . ' (sec)',
'type' => Controls_Manager::NUMBER,
'min' => 0.1,
'max' => 60,
'step' => 0.1,
'frontend_available' => true,
]
);
$this->add_control(
'prevent_close_on_background_click',
[
'label' => esc_html__( 'Prevent Closing on Overlay', 'elementor-pro' ),
'type' => Controls_Manager::SWITCHER,
'frontend_available' => true,
]
);
$this->add_control(
'prevent_close_on_esc_key',
[
'label' => esc_html__( 'Prevent Closing on ESC key', 'elementor-pro' ),
'type' => Controls_Manager::SWITCHER,
'frontend_available' => true,
]
);
$this->add_control(
'prevent_scroll',
[
'label' => esc_html__( 'Disable Page Scrolling', 'elementor-pro' ),
'type' => Controls_Manager::SWITCHER,
'frontend_available' => true,
]
);
$this->add_control(
'avoid_multiple_popups',
[
'label' => esc_html__( 'Avoid Multiple Popups', 'elementor-pro' ),
'type' => Controls_Manager::SWITCHER,
'description' => esc_html__( 'If the user has seen another popup on the page hide this popup', 'elementor-pro' ),
'frontend_available' => true,
]
);
$this->add_control(
'open_selector',
[
'label' => esc_html__( 'Open By Selector', 'elementor-pro' ),
'type' => Controls_Manager::TEXT,
'placeholder' => esc_html__( '#id, .class', 'elementor-pro' ),
'description' => esc_html__( 'In order to open a popup on selector click, please set your Popup Conditions', 'elementor-pro' ),
'frontend_available' => true,
]
);
$this->add_responsive_control(
'margin',
[
'label' => esc_html__( 'Margin', 'elementor-pro' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => [ 'px', '%' ],
'separator' => 'before',
'selectors' => [
'{{WRAPPER}} .dialog-widget-content' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
]
);
$this->add_responsive_control(
'padding',
[
'label' => esc_html__( 'Padding', 'elementor-pro' ),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => [ 'px', '%' ],
'selectors' => [
'{{WRAPPER}} .dialog-message' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
]
);
$this->add_control(
'classes',
[
'label' => esc_html__( 'CSS Classes', 'elementor-pro' ),
'type' => Controls_Manager::TEXT,
'title' => esc_html__( 'Add your custom class WITHOUT the dot. e.g: my-class', 'elementor-pro' ),
'frontend_available' => true,
]
);
$this->end_controls_section();
Plugin::elementor()->controls_manager->add_custom_css_controls( $this );
}
protected function get_remote_library_config() {
$config = parent::get_remote_library_config();
$config['type'] = 'popup';
$config['default_route'] = 'templates/popups';
$config['autoImportSettings'] = true;
return $config;
}
}
modules/popup/form-action.php 0000644 00000006712 15075500430 0012313 0 ustar 00 <?php
namespace ElementorPro\Modules\Popup;
use Elementor\Controls_Manager;
use ElementorPro\Modules\Forms\Classes\Action_Base;
use ElementorPro\Modules\QueryControl\Module as QueryControlModule;
use ElementorPro\Modules\Forms\Module as FormsModule;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
class Form_Action extends Action_Base {
public function get_name() {
return 'popup';
}
public function get_label() {
return esc_html__( 'Popup', 'elementor-pro' );
}
public function register_settings_section( $widget ) {
$widget->start_controls_section(
'section_popup',
[
'label' => esc_html__( 'Popup', 'elementor-pro' ),
'condition' => [
'submit_actions' => $this->get_name(),
],
]
);
$widget->add_control(
'popup_action',
[
'label' => esc_html__( 'Action', 'elementor-pro' ),
'type' => Controls_Manager::SELECT,
'options' => [
'' => esc_html__( 'Choose', 'elementor-pro' ),
'open' => esc_html__( 'Open Popup', 'elementor-pro' ),
'close' => esc_html__( 'Close Popup', 'elementor-pro' ),
],
]
);
$widget->add_control(
'popup_action_popup_id',
[
'label' => esc_html__( 'Popup', 'elementor-pro' ),
'type' => QueryControlModule::QUERY_CONTROL_ID,
'label_block' => true,
'autocomplete' => [
'object' => QueryControlModule::QUERY_OBJECT_LIBRARY_TEMPLATE,
'query' => [
'posts_per_page' => 20,
'meta_query' => [
[
'key' => Document::TYPE_META_KEY,
'value' => 'popup',
],
],
],
],
'condition' => [
'popup_action' => 'open',
],
]
);
$widget->add_control(
'popup_action_do_not_show_again',
[
'label' => esc_html__( 'Don\'t Show Again', 'elementor-pro' ),
'type' => Controls_Manager::SWITCHER,
'condition' => [
'popup_action' => 'close',
],
]
);
$widget->end_controls_section();
}
public function on_export( $element ) {
unset(
$element['settings']['popup_action'],
$element['settings']['popup_action_popup_id'],
$element['settings']['popup_action_do_not_show_again']
);
return $element;
}
public function run( $record, $ajax_handler ) {
$popup_action = $record->get_form_settings( 'popup_action' );
if ( empty( $popup_action ) ) {
return;
}
$action_settings = [
'action' => $popup_action,
];
if ( 'open' === $popup_action ) {
$popup_id = $record->get_form_settings( 'popup_action_popup_id' );
if ( empty( $popup_id ) ) {
return;
}
$action_settings['id'] = $popup_id;
} else {
$action_settings['do_not_show_again'] = $record->get_form_settings( 'popup_action_do_not_show_again' );
}
$ajax_handler->add_response_data( 'popup', $action_settings );
}
public function maybe_print_popup( $settings, $widget ) {
if ( ! is_array( $settings['submit_actions'] ) || ! in_array( 'popup', $settings['submit_actions'] ) ) {
return;
}
$has_valid_settings = ( ! empty( $settings['popup_action'] ) && 'open' === $settings['popup_action'] && ! empty( $settings['popup_action_popup_id'] ) );
if ( ! $has_valid_settings ) {
return;
}
Module::add_popup_to_location( $settings['popup_action_popup_id'] );
}
public function __construct() {
/** @var FormsModule $forms_module */
$forms_module = FormsModule::instance();
// Register popup form action
$forms_module->actions_registrar->register( $this );
add_action( 'elementor-pro/forms/pre_render', [ $this, 'maybe_print_popup' ], 10, 2 );
}
}
modules/popup/assets/images/triggers/page_load.svg 0000644 00000010412 15075500430 0016405 0 ustar 00 <?xml version="1.0" encoding="UTF-8"?>
<svg width="48px" height="48px" viewBox="0 0 48 48" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g transform="translate(12.631579, 6.315789)">
<path d="M11.5165481,10.1825079 L14.6635031,13.043376 C14.715123,13.0903032 14.7189272,13.1701914 14.672,13.2218113 C14.6480603,13.2481449 14.6141227,13.2631579 14.5785339,13.2631579 L8.28462403,13.2631579 C8.21486174,13.2631579 8.15830824,13.2066044 8.15830824,13.1368421 C8.15830824,13.1012533 8.17332122,13.0673156 8.19965483,13.043376 L11.3466098,10.1825079 C11.3947893,10.1387083 11.4683686,10.1387083 11.5165481,10.1825079 Z" fill="#71D7F7" transform="translate(11.431579, 11.684211) scale(1, -1) translate(-11.431579, -11.684211) "></path>
<path d="M10.8021641,22.6684287 L11.9744991,22.7395718 C12.0381545,22.7434348 12.0889464,22.7941398 12.0929183,22.8577884 L12.1662104,24.0322737 C12.1705554,24.1019005 12.1176339,24.1618665 12.0480071,24.1662115 C12.0430315,24.166522 12.0380419,24.1665377 12.0330645,24.1662584 L10.8515719,24.0999751 C10.787295,24.096369 10.7360137,24.0449997 10.7325179,23.9807167 L10.6683833,22.8013717 C10.6645951,22.7317123 10.7179943,22.6721713 10.7876536,22.6683831 C10.7924873,22.6681203 10.7973322,22.6681355 10.8021641,22.6684287 Z" fill="#71D7F7" transform="translate(11.417327, 23.417327) rotate(-45.000000) translate(-11.417327, -23.417327) "></path>
<path d="M9.91795361,25.0684287 L11.0902886,25.1395718 C11.1539439,25.1434348 11.2047359,25.1941398 11.2087078,25.2577884 L11.2819999,26.4322737 C11.2863448,26.5019005 11.2334234,26.5618665 11.1637966,26.5662115 C11.158821,26.566522 11.1538314,26.5665377 11.1488539,26.5662584 L9.96736139,26.4999751 C9.90308452,26.496369 9.85180314,26.4449997 9.84830733,26.3807167 L9.7841728,25.2013717 C9.78038462,25.1317123 9.83378376,25.0721713 9.90344311,25.0683831 C9.90827682,25.0681203 9.91312165,25.0681355 9.91795361,25.0684287 Z" fill="#71D7F7" transform="translate(10.533116, 25.817327) rotate(-45.000000) translate(-10.533116, -25.817327) "></path>
<path d="M12.4442694,24.1842182 L13.6166044,24.2553613 C13.6802597,24.2592242 13.7310517,24.3099293 13.7350236,24.3735779 L13.8083157,25.5480632 C13.8126606,25.61769 13.7597392,25.677656 13.6901124,25.682001 C13.6851368,25.6823115 13.6801472,25.6823271 13.6751697,25.6820479 L12.4936772,25.6157645 C12.4294003,25.6121585 12.3781189,25.5607891 12.3746231,25.4965062 L12.3104886,24.3171611 C12.3067004,24.2475018 12.3600995,24.1879608 12.4297589,24.1841726 C12.4345926,24.1839098 12.4394374,24.183925 12.4442694,24.1842182 Z" fill="#71D7F7" transform="translate(13.059432, 24.933116) rotate(-45.000000) translate(-13.059432, -24.933116) "></path>
<rect stroke="#A4AFB7" stroke-width="1.64210526" x="0.821052632" y="0.821052632" width="21.0947368" height="2.77894737" rx="1.38947368"></rect>
<rect stroke="#A4AFB7" stroke-width="1.64210526" x="0.821052632" y="31.1368421" width="21.0947368" height="2.77894737" rx="1.38947368"></rect>
<path d="M11.3684211,17.2475329 C12.6070668,16.1489688 14.1638359,14.7028853 16.0387284,12.9092825 C17.7228201,11.298208 21.1087068,8.44856945 21.1087068,6.35826994 C21.1087068,5.47191262 20.6428865,4.55283881 19.7112459,3.60104852 L11.3684211,3.60490337 L2.81303968,3.61392373 C1.90391139,4.62138713 1.44934725,5.51915645 1.44934725,6.3072317 C1.44934725,8.79014416 3.91089805,10.7299086 6.03592722,12.4897975 C7.80360659,13.9537395 9.58110454,15.5396513 11.3684211,17.2475329 Z" stroke="#A4AFB7" stroke-width="1.64210526"></path>
<path d="M11.3684211,31.1422697 C12.6070668,30.0437056 14.1638359,28.5976221 16.0387284,26.8040193 C17.7228201,25.1929449 21.1087068,22.3433063 21.1087068,20.2530068 C21.1087068,19.3666495 20.6428865,18.4475757 19.7112459,17.4957854 L11.3684211,17.4996402 L2.81303968,17.5086606 C1.90391139,18.516124 1.44934725,19.4138933 1.44934725,20.2019685 C1.44934725,22.684881 3.91089805,24.6246454 6.03592722,26.3845343 C7.80360659,27.8484763 9.58110454,29.4343881 11.3684211,31.1422697 Z" stroke="#A4AFB7" stroke-width="1.64210526" transform="translate(11.279027, 24.319028) scale(1, -1) translate(-11.279027, -24.319028) "></path>
</g>
</g>
</svg>