PluginProbe
Page Builder: Pagelayer – Drag and Drop website builder / 1.0.2
Page Builder: Pagelayer – Drag and Drop website builder v1.0.2
2.2.1 2.2.0 2.1.9 2.1.8 2.1.7 2.1.6 2.1.5 2.1.4 2.1.3 trunk 0.9.0 0.9.1 0.9.2 0.9.3 0.9.4 0.9.5 0.9.6 0.9.7 0.9.8 0.9.9 1.0.0 1.0.2 1.0.3 1.0.4 1.0.5 All 129 releases
pagelayer / main / settings.php

settings.php in Page Builder: Pagelayer – Drag and Drop website builder 1.0.2, at main/settings.php

401 lines 12.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 //////////////////////////////////////////////////////////////
4 //===========================================================
5 // settings.php
6 //===========================================================
7 // PAGELAYER
8 // Inspired by the DESIRE to be the BEST OF ALL
9 // ----------------------------------------------------------
10 // Started by: Pulkit Gupta
11 // Date: 23rd Jan 2017
12 // Time: 23:00 hrs
13 // Site: http://pagelayer.com/wordpress (PAGELAYER)
14 // ----------------------------------------------------------
15 // Please Read the Terms of use at http://pagelayer.com/tos
16 // ----------------------------------------------------------
17 //===========================================================
18 // (c)Pagelayer Team
19 //===========================================================
20 //////////////////////////////////////////////////////////////
21
22 // Are we being accessed directly ?
23 if(!defined('PAGELAYER_VERSION')) {
24 exit('Hacking Attempt !');
25 }
26
27 $option_name = 'pl_gen_setting' ;
28 $new_value = '';
29
30 if(isset($_REQUEST['pl_gen_setting'])){
31 $new_value = $_REQUEST['pl_gen_setting'];
32
33 if ( get_option( $option_name ) !== false ) {
34
35 // The option already exists, so we just update it.
36 update_option( $option_name, $new_value );
37
38 } else {
39
40 // The option hasn't been added yet. We'll add it with $autoload set to 'no'.
41 $deprecated = null;
42 $autoload = 'no';
43 add_option( $option_name, $new_value, $deprecated, $autoload );
44 }
45
46 }
47
48 if(isset($_REQUEST['pl_support_ept'])){
49
50 $pl_support_ept = $_REQUEST['pl_support_ept'];
51
52 if ( get_option( 'pl_support_ept' ) !== false ) {
53
54 // The option already exists, so we just update it.
55 update_option( 'pl_support_ept', $pl_support_ept );
56
57 } else {
58
59 // The option hasn't been added yet. We'll add it with $autoload set to 'no'.
60 $deprecated = null;
61 $autoload = 'no';
62 $pl_support_ept = ['post', 'page'];
63 add_option( 'pl_support_ept', $pl_support_ept, $deprecated, $autoload );
64 }
65 }
66
67
68
69 if(isset($_REQUEST['pagelayer_icons_set'])){
70 $pagelayer_icons_set = $_REQUEST['pagelayer_icons_set'];
71
72 if ( get_option( 'pagelayer_icons_set' ) !== false ) {
73
74 // The option already exists, so we just update it.
75 update_option( 'pagelayer_icons_set', $pagelayer_icons_set);
76
77 } else {
78 // The option hasn't been added yet. We'll add it with $autoload set to 'no'.
79 $deprecated = null;
80 $autoload = 'no';
81 //$pagelayer_icons_set = [];
82 add_option( 'pagelayer_icons_set', $pagelayer_icons_set, $deprecated, $autoload );
83 }
84 }
85
86 if(isset($_REQUEST['pagelayer_content_width'])){
87
88 $content_width = $_REQUEST['pagelayer_content_width'];
89
90 if ( get_option( 'pagelayer_content_width' ) !== false ) {
91
92 // The option already exists, so we just update it.
93 update_option( 'pagelayer_content_width', $content_width );
94
95 } else {
96
97 // The option hasn't been added yet. We'll add it with $autoload set to 'no'.
98 $deprecated = null;
99 $autoload = 'no';
100 add_option( 'pagelayer_content_width', $content_width, $deprecated, $autoload );
101 }
102 }
103
104 if(isset($_REQUEST['pagelayer_between_widgets'])){
105
106 $space_widgets = $_REQUEST['pagelayer_between_widgets'];
107
108 if ( get_option( 'pagelayer_between_widgets' ) !== false ) {
109
110 // The option already exists, so we just update it.
111 update_option( 'pagelayer_between_widgets', $space_widgets );
112
113 } else {
114
115 // The option hasn't been added yet. We'll add it with $autoload set to 'no'.
116 $deprecated = null;
117 $autoload = 'no';
118 add_option( 'pagelayer_between_widgets', $space_widgets, $deprecated, $autoload );
119 }
120 }
121
122 if(defined('PAGELAYER_PREMIUM')){
123
124 if(isset($_REQUEST['pagelayer_cf_to_email'])){
125
126 $to_email = $_REQUEST['pagelayer_cf_to_email'];
127
128 if ( get_option( 'pagelayer_cf_to_email' ) !== false ) {
129
130 // The option already exists, so we just update it.
131 update_option( 'pagelayer_cf_to_email', $to_email );
132
133 } else {
134
135 // The option hasn't been added yet. We'll add it with $autoload set to 'no'.
136 $deprecated = null;
137 $autoload = 'no';
138 add_option( 'pagelayer_cf_to_email', $to_email, $deprecated, $autoload );
139 }
140 }
141
142 if(isset($_REQUEST['pagelayer_cf_subject'])){
143
144 $subject = $_REQUEST['pagelayer_cf_subject'];
145
146 if ( get_option( 'pagelayer_cf_subject' ) !== false ) {
147
148 // The option already exists, so we just update it.
149 update_option( 'pagelayer_cf_subject', $subject );
150
151 } else {
152
153 // The option hasn't been added yet. We'll add it with $autoload set to 'no'.
154 $deprecated = null;
155 $autoload = 'no';
156 add_option( 'pagelayer_cf_subject', $subject, $deprecated, $autoload );
157 }
158 }
159
160 if(isset($_REQUEST['pagelayer_cf_success'])){
161
162 $success = $_REQUEST['pagelayer_cf_success'];
163
164 if ( get_option( 'pagelayer_cf_success' ) !== false ) {
165
166 // The option already exists, so we just update it.
167 update_option( 'pagelayer_cf_success', $success );
168
169 } else {
170
171 // The option hasn't been added yet. We'll add it with $autoload set to 'no'.
172 $deprecated = null;
173 $autoload = 'no';
174 add_option( 'pagelayer_cf_success', $success, $deprecated, $autoload );
175 }
176 }
177
178 if(isset($_REQUEST['pagelayer_cf_failed'])){
179
180 $failed = $_REQUEST['pagelayer_cf_failed'];
181
182 if ( get_option( 'pagelayer_cf_failed' ) !== false ) {
183
184 // The option already exists, so we just update it.
185 update_option( 'pagelayer_cf_failed', $failed );
186
187 } else {
188
189 // The option hasn't been added yet. We'll add it with $autoload set to 'no'.
190 $deprecated = null;
191 $autoload = 'no';
192 add_option( 'pagelayer_cf_failed', $failed, $deprecated, $autoload );
193 }
194 }
195
196 if(isset($_REQUEST['pagelayer_google_captcha'])){
197
198 $captcha = $_REQUEST['pagelayer_google_captcha'];
199
200 if ( get_option( 'pagelayer_google_captcha' ) !== false ) {
201
202 // The option already exists, so we just update it.
203 update_option( 'pagelayer_google_captcha', $captcha );
204
205 } else {
206
207 // The option hasn't been added yet. We'll add it with $autoload set to 'no'.
208 $deprecated = null;
209 $autoload = 'no';
210 add_option( 'pagelayer_google_captcha', $captcha, $deprecated, $autoload );
211 }
212 }
213
214 // Facebook APP ID
215 if(isset($_REQUEST['pagelayer-fbapp-id'])){
216 $fb_app_id = $_REQUEST['pagelayer-fbapp-id'];
217
218 // Save it
219 update_option( 'pagelayer-fbapp-id', $fb_app_id );
220 }
221 }
222
223 $post_type = array('post', 'page', 'product');
224
225 $support_ept = get_option( 'pl_support_ept', ['post', 'page']);
226 foreach ( $support_ept as $support_pl ) {
227 add_post_type_support( $support_pl, 'pagelayer' );
228 }
229 ?>
230 <form class="pagelayer-setting-form" method="post" action="">
231 <h1>Pagelayer Settings</h1>
232 <p>Welcome To Pagelayer</p>
233 <div class="tabs-wrapper">
234 <h2 class="nav-tab-wrapper pagelayer-wrapper">
235 <a href="#general" class="nav-tab">General</a>
236 <a href="#settings" class="nav-tab ">Settings</a>
237 <a href="#icons" class="nav-tab ">Enable Icons</a>
238 <?php if(defined('PAGELAYER_PREMIUM')){ ?>
239 <a href="#integration" class="nav-tab">Integrations</a>
240 <a href="#contactform" class="nav-tab ">Contact Form</a>
241 <a href="#captcha" class="nav-tab ">Google Captcha</a>
242 <?php } ?>
243 <a href="#support" class="nav-tab ">Support</a>
244 <a href="#faq" class="nav-tab ">FAQ</a>
245 </h2>
246
247 <div class="pagelayer-tab-panel" id="general">
248 <table>
249 <tr>
250 <th scope="row">Editor Enables On </th>
251 <td>
252 <label>
253 <?php
254 foreach($post_type as $type){
255
256 echo '<input type="checkbox" name="pl_support_ept[]" value="'.$type.'" '. (in_array($type, $support_ept) ? "checked" : "") .'/>'.$type.'</br>';
257 }
258 ?>
259 </label></td>
260 </tr>
261 </table>
262 </div>
263 <div class="pagelayer-tab-panel" id="settings">
264 <table>
265 <tr>
266 <th>Content Width</th>
267 <td>
268 <input name="pagelayer_content_width" type="number" step="1" min="320" max="5000" placeholder="1170" <?php if(get_option('pagelayer_content_width')){
269 echo 'value="'.get_option('pagelayer_content_width').'"';
270 }?>>
271 <p>Set the custom width of the content area. The default width set is 1170px</p>
272 </td>
273 <tr>
274 <tr>
275 <th>Space Between Widgets</th>
276 <td>
277 <input name="pagelayer_between_widgets" type="number" step="1" min="0" max="500" placeholder="15" <?php if(get_option('pagelayer_between_widgets')){
278 echo 'value="'.get_option('pagelayer_between_widgets').'"';
279 }?>>
280 <p>Set the Space Between Widgets. The default Space set is 15px</p>
281 </td>
282 <tr>
283 </table>
284 </div>
285 <?php if(defined('PAGELAYER_PREMIUM')){ ?>
286 <div class="pagelayer-tab-panel" id="integration">
287 <div class="pagelayer-title">
288 <h2>Facebook SDK Details</h2>
289 </div>
290 <table>
291 <tr>
292 <th>App ID</th>
293 <td><input type="text" name="pagelayer-fbapp-id" class="pagelayer-app-id" <?php if(get_option('pagelayer-fbapp-id')){
294 echo 'value="'.get_option('pagelayer-fbapp-id').'"';
295 }?>/></td>
296 </tr>
297 </table>
298 </div>
299 <div class="pagelayer-tab-panel" id="icons">
300 <table>
301 <tr>
302 <th scope="row">Enable Icons</th>
303 <td>
304 <label>
305 <input type="checkbox" name="pagelayer_icons_set[]" value="font-awesome5" <?php if(in_array('font-awesome5',get_option( 'pagelayer_icons_set')) || !get_option( 'pagelayer_icons_set')){echo ' checked';}?> />font-awesome5</br>
306 </label>
307 </td>
308 </tr>
309 </table>
310 </div>
311 <div class="pagelayer-tab-panel" id="contactform">
312 <table>
313 <tr>
314 <th scope="row">To Email:
315 </th>
316 <td>
317 <label>
318 <input name="pagelayer_cf_to_email" type="email" placeholder="email@domain.com" <?php if(get_option('pagelayer_cf_to_email')){
319 echo 'value="'.get_option('pagelayer_cf_to_email').'"';
320 }?>/>
321 </label>
322 </td>
323 </tr>
324 <tr>
325 <th scope="row">Subject:
326 </th>
327 <td>
328 <label>
329 <input name="pagelayer_cf_subject" type="text" placeholder="Subject" <?php if(get_option('pagelayer_cf_subject')){
330 echo 'value="'.get_option('pagelayer_cf_subject').'"';
331 }?> />
332 </label>
333 </td>
334 </tr>
335 <tr>
336 <th scope="row">Success Message:
337 </th>
338 <td>
339 <label>
340 <input name="pagelayer_cf_success" type="text" placeholder="Success" <?php if(get_option('pagelayer_cf_success')){
341 echo 'value="'.get_option('pagelayer_cf_success').'"';
342 }?> />
343 </label>
344 </td>
345 </tr>
346 <tr>
347 <th scope="row">Failed Message:
348 </th>
349 <td>
350 <label>
351 <input name="pagelayer_cf_failed" type="text" placeholder="Failed" <?php if(get_option('pagelayer_cf_failed')){
352 echo 'value="'.get_option('pagelayer_cf_failed').'"';
353 }?> />
354 </label>
355 </td>
356 </tr>
357 </table>
358 </div>
359 <div class="pagelayer-tab-panel" id="captcha">
360 <table>
361 <tr>
362 <th scope="row">Google ReCaptcha </th>
363 </th>
364 <td>
365 <label>
366 <input name="pagelayer_google_captcha" type="text" placeholder="captcha" <?php if(get_option('pagelayer_google_captcha')){
367 echo 'value="'.get_option('pagelayer_google_captcha').'"';
368 }?> />
369 </label>
370 </td>
371 </tr>
372 </table>
373 </div>
374 <?php } ?>
375 <div class="pagelayer-tab-panel" id="support">
376 <h2>Support</h2>
377 <h3>You can contact the Pagelayer Team via email. Our email address is <a href="mailto:support@pagelayer.com">support@pagelayer.com</a>. We will get back to you as soon as possible!</h3>
378
379
380 </div>
381 <div class="pagelayer-tab-panel" id="faq">
382 <h2>FAQ</h2>
383 <div class="pagelayer-acc-wrapper">
384 <span class="nav-tab pagelayer-acc-tab">1: Why choose us</span>
385 <div class="pagelayer-acc-panel">
386 <p>Pagelayer is best live editor and easy to use and we will keep improving it !</P>
387 </div>
388
389 <span class="nav-tab pagelayer-acc-tab">2: Support</span>
390 <div class="pagelayer-acc-panel">
391 <p>You can contact the PageLayer Group via email. Our email address is <a href="mailto:support@pagelayer.com">support@pagelayer.com</a>. We will get back to you as soon as possible!</p>
392 </div>
393 </div>
394 </div>
395 </div>
396 <tr>
397 <p>
398 <input type="submit" name="submit" class="button button-primary" value="Save Changes">
399 </p>
400 </form>
401