/home/techb158/l2hypotheques.com/wp-content/plugins/pyloncore/elementor/widgets
Edit: /home/techb158/l2hypotheques.com/wp-content/plugins/pyloncore/elementor/widgets/animation-shape.php (6751B)
start_controls_section(
'pylon_Animation_shape_options',
[
'label' => esc_html__( 'Pylon Animation Shape', 'pyloncore' ),
'tab' => Controls_Manager::TAB_CONTENT,
]
);
$repeater = new \Elementor\Repeater();
$repeater->add_control(
'pylon_shape_select',
[
'label' => esc_html__( 'Select Animation', 'pyloncore' ),
'type' => \Elementor\Controls_Manager::SELECT,
'default' => 'shapeMover',
'options' => [
'shapeMover' => esc_html__( 'Shape Mover', 'pyloncore' ),
'bubbleMover' => esc_html__( 'Bubble Mover', 'pyloncore' ),
'bounce' => esc_html__( 'Bounce', 'pyloncore' ),
'float-bob-x' => esc_html__( 'float-bob-x', 'pyloncore' ),
'bounceInLeft' => esc_html__( 'bounceInLeft', 'pyloncore' ),
'float-bob-y' => esc_html__( 'float-bob-y', 'pyloncore' ),
'None' => esc_html__( 'None', 'pyloncore' ),
],
]
);
$repeater->add_responsive_control(
'pylon_shape_top',
[
'label' => esc_html__( 'Top To Bottom', 'pyloncore' ),
'type' => Controls_Manager::SLIDER,
'size_units' => [ 'px', '%' ],
'range' => [
'px' => [
'min' => -1000,
'max' => 2000,
'step' => 1,
],
'%' => [
'min' => -100,
'max' => 100,
],
],
'default' => [
'unit' => 'px',
'size' => 100,
],
]
);
$repeater->add_responsive_control(
'pylon_shape_left',
[
'label' => esc_html__( 'Left To Right', 'pyloncore' ),
'type' => Controls_Manager::SLIDER,
'size_units' => [ 'px', '%' ],
'range' => [
'px' => [
'min' => -1000,
'max' => 2000,
'step' => 1,
],
'%' => [
'min' => -100,
'max' => 100,
],
],
'default' => [
'unit' => 'px',
'size' => 100,
],
]
);
$repeater->add_responsive_control(
'pylon_shape_duration',
[
'label' => esc_html__( 'Animation Duration', 'pyloncore' ),
'type' => Controls_Manager::SLIDER,
'size_units' => [ 's' ],
'range' => [
's' => [
'min' => 0.1,
'max' => 100,
'step' => 0.1,
]
],
'default' => [
'unit' => 's',
'size' => 9,
],
]
);
$repeater->add_control(
'pylon_shape_img',
[
'label' => __( 'Choose Image', 'pyloncore' ),
'type' => \Elementor\Controls_Manager::MEDIA,
'default' => [
'url' => \Elementor\Utils::get_placeholder_image_src(),
],
]
);
$repeater->add_control(
'pylon_shape_img_opacity',
[
'label' => esc_html__( 'opacity', 'pyloncore' ),
'type' => \Elementor\Controls_Manager::NUMBER,
'min' => -1,
'max' => 1,
'step' => 0.1,
'default' => 1,
]
);
$this->add_control(
'pylon_shapes',
[
'label' => esc_html__( 'Shape List', 'pyloncore' ),
'type' => \Elementor\Controls_Manager::REPEATER,
'fields' => $repeater->get_controls(),
'default' => [
[
'pylon_shape_select' =>'shapeMover',
'pylon_shape_img' => '',
'pylon_shape_top' => '200',
'pylon_shape_left' => '300',
'pylon_shape_duration' => '9',
],
],
]
);
$this->end_controls_section();
}
//Render
protected function render() {
$settings = $this->get_settings_for_display();
foreach($settings['pylon_shapes'] as $paylo_shape){
echo '
.')
';
}
}
}
Plugin::instance()->widgets_manager->register_widget_type( new Pylon_Animation_Shape_Widget());