PluginProbe
Page Builder: Pagelayer – Drag and Drop website builder / 0.9.6
Page Builder: Pagelayer – Drag and Drop website builder v0.9.6
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 0.9.6, at main/settings.php

185 lines 5.9 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 if(isset($_REQUEST['pagelayer_content_width'])){
68
69 $content_width = $_REQUEST['pagelayer_content_width'];
70
71 if ( get_option( 'pagelayer_content_width' ) !== false ) {
72
73 // The option already exists, so we just update it.
74 update_option( 'pagelayer_content_width', $content_width );
75
76 } else {
77
78 // The option hasn't been added yet. We'll add it with $autoload set to 'no'.
79 $deprecated = null;
80 $autoload = 'no';
81 add_option( 'pagelayer_content_width', $content_width, $deprecated, $autoload );
82 }
83 }
84
85 if(isset($_REQUEST['pagelayer_between_widgets'])){
86
87 $space_widgets = $_REQUEST['pagelayer_between_widgets'];
88
89 if ( get_option( 'pagelayer_between_widgets' ) !== false ) {
90
91 // The option already exists, so we just update it.
92 update_option( 'pagelayer_between_widgets', $space_widgets );
93
94 } else {
95
96 // The option hasn't been added yet. We'll add it with $autoload set to 'no'.
97 $deprecated = null;
98 $autoload = 'no';
99 add_option( 'pagelayer_between_widgets', $space_widgets, $deprecated, $autoload );
100 }
101 }
102
103 $post_type = array('post', 'page', 'product');
104
105 $support_ept = get_option( 'pl_support_ept', ['post', 'page']);
106 foreach ( $support_ept as $support_pl ) {
107 add_post_type_support( $support_pl, 'pagelayer' );
108 }
109 ?>
110 <form class="pagelayer-setting-form" method="post" action="">
111 <h1>PageLayer Editor</h1>
112 <p>Welcome To PageLayer</p>
113 <div class="tabs-wrapper">
114 <h2 class="nav-tab-wrapper pagelayer-wrapper">
115 <a href="#general" class="nav-tab">General</a>
116 <a href="#settings" class="nav-tab ">Settings</a>
117 <a href="#support" class="nav-tab ">Support</a>
118 <a href="#faq" class="nav-tab ">FAQ</a>
119 </h2>
120
121 <div class="pagelayer-tab-panel" id="general">
122 <table>
123 <tr>
124 <th scope="row">Editor Enables On </th>
125 <td>
126 <label>
127 <?php
128 foreach($post_type as $type){
129
130 echo '<input type="checkbox" name="pl_support_ept[]" value="'.$type.'" '. (in_array($type, $support_ept) ? "checked" : "") .'/>'.$type.'</br>';
131 }
132 ?>
133 </label></td>
134 </tr>
135 </table>
136 </div>
137 <div class="pagelayer-tab-panel" id="settings">
138 <table>
139 <tr>
140 <th>Content Width</th>
141 <td>
142 <input name="pagelayer_content_width" type="number" step="1" min="320" max="5000" placeholder="1170" <?php if(get_option('pagelayer_content_width')){
143 echo 'value="'.get_option('pagelayer_content_width').'"';
144 }?>>
145 <p>Set the custom width of the content area. The default width set is 1170px</p>
146 </td>
147 <tr>
148 <tr>
149 <th>Space Between Widgets</th>
150 <td>
151 <input name="pagelayer_between_widgets" type="number" step="1" min="0" max="500" placeholder="15" <?php if(get_option('pagelayer_between_widgets')){
152 echo 'value="'.get_option('pagelayer_between_widgets').'"';
153 }?>>
154 <p>Set the Space Between Widgets. The default Space set is 15px</p>
155 </td>
156 <tr>
157 </table>
158 </div>
159 <div class="pagelayer-tab-panel" id="support">
160 <h2>Support</h2>
161 <h3>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!</h3>
162
163
164 </div>
165 <div class="pagelayer-tab-panel" id="faq">
166 <h2>FAQ</h2>
167 <div class="pagelayer-acc-wrapper">
168 <span class="nav-tab pagelayer-acc-tab">1: Why choose us</span>
169 <div class="pagelayer-acc-panel">
170 <p>PageLayer is best live editor and easy to use and we will keep improving it !</P>
171 </div>
172
173 <span class="nav-tab pagelayer-acc-tab">2: Support</span>
174 <div class="pagelayer-acc-panel">
175 <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>
176 </div>
177 </div>
178 </div>
179 </div>
180 <tr>
181 <p>
182 <input type="submit" name="submit" class="button button-primary" value="Save Changes">
183 </p>
184 </form>
185