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

158 lines 5.0 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 $post_type = array('post', 'page', 'product');
86
87 $support_ept = get_option( 'pl_support_ept', ['post', 'page']);
88 foreach ( $support_ept as $support_pl ) {
89 add_post_type_support( $support_pl, 'pagelayer' );
90 }
91 ?>
92 <form class="pagelayer-setting-form" method="post" action="">
93 <h1>PageLayer Editor</h1>
94 <p>Welcome To PageLayer</p>
95 <div class="tabs-wrapper">
96 <h2 class="nav-tab-wrapper">
97 <a href="#general" class="nav-tab">General</a>
98 <a href="#settings" class="nav-tab ">Settings</a>
99 <a href="#support" class="nav-tab ">Support</a>
100 <a href="#faq" class="nav-tab ">FAQ</a>
101 </h2>
102
103 <div class="pagelayer-tab-panel" id="general">
104 <table>
105 <tr>
106 <th scope="row">Editor Enables On </th>
107 <td>
108 <label>
109 <?php
110 foreach($post_type as $type){
111
112 echo '<input type="checkbox" name="pl_support_ept[]" value="'.$type.'" '. (in_array($type, $support_ept) ? "checked" : "") .'/>'.$type.'</br>';
113 }
114 ?>
115 </label></td>
116 </tr>
117 </table>
118 </div>
119 <div class="pagelayer-tab-panel" id="settings">
120 <table>
121 <tr>
122 <th>Content Width</th>
123 <td>
124 <input name="pagelayer_content_width" type="number" step="1" min="320" max="5000" placeholder="1170" <?php if(get_option('pagelayer_content_width')){
125 echo 'value="'.get_option('pagelayer_content_width').'"';
126 }?>>
127 <p>Set the custom width of the content area. The default width set is 1170px</p>
128 </td>
129 <tr>
130 </table>
131 </div>
132 <div class="pagelayer-tab-panel" id="support">
133 <h2>Support</h2>
134 <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>
135
136
137 </div>
138 <div class="pagelayer-tab-panel" id="faq">
139 <h2>FAQ</h2>
140 <div class="pagelayer-acc-wrapper">
141 <span class="nav-tab pagelayer-acc-tab">1: Why choose us</span>
142 <div class="pagelayer-acc-panel">
143 <p>PageLayer is best live editor and easy to use and we will keep improving it !</P>
144 </div>
145
146 <span class="nav-tab pagelayer-acc-tab">2: Support</span>
147 <div class="pagelayer-acc-panel">
148 <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>
149 </div>
150 </div>
151 </div>
152 </div>
153 <tr>
154 <p>
155 <input type="submit" name="submit" class="button button-primary" value="Save Changes">
156 </p>
157 </form>
158