PluginProbe ʕ •ᴥ•ʔ
Essential Addons for Elementor – Popular Elementor Templates & Widgets / 6.6.9
Essential Addons for Elementor – Popular Elementor Templates & Widgets v6.6.9
6.6.9 6.6.8 6.6.7 6.6.6 6.6.5 6.6.4 6.6.3 5.7.3 5.7.4 5.8.0 5.8.1 5.8.10 5.8.11 5.8.12 5.8.13 5.8.14 5.8.15 5.8.16 5.8.18 5.8.2 5.8.3 5.8.4 5.8.5 5.8.6 5.8.7 5.8.8 5.8.9 5.9.0 5.9.1 5.9.10 5.9.11 5.9.12 5.9.13 5.9.14 5.9.15 5.9.16 5.9.17 5.9.18 5.9.19 5.9.2 5.9.20 5.9.21 5.9.22 5.9.23 5.9.24 5.9.25 5.9.26 5.9.27 5.9.3 5.9.4 5.9.5 5.9.6 5.9.7 5.9.8 5.9.9 6.0.0 6.0.1 6.0.10 6.0.11 6.0.12 6.0.13 6.0.14 6.0.15 6.0.2 6.0.3 6.0.4 6.0.5 6.0.6 6.0.7 6.0.8 6.0.9 6.1.0 6.1.1 6.1.10 6.1.11 trunk 6.1.12 1.0.0 6.1.13 1.0.1 6.1.14 1.1.0 6.1.15 2.0 6.1.17 2.1 6.1.18 2.10.0 6.1.19 2.10.1 6.1.2 2.10.2 6.1.20 2.10.3 6.1.3 2.10.4 6.1.4 2.10.5 6.1.5 2.2.0 6.1.6 2.2.1 6.1.7 2.2.2 6.1.8 2.2.3 6.1.9 2.2.4 6.2.0 2.2.5 6.2.1 2.3.0 6.2.2 2.3.1 6.2.3 2.4.0 6.2.4 2.4.1 6.3.0 2.4.2 6.3.1 2.4.3 6.3.2 2.5.0 6.3.3 2.6.0 6.4.0 2.7.0 6.5.0 2.7.1 6.5.1 2.7.10 6.5.10 2.7.11 6.5.11 2.7.2 6.5.12 2.7.3 6.5.13 2.7.4 6.5.2 2.7.5 6.5.3 2.7.6 6.5.4 2.7.7 6.5.5 2.7.8 6.5.6 2.7.9 6.5.7 2.8.0 6.5.8 2.8.1 6.5.9 2.8.2 6.6.0 2.8.3 6.6.1 2.8.4 6.6.2 2.8.5 2.8.6 2.8.7 2.9.0 2.9.1 2.9.2 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7 2.9.8 2.9.9 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.4.1 3.1.5 3.2.0 3.3.0 3.3.1 3.3.2 3.3.3 3.4.0 3.5.0 3.5.1 3.5.2 3.6.0 3.6.1 3.6.2 3.7.0 3.7.1 3.7.2 3.8.0 3.8.1 3.8.2 3.8.3 3.8.4 3.8.5 3.9.0 3.9.1 3.9.2 3.9.3 3.9.4 4.0.0 4.0.1 4.0.2 4.0.3 4.0.4 4.1.0 4.1.1 4.1.2 4.2.0 4.2.1 4.2.2 4.2.3 4.2.4 4.3.0 4.3.1 4.3.2 4.3.3 4.3.4 4.3.5 4.3.6 4.3.7 4.3.8 4.3.9 4.4.0 4.4.1 4.5.0 4.5.1 4.5.2 4.5.3 4.5.4 4.5.5 4.6.0 4.6.1 4.6.2 4.6.3 4.6.4 4.6.5 4.6.6 4.7.0 4.7.1 4.7.2 4.7.3 4.7.4 4.7.5 4.8.0 4.8.1 4.8.2 4.8.3 4.8.4 4.9.0 4.9.1 4.9.2 4.9.3 4.9.4 4.9.5 4.9.6 4.9.7 5.0.0 5.0.1 5.0.10 5.0.11 5.0.12 5.0.13 5.0.2 5.0.3 5.0.4 5.0.5 5.0.6 5.0.7 5.0.8 5.0.9 5.1.0 5.1.1 5.1.2 5.1.3 5.1.4 5.1.5 5.1.6 5.1.7 5.1.8 5.1.9 5.2.0 5.2.1 5.2.2 5.2.3 5.2.4 5.3.0 5.3.1 5.3.2 5.4.6 5.5.5 5.6.5 5.7.2
essential-addons-for-elementor-lite / includes / Extensions / Reading_Progress.php
essential-addons-for-elementor-lite / includes / Extensions Last commit date
Custom_JS.php 1 year ago Hover_Effect.php 1 year ago Image_Masking.php 2 months ago Liquid_Glass_Effect.php 5 months ago Post_Duplicator.php 2 months ago Promotion.php 9 months ago Reading_Progress.php 5 months ago Scroll_to_Top.php 5 months ago Table_of_Content.php 2 weeks ago Vertical_Text_Orientation.php 7 months ago Wrapper_Link.php 2 months ago index.php 3 years ago
Reading_Progress.php
219 lines
1 <?php
2 namespace Essential_Addons_Elementor\Extensions;
3
4 if (!defined('ABSPATH')) {
5 exit;
6 }
7
8 use \Elementor\Controls_Manager;
9 use \Essential_Addons_Elementor\Classes\Helper;
10
11 class Reading_Progress
12 {
13
14 public function __construct()
15 {
16 add_action('elementor/documents/register_controls', [$this, 'register_controls'], 10);
17 }
18
19 public function register_controls($element)
20 {
21 if (Helper::prevent_extension_loading(get_the_ID())) {
22 return;
23 }
24
25 $global_settings = get_option('eael_global_settings');
26
27 $element->start_controls_section(
28 'eael_ext_reading_progress_section',
29 [
30 'label' => __('<i class="eaicon-logo"></i> Reading Progress Bar', 'essential-addons-for-elementor-lite'),
31 'tab' => Controls_Manager::TAB_SETTINGS,
32 ]
33 );
34
35 $element->add_control(
36 'eael_ext_reading_progress',
37 [
38 'label' => __('Enable Reading Progress Bar', 'essential-addons-for-elementor-lite'),
39 'type' => Controls_Manager::SWITCHER,
40 'default' => 'no',
41 'label_on' => __('Yes', 'essential-addons-for-elementor-lite'),
42 'label_off' => __('No', 'essential-addons-for-elementor-lite'),
43 'return_value' => 'yes',
44 ]
45 );
46
47 $element->add_control(
48 'eael_ext_reading_progress_has_global',
49 [
50 'label' => __('Enabled Globally?', 'essential-addons-for-elementor-lite'),
51 'type' => Controls_Manager::HIDDEN,
52 'default' => (isset($global_settings['reading_progress']['enabled']) ? $global_settings['reading_progress']['enabled'] : false),
53 ]
54 );
55
56 if (isset($global_settings['reading_progress']['enabled']) && ($global_settings['reading_progress']['enabled'] == true) && get_the_ID() != $global_settings['reading_progress']['post_id'] && get_post_status($global_settings['reading_progress']['post_id']) == 'publish') {
57 $element->add_control(
58 'eael_global_warning_text',
59 [
60 'type' => Controls_Manager::RAW_HTML,
61 'raw' => sprintf(
62 /* translators: %s: Edit link to the Reading Progress Bar settings. */
63 __('You can modify the Global Reading Progress Bar by <strong><a href="%s">Clicking Here</a></strong>', 'essential-addons-for-elementor-lite'),
64 esc_url( get_bloginfo('url') . '/wp-admin/post.php?post=' . $global_settings['reading_progress']['post_id'] . '&action=elementor' )
65 ),
66 'content_classes' => 'eael-warning',
67 'separator' => 'before',
68 'condition' => [
69 'eael_ext_reading_progress' => 'yes',
70 ],
71 ]
72 );
73 } else {
74 $element->add_control(
75 'eael_ext_reading_progress_global',
76 [
77 'label' => __('Enable Reading Progress Bar Globally', 'essential-addons-for-elementor-lite'),
78 'description' => __('Enabling this option will effect on entire site.', 'essential-addons-for-elementor-lite'),
79 'type' => Controls_Manager::SWITCHER,
80 'default' => 'no',
81 'label_on' => __('Yes', 'essential-addons-for-elementor-lite'),
82 'label_off' => __('No', 'essential-addons-for-elementor-lite'),
83 'return_value' => 'yes',
84 'separator' => 'before',
85 'condition' => [
86 'eael_ext_reading_progress' => 'yes',
87 ],
88 ]
89 );
90
91 $element->add_control(
92 'eael_ext_reading_progress_global_display_condition',
93 [
94 'label' => __('Display On', 'essential-addons-for-elementor-lite'),
95 'type' => Controls_Manager::SELECT,
96 'default' => 'all',
97 'options' => [
98 'posts' => __('All Posts', 'essential-addons-for-elementor-lite'),
99 'pages' => __('All Pages', 'essential-addons-for-elementor-lite'),
100 'all' => __('All Posts & Pages', 'essential-addons-for-elementor-lite'),
101 ],
102 'condition' => [
103 'eael_ext_reading_progress' => 'yes',
104 'eael_ext_reading_progress_global' => 'yes',
105 ],
106 'separator' => 'before',
107 ]
108 );
109 }
110
111 $element->add_control(
112 'eael_ext_reading_progress_position',
113 [
114 'label' => esc_html__('Position', 'essential-addons-for-elementor-lite'),
115 'type' => Controls_Manager::SELECT,
116 'default' => 'top',
117 'label_block' => false,
118 'options' => [
119 'top' => esc_html__('Top', 'essential-addons-for-elementor-lite'),
120 'bottom' => esc_html__('Bottom', 'essential-addons-for-elementor-lite'),
121 ],
122 'separator' => 'before',
123 'condition' => [
124 'eael_ext_reading_progress' => 'yes',
125 ],
126 ]
127 );
128
129 $element->add_control(
130 'eael_ext_reading_progress_height',
131 [
132 'label' => __('Height', 'essential-addons-for-elementor-lite'),
133 'type' => Controls_Manager::SLIDER,
134 'size_units' => ['px'],
135 'range' => [
136 'px' => [
137 'min' => 0,
138 'max' => 100,
139 'step' => 1,
140 ],
141 ],
142 'default' => [
143 'unit' => 'px',
144 'size' => 5,
145 ],
146 'selectors' => [
147 '.eael-reading-progress-wrap .eael-reading-progress' => 'height: {{SIZE}}{{UNIT}} !important',
148 '.eael-reading-progress-wrap .eael-reading-progress .eael-reading-progress-fill' => 'height: {{SIZE}}{{UNIT}} !important',
149 ],
150 'separator' => 'before',
151 'condition' => [
152 'eael_ext_reading_progress' => 'yes',
153 ],
154 ]
155 );
156
157 $element->add_control(
158 'eael_ext_reading_progress_bg_color',
159 [
160 'label' => __('Background Color', 'essential-addons-for-elementor-lite'),
161 'type' => Controls_Manager::COLOR,
162 'default' => '',
163 'selectors' => [
164 '.eael-reading-progress' => 'background-color: {{VALUE}}',
165 ],
166 'separator' => 'before',
167 'condition' => [
168 'eael_ext_reading_progress' => 'yes',
169 ],
170 ]
171 );
172
173 $element->add_control(
174 'eael_ext_reading_progress_fill_color',
175 [
176 'label' => __('Fill Color', 'essential-addons-for-elementor-lite'),
177 'type' => Controls_Manager::COLOR,
178 'default' => '#1fd18e',
179 'selectors' => [
180 '.eael-reading-progress-wrap .eael-reading-progress .eael-reading-progress-fill' => 'background-color: {{VALUE}}',
181 ],
182 'separator' => 'before',
183 'condition' => [
184 'eael_ext_reading_progress' => 'yes',
185 ],
186 ]
187 );
188
189 $element->add_control(
190 'eael_ext_reading_progress_animation_speed',
191 [
192 'label' => __('Animation Speed', 'essential-addons-for-elementor-lite'),
193 'type' => Controls_Manager::SLIDER,
194 'size_units' => ['px'],
195 'range' => [
196 'px' => [
197 'min' => 0,
198 'max' => 1000,
199 'step' => 1,
200 ],
201 ],
202 'default' => [
203 'unit' => 'px',
204 'size' => 50,
205 ],
206 'selectors' => [
207 '.eael-reading-progress-wrap .eael-reading-progress .eael-reading-progress-fill' => 'transition: width {{SIZE}}ms ease;',
208 ],
209 'separator' => 'before',
210 'condition' => [
211 'eael_ext_reading_progress' => 'yes',
212 ],
213 ]
214 );
215
216 $element->end_controls_section();
217 }
218 }
219