PluginProbe
MarqueeX – Smooth Marquee Slider, News Ticker & Post Marquee for Block Editor & Elementor / 0.6.0
MarqueeX – Smooth Marquee Slider, News Ticker & Post Marquee for Block Editor & Elementor v0.6.0
0.6.0 0.5.4 0.5.3 0.5.2 0.5.1 0.5.0 0.4.0 0.3.3 0.3.2 trunk 0.0.1 0.0.2 0.0.3 0.0.4 0.0.5 0.0.6 0.1.0 0.1.1 0.1.2 0.2.0 0.2.1 0.2.2 0.2.3 0.3.0 0.3.1
marqueex / includes / Traits / AnimatedWordRoller / AdditionalOptionsControls.php

AdditionalOptionsControls.php in MarqueeX – Smooth Marquee Slider, News Ticker & Post Marquee for Block Editor & Elementor 0.6.0, at includes/Traits/AnimatedWordRoller/AdditionalOptionsControls.php

102 lines 3.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Wpxero\Marqueex\Traits\AnimatedWordRoller;
4
5 use Elementor\Controls_Manager;
6 use Wpxero\Marqueex\Core\Upsell;
7
8 if (!defined('ABSPATH')) {
9 exit;
10 }
11
12 trait AdditionalOptionsControls {
13
14 private function register_additional_options_section_controls() {
15 $this->start_controls_section(
16 'marqueex_word_roller_additional_section',
17 [
18 'label' => __('Additional Options', 'marqueex'),
19 'tab' => Controls_Manager::TAB_CONTENT,
20 ]
21 );
22
23 $this->add_control(
24 'marqueex_word_roller_delay',
25 [
26 'label' => __('Active Word Duration', 'marqueex'),
27 'description' => __('Time each word stays active (in seconds).', 'marqueex'),
28 'type' => Controls_Manager::NUMBER,
29 'min' => 1,
30 'max' => 10,
31 'step' => 1,
32 'default' => 1,
33 ]
34 );
35
36 $this->add_control(
37 'marqueex_word_roller_visible_words',
38 [
39 'label' => __('Visible Words', 'marqueex'),
40 'type' => Controls_Manager::NUMBER,
41 'min' => 1,
42 'max' => 50,
43 'step' => 1,
44 'default' => 5,
45 ]
46 );
47
48 $free_animations = [
49 'vertical' => __('Vertical Scroll', 'marqueex'),
50 ];
51
52 $pro_animations = [
53 'horizontal' => __('Horizontal Scroll', 'marqueex'),
54 'fade' => __('Fade', 'marqueex'),
55 'slide' => __('Slide', 'marqueex'),
56 'zoom' => __('Zoom', 'marqueex'),
57 ];
58
59 $this->add_control(
60 'marqueex_word_roller_animation_type',
61 [
62 'label' => __('Animation Type', 'marqueex'),
63 'type' => Controls_Manager::SELECT,
64 'default' => 'vertical',
65 'options' => Upsell::merge_select_options($free_animations, $pro_animations),
66 ]
67 );
68
69 Upsell::add_elementor_notice($this, 'marqueex_word_roller_pro_notice', [
70 'title' => __('4 more word transitions', 'marqueex'),
71 'description' => __('Roll words sideways, or swap them with a fade, slide or zoom instead of a vertical scroll.', 'marqueex'),
72 'items' => array_values($pro_animations),
73 'cta' => __('Unlock these transitions', 'marqueex'),
74 'source' => 'elementor-word-roller',
75 ]);
76
77 $this->add_control(
78 'marqueex_word_roller_pause_on_hover',
79 [
80 'label' => __('Pause on Hover', 'marqueex'),
81 'type' => Controls_Manager::SWITCHER,
82 'label_on' => __('Yes', 'marqueex'),
83 'label_off' => __('No', 'marqueex'),
84 'return_value' => 'yes',
85 'default' => 'no',
86 ]
87 );
88
89 $this->add_control(
90 'marqueex_word_roller_notice',
91 [
92 'type' => Controls_Manager::ALERT,
93 'alert_type' => 'warning',
94 'heading' => __('Visible Words Notice', 'marqueex'),
95 'content' => __('Please make sure to select an odd number that is less than or equal to the total number of words in your list.', 'marqueex'),
96 ]
97 );
98
99 $this->end_controls_section();
100 }
101 }
102