PluginProbe ʕ •ᴥ•ʔ
EmbedPress – PDF Embedder, Embed PDF viewer, YouTube Videos, 3D FlipBook, Social feeds & more / 3.9.0
EmbedPress – PDF Embedder, Embed PDF viewer, YouTube Videos, 3D FlipBook, Social feeds & more v3.9.0
4.5.6 4.5.5 4.5.4 4.5.3 4.5.2 trunk 1.0.0 1.1.0 1.1.1 1.1.2 1.1.3 1.2.0 1.3.0 1.3.1 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.5.0 1.6.0 1.6.1 1.6.2 1.6.3 1.7.0 1.7.1 1.7.2 1.7.3 1.7.4 1.7.5 2.0.0 2.0.1 2.0.2 2.0.3 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.2.0 2.2.1 2.2.2 2.3.0 2.3.1 2.3.2 2.3.3 2.4.0 2.4.1 2.5.0 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 2.6.0 2.6.1 2.6.2 2.7.0 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.1.0 3.1.1 3.1.2 3.1.3 3.2.0 3.2.1 3.3.0 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.4.0 3.4.1 3.4.2 3.4.3 3.5.0 3.5.1 3.5.2 3.5.3 3.6.0 3.6.1 3.6.2 3.6.3 3.6.4 3.6.5 3.6.6 3.6.7 3.6.8 3.7.0 3.7.1 3.7.2 3.7.3 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.10 3.9.11 3.9.12 3.9.13 3.9.14 3.9.15 3.9.16 3.9.17 3.9.2 3.9.3 3.9.4 3.9.5 3.9.6 3.9.7 3.9.8 3.9.9 4.0.0 4.0.1 4.0.10 4.0.11 4.0.12 4.0.13 4.0.14 4.0.2 4.0.3 4.0.4 4.0.5 4.0.6 4.0.7 4.0.8 4.0.9 4.1.0 4.1.1 4.1.10 4.1.2 4.1.3 4.1.4 4.1.5 4.1.6 4.1.7 4.1.8 4.1.9 4.2.0 4.2.1 4.2.2 4.2.3 4.2.4 4.2.5 4.2.6 4.2.7 4.2.8 4.2.9 4.3.0 4.3.1 4.4.0 4.4.1 4.4.10 4.4.11 4.4.2 4.4.3 4.4.4 4.4.5 4.4.6 4.4.7 4.4.8 4.4.9 4.5.0 4.5.1
embedpress / EmbedPress / Includes / Classes / Extend_Elementor_Controls.php
embedpress / EmbedPress / Includes / Classes Last commit date
Elementor_Enhancer.php 3 years ago EmbedPress_Core_Installer.php 6 years ago EmbedPress_Notice.php 4 years ago EmbedPress_Plugin_Usage_Tracker.php 2 years ago Extend_CustomPlayer_Controls.php 3 years ago Extend_Elementor_Controls.php 3 years ago Feature_Enhancer.php 2 years ago Helper.php 2 years ago
Extend_Elementor_Controls.php
236 lines
1 <?php
2
3 namespace EmbedPress\Includes\Classes;
4 use \Elementor\Controls_Manager;
5
6 class Extend_Elementor_Controls {
7
8 public function __construct () {
9 add_action( 'extend_elementor_controls', [$this, 'extend_elementor_share_and_lock_controls'], 10, 4 );
10 }
11
12 public function extend_elementor_share_and_lock_controls($that, $infix = '', $pro_text = '', $pro_class = ''){
13 $that->start_controls_section(
14 'embedpress_content_protection_settings',
15 [
16 'label' => esc_html__('EP Content Protection', 'embedpress'),
17 ]
18 );
19
20 $that->add_control(
21 'embedpress'.$infix.'lock_content',
22 [
23 'label' => sprintf(__('Enable Content Protection %s', 'embedpress'), $pro_text),
24 'type' => Controls_Manager::SWITCHER,
25 'label_block' => false,
26 'return_value' => 'yes',
27 'default' => '',
28 'classes' => $pro_class,
29 ]
30 );
31
32 $that->add_control(
33 'embedpress'.$infix.'lock_content_password',
34 [
35 'label' => __('Set Password', 'embedpress'),
36 'type' => Controls_Manager::TEXT,
37 'default' => '',
38 'placeholder' => '••••••',
39 'label_block' => false,
40 'condition' => [
41 'embedpress'.$infix.'lock_content' => 'yes'
42 ]
43 ]
44 );
45
46
47 $that->add_control(
48 'embedpress'.$infix.'lock_content_error_message',
49 [
50 'label' => __('Error Message', 'embedpress'),
51 'type' => Controls_Manager::TEXTAREA,
52 'default' => 'Oops, that wasn\'t the right password. Try again.',
53 'placeholder' => __('Oops, that wasn\'t the right password. Try again.', 'embedpress'),
54 'label_block' => true,
55 'condition' => [
56 'embedpress'.$infix.'lock_content' => 'yes'
57 ]
58 ]
59 );
60 $that->add_control(
61 'embedpress'.$infix.'password_placeholder',
62 [
63 'label' => __('Placeholder', 'embedpress'),
64 'type' => Controls_Manager::TEXT,
65 'default' => 'Password',
66 'placeholder' => __('Password', 'embedpress'),
67 'label_block' => false,
68 'condition' => [
69 'embedpress'.$infix.'lock_content' => 'yes'
70 ]
71 ]
72 );
73 $that->add_control(
74 'embedpress'.$infix.'submit_button_text',
75 [
76 'label' => __('Button Text', 'embedpress'),
77 'type' => Controls_Manager::TEXT,
78 'default' => 'Unlock',
79 'placeholder' => __('Unlock', 'embedpress'),
80 'label_block' => false,
81 'condition' => [
82 'embedpress'.$infix.'lock_content' => 'yes'
83 ]
84 ]
85 );
86 $that->add_control(
87 'embedpress'.$infix.'submit_Unlocking_text',
88 [
89 'label' => __('Loader Text', 'embedpress'),
90 'type' => Controls_Manager::TEXT,
91 'default' => 'Unlocking...',
92 'placeholder' => __('Unlocking...', 'embedpress'),
93 'label_block' => false,
94 'condition' => [
95 'embedpress'.$infix.'lock_content' => 'yes'
96 ]
97 ]
98 );
99
100 $that->add_control(
101 'embedpress'.$infix.'lock_content_heading',
102 [
103 'label' => __('Header', 'embedpress'),
104 'type' => Controls_Manager::TEXT,
105 'default' => 'Content Locked',
106 'placeholder' => __('Content Locked', 'embedpress'),
107 'label_block' => false,
108 'condition' => [
109 'embedpress'.$infix.'lock_content' => 'yes'
110 ]
111 ]
112 );
113
114 $that->add_control(
115 'embedpress'.$infix.'lock_content_sub_heading',
116 [
117 'label' => __('Description', 'embedpress'),
118 'type' => Controls_Manager::TEXTAREA,
119 'default' => 'Content is locked and requires password to access it.',
120 'placeholder' => __('Content is locked and requires password to access it.', 'embedpress'),
121 'label_block' => true,
122 'condition' => [
123 'embedpress'.$infix.'lock_content' => 'yes'
124 ]
125 ]
126 );
127
128
129 $that->add_control(
130 'embedpress'.$infix.'enable_footer_message',
131 [
132 'label' => __('Footer Text', 'embedpress'),
133 'type' => Controls_Manager::SWITCHER,
134 'label_block' => false,
135 'return_value' => 'yes',
136 'default' => '',
137 'condition' => [
138 'embedpress'.$infix.'lock_content' => 'yes'
139 ],
140
141 ]
142 );
143
144 $that->add_control(
145 'embedpress'.$infix.'lock_content_footer_message',
146 [
147 'label' => __('Footer', 'embedpress'),
148 'type' => Controls_Manager::TEXTAREA,
149 'default' => 'In case you don\'t have the password, kindly reach out to content owner or administrator to request access.',
150 'placeholder' => __('In case you don\'t have the password, kindly reach out to content owner or administrator to request access.', 'embedpress'),
151 'label_block' => true,
152 'condition' => [
153 'embedpress'.$infix.'enable_footer_message' => 'yes',
154 'embedpress'.$infix.'lock_content' => 'yes'
155 ]
156 ]
157 );
158
159 $that->end_controls_section();
160
161 $that->start_controls_section(
162 'embedpress_content_share_settings',
163 [
164 'label' => esc_html__('EP Social Share', 'embedpress'),
165 ]
166 );
167
168 $that->add_control(
169 'embedpress'.$infix.'content_share',
170 [
171 'label' => __('Enable Social Share', 'embedpress'),
172 'type' => Controls_Manager::SWITCHER,
173 'label_block' => false,
174 'return_value' => 'yes',
175 'default' => '',
176 ]
177 );
178 $that->add_control(
179 'embedpress'.$infix.'content_share_position',
180 [
181 'label' => __('Position', 'embedpress'),
182 'type' => Controls_Manager::SELECT,
183 'default' => 'right',
184 'options' => [
185 'top' => __('Top', 'embedpress'),
186 'right' => __('Right', 'embedpress'),
187 'bottom' => __('Bottom', 'embedpress'),
188 'left' => __('Left', 'embedpress'),
189 ],
190 'condition' => [
191 'embedpress'.$infix.'content_share' => 'yes'
192 ]
193 ]
194 );
195 $that->add_control(
196 'embedpress'.$infix.'content_title',
197 [
198 'label' => __('Title', 'embedpress'),
199 'type' => Controls_Manager::TEXT,
200 'placeholder' => __('Enter share title', 'embedpress'),
201 'condition' => [
202 'embedpress'.$infix.'content_share' => 'yes'
203 ]
204 ]
205 );
206 $that->add_control(
207 'embedpress'.$infix.'content_descripiton',
208 [
209 'label' => __('Description', 'embedpress'),
210 'type' => Controls_Manager::TEXTAREA,
211 'placeholder' => __('Enter share description', 'embedpress'),
212 'condition' => [
213 'embedpress'.$infix.'content_share' => 'yes'
214 ]
215 ]
216 );
217
218 $that->add_control(
219 'embedpress'.$infix.'content_share_custom_thumbnail',
220 [
221 'label' => esc_html__( 'Thumbnail', 'textdomain' ),
222 'type' => \Elementor\Controls_Manager::MEDIA,
223 'default' => [
224 'url' => \Elementor\Utils::get_placeholder_image_src(),
225 ],
226 'condition' => [
227 'embedpress'.$infix.'content_share' => 'yes'
228 ]
229 ]
230 );
231 $that->end_controls_section();
232
233 }
234
235
236 }