Click to Chat for WhatsApp Chat - Version 1.0

Version Description

Download this release

Release Info

Developer bhvreddy
Plugin Icon 128x128 Click to Chat for WhatsApp Chat
Version 1.0
Comparing to
See all releases

Version 1.0

admin/add_styles_scripts_admin.php ADDED
@@ -0,0 +1,39 @@
1
+ <?php
2
+ /*
3
+ * Register css styles, javascript files at admin side
4
+ * instead of register multiple styles - as using sass in dev env,
5
+ * import files and at final create less css files
6
+ */
7
+
8
+ if ( ! defined( 'ABSPATH' ) ) exit;
9
+
10
+ // Register css styles, javascript files only on 'click-to-chat' page
11
+ if( ! function_exists('ccw_register_files_admin') ) {
12
+
13
+ function ccw_register_files_admin($hook) {
14
+
15
+ // ?page=click-to-chat
16
+ if( 'toplevel_page_click-to-chat' == $hook || 'click-to-chat_page_ccw-edit-styles' == $hook ) {
17
+
18
+ wp_register_style('ccw_new_css_admin', plugins_url( 'assets/css/admin_main.css', dirname(__FILE__) ) , '', CCW_VERSION );
19
+
20
+
21
+ wp_enqueue_style('ccw_new_css_admin');
22
+
23
+ wp_enqueue_style( 'wp-color-picker' );
24
+
25
+
26
+ wp_enqueue_script( 'ccw_app_admin', plugins_url( 'assets/js/admin_app.js', dirname(__FILE__) ), array( 'wp-color-picker' ), CCW_VERSION, true );
27
+ // wp_enqueue_script( 'ccw_app_admin_dir', plugins_url( 'assets/js/dir.js', dirname(__FILE__) ), '', '', true );
28
+ // return;
29
+ } else {
30
+ return;
31
+ }
32
+
33
+
34
+ }
35
+
36
+ }
37
+
38
+
39
+ add_action('admin_enqueue_scripts', 'ccw_register_files_admin');
admin/admin.php ADDED
@@ -0,0 +1,22 @@
1
+ <?php
2
+ /*
3
+ * starting point for the admin side of this plugin.
4
+ *
5
+ * include other file here .. which need in admin side.
6
+ *
7
+ * In click-to-chat.php this file will be loaded as is_admin
8
+ */
9
+
10
+ if ( ! defined( 'ABSPATH' ) ) exit;
11
+
12
+ /*************** includes ***********/
13
+ require_once('add_styles_scripts_admin.php');
14
+
15
+
16
+ require_once('admin_menu.php');
17
+ require_once('admin_page.php');
18
+ require_once('admin_page_customize_styles.php');
19
+
20
+
21
+
22
+ /*************** hooks ***********/
admin/admin_menu.php ADDED
@@ -0,0 +1,73 @@
1
+ <?php
2
+ /*
3
+ * Admin - menu page - add_menu_page for this plugin - top level menu
4
+ * calls settings_page.php ( ccw_settings_page - > require_once('settings_page.php') )
5
+ * and page content display at admin_menu.php
6
+ */
7
+
8
+ if ( ! defined( 'ABSPATH' ) ) exit;
9
+
10
+ if( ! function_exists('ccw_options_page') ) {
11
+
12
+ function ccw_options_page() {
13
+ add_menu_page(
14
+ 'Click to Chat for WhatsApp - Plugin Option Page',
15
+ 'Click to Chat',
16
+ 'manage_options',
17
+ 'click-to-chat',
18
+ 'ccw_settings_page',
19
+ 'dashicons-format-chat'
20
+ );
21
+ }
22
+ }
23
+
24
+ add_action('admin_menu', 'ccw_options_page');
25
+
26
+
27
+ if( ! function_exists('ccw_settings_page') ) {
28
+
29
+ function ccw_settings_page() {
30
+
31
+ if ( ! current_user_can('manage_options') ) {
32
+ return;
33
+ }
34
+
35
+ require_once('settings_page.php');
36
+
37
+ }
38
+ }
39
+
40
+
41
+
42
+
43
+ // second page
44
+ if( ! function_exists('ccw_options_page_two') ) {
45
+
46
+ function ccw_options_page_two() {
47
+ add_submenu_page(
48
+ 'click-to-chat',
49
+ 'Edit Styles',
50
+ 'Customize Styles',
51
+ 'manage_options',
52
+ 'ccw-edit-styles',
53
+ 'ccw_settings_page_two'
54
+ );
55
+
56
+ }
57
+ }
58
+
59
+ add_action('admin_menu', 'ccw_options_page_two');
60
+
61
+
62
+ if( ! function_exists('ccw_settings_page_two') ) {
63
+
64
+ function ccw_settings_page_two() {
65
+
66
+ if ( ! current_user_can('manage_options') ) {
67
+ return;
68
+ }
69
+
70
+ require_once('sp_customize_styles.php');
71
+
72
+ }
73
+ }
admin/admin_page.php ADDED
@@ -0,0 +1,571 @@
1
+ <?php
2
+ /*
3
+ * content of the options page ..
4
+ * admin_menu.php -> settings_page.php -> admin_page.php
5
+ */
6
+
7
+ if ( ! defined( 'ABSPATH' ) ) exit;
8
+
9
+ function ccw_custom_settings() {
10
+
11
+ register_setting( 'ccw_settings_group', 'ccw_options' , 'ccw_options_sanitize' );
12
+
13
+ add_settings_section( 'ccw_settings', '', 'ccw_settings_section', 'ccw_options_settings' );
14
+
15
+ add_settings_field( 'ccw_enable', 'Enable Floating Styles', 'ccw_enable_cb', 'ccw_options_settings', 'ccw_settings' );
16
+ add_settings_field( 'ccw_enable_sc', 'Enable ShortCodes', 'ccw_enable_sc_cb', 'ccw_options_settings', 'ccw_settings' );
17
+ add_settings_field( 'ccw_return_type', 'Return Type', 'ccw_return_type_cb', 'ccw_options_settings', 'ccw_settings' );
18
+ add_settings_field( 'ccw_number', 'WhatsApp Number', 'ccw_number_input_cb', 'ccw_options_settings', 'ccw_settings' );
19
+ add_settings_field( 'ccw_group_id', 'Group Id', 'ccw_group_id_cb', 'ccw_options_settings', 'ccw_settings' );
20
+ add_settings_field( 'ccw_style', 'Style for Desktops', 'ccw_style_cb', 'ccw_options_settings', 'ccw_settings' );
21
+ add_settings_field( 'ccw_style_mobile', 'Style for Mobile Devices', 'ccw_style_mobile_cb', 'ccw_options_settings', 'ccw_settings' );
22
+ add_settings_field( 'ccw_position', 'Position to Place', 'ccw_position_input_cb', 'ccw_options_settings', 'ccw_settings' );
23
+ add_settings_field( 'ccw_placeholder', 'Text to Display', 'ccw_input_placeholder_cb', 'ccw_options_settings', 'ccw_settings' );
24
+ add_settings_field( 'ccw_checkbox', 'Show / Hide ', 'ccw_checkbox_cb', 'ccw_options_settings', 'ccw_settings' );
25
+ add_settings_field( 'ccw_list_id_tohide', 'Posts, Pages Id\'s to Hide', 'ccw_list_id_tohide_cb', 'ccw_options_settings', 'ccw_settings' );
26
+ add_settings_field( 'ccw_list_cat_tohide', 'Categorys to Hide', 'ccw_list_cat_tohide_cb', 'ccw_options_settings', 'ccw_settings' );
27
+ add_settings_field( 'ccw_custom_shortcode', 'Shortcode name', 'ccw_custom_shortcode_cb', 'ccw_options_settings', 'ccw_settings' );
28
+
29
+ }
30
+
31
+
32
+ add_action( 'admin_init', 'ccw_custom_settings' );
33
+
34
+
35
+ // heading
36
+ if( ! function_exists('ccw_settings_section') ) {
37
+
38
+ function ccw_settings_section() {
39
+ echo '<h1>Click to Chat For WhatsApp - Global Settings</h1>';
40
+ }
41
+ }
42
+
43
+
44
+ // enable / disable floating styles
45
+ if( ! function_exists('ccw_enable_cb') ) {
46
+
47
+ function ccw_enable_cb() {
48
+ $ccw_enable = get_option('ccw_options');
49
+ ?>
50
+ <div class="row">
51
+ <div class="input-field col s12">
52
+ <select name="ccw_options[enable]" class="select-1">
53
+ <option value="1">No</option>
54
+ <option value="2" <?php echo esc_attr( $ccw_enable['enable'] ) == 2 ? 'SELECTED' : ''; ?> >Yes</option>
55
+ </select>
56
+ <label>enable</label>
57
+ </div>
58
+ </div>
59
+ <?php
60
+ }
61
+ }
62
+
63
+ // enable / disable shortcodes
64
+ if( ! function_exists('ccw_enable_sc_cb') ) {
65
+
66
+ function ccw_enable_sc_cb() {
67
+ $ccw_enable_sc = get_option('ccw_options');
68
+ ?>
69
+ <div class="row">
70
+ <div class="input-field col s12 select-margin">
71
+ <select name="ccw_options[enable_sc]" class="select-1">
72
+ <option value="1">No</option>
73
+ <option value="2" <?php echo esc_attr( $ccw_enable_sc['enable_sc'] ) == 2 ? 'SELECTED' : ''; ?> >Yes</option>
74
+ </select>
75
+ <label>enable ShortCodes</label>
76
+ <p class="description"> If Selected - No - then Hides Shortcodes and its syntax - <a target="_blank" href="https://medium.com/clicktochat/enable-disable-styles-84293dca3fbd">more info</a> </p>
77
+ </div>
78
+ </div>
79
+ <?php
80
+ }
81
+ }
82
+
83
+ // Return type - chat or group chat
84
+ if( ! function_exists('ccw_return_type_cb') ) {
85
+
86
+ function ccw_return_type_cb() {
87
+ $ccw_return_type = get_option('ccw_options');
88
+ ?>
89
+ <div class="row">
90
+ <div class="input-field col s12 select-margin">
91
+ <select name="ccw_options[return_type]" class="select-1">
92
+ <option value="chat" <?php echo esc_attr( $ccw_return_type['return_type'] ) == 'chat' ? 'SELECTED' : ''; ?> >Chat</option>
93
+ <option value="group_chat" <?php echo esc_attr( $ccw_return_type['return_type'] ) == 'group_chat' ? 'SELECTED' : ''; ?> >Group chat - Invite</option>
94
+ </select>
95
+ <label>Default return type - Chat or Group Chat Invite</label>
96
+ <p class="description"> Default return type for Floating Style, shortcodes. But for shortcodes can change using shortcode attributes - <a target="_blank" href="https://medium.com/clicktochat/return-type-451635e320eb">more info</a> </p>
97
+ </div>
98
+ </div>
99
+ <?php
100
+ }
101
+ }
102
+
103
+
104
+ // Desktop - select style
105
+ if( ! function_exists('ccw_style_cb') ) {
106
+
107
+ function ccw_style_cb() {
108
+ $ccw_style = get_option('ccw_options');
109
+ $style_value = esc_attr( $ccw_style['style'] );
110
+ ?>
111
+ <div class="row">
112
+ <div class="input-field col s12">
113
+ <select name="ccw_options[style]" class="select-2">
114
+ <option value="1" <?php echo $style_value == 1 ? 'SELECTED' : ''; ?> >Style-1</option>
115
+ <option value="2" <?php echo $style_value == 2 ? 'SELECTED' : ''; ?> >Style-2</option>
116
+ <option value="3" <?php echo $style_value == 3 ? 'SELECTED' : ''; ?> >Style-3</option>
117
+ <option value="4" <?php echo $style_value == 4 ? 'SELECTED' : ''; ?> >Style-4</option>
118
+ <option value="5" <?php echo $style_value == 5 ? 'SELECTED' : ''; ?> >Style-5</option>
119
+ <option value="6" <?php echo $style_value == 6 ? 'SELECTED' : ''; ?> >Style-6</option>
120
+ <option value="7" <?php echo $style_value == 7 ? 'SELECTED' : ''; ?> >Style-7</option>
121
+ <option value="8" <?php echo $style_value == 8 ? 'SELECTED' : ''; ?> >Style-8</option>
122
+ <option value="0" <?php echo $style_value == 0 ? 'SELECTED' : ''; ?> >Hide on Desktop Devices</option>
123
+ </select>
124
+ <label>Select Style for Destops</label>
125
+ <p class="description"> - <a target="_blank" href="https://medium.com/clicktochat/select-styles-48527f73e697">List of syles with images</a> </p>
126
+ </div>
127
+ </div>
128
+ <?php
129
+ }
130
+ }
131
+
132
+ // Mobile - Select Style
133
+ if( ! function_exists('ccw_style_mobile_cb') ) {
134
+
135
+ function ccw_style_mobile_cb() {
136
+ $ccw_stylemobile = get_option('ccw_options');
137
+ $style_mobile_value = esc_attr( $ccw_stylemobile['stylemobile'] );
138
+ ?>
139
+ <div class="row">
140
+ <div class="input-field col s12">
141
+ <select name="ccw_options[stylemobile]" class="select-2_2">
142
+ <option value="1" <?php echo $style_mobile_value == 1 ? 'SELECTED' : ''; ?> >Style-1</option>
143
+ <option value="2" <?php echo $style_mobile_value == 2 ? 'SELECTED' : ''; ?> >Style-2</option>
144
+ <option value="3" <?php echo $style_mobile_value == 3 ? 'SELECTED' : ''; ?> >Style-3</option>
145
+ <option value="4" <?php echo $style_mobile_value == 4 ? 'SELECTED' : ''; ?> >Style-4</option>
146
+ <option value="5" <?php echo $style_mobile_value == 5 ? 'SELECTED' : ''; ?> >Style-5</option>
147
+ <option value="6" <?php echo $style_mobile_value == 6 ? 'SELECTED' : ''; ?> >Style-6</option>
148
+ <option value="7" <?php echo $style_mobile_value == 7 ? 'SELECTED' : ''; ?> >Style-7</option>
149
+ <option value="8" <?php echo $style_mobile_value == 8 ? 'SELECTED' : ''; ?> >Style-8</option>
150
+ <option value="0" <?php echo $style_mobile_value == 0 ? 'SELECTED' : ''; ?> >Hide on Mobile Devices</option>
151
+ </select>
152
+ <label>Select Style for Mobile Devices</label>
153
+ </div>
154
+ </div>
155
+ <?php
156
+ }
157
+ }
158
+
159
+ // number
160
+ if( ! function_exists('ccw_number_input_cb') ) {
161
+
162
+ function ccw_number_input_cb() {
163
+ $ccw_number = get_option('ccw_options');
164
+ ?>
165
+ <div class="row">
166
+ <div class="input-field col s12">
167
+ <input name="ccw_options[number]" value="<?php echo esc_attr( $ccw_number['number'] ) ?>" id="whatsapp_number" type="text" class="validate input-margin">
168
+ <label for="whatsapp_number">Enter whatsapp number </label>
169
+ <p class="description">Enter whatsapp number with country code ( e.g. 916123456789 ) please dont include +, ( here in e.g. 91 is country code 6123456789 is mobile number - <a target="_blank" href="https://medium.com/clicktochat/whatsapp-number-b155206825c8">more info</a> ) </p>
170
+ </div>
171
+ </div>
172
+ <?php
173
+ }
174
+ }
175
+
176
+ // Group ID
177
+ if( ! function_exists('ccw_group_id_cb') ) {
178
+
179
+ function ccw_group_id_cb() {
180
+ $ccw_group_id = get_option('ccw_options');
181
+ ?>
182
+ <div class="row">
183
+ <div class="input-field col s12">
184
+ <input name="ccw_options[group_id]" value="<?php echo esc_attr( $ccw_group_id['group_id'] ) ?>" id="whatsapp_group_id" type="text" class="validate input-margin">
185
+ <label for="whatsapp_group_id">whatsapp group ID Extenstion </label>
186
+ <p class="description">Enter whatsapp Group Id - <a target="_blank" href="https://medium.com/clicktochat/later">more info</a> ) </p>
187
+ </div>
188
+ </div>
189
+ <?php
190
+ }
191
+ }
192
+
193
+ // postion
194
+ if( ! function_exists('ccw_position_input_cb') ) {
195
+
196
+ function ccw_position_input_cb() {
197
+ $ccw_position = get_option('ccw_options');
198
+ $ccw_position_value = esc_attr( $ccw_position['position'] )
199
+ ?>
200
+ <div class="row">
201
+ <div class="input-field col s12">
202
+ <select name="ccw_options[position]" class="select">
203
+ <option value="1" <?php echo $ccw_position_value == 1 ? 'SELECTED' : ''; ?> >bottom right</option>
204
+ <option value="2" <?php echo $ccw_position_value == 2 ? 'SELECTED' : ''; ?> >bottom left</option>
205
+ <option value="3" <?php echo $ccw_position_value == 3 ? 'SELECTED' : ''; ?> >top left</option>
206
+ <option value="4" <?php echo $ccw_position_value == 4 ? 'SELECTED' : ''; ?> >top right</option>
207
+ </select>
208
+ <label>Fixed position to place</label>
209
+ <p class="description"> e.g. 10px - please add css units as suffix, e.g. 10px, 10%, 10rem, 10em .. <a target="_blank" href="https://medium.com/clicktochat/position-to-place-984ac32446e6">more info</a> </p>
210
+ </div>
211
+ </div>
212
+
213
+ <div class="row display-none position position-1 bottom-right">
214
+ <div class="input-field col s6">
215
+ <input name="ccw_options[position-1_bottom]" value="<?php echo esc_attr( $ccw_position['position-1_bottom'] ) ?>" id="position_bottom" type="text" class="validate">
216
+ <label for="position_bottom">position_bottom: </label>
217
+ </div>
218
+ <div class="input-field col s6">
219
+ <input name="ccw_options[position-1_right]" value="<?php echo esc_attr( $ccw_position['position-1_right'] ) ?>" id="position_right" type="text" class="validate">
220
+ <label for="position_right">position_right: </label>
221
+ </div>
222
+ </div>
223
+
224
+ <div class="row display-none position position-2 bottom-left">
225
+ <div class="input-field col s6">
226
+ <input name="ccw_options[position-2_bottom]" value="<?php echo esc_attr( $ccw_position['position-2_bottom'] ) ?>" id="position_bottom" type="text" class="validate">
227
+ <label for="position_bottom">position_bottom: </label>
228
+ </div>
229
+ <div class="input-field col s6">
230
+ <input name="ccw_options[position-2_left]" value="<?php echo esc_attr( $ccw_position['position-2_left'] ) ?>" id="position_left" type="text" class="validate">
231
+ <label for="position_left">position_left: </label>
232
+ </div>
233
+ </div>
234
+
235
+
236
+
237
+ <div class="row display-none position position-3 top-left">
238
+ <div class="input-field col s6">
239
+ <input name="ccw_options[position-3_top]" value="<?php echo esc_attr( $ccw_position['position-3_top'] ) ?>" id="position_top" type="text" class="validate">
240
+ <label for="position_top">position_top: </label>
241
+ </div>
242
+ <div class="input-field col s6">
243
+ <input name="ccw_options[position-3_left]" value="<?php echo esc_attr( $ccw_position['position-3_left'] ) ?>" id="position_left" type="text" class="validate">
244
+ <label for="position_left">position_left: </label>
245
+ </div>
246
+ </div>
247
+
248
+ <div class="row display-none position position-4 top-right">
249
+ <div class="input-field col s6">
250
+ <input name="ccw_options[position-4_top]" value="<?php echo esc_attr( $ccw_position['position-4_top'] ) ?>" id="position_top" type="text" class="validate">
251
+ <label for="position_top">position_top: </label>
252
+ </div>
253
+ <div class="input-field col s6">
254
+ <input name="ccw_options[position-4_right]" value="<?php echo esc_attr( $ccw_position['position-4_right'] ) ?>" id="position_right" type="text" class="validate">
255
+ <label for="position_right">position_right: </label>
256
+ </div>
257
+ </div>
258
+
259
+ <?php
260
+ }
261
+ }
262
+
263
+ // Text - placeholder
264
+ if( ! function_exists('ccw_input_placeholder_cb') ) {
265
+
266
+ function ccw_input_placeholder_cb() {
267
+ $ccw_placeholder = get_option('ccw_options');
268
+ ?>
269
+ <div class="row">
270
+ <div class="input-field col s12">
271
+ <input name="ccw_options[input_placeholder]" value="<?php echo esc_attr( $ccw_placeholder['input_placeholder'] ) ?>" id="input_placeholder" type="text" class="validate input-margin">
272
+ <label for="input_placeholder">placeholder value</label>
273
+ <p class="description"> - <a target="_blank" href="https://medium.com/clicktochat/text-to-display-59c478c87167">more info</a> </p>
274
+ </div>
275
+ </div>
276
+ <?php
277
+ }
278
+ }
279
+
280
+ // checkboxes - based on Type of posts ..
281
+ if( ! function_exists('ccw_checkbox_cb') ) {
282
+
283
+ function ccw_checkbox_cb() {
284
+ $ccw_checkbox = get_option('ccw_options');
285
+
286
+
287
+ // Single Posts
288
+ if ( isset( $ccw_checkbox['showon_posts'] ) ) {
289
+ ?>
290
+ <p>
291
+ <input name="ccw_options[showon_posts]" type="checkbox" value="1" <?php checked( $ccw_checkbox['showon_posts'], 1 ); ?> id="filled-in-box1" />
292
+ <label for="filled-in-box1">Posts</label>
293
+ </p>
294
+ <?php
295
+ } else {
296
+ ?>
297
+ <p>
298
+ <input name="ccw_options[showon_posts]" type="checkbox" value="1" id="filled-in-box1" />
299
+ <label for="filled-in-box1">Posts</label>
300
+ </p>
301
+ <?php
302
+ }
303
+
304
+
305
+ // Page
306
+ if ( isset( $ccw_checkbox['showon_page'] ) ) {
307
+ ?>
308
+ <p>
309
+ <input name="ccw_options[showon_page]" type="checkbox" value="1" <?php checked( $ccw_checkbox['showon_page'], 1 ); ?> id="filled-in-box2" />
310
+ <label for="filled-in-box2">Pages</label>
311
+ </p>
312
+ <?php
313
+ } else {
314
+ ?>
315
+ <p>
316
+ <input name="ccw_options[showon_page]" type="checkbox" value="1" id="filled-in-box2" />
317
+ <label for="filled-in-box2">Pages</label>
318
+ </p>
319
+ <?php
320
+ }
321
+
322
+
323
+ // Home Page
324
+ if ( isset( $ccw_checkbox['showon_homepage'] ) ) {
325
+ ?>
326
+ <p>
327
+ <input name="ccw_options[showon_homepage]" type="checkbox" value="1" <?php checked( $ccw_checkbox['showon_homepage'], 1 ); ?> id="filled-in-box3" />
328
+ <label for="filled-in-box3">Home Page</label>
329
+ </p>
330
+ <?php
331
+ } else {
332
+ ?>
333
+ <p>
334
+ <input name="ccw_options[showon_homepage]" type="checkbox" value="1" id="filled-in-box3" />
335
+ <label for="filled-in-box3">Home Page</label>
336
+ </p>
337
+ <?php
338
+ }
339
+
340
+ /* Front Page
341
+ A front page is also a home page, but home page is not a front page
342
+ if front page unchecked - it works on both homepage and fornt page
343
+ but if home page is unchecked - it works only on home page, not on front page */
344
+ if ( isset( $ccw_checkbox['showon_frontpage'] ) ) {
345
+ ?>
346
+ <p>
347
+ <input name="ccw_options[showon_frontpage]" type="checkbox" value="1" <?php checked( $ccw_checkbox['showon_frontpage'], 1 ); ?> id="filled-in-box4" />
348
+ <label for="filled-in-box4">Front Page</label>
349
+ </p>
350
+ <?php
351
+ } else {
352
+ ?>
353
+ <p>
354
+ <input name="ccw_options[showon_frontpage]" type="checkbox" value="1" id="filled-in-box4" />
355
+ <label for="filled-in-box4">Front Page</label>
356
+ </p>
357
+ <?php
358
+ }
359
+
360
+ // Category
361
+ if ( isset( $ccw_checkbox['showon_category'] ) ) {
362
+ ?>
363
+ <p>
364
+ <input name="ccw_options[showon_category]" type="checkbox" value="1" <?php checked( $ccw_checkbox['showon_category'], 1 ); ?> id="filled-in-box5" />
365
+ <label for="filled-in-box5">Category</label>
366
+ </p>
367
+ <?php
368
+ } else {
369
+ ?>
370
+ <p>
371
+ <input name="ccw_options[showon_category]" type="checkbox" value="1" id="filled-in-box5" />
372
+ <label for="filled-in-box5">Category</label>
373
+ </p>
374
+ <?php
375
+ }
376
+
377
+ // Archive
378
+ if ( isset( $ccw_checkbox['showon_archive'] ) ) {
379
+ ?>
380
+ <p>
381
+ <input name="ccw_options[showon_archive]" type="checkbox" value="1" <?php checked( $ccw_checkbox['showon_archive'], 1 ); ?> id="filled-in-box6" />
382
+ <label for="filled-in-box6">Archive</label>
383
+ </p>
384
+ <?php
385
+ } else {
386
+ ?>
387
+ <p>
388
+ <input name="ccw_options[showon_archive]" type="checkbox" value="1" id="filled-in-box6" />
389
+ <label for="filled-in-box6">Archive</label>
390
+ </p>
391
+ <?php
392
+ }
393
+
394
+
395
+ // 404 Page
396
+ if ( isset( $ccw_checkbox['showon_404'] ) ) {
397
+ ?>
398
+ <p>
399
+ <input name="ccw_options[showon_404]" type="checkbox" value="1" <?php checked( $ccw_checkbox['showon_404'], 1 ); ?> id="filled-in-box7" />
400
+ <label for="filled-in-box7">404 Page</label>
401
+ </p>
402
+ <?php
403
+ } else {
404
+ ?>
405
+ <p>
406
+ <input name="ccw_options[showon_404]" type="checkbox" value="1" id="filled-in-box7" />
407
+ <label for="filled-in-box7">404 Page</label>
408
+ </p>
409
+ <?php
410
+ }
411
+ ?>
412
+ <p class="description"> check to show, uncheck to hide - Show/ Hide - Styles - based on type of the page <a target="_blank" href="https://medium.com/clicktochat/show-hide-styles-based-on-type-of-the-page-4f0542a92909">more info</a> </p>
413
+ <?php
414
+ }
415
+ }
416
+
417
+ // ID 's list to hide styles
418
+ if( ! function_exists('ccw_list_id_tohide_cb') ) {
419
+
420
+ function ccw_list_id_tohide_cb() {
421
+ $ccw_list_id_tohide = get_option('ccw_options');
422
+ ?>
423
+ <div class="row">
424
+ <div class="input-field col s12">
425
+ <input name="ccw_options[list_hideon_pages]" value="<?php echo esc_attr( $ccw_list_id_tohide['list_hideon_pages'] ) ?>" id="ccw_list_id_tohide" type="text" class="validate input-margin">
426
+ <label for="ccw_list_id_tohide">Id's list to Hide - add ',' after each id </label>
427
+ <p class="description"> Add Post, Pages, Media - ID's to hide, can add multiple id's separate with comma ( , ) - <a target="_blank" href="https://medium.com/@bhvreddy/show-hide-styles-based-on-id-bb4cbfa091d7">more info</a> </p>
428
+ </div>
429
+ </div>
430
+ <?php
431
+ }
432
+ }
433
+
434
+
435
+ // Categorys list - to hide
436
+ if( ! function_exists('ccw_list_cat_tohide_cb') ) {
437
+
438
+ function ccw_list_cat_tohide_cb() {
439
+ $ccw_list_cat_tohide = get_option('ccw_options');
440
+ ?>
441
+ <div class="row">
442
+ <div class="input-field col s12">
443
+ <input name="ccw_options[list_hideon_cat]" value="<?php echo esc_attr( $ccw_list_cat_tohide['list_hideon_cat'] ) ?>" id="ccw_list_cat_tohide" type="text" class="validate input-margin">
444
+ <label for="ccw_list_cat_tohide">Category name's to Hide - add ',' after each category name </label>
445
+ <p class="description"> Category name's to hide, can add multiple Categories separate with comma ( , ) - <a target="_blank" href="https://medium.com/@bhvreddy/show-hide-styles-based-on-category-52453616cb65">more info</a> </p>
446
+ </div>
447
+ </div>
448
+ <?php
449
+ }
450
+ }
451
+
452
+ // Custom shortcode
453
+ if( ! function_exists('ccw_custom_shortcode_cb') ) {
454
+
455
+ function ccw_custom_shortcode_cb() {
456
+ $ccw_shortcode = get_option('ccw_options');
457
+ ?>
458
+ <div class="row">
459
+ <div class="input-field col s12">
460
+ <input name="ccw_options[shortcode]" value="<?php echo esc_attr( $ccw_shortcode['shortcode'] ) ?>" id="shortcode" type="text" class="validate input-margin">
461
+ <label for="shortcode">shortcode name</label>
462
+ <?php
463
+ $shorcode_list = '';
464
+ foreach ($GLOBALS['shortcode_tags'] AS $key => $value) {
465
+ $shorcode_list .= $key . ', ';
466
+ }
467
+ ?>
468
+ <p class="description"> Default values is 'chat', can customize shortcode name - <a target="_blank" href="https://medium.com/clicktochat/shortcode-name-d90fd531d589">more info</a> </p>
469
+ <p class="description"> please dont add this already existing shorcode names - <?php echo $shorcode_list ?> </p>
470
+ </div>
471
+ </div>
472
+ <?php
473
+ }
474
+ }
475
+
476
+ // Sanitize callback ..
477
+ if( ! function_exists('ccw_options_sanitize') ) {
478
+
479
+ function ccw_options_sanitize( $input ) {
480
+
481
+ if ( ! current_user_can( 'manage_options' ) ) {
482
+ wp_die( 'not allowed to modify - please contact admin ' );
483
+ }
484
+
485
+ $new_input = array();
486
+
487
+ if( isset( $input['enable'] ) )
488
+ $new_input['enable'] = sanitize_text_field( $input['enable'] );
489
+
490
+ if( isset( $input['enable_sc'] ) )
491
+ $new_input['enable_sc'] = sanitize_text_field( $input['enable_sc'] );
492
+
493
+ if( isset( $input['number'] ) )
494
+ $new_input['number'] = sanitize_text_field( $input['number'] );
495
+
496
+ if( isset( $input['input_placeholder'] ) )
497
+ $new_input['input_placeholder'] = sanitize_text_field( $input['input_placeholder'] );
498
+
499
+ if( isset( $input['position'] ) )
500
+ $new_input['position'] = sanitize_text_field( $input['position'] );
501
+
502
+ if( isset( $input['style'] ) )
503
+ $new_input['style'] = sanitize_text_field( $input['style'] );
504
+
505
+ if( isset( $input['stylemobile'] ) )
506
+ $new_input['stylemobile'] = sanitize_text_field( $input['stylemobile'] );
507
+
508
+ if( isset( $input['position-1_bottom'] ) )
509
+ $new_input['position-1_bottom'] = sanitize_text_field( $input['position-1_bottom'] );
510
+
511
+ if( isset( $input['position-1_right'] ) )
512
+ $new_input['position-1_right'] = sanitize_text_field( $input['position-1_right'] );
513
+
514
+ if( isset( $input['position-2_bottom'] ) )
515
+ $new_input['position-2_bottom'] = sanitize_text_field( $input['position-2_bottom'] );
516
+
517
+ if( isset( $input['position-2_left'] ) )
518
+ $new_input['position-2_left'] = sanitize_text_field( $input['position-2_left'] );
519
+
520
+ if( isset( $input['position-3_top'] ) )
521
+ $new_input['position-3_top'] = sanitize_text_field( $input['position-3_top'] );
522
+
523
+ if( isset( $input['position-3_left'] ) )
524
+ $new_input['position-3_left'] = sanitize_text_field( $input['position-3_left'] );
525
+
526
+ if( isset( $input['position-4_top'] ) )
527
+ $new_input['position-4_top'] = sanitize_text_field( $input['position-4_top'] );
528
+
529
+ if( isset( $input['position-4_right'] ) )
530
+ $new_input['position-4_right'] = sanitize_text_field( $input['position-4_right'] );
531
+
532
+ if( isset( $input['showon_posts'] ) )
533
+ $new_input['showon_posts'] = sanitize_text_field( $input['showon_posts'] );
534
+
535
+ if( isset( $input['showon_page'] ) )
536
+ $new_input['showon_page'] = sanitize_text_field( $input['showon_page'] );
537
+
538
+ if( isset( $input['showon_homepage'] ) )
539
+ $new_input['showon_homepage'] = sanitize_text_field( $input['showon_homepage'] );
540
+
541
+ if( isset( $input['showon_frontpage'] ) )
542
+ $new_input['showon_frontpage'] = sanitize_text_field( $input['showon_frontpage'] );
543
+
544
+ if( isset( $input['showon_category'] ) )
545
+ $new_input['showon_category'] = sanitize_text_field( $input['showon_category'] );
546
+
547
+ if( isset( $input['showon_archive'] ) )
548
+ $new_input['showon_archive'] = sanitize_text_field( $input['showon_archive'] );
549
+
550
+ if( isset( $input['showon_404'] ) )
551
+ $new_input['showon_404'] = sanitize_text_field( $input['showon_404'] );
552
+
553
+ if( isset( $input['list_hideon_pages'] ) )
554
+ $new_input['list_hideon_pages'] = sanitize_text_field( $input['list_hideon_pages'] );
555
+
556
+ if( isset( $input['list_hideon_cat'] ) )
557
+ $new_input['list_hideon_cat'] = sanitize_text_field( $input['list_hideon_cat'] );
558
+
559
+ if( isset( $input['shortcode'] ) )
560
+ $new_input['shortcode'] = sanitize_text_field( $input['shortcode'] );
561
+
562
+ if( isset( $input['return_type'] ) )
563
+ $new_input['return_type'] = sanitize_text_field( $input['return_type'] );
564
+
565
+ if( isset( $input['group_id'] ) )
566
+ $new_input['group_id'] = sanitize_text_field( $input['group_id'] );
567
+
568
+ // $new_input = sanitize_text_field($input);
569
+ return $new_input;
570
+ }
571
+ }
admin/admin_page_customize_styles.php ADDED
@@ -0,0 +1,742 @@
1
+ <?php
2
+ /*
3
+ * content of the options page .. Customize Styles ..
4
+ * admin_menu.php -> settings_page.php -> admin_page.php
5
+ * in name exists - this short values - it means
6
+ * cs - customize styles
7
+ * cb - call back - function
8
+ */
9
+
10
+ if ( ! defined( 'ABSPATH' ) ) exit;
11
+
12
+ function ccw_customize_styles() {
13
+
14
+ register_setting( 'ccw_settings_group_cs', 'ccw_options_cs' , 'ccw_options_sanitize_cs_cb' );
15
+
16
+ add_settings_section( 'ccw_settings_cs', '', 'ccw_settings_section_cs_cb', 'ccw_options_settings_cs' );
17
+
18
+ add_settings_field( 'ccw_style_1_cs', 'Style 1', 'ccw_style_1_cb', 'ccw_options_settings_cs', 'ccw_settings_cs' );
19
+ add_settings_field( 'ccw_style_2_cs', 'Style 2', 'ccw_style_2_cb', 'ccw_options_settings_cs', 'ccw_settings_cs' );
20
+ add_settings_field( 'ccw_style_3_cs', 'Style 3', 'ccw_style_3_cb', 'ccw_options_settings_cs', 'ccw_settings_cs' );
21
+ add_settings_field( 'ccw_style_4_cs', 'Style 4', 'ccw_style_4_cb', 'ccw_options_settings_cs', 'ccw_settings_cs' );
22
+ add_settings_field( 'ccw_style_5_cs', 'Style 5', 'ccw_style_5_cb', 'ccw_options_settings_cs', 'ccw_settings_cs' );
23
+ add_settings_field( 'ccw_style_6_cs', 'Style 6', 'ccw_style_6_cb', 'ccw_options_settings_cs', 'ccw_settings_cs' );
24
+ add_settings_field( 'ccw_style_7_cs', 'Style 7', 'ccw_style_7_cb', 'ccw_options_settings_cs', 'ccw_settings_cs' );
25
+ add_settings_field( 'ccw_style_8_cs', 'Style 8', 'ccw_style_8_cb', 'ccw_options_settings_cs', 'ccw_settings_cs' );
26
+
27
+ }
28
+ add_action( 'admin_init', 'ccw_customize_styles' );
29
+
30
+
31
+
32
+ if( ! function_exists('ccw_settings_section_cs_cb') ) {
33
+
34
+ function ccw_settings_section_cs_cb() {
35
+ echo '<h1>Customize Styles</h1>';
36
+ }
37
+ }
38
+
39
+
40
+ if( ! function_exists('ccw_style_1_cb') ) {
41
+
42
+ function ccw_style_1_cb() {
43
+ $ccw_style_1 = get_option('ccw_options_cs');
44
+ ?>
45
+ <ul class="collapsible" data-collapsible="accordion">
46
+ <li>
47
+ <div class="collapsible-header">Style 1</div>
48
+ <div class="collapsible-body">
49
+
50
+ <div class="row">
51
+ <div class="col s6">
52
+ <p>Color of text</p>
53
+ </div>
54
+ <div class="input-field col s6">
55
+ <input name="ccw_options_cs[s1_text_color]" data-default-color="#9e9e9e" value="<?php echo esc_attr( $ccw_style_1['s1_text_color'] ) ?>" type="text" class="color-wp" style="height: 1.375rem;" >
56
+ </div>
57
+ </div>
58
+
59
+ <div class="row">
60
+ <div class="col s6">
61
+ <p>Color of text when focus on input box</p>
62
+ </div>
63
+ <div class="input-field col s6">
64
+ <input name="ccw_options_cs[s1_text_color_onfocus]" data-default-color="#26a69a" value="<?php echo esc_attr( $ccw_style_1['s1_text_color_onfocus'] ) ?>" type="text" class="color-wp" style="height: 1.375rem;" >
65
+ </div>
66
+ </div>
67
+
68
+ <div class="row">
69
+ <div class="col s6">
70
+ <p>Color of input field bottom border</p>
71
+ </div>
72
+ <div class="input-field col s6">
73
+ <input name="ccw_options_cs[s1_border_color]" data-default-color="#9e9e9e" value="<?php echo esc_attr( $ccw_style_1['s1_border_color'] ) ?>" type="text" class="color-wp" style="height: 1.375rem;" >
74
+ </div>
75
+ </div>
76
+
77
+ <div class="row">
78
+ <div class="col s6">
79
+ <p>Color of input field border bottom on focus</p>
80
+ </div>
81
+ <div class="input-field col s6">
82
+ <input name="ccw_options_cs[s1_border_color_onfocus]" data-default-color="#26a69a" value="<?php echo esc_attr( $ccw_style_1['s1_border_color_onfocus'] ) ?>" type="text" class="color-wp" style="height: 1.375rem;" >
83
+ </div>
84
+ </div>
85
+
86
+ <div class="row">
87
+ <div class="col s6">
88
+ <p>Color of submit button</p>
89
+ </div>
90
+ <div class="input-field col s6">
91
+ <input name="ccw_options_cs[s1_submit_btn_color]" data-default-color="#26a69a" value="<?php echo esc_attr( $ccw_style_1['s1_submit_btn_color'] ) ?>" type="text" class="color-wp" style="height: 1.375rem;" >
92
+ </div>
93
+ </div>
94
+
95
+ <div class="row">
96
+ <div class="col s6">
97
+ <p>Color of submit button - text, icon </p>
98
+ </div>
99
+ <div class="input-field col s6">
100
+ <input name="ccw_options_cs[s1_submit_btn_text_and_icon_color]" data-default-color="#fff" value="<?php echo esc_attr( $ccw_style_1['s1_submit_btn_text_and_icon_color'] ) ?>" type="text" class="color-wp" style="height: 1.375rem;" >
101
+ </div>
102
+ </div>
103
+
104
+ <div class="row hide">
105
+ <div class="col s6">
106
+ <p>Icon size</p>
107
+ </div>
108
+ <div class="input-field col s4">
109
+ <input name="ccw_options_cs[s1_width]" value="<?php echo esc_attr( $ccw_style_1['s1_width'] ) ?>" type="text" class="" >
110
+ </div>
111
+ </div>
112
+
113
+ </div>
114
+ </div>
115
+ </li>
116
+ </ul>
117
+ <?php
118
+ }
119
+ }
120
+
121
+
122
+ if( ! function_exists('ccw_style_2_cb') ) {
123
+
124
+ function ccw_style_2_cb() {
125
+ $ccw_style_2 = get_option('ccw_options_cs');
126
+ $s2_decoration_value = esc_attr( $ccw_style_2['s2_decoration'] );
127
+ $s2_decoration_onhover = esc_attr( $ccw_style_2['s2_decoration_onhover'] );
128
+ ?>
129
+ <ul class="collapsible" data-collapsible="accordion">
130
+ <li>
131
+ <div class="collapsible-header">Style 2</div>
132
+ <div class="collapsible-body">
133
+
134
+ <div class="row">
135
+ <div class="col s6">
136
+ <p>Text Color</p>
137
+ </div>
138
+ <div class="input-field col s6">
139
+ <input name="ccw_options_cs[s2_text_color]" data-default-color="inherit" value="<?php echo esc_attr( $ccw_style_2['s2_text_color'] ) ?>" type="text" class="color-wp" style="height: 1.375rem;" >
140
+ </div>
141
+ </div>
142
+
143
+ <div class="row">
144
+ <div class="col s6">
145
+ <p>Text Color When Hover</p>
146
+ </div>
147
+ <div class="input-field col s6">
148
+ <input name="ccw_options_cs[s2_text_color_onhover]" data-default-color="inherit" value="<?php echo esc_attr( $ccw_style_2['s2_text_color_onhover'] ) ?>" type="text" class="color-wp" style="height: 1.375rem;" >
149
+ </div>
150
+ </div>
151
+
152
+ <div class="row">
153
+ <div class="col s6">
154
+ <p>Text Decoration</p>
155
+ </div>
156
+ <div class="input-field col s6">
157
+ <select name="ccw_options_cs[s2_decoration]" class="select-2_2">
158
+ <option value="none" <?php echo $s2_decoration_value == 'none' ? 'SELECTED' : ''; ?> >none</option>
159
+ <option value="underline" <?php echo $s2_decoration_value == 'underline' ? 'SELECTED' : ''; ?> >underline</option>
160
+ <option value="overline" <?php echo $s2_decoration_value == 'overline' ? 'SELECTED' : ''; ?> >overline</option>
161
+ <option value="line-through" <?php echo $s2_decoration_value == 'line-through' ? 'SELECTED' : ''; ?> >line-through</option>
162
+ <option value="initial" <?php echo $s2_decoration_value == 'initial' ? 'SELECTED' : ''; ?> >initial</option>
163
+ <option value="inherit" <?php echo $s2_decoration_value == 'inherit' ? 'SELECTED' : ''; ?> >inherit</option>
164
+ </select>
165
+ <label>Text Decoration</label>
166
+ </div>
167
+ </div>
168
+
169
+ <div class="row">
170
+ <div class="col s6">
171
+ <p>Text Decoration when Hover</p>
172
+ </div>
173
+ <div class="input-field col s6">
174
+ <select name="ccw_options_cs[s2_decoration_onhover]" class="select-2_2">
175
+ <option value="none" <?php echo $s2_decoration_onhover == 'none' ? 'SELECTED' : ''; ?> >none</option>
176
+ <option value="underline" <?php echo $s2_decoration_onhover == 'underline' ? 'SELECTED' : ''; ?> >underline</option>
177
+ <option value="overline" <?php echo $s2_decoration_onhover == 'overline' ? 'SELECTED' : ''; ?> >overline</option>
178
+ <option value="line-through" <?php echo $s2_decoration_onhover == 'line-through' ? 'SELECTED' : ''; ?> >line-through</option>
179
+ <option value="initial" <?php echo $s2_decoration_onhover == 'initial' ? 'SELECTED' : ''; ?> >initial</option>
180
+ <option value="inherit" <?php echo $s2_decoration_onhover == 'inherit' ? 'SELECTED' : ''; ?> >inherit</option>
181
+ </select>
182
+ <label>Text Decoration on focus</label>
183
+ </div>
184
+ </div>
185
+
186
+ </div>
187
+ </div>
188
+ </li>
189
+ </ul>
190
+ <?php
191
+ }
192
+ }
193
+
194
+
195
+ if( ! function_exists('ccw_style_3_cb') ) {
196
+
197
+ function ccw_style_3_cb() {
198
+ $ccw_style_3 = get_option('ccw_options_cs');
199
+ ?>
200
+ <ul class="collapsible" data-collapsible="accordion">
201
+ <li>
202
+ <div class="collapsible-header">Style 3</div>
203
+ <div class="collapsible-body">
204
+
205
+ <div class="row">
206
+ <div class="col s6">
207
+ <p>Icon size</p>
208
+ </div>
209
+ <div class="input-field col s4">
210
+ <input name="ccw_options_cs[s3_icon_size]" value="<?php echo esc_attr( $ccw_style_3['s3_icon_size'] ) ?>" type="text" class="" >
211
+ </div>
212
+ </div>
213
+
214
+ </div>
215
+ </div>
216
+ </li>
217
+ </ul>
218
+
219
+ <?php
220
+ }
221
+ }
222
+
223
+ if( ! function_exists('ccw_style_4_cb') ) {
224
+
225
+ function ccw_style_4_cb() {
226
+ $ccw_style_4 = get_option('ccw_options_cs');
227
+ ?>
228
+ <ul class="collapsible" data-collapsible="accordion">
229
+ <li>
230
+ <div class="collapsible-header">Style 4</div>
231
+ <div class="collapsible-body">
232
+
233
+
234
+ <div class="row">
235
+ <div class="col s6">
236
+ <p>Text Color</p>
237
+ </div>
238
+ <div class="input-field col s6">
239
+ <input name="ccw_options_cs[s4_text_color]" data-default-color="rgba(0, 0, 0, 0.6)" value="<?php echo esc_attr( $ccw_style_4['s4_text_color'] ) ?>" type="text" class="color-wp" style="height: 1.375rem;" >
240
+ </div>
241
+ </div>
242
+
243
+ <div class="row">
244
+ <div class="col s6">
245
+ <p>Background Color</p>
246
+ </div>
247
+ <div class="input-field col s6">
248
+ <input name="ccw_options_cs[s4_background_color]" data-default-color="#e4e4e4" value="<?php echo esc_attr( $ccw_style_4['s4_background_color'] ) ?>" type="text" class="color-wp" style="height: 1.375rem;" >
249
+ </div>
250
+ </div>
251
+
252
+ </div>
253
+ </div>
254
+ </li>
255
+ </ul>
256
+
257
+ <?php
258
+ }
259
+ }
260
+
261
+
262
+
263
+ if( ! function_exists('ccw_style_5_cb') ) {
264
+
265
+ function ccw_style_5_cb() {
266
+ $ccw_style_5 = get_option('ccw_options_cs');
267
+ ?>
268
+ <ul class="collapsible" data-collapsible="accordion">
269
+ <li>
270
+ <div class="collapsible-header">Style 5</div>
271
+ <div class="collapsible-body">
272
+
273
+ <div class="row">
274
+ <div class="col s6">
275
+ <p>Color of icon</p>
276
+ </div>
277
+ <div class="input-field col s6">
278
+ <!-- style="height: 1.375rem;" or 22px -->
279
+ <input name="ccw_options_cs[s5_color]" data-default-color="#000" value="<?php echo esc_attr( $ccw_style_5['s5_color'] ) ?>" type="text" class="color-wp" style="height: 1.375rem;" >
280
+ </div>
281
+ </div>
282
+
283
+ <div class="row">
284
+ <div class="col s6">
285
+ <p>Color of icon - when hover </p>
286
+ </div>
287
+ <div class="input-field col s6">
288
+ <input name="ccw_options_cs[s5_hover_color]" data-default-color="#ddd" value="<?php echo esc_attr( $ccw_style_5['s5_hover_color'] ) ?>" type="text" class="color-wp" style="height: 1.375rem;" >
289
+ </div>
290
+ </div>
291
+
292
+ <div class="row">
293
+ <div class="col s6">
294
+ <p>Size of icon</p>
295
+ </div>
296
+ <div class="input-field col s4">
297
+ <input name="ccw_options_cs[s5_icon_size]" value="<?php echo esc_attr( $ccw_style_5['s5_icon_size'] ) ?>" type="text" class="" >
298
+ </div>
299
+ </div>
300
+
301
+ </div>
302
+ </li>
303
+ </ul>
304
+
305
+ <?php
306
+ }
307
+ }
308
+
309
+
310
+ if( ! function_exists('ccw_style_6_cb') ) {
311
+
312
+ function ccw_style_6_cb() {
313
+ $ccw_style_6 = get_option('ccw_options_cs');
314
+ ?>
315
+ <ul class="collapsible" data-collapsible="accordion">
316
+ <li>
317
+ <div class="collapsible-header">Style 6</div>
318
+ <div class="collapsible-body">
319
+
320
+ <div class="row">
321
+ <div class="col s6">
322
+ <p>Color of icon</p>
323
+ </div>
324
+ <div class="input-field col s6">
325
+ <!-- style="height: 1.375rem;" or 22px -->
326
+ <input name="ccw_options_cs[s6_color]" data-default-color="#fff" value="<?php echo esc_attr( $ccw_style_6['s6_color'] ) ?>" type="text" class="color-wp" style="height: 1.375rem;" >
327
+ </div>
328
+ </div>
329
+
330
+ <div class="row">
331
+ <div class="col s6">
332
+ <p>Color of icon - when hover </p>
333
+ </div>
334
+ <div class="input-field col s6">
335
+ <input name="ccw_options_cs[s6_hover_color]" data-default-color="#000" value="<?php echo esc_attr( $ccw_style_6['s6_hover_color'] ) ?>" type="text" class="color-wp" style="height: 1.375rem;" >
336
+ </div>
337
+ </div>
338
+
339
+ <div class="row">
340
+ <div class="col s6">
341
+ <p>Size of icon</p>
342
+ </div>
343
+ <div class="input-field col s4">
344
+ <input name="ccw_options_cs[s6_icon_size]" value="<?php echo esc_attr( $ccw_style_6['s6_icon_size'] ) ?>" type="text" class="" >
345
+ </div>
346
+ </div>
347
+
348
+ <div class="row">
349
+ <div class="col s6">
350
+ <p>Circle color </p>
351
+ </div>
352
+ <div class="input-field col s6">
353
+ <input name="ccw_options_cs[s6_circle_background_color]" data-default-color="#ffa500" value="<?php echo esc_attr( $ccw_style_6['s6_circle_background_color'] ) ?>" type="text" class="color-wp" style="height: 1.375rem;" >
354
+ </div>
355
+ </div>
356
+
357
+ <div class="row">
358
+ <div class="col s6">
359
+ <p>Circle color - when hover </p>
360
+ </div>
361
+ <div class="input-field col s6">
362
+ <input name="ccw_options_cs[s6_circle_background_hover_color]" data-default-color="#ffa500" value="<?php echo esc_attr( $ccw_style_6['s6_circle_background_hover_color'] ) ?>" type="text" class="color-wp" style="height: 1.375rem;" >
363
+ </div>
364
+ </div>
365
+
366
+
367
+ <div class="row">
368
+ <div class="col s6">
369
+ <p>Circle Height</p>
370
+ </div>
371
+ <div class="input-field col s4">
372
+ <input name="ccw_options_cs[s6_circle_height]" value="<?php echo esc_attr( $ccw_style_6['s6_circle_height'] ) ?>" type="text" class="" >
373
+ </div>
374
+ </div>
375
+
376
+ <div class="row">
377
+ <div class="col s6">
378
+ <p>Circle Width</p>
379
+ </div>
380
+ <div class="input-field col s4">
381
+ <input name="ccw_options_cs[s6_circle_width]" value="<?php echo esc_attr( $ccw_style_6['s6_circle_width'] ) ?>" type="text" class="" >
382
+ </div>
383
+ </div>
384
+
385
+ <div class="row">
386
+ <div class="col s6">
387
+ <p>Circle Line Height</p>
388
+ </div>
389
+ <div class="input-field col s4">
390
+ <input name="ccw_options_cs[s6_line_height]" value="<?php echo esc_attr( $ccw_style_6['s6_line_height'] ) ?>" type="text" class="" >
391
+ </div>
392
+ </div>
393
+
394
+ <p class="description">initial add height, width, line-height same values - if feels like icon is not center then adjust 'Line Height' to make icon looks center of the circle</p>
395
+
396
+ </div>
397
+ </div>
398
+ </li>
399
+ </ul>
400
+
401
+ <?php
402
+ }
403
+ }
404
+
405
+
406
+
407
+ if( ! function_exists('ccw_style_7_cb') ) {
408
+
409
+ function ccw_style_7_cb() {
410
+ $ccw_style_7 = get_option('ccw_options_cs');
411
+ ?>
412
+ <ul class="collapsible" data-collapsible="accordion">
413
+ <li>
414
+ <div class="collapsible-header">Style 7</div>
415
+ <div class="collapsible-body">
416
+
417
+
418
+ <div class="row">
419
+ <div class="col s6">
420
+ <p>Color of icon</p>
421
+ </div>
422
+ <div class="input-field col s6">
423
+ <!-- style="height: 1.375rem;" or 22px -->
424
+ <input name="ccw_options_cs[s7_color]" data-default-color="#fff" value="<?php echo esc_attr( $ccw_style_7['s7_color'] ) ?>" type="text" class="color-wp" style="height: 1.375rem;" >
425
+ </div>
426
+ </div>
427
+
428
+ <div class="row">
429
+ <div class="col s6">
430
+ <p>Color of icon - when hover </p>
431
+ </div>
432
+ <div class="input-field col s6">
433
+ <input name="ccw_options_cs[s7_hover_color]" data-default-color="#000" value="<?php echo esc_attr( $ccw_style_7['s7_hover_color'] ) ?>" type="text" class="color-wp" style="height: 1.375rem;" >
434
+ </div>
435
+ </div>
436
+
437
+ <div class="row">
438
+ <div class="col s6">
439
+ <p>Size of icon</p>
440
+ </div>
441
+ <div class="input-field col s4">
442
+ <input name="ccw_options_cs[s7_icon_size]" value="<?php echo esc_attr( $ccw_style_7['s7_icon_size'] ) ?>" type="text" class="" >
443
+ </div>
444
+ </div>
445
+
446
+ <div class="row">
447
+ <div class="col s6">
448
+ <p>box color </p>
449
+ </div>
450
+ <div class="input-field col s6">
451
+ <input name="ccw_options_cs[s7_box_background_color]" data-default-color="#ffa500" value="<?php echo esc_attr( $ccw_style_7['s7_box_background_color'] ) ?>" type="text" class="color-wp" style="height: 1.375rem;" >
452
+ </div>
453
+ </div>
454
+
455
+ <div class="row">
456
+ <div class="col s6">
457
+ <p>box color - when hover </p>
458
+ </div>
459
+ <div class="input-field col s6">
460
+ <input name="ccw_options_cs[s7_box_background_hover_color]" data-default-color="#ffa500" value="<?php echo esc_attr( $ccw_style_7['s7_box_background_hover_color'] ) ?>" type="text" class="color-wp" style="height: 1.375rem;" >
461
+ </div>
462
+ </div>
463
+
464
+
465
+ <div class="row">
466
+ <div class="col s6">
467
+ <p>box Height</p>
468
+ </div>
469
+ <div class="input-field col s4">
470
+ <input name="ccw_options_cs[s7_box_height]" value="<?php echo esc_attr( $ccw_style_7['s7_box_height'] ) ?>" type="text" class="" >
471
+ </div>
472
+ </div>
473
+
474
+ <div class="row">
475
+ <div class="col s6">
476
+ <p>box Width</p>
477
+ </div>
478
+ <div class="input-field col s4">
479
+ <input name="ccw_options_cs[s7_box_width]" value="<?php echo esc_attr( $ccw_style_7['s7_box_width'] ) ?>" type="text" class="" >
480
+ </div>
481
+ </div>
482
+
483
+ <div class="row">
484
+ <div class="col s6">
485
+ <p>box Line Height</p>
486
+ </div>
487
+ <div class="input-field col s4">
488
+ <input name="ccw_options_cs[s7_line_height]" value="<?php echo esc_attr( $ccw_style_7['s7_line_height'] ) ?>" type="text" class="" >
489
+ </div>
490
+ </div>
491
+
492
+ <p class="description">initial add height, width, line-height same values - if feels like icon is not center then adjust 'Line Height' to make icon looks center of the box</p>
493
+
494
+
495
+ </div>
496
+ </div>
497
+ </li>
498
+ </ul>
499
+
500
+ <?php
501
+ }
502
+ }
503
+
504
+
505
+ if( ! function_exists('ccw_style_8_cb') ) {
506
+
507
+ function ccw_style_8_cb() {
508
+ $ccw_style_8 = get_option('ccw_options_cs');
509
+ $s8_icon_float = esc_attr( $ccw_style_8['s8_icon_float'] )
510
+ ?>
511
+ <ul class="collapsible" data-collapsible="accordion">
512
+ <li>
513
+ <div class="collapsible-header">Style 8</div>
514
+ <div class="collapsible-body">
515
+
516
+
517
+ <div class="row">
518
+ <div class="col s6">
519
+ <p>Text Color</p>
520
+ </div>
521
+ <div class="input-field col s6">
522
+ <input name="ccw_options_cs[s8_text_color]" data-default-color="#fff" value="<?php echo esc_attr( $ccw_style_8['s8_text_color'] ) ?>" type="text" class="color-wp" style="height: 1.375rem;" >
523
+ </div>
524
+ </div>
525
+
526
+ <div class="row">
527
+ <div class="col s6">
528
+ <p>Background Color</p>
529
+ </div>
530
+ <div class="input-field col s6">
531
+ <input name="ccw_options_cs[s8_background_color]" data-default-color="#26a69a" value="<?php echo esc_attr( $ccw_style_8['s8_background_color'] ) ?>" type="text" class="color-wp" style="height: 1.375rem;" >
532
+ </div>
533
+ </div>
534
+
535
+ <div class="row">
536
+ <div class="col s6">
537
+ <p>Icon color</p>
538
+ </div>
539
+ <div class="input-field col s6">
540
+ <input name="ccw_options_cs[s8_icon_color]" data-default-color="#fff" value="<?php echo esc_attr( $ccw_style_8['s8_icon_color'] ) ?>" type="text" class="color-wp" style="height: 1.375rem;" >
541
+ </div>
542
+ </div>
543
+
544
+ <div class="row">
545
+ <div class="col s6">
546
+ <p>Text Color on hover</p>
547
+ </div>
548
+ <div class="input-field col s6">
549
+ <input name="ccw_options_cs[s8_text_color_onhover]" data-default-color="#fff" value="<?php echo esc_attr( $ccw_style_8['s8_text_color_onhover'] ) ?>" type="text" class="color-wp" style="height: 1.375rem;" >
550
+ </div>
551
+ </div>
552
+
553
+ <div class="row">
554
+ <div class="col s6">
555
+ <p>Background Color on hover</p>
556
+ </div>
557
+ <div class="input-field col s6">
558
+ <input name="ccw_options_cs[s8_background_color_onhover]" data-default-color="#26a69a" value="<?php echo esc_attr( $ccw_style_8['s8_background_color_onhover'] ) ?>" type="text" class="color-wp" style="height: 1.375rem;" >
559
+ </div>
560
+ </div>
561
+
562
+ <div class="row">
563
+ <div class="col s6">
564
+ <p>Icon color on hover</p>
565
+ </div>
566
+ <div class="input-field col s6">
567
+ <input name="ccw_options_cs[s8_icon_color_onhover]" data-default-color="#fff" value="<?php echo esc_attr( $ccw_style_8['s8_icon_color_onhover'] ) ?>" type="text" class="color-wp" style="height: 1.375rem;" >
568
+ </div>
569
+ </div>
570
+
571
+ <div class="row">
572
+ <div class="col s6">
573
+ <p>Icon float</p>
574
+ </div>
575
+ <div class="input-field col s6">
576
+ <select name="ccw_options_cs[s8_icon_float]" class="select-2_2">
577
+ <option value="left" <?php echo $s8_icon_float == 'left' ? 'SELECTED' : ''; ?> >left</option>
578
+ <option value="right" <?php echo $s8_icon_float == 'right' ? 'SELECTED' : ''; ?> >right</option>
579
+ <option value="hide" <?php echo $s8_icon_float == 'hide' ? 'SELECTED' : ''; ?> >hide</option>
580
+ </select>
581
+ <label>Icon flow</label>
582
+ </div>
583
+ </div>
584
+
585
+ <div class="row hide">
586
+ <div class="col s6">
587
+ <p>Icon size</p>
588
+ </div>
589
+ <div class="input-field col s4">
590
+ <input name="ccw_options_cs[s8_1_width]" value="<?php echo esc_attr( $ccw_style_8['s8_1_width'] ) ?>" type="text" class="" >
591
+ </div>
592
+ </div>
593
+
594
+ </div>
595
+ </div>
596
+ </li>
597
+ </ul>
598
+
599
+ <?php
600
+ }
601
+ }
602
+
603
+
604
+
605
+
606
+
607
+ if( ! function_exists('ccw_options_sanitize_cs_cb') ) {
608
+
609
+ function ccw_options_sanitize_cs_cb( $input ) {
610
+
611
+ if ( ! current_user_can( 'manage_options' ) ) {
612
+ wp_die( 'not allowed to modify - please contact admin ' );
613
+ }
614
+
615
+ $new_input = array();
616
+
617
+ if( isset( $input['s1_text_color'] ) )
618
+ $new_input['s1_text_color'] = sanitize_text_field( $input['s1_text_color'] );
619
+
620
+ if( isset( $input['s1_text_color_onfocus'] ) )
621
+ $new_input['s1_text_color_onfocus'] = sanitize_text_field( $input['s1_text_color_onfocus'] );
622
+
623
+ if( isset( $input['s1_border_color'] ) )
624
+ $new_input['s1_border_color'] = sanitize_text_field( $input['s1_border_color'] );
625
+
626
+ if( isset( $input['s1_border_color_onfocus'] ) )
627
+ $new_input['s1_border_color_onfocus'] = sanitize_text_field( $input['s1_border_color_onfocus'] );
628
+
629
+ if( isset( $input['s1_submit_btn_color'] ) )
630
+ $new_input['s1_submit_btn_color'] = sanitize_text_field( $input['s1_submit_btn_color'] );
631
+
632
+ if( isset( $input['s1_submit_btn_text_and_icon_color'] ) )
633
+ $new_input['s1_submit_btn_text_and_icon_color'] = sanitize_text_field( $input['s1_submit_btn_text_and_icon_color'] );
634
+
635
+ if( isset( $input['s1_width'] ) )
636
+ $new_input['s1_width'] = sanitize_text_field( $input['s1_width'] );
637
+
638
+ if( isset( $input['s2_text_color'] ) )
639
+ $new_input['s2_text_color'] = sanitize_text_field( $input['s2_text_color'] );
640
+
641
+ if( isset( $input['s2_text_color_onhover'] ) )
642
+ $new_input['s2_text_color_onhover'] = sanitize_text_field( $input['s2_text_color_onhover'] );
643
+
644
+ if( isset( $input['s2_decoration'] ) )
645
+ $new_input['s2_decoration'] = sanitize_text_field( $input['s2_decoration'] );
646
+
647
+ if( isset( $input['s2_decoration_onhover'] ) )
648
+ $new_input['s2_decoration_onhover'] = sanitize_text_field( $input['s2_decoration_onhover'] );
649
+
650
+ if( isset( $input['s3_icon_size'] ) )
651
+ $new_input['s3_icon_size'] = sanitize_text_field( $input['s3_icon_size'] );
652
+
653
+ if( isset( $input['s4_text_color'] ) )
654
+ $new_input['s4_text_color'] = sanitize_text_field( $input['s4_text_color'] );
655
+
656
+ if( isset( $input['s4_background_color'] ) )
657
+ $new_input['s4_background_color'] = sanitize_text_field( $input['s4_background_color'] );
658
+
659
+ if( isset( $input['s5_color'] ) )
660
+ $new_input['s5_color'] = sanitize_text_field( $input['s5_color'] );
661
+
662
+ if( isset( $input['s5_hover_color'] ) )
663
+ $new_input['s5_hover_color'] = sanitize_text_field( $input['s5_hover_color'] );
664
+
665
+ if( isset( $input['s5_icon_size'] ) )
666
+ $new_input['s5_icon_size'] = sanitize_text_field( $input['s5_icon_size'] );
667
+
668
+ if( isset( $input['s6_color'] ) )
669
+ $new_input['s6_color'] = sanitize_text_field( $input['s6_color'] );
670
+
671
+ if( isset( $input['s6_hover_color'] ) )
672
+ $new_input['s6_hover_color'] = sanitize_text_field( $input['s6_hover_color'] );
673
+
674
+ if( isset( $input['s6_icon_size'] ) )
675
+ $new_input['s6_icon_size'] = sanitize_text_field( $input['s6_icon_size'] );
676
+
677
+ if( isset( $input['s6_circle_background_color'] ) )
678
+ $new_input['s6_circle_background_color'] = sanitize_text_field( $input['s6_circle_background_color'] );
679
+
680
+ if( isset( $input['s6_circle_background_hover_color'] ) )
681
+ $new_input['s6_circle_background_hover_color'] = sanitize_text_field( $input['s6_circle_background_hover_color'] );
682
+
683
+ if( isset( $input['s6_circle_height'] ) )
684
+ $new_input['s6_circle_height'] = sanitize_text_field( $input['s6_circle_height'] );
685
+
686
+ if( isset( $input['s6_circle_width'] ) )
687
+ $new_input['s6_circle_width'] = sanitize_text_field( $input['s6_circle_width'] );
688
+
689
+ if( isset( $input['s6_line_height'] ) )
690
+ $new_input['s6_line_height'] = sanitize_text_field( $input['s6_line_height'] );
691
+
692
+ if( isset( $input['s7_color'] ) )
693
+ $new_input['s7_color'] = sanitize_text_field( $input['s7_color'] );
694
+
695
+ if( isset( $input['s7_hover_color'] ) )
696
+ $new_input['s7_hover_color'] = sanitize_text_field( $input['s7_hover_color'] );
697
+
698
+ if( isset( $input['s7_icon_size'] ) )
699
+ $new_input['s7_icon_size'] = sanitize_text_field( $input['s7_icon_size'] );
700
+
701
+ if( isset( $input['s7_box_background_color'] ) )
702
+ $new_input['s7_box_background_color'] = sanitize_text_field( $input['s7_box_background_color'] );
703
+
704
+ if( isset( $input['s7_box_background_hover_color'] ) )
705
+ $new_input['s7_box_background_hover_color'] = sanitize_text_field( $input['s7_box_background_hover_color'] );
706
+
707
+ if( isset( $input['s7_box_height'] ) )
708
+ $new_input['s7_box_height'] = sanitize_text_field( $input['s7_box_height'] );
709
+
710
+ if( isset( $input['s7_box_width'] ) )
711
+ $new_input['s7_box_width'] = sanitize_text_field( $input['s7_box_width'] );
712
+
713
+ if( isset( $input['s7_line_height'] ) )
714
+ $new_input['s7_line_height'] = sanitize_text_field( $input['s7_line_height'] );
715
+
716
+ if( isset( $input['s8_text_color'] ) )
717
+ $new_input['s8_text_color'] = sanitize_text_field( $input['s8_text_color'] );
718
+
719
+ if( isset( $input['s8_background_color'] ) )
720
+ $new_input['s8_background_color'] = sanitize_text_field( $input['s8_background_color'] );
721
+
722
+ if( isset( $input['s8_icon_color'] ) )
723
+ $new_input['s8_icon_color'] = sanitize_text_field( $input['s8_icon_color'] );
724
+
725
+ if( isset( $input['s8_text_color_onhover'] ) )
726
+ $new_input['s8_text_color_onhover'] = sanitize_text_field( $input['s8_text_color_onhover'] );
727
+
728
+ if( isset( $input['s8_background_color_onhover'] ) )
729
+ $new_input['s8_background_color_onhover'] = sanitize_text_field( $input['s8_background_color_onhover'] );
730
+
731
+ if( isset( $input['s8_icon_color_onhover'] ) )
732
+ $new_input['s8_icon_color_onhover'] = sanitize_text_field( $input['s8_icon_color_onhover'] );
733
+
734
+ if( isset( $input['s8_icon_float'] ) )
735
+ $new_input['s8_icon_float'] = sanitize_text_field( $input['s8_icon_float'] );
736
+
737
+ if( isset( $input['s8_1_width'] ) )
738
+ $new_input['s8_1_width'] = sanitize_text_field( $input['s8_1_width'] );
739
+
740
+ return $new_input;
741
+ }
742
+ }
admin/default-values.php ADDED
@@ -0,0 +1,130 @@
1
+ <?php
2
+ /*
3
+ * set the default values
4
+ * which stores in database options table
5
+ * dont override user settings
6
+ * get user setting value and merge with newly added values
7
+ *
8
+ * ccw_plugin_details - this values will be overrides..
9
+ */
10
+
11
+ if ( ! defined( 'ABSPATH' ) ) exit;
12
+
13
+
14
+ // plugin details
15
+ $plugin_details = array(
16
+ 'version' => '1.0.0',
17
+ );
18
+
19
+ // Always use update_option - override new values .. don't preseve already existing values
20
+ update_option( 'ccw_plugin_details', $plugin_details );
21
+
22
+
23
+
24
+
25
+
26
+ // top level options page
27
+ $values = array(
28
+ 'enable' => '2',
29
+ 'enable_sc' => '2',
30
+ 'number' => '918897606725',
31
+ 'input_placeholder' => 'WhatsApp us',
32
+ 'position' => '1',
33
+ 'style' => '1',
34
+ 'stylemobile' => '3',
35
+ 'position-1_bottom' => '10px',
36
+ 'position-1_right' => '10px',
37
+ 'position-2_bottom' => '10px',
38
+ 'position-2_left' => '10px',
39
+ 'position-3_top' => '10px',
40
+ 'position-3_left' => '10px',
41
+ 'position-4_top' => '10px',
42
+ 'position-4_right' => '10px',
43
+ 'showon_posts' => '1',
44
+ 'showon_page' => '1',
45
+ 'showon_homepage' => '1',
46
+ 'showon_frontpage' => '1',
47
+ 'showon_category' => '1',
48
+ 'showon_archive' => '1',
49
+ 'showon_404' => '1',
50
+ 'list_hideon_pages' => '',
51
+ 'list_hideon_cat' => '',
52
+ 'shortcode' => 'chat',
53
+
54
+ 'return_type' => 'chat', // chat or group_chat
55
+ 'group_id' => 'DuEZlyOo94A1QirOX42zKr',
56
+ );
57
+
58
+ // update_option( 'ccw_options', $values );
59
+ // add_option( 'ccw_options', $values );
60
+
61
+ $db_values = get_option( 'ccw_options', array() );
62
+ $update_values = array_merge($values, $db_values);
63
+ update_option('ccw_options', $update_values);
64
+
65
+
66
+
67
+
68
+
69
+
70
+ // customize styles - options page
71
+ $values_cs = array(
72
+ 's1_text_color' => '#9e9e9e',
73
+ 's1_text_color_onfocus' => '#26a69a',
74
+ 's1_border_color' => '#9e9e9e',
75
+ 's1_border_color_onfocus' => '#26a69a',
76
+ 's1_submit_btn_color' => '#26a69a',
77
+ 's1_submit_btn_text_and_icon_color' => '#fff',
78
+ 's1_width' => 'auto',
79
+
80
+ 's2_text_color' => 'initial',
81
+ 's2_text_color_onhover' => 'initial',
82
+ 's2_decoration' => 'initial',
83
+ 's2_decoration_onhover' => 'initial',
84
+
85
+ 's3_icon_size' => '48px',
86
+
87
+ 's4_text_color' => 'rgba(0, 0, 0, 0.6)',
88
+ 's4_background_color' => '#e4e4e4',
89
+
90
+ 's5_color' => '#000',
91
+ 's5_hover_color' => '#ddd',
92
+ 's5_icon_size' => '24px',
93
+
94
+ 's6_color' => '#fff',
95
+ 's6_hover_color' => '#000',
96
+ 's6_icon_size' => '24px',
97
+ 's6_circle_background_color' => '#ffa500',
98
+ 's6_circle_background_hover_color' => '#00e51e',
99
+ 's6_circle_height' => '48px',
100
+ 's6_circle_width' => '48px',
101
+ 's6_line_height' => '48px',
102
+
103
+ 's7_color' => '#fff',
104
+ 's7_hover_color' => '#000',
105
+ 's7_icon_size' => '24px',
106
+ 's7_box_background_color' => '#ffa500',
107
+ 's7_box_background_hover_color' => '#00e51e',
108
+ 's7_box_height' => '48px',
109
+ 's7_box_width' => '48px',
110
+ 's7_line_height' => '48px',
111
+
112
+ 's8_text_color' => '#fff',
113
+ 's8_background_color' => '#26a69a',
114
+ 's8_icon_color' => '#fff',
115
+
116
+ 's8_text_color_onhover' => '#fff',
117
+ 's8_background_color_onhover' => '#26a69a',
118
+ 's8_icon_color_onhover' => '#fff',
119
+ 's8_icon_float' => 'right',
120
+ 's8_1_width' => '',
121
+ );
122
+
123
+ $db_values_cs = get_option( 'ccw_options_cs', array() );
124
+ $update_values_cs = array_merge($values_cs, $db_values_cs);
125
+ update_option('ccw_options_cs', $update_values_cs);
126
+
127
+
128
+
129
+
130
+
admin/settings_page.php ADDED
@@ -0,0 +1,27 @@
1
+ <?php
2
+ /*
3
+ * options page
4
+ * content of this page load / continue at admin_page.php
5
+ */
6
+
7
+ if ( ! defined( 'ABSPATH' ) ) exit;
8
+
9
+ ?>
10
+
11
+ <div class="wrap">
12
+
13
+ <?php settings_errors(); ?>
14
+
15
+ <div class="row">
16
+ <div class="col s12 m12 xl6">
17
+ <form action="options.php" method="post" class="col s12">
18
+ <?php settings_fields( 'ccw_settings_group' ); ?>
19
+ <?php do_settings_sections( 'ccw_options_settings' ) ?>
20
+ <?php submit_button() ?>
21
+ </form>
22
+ </div>
23
+ <div class="col admin_guide">
24
+ </div>
25
+ </div>
26
+
27
+ </div>
admin/sp_customize_styles.php ADDED
@@ -0,0 +1,29 @@
1
+ <?php
2
+ /*
3
+ * settings page - customize styles ( settings_page.php is main page and this is sub page )
4
+ * options page
5
+ * content of this page load / continue at admin_page_customize_styles.php
6
+ * cs - customize styles
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) exit;
10
+
11
+ ?>
12
+
13
+ <div class="wrap">
14
+
15
+ <?php settings_errors(); ?>
16
+
17
+ <div class="row">
18
+ <div class="col s12 m12 xl6">
19
+ <form action="options.php" method="post" class="col s12">
20
+ <?php settings_fields( 'ccw_settings_group_cs' ); ?>
21
+ <?php do_settings_sections( 'ccw_options_settings_cs' ) ?>
22
+ <?php submit_button() ?>
23
+ </form>
24
+ </div>
25
+ <div class="col admin_guide">
26
+ </div>
27
+ </div>
28
+
29
+ </div>
assets/css/admin_main.css ADDED
@@ -0,0 +1,4765 @@