PluginProbe
All-in-one Sticky Floating Contact Form, Call, Click to Chat, and 50+ Social Icon Tabs – My Sticky Elements / 2.3.4
All-in-one Sticky Floating Contact Form, Call, Click to Chat, and 50+ Social Icon Tabs – My Sticky Elements v2.3.4
2.3.9 2.3.8 2.3.7 2.3.6 2.3.5 trunk 1.0 1.1 1.2 1.3 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.4 1.4.1 1.4.2 1.5 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 All 99 releases
mystickyelements / mystickyelements.php

mystickyelements.php in All-in-one Sticky Floating Contact Form, Call, Click to Chat, and 50+ Social Icon Tabs – My Sticky Elements 2.3.4, at mystickyelements.php

3,867 lines 154.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*
3 Plugin Name: myStickyElements
4 Plugin URI: https://premio.io/
5 Description: myStickyElements is simple yet very effective plugin. It is perfect to fill out usually unused side space on webpages with some additional messages, videos, social widgets ...
6 Version: 2.3.4
7 Author: Premio
8 Author URI: https://premio.io/
9 Domain Path: /languages
10 License: GPLv3
11 */
12
13 defined('ABSPATH') or die("Cannot access pages directly.");
14
15 define('MYSTICKYELEMENTS_URL', plugins_url('/', __FILE__)); // Define Plugin URL
16 define('MYSTICKYELEMENTS_PATH', plugin_dir_path(__FILE__)); // Define Plugin Directory Path
17 define('MYSTICKYELEMENTS_BASE', plugin_basename(__FILE__));
18 define("MY_STICKY_ELEMENT_VERSION", "2.3.4");
19 if(!defined('MSE_DEV_MODE')) {
20 define('MSE_DEV_MODE', false);
21 }
22 /*
23 * redirect my sticky element setting page after plugin activated
24 */
25 add_action( 'activated_plugin', 'mystickyelement_activation_redirect' );
26 function mystickyelement_activation_redirect($plugin){
27
28 if( $plugin == plugin_basename( __FILE__ ) ) {
29
30 if(!defined( 'DOING_AJAX' )) {
31 add_option("mse_redirect",1);
32 }
33 }
34 }
35
36 if(!function_exists("check_for_mse_redirect")) {
37 function check_for_mse_redirect() {
38 if (!defined("DOING_AJAX")) {
39 if (get_option("mse_redirect")) {
40 delete_option("mse_redirect");
41 $mystickyelements_contact_form = get_option("mystickyelements-contact-form");
42 $mystickyelements_widgets = get_option("mystickyelements-widgets");
43 if ($mystickyelements_widgets && $mystickyelements_contact_form) {
44 wp_redirect(admin_url('admin.php?page=my-sticky-elements'));
45 } else {
46 wp_redirect(admin_url('admin.php?page=my-sticky-elements&widget=0'));
47 }
48 exit;
49 }
50 }
51 }
52
53 add_action("admin_init", "check_for_mse_redirect");
54 }
55
56
57 class MyStickyElementsPage
58 {
59 private $options;
60 private $options0;
61 private $options1;
62 private $options2;
63 private $options3;
64 private $options4;
65 private $options5;
66 private $options6;
67 private $options7;
68 private $options8;
69 private $options9;
70 public function __construct()
71 {
72 add_action( 'admin_menu', array( $this, 'add_plugin_page' ) );
73 add_action( 'admin_init', array( $this, 'page_init' ) );
74 add_action( 'admin_init', array( $this, 'mystickysideelement_load_transl') );
75 add_action( 'admin_enqueue_scripts', array( $this, 'mw_enqueue_color_picker' ) );
76
77 }
78
79 public function mystickysideelement_load_transl()
80 {
81 load_plugin_textdomain('mystickyelements', FALSE, dirname(plugin_basename(__FILE__)).'/languages/');
82 }
83
84 public function add_plugin_page()
85 {
86 add_options_page(
87 'Settings Admin',
88 'myStickyelements',
89 'manage_options',
90 'my-sticky-elements-settings',
91 array( $this, 'create_admin_page' )
92 );
93 }
94
95 public function create_admin_page() {
96
97
98 // Set class property
99 // $all_options = array (
100 $this->options = get_option( 'mysticky_elements_options');
101 $this->options0 = get_option( 'mysticky_elements_options0');
102 $this->options1 = get_option( 'mysticky_elements_options1');
103 $this->options2 = get_option( 'mysticky_elements_options2');
104 $this->options3 = get_option( 'mysticky_elements_options3');
105 $this->options4 = get_option( 'mysticky_elements_options4');
106 $this->options5 = get_option( 'mysticky_elements_options5');
107 $this->options6 = get_option( 'mysticky_elements_options6');
108 $this->options7 = get_option( 'mysticky_elements_options7');
109 $this->options8 = get_option( 'mysticky_elements_options8');
110 $this->options9 = get_option( 'mysticky_elements_options9');
111 ?>
112 <div class="wrap">
113 <?php screen_icon(); ?>
114 <h2><?php _e( 'myStickylements Settings', 'mystickyelements' ); ?></h2>
115
116 <?php $active_tab = isset( $_GET[ 'tab' ] ) ? $_GET[ 'tab' ] : 'general'; ?>
117
118 <h2 class="nav-tab-wrapper">
119 <a href="?page=my-sticky-elements-settings&tab=general" class="nav-tab <?php echo esc_attr($active_tab == 'general' ? 'nav-tab-active' : ''); ?>">General Settings</a>
120 <a href="?page=my-sticky-elements-settings&tab=element_1" class="nav-tab <?php echo esc_attr($active_tab == 'element_1' ? 'nav-tab-active' : ''); ?>">E1</a>
121 <a href="?page=my-sticky-elements-settings&tab=element_2" class="nav-tab <?php echo esc_attr($active_tab == 'element_2' ? 'nav-tab-active' : ''); ?>">E2</a>
122 <a href="?page=my-sticky-elements-settings&tab=element_3" class="nav-tab <?php echo esc_attr($active_tab == 'element_3' ? 'nav-tab-active' : ''); ?>">E3</a>
123 <a href="?page=my-sticky-elements-settings&tab=element_4" class="nav-tab <?php echo esc_attr($active_tab == 'element_4' ? 'nav-tab-active' : ''); ?>">E4</a>
124 <a href="?page=my-sticky-elements-settings&tab=element_5" class="nav-tab <?php echo esc_attr($active_tab == 'element_5' ? 'nav-tab-active' : ''); ?>">E5</a>
125 <a href="?page=my-sticky-elements-settings&tab=element_6" class="nav-tab <?php echo esc_attr($active_tab == 'element_6' ? 'nav-tab-active' : ''); ?>">E6</a>
126 <a href="?page=my-sticky-elements-settings&tab=element_7" class="nav-tab <?php echo esc_attr($active_tab == 'element_7' ? 'nav-tab-active' : ''); ?>">E7</a>
127 <a href="?page=my-sticky-elements-settings&tab=element_8" class="nav-tab <?php echo esc_attr($active_tab == 'element_8' ? 'nav-tab-active' : ''); ?>">E8</a>
128 <a href="?page=my-sticky-elements-settings&tab=element_9" class="nav-tab <?php echo esc_attr($active_tab == 'element_9' ? 'nav-tab-active' : ''); ?>">E9</a>
129 <a href="?page=my-sticky-elements-settings&tab=element_10" class="nav-tab <?php echo esc_attr($active_tab == 'element_10' ? 'nav-tab-active' : ''); ?>">E10</a>
130 </h2>
131 <form method="post" action="options.php">
132 <?php
133
134 if( $active_tab == 'general' ) {
135
136 settings_fields( 'mysticky_elements_option_group' );
137 do_settings_sections( 'my-sticky-elements-settings' );
138
139 } else if( $active_tab == 'element_1' ) {
140
141 settings_fields( 'mysticky_elements_option_group9' );
142 do_settings_sections( 'my-sticky-elements-settings9' );
143
144
145 } else if( $active_tab == 'element_2' ) {
146
147 settings_fields( 'mysticky_elements_option_group8' );
148 do_settings_sections( 'my-sticky-elements-settings8' );
149
150 } else if( $active_tab == 'element_3' ) {
151
152 settings_fields( 'mysticky_elements_option_group7' );
153 do_settings_sections( 'my-sticky-elements-settings7' );
154
155 } else if( $active_tab == 'element_4' ) {
156
157 settings_fields( 'mysticky_elements_option_group6' );
158 do_settings_sections( 'my-sticky-elements-settings6' );
159
160 } else if( $active_tab == 'element_5' ) {
161
162 settings_fields( 'mysticky_elements_option_group5' );
163 do_settings_sections( 'my-sticky-elements-settings5' );
164
165 } else if( $active_tab == 'element_6' ) {
166
167 settings_fields( 'mysticky_elements_option_group4' );
168 do_settings_sections( 'my-sticky-elements-settings4' );
169
170 } else if( $active_tab == 'element_7' ) {
171
172 settings_fields( 'mysticky_elements_option_group3' );
173 do_settings_sections( 'my-sticky-elements-settings3' );
174
175 } else if( $active_tab == 'element_8' ) {
176
177 settings_fields( 'mysticky_elements_option_group2' );
178 do_settings_sections( 'my-sticky-elements-settings2' );
179
180 } else if( $active_tab == 'element_9' ) {
181
182 settings_fields( 'mysticky_elements_option_group1' );
183 do_settings_sections( 'my-sticky-elements-settings1' );
184
185 } else if( $active_tab == 'element_10' ) {
186
187 settings_fields( 'mysticky_elements_option_group0' );
188 do_settings_sections( 'my-sticky-elements-settings0' );
189
190 }
191
192 // This prints out all hidden setting fields
193 // settings_fields( 'mysticky_elements_option_group' );
194 // do_settings_sections( 'my-sticky-elements-settings' );
195 submit_button();
196 ?>
197 </form>
198 </div>
199 <?php
200 }
201
202 /**
203 * Register and add settings
204 */
205 public function page_init()
206 {
207 global $id, $title, $callback, $page;
208 register_setting(
209 'mysticky_elements_option_group', // Option group
210 'mysticky_elements_options', // Option name
211 array( $this, 'sanitize' ) // Sanitize
212 );
213 register_setting(
214 'mysticky_elements_option_group9',
215 'mysticky_elements_options9',
216 array( $this, 'sanitize' )
217 );
218
219 register_setting(
220 'mysticky_elements_option_group8',
221 'mysticky_elements_options8',
222 array( $this, 'sanitize' )
223 );
224 register_setting(
225 'mysticky_elements_option_group7',
226 'mysticky_elements_options7',
227 array( $this, 'sanitize' )
228 );
229 register_setting(
230 'mysticky_elements_option_group6',
231 'mysticky_elements_options6',
232 array( $this, 'sanitize' )
233 );
234 register_setting(
235 'mysticky_elements_option_group5',
236 'mysticky_elements_options5',
237 array( $this, 'sanitize' )
238 );
239 register_setting(
240 'mysticky_elements_option_group4',
241 'mysticky_elements_options4',
242 array( $this, 'sanitize' )
243 );
244 register_setting(
245 'mysticky_elements_option_group3',
246 'mysticky_elements_options3',
247 array( $this, 'sanitize' )
248 );
249 register_setting(
250 'mysticky_elements_option_group2',
251 'mysticky_elements_options2',
252 array( $this, 'sanitize' )
253 );
254 register_setting(
255 'mysticky_elements_option_group1',
256 'mysticky_elements_options1',
257 array( $this, 'sanitize' )
258 );
259 register_setting(
260 'mysticky_elements_option_group0',
261 'mysticky_elements_options0',
262 array( $this, 'sanitize' )
263 );
264
265 add_settings_field( $id, $title, $callback, $page, $section = 'default', $args = array() );
266
267 //** General Settings **//
268 add_settings_section(
269 'setting_section_id', // ID
270 esc_html__("myStickyElements Options", 'mystickyelements'), // Title
271 array( $this, 'print_section_info' ), // Callback
272 'my-sticky-elements-settings' // Page
273 );
274
275 add_settings_field(
276 'myfixed_disable_small_screen',
277 esc_html__("Disable at Small Screen Sizes", 'mystickyelements'),
278 array( $this, 'myfixed_disable_small_screen_callback' ),
279 'my-sticky-elements-settings',
280 'setting_section_id'
281 );
282
283 /* add_settings_field(
284 'mysticky_active_on_height',
285 'Make visible when scroled',
286 array( $this, 'mysticky_active_on_height_callback' ),
287 'my-sticky-elements-settings',
288 'setting_section_id'
289 );*/
290
291 add_settings_field(
292 'myfixed_click',
293 esc_html__("Change on Event", 'mystickyelements'),
294 array( $this, 'myfixed_click_callback' ),
295 'my-sticky-elements-settings',
296 'setting_section_id'
297 );
298
299 add_settings_field(
300 'myfixed_cssstyle',
301 esc_html__("CSS style", 'mystickyelements'),
302 array( $this, 'myfixed_cssstyle_callback' ),
303 'my-sticky-elements-settings',
304 'setting_section_id'
305
306 );
307
308
309 //** First element 9 **//
310
311 add_settings_section(
312 'setting_section_id', // ID
313 esc_html__("myStickyElements Options", 'mystickyelements'), // Title
314 array( $this, 'print_section_info9' ), // Callback
315 'my-sticky-elements-settings9' // Page
316 );
317 add_settings_field(
318 'myfixed_element_enable',
319 esc_html__("Enable Element", 'mystickyelements'),
320 array( $this, 'myfixed_element9_enable_callback' ),
321 'my-sticky-elements-settings9',
322 'setting_section_id'
323 );
324 add_settings_field(
325 'myfixed_element_side_position',
326 esc_html__("Horizontal Position", 'mystickyelements'),
327 array( $this, 'myfixed_element9_side_position_callback' ),
328 'my-sticky-elements-settings9',
329 'setting_section_id'
330 );
331 add_settings_field(
332 'myfixed_element_top_position',
333 esc_html__("Vertical Position", 'mystickyelements'),
334 array( $this, 'myfixed_element9_top_position_callback' ),
335 'my-sticky-elements-settings9',
336 'setting_section_id'
337 );
338 add_settings_field(
339 'myfixed_element_icon_bg_color',
340 esc_html__("Icon bg Color", 'mystickyelements'),
341 array( $this, 'myfixed_element9_icon_bg_color_callback' ),
342 'my-sticky-elements-settings9',
343 'setting_section_id'
344 );
345 add_settings_field(
346 'myfixed_element_icon_bg_img',
347 esc_html__("Icon bg Image", 'mystickyelements'),
348 array( $this, 'myfixed_element9_icon_bg_img_callback' ),
349 'my-sticky-elements-settings9',
350 'setting_section_id'
351 );
352 add_settings_field(
353 'myfixed_element_content_bg_color',
354 esc_html__("Content bg Color", 'mystickyelements'),
355 array( $this, 'myfixed_element9_content_bg_color_callback' ),
356 'my-sticky-elements-settings9',
357 'setting_section_id'
358 );
359 add_settings_field(
360 'myfixed_element_content_txt_color',
361 esc_html__("Content Text Color", 'mystickyelements'),
362 array( $this, 'myfixed_element9_content_txt_color_callback' ),
363 'my-sticky-elements-settings9',
364 'setting_section_id'
365 );
366 add_settings_field(
367 'myfixed_element_content_width',
368 esc_html__("Content Width", 'mystickyelements'),
369 array( $this, 'myfixed_element9_content_width_callback' ),
370 'my-sticky-elements-settings9',
371 'setting_section_id'
372 );
373 add_settings_field(
374 'myfixed_element_content_padding',
375 esc_html__("Content Padding", 'mystickyelements'),
376 array( $this, 'myfixed_element9_content_padding_callback' ),
377 'my-sticky-elements-settings9',
378 'setting_section_id'
379 );
380 add_settings_field(
381 'myfixed_element_content',
382 esc_html__("Content", 'mystickyelements'),
383 array( $this, 'myfixed_element9_content_callback' ),
384 'my-sticky-elements-settings9',
385 'setting_section_id'
386 );
387
388
389 //** Second element 8 **//
390 add_settings_section(
391 'setting_section_id',
392 esc_html__("myStickyElements Options", 'mystickyelements'),
393 array( $this, 'print_section_info8' ),
394 'my-sticky-elements-settings8'
395 );
396 add_settings_field(
397 'myfixed_element_enable',
398 esc_html__("Enable Element", 'mystickyelements'),
399 array( $this, 'myfixed_element8_enable_callback' ),
400 'my-sticky-elements-settings8',
401 'setting_section_id'
402 );
403
404 add_settings_field(
405 'myfixed_element_side_position',
406 esc_html__("Horizontal Position", 'mystickyelements'),
407 array( $this, 'myfixed_element8_side_position_callback' ),
408 'my-sticky-elements-settings8',
409 'setting_section_id'
410 );
411 add_settings_field(
412 'myfixed_element_top_position',
413 esc_html__("Vertical Position", 'mystickyelements'),
414 array( $this, 'myfixed_element8_top_position_callback' ),
415 'my-sticky-elements-settings8',
416 'setting_section_id'
417 );
418 add_settings_field(
419 'myfixed_element_icon_bg_color',
420 esc_html__("Icon bg Color", 'mystickyelements'),
421 array( $this, 'myfixed_element8_icon_bg_color_callback' ),
422 'my-sticky-elements-settings8',
423 'setting_section_id'
424 );
425 add_settings_field(
426 'myfixed_element_icon_bg_img',
427 esc_html__("Icon bg Image", 'mystickyelements'),
428 array( $this, 'myfixed_element8_icon_bg_img_callback' ),
429 'my-sticky-elements-settings8',
430 'setting_section_id'
431 );
432 add_settings_field(
433 'myfixed_element_content_bg_color',
434 esc_html__("Content bg Color", 'mystickyelements'),
435 array( $this, 'myfixed_element8_content_bg_color_callback' ),
436 'my-sticky-elements-settings8',
437 'setting_section_id'
438 );
439 add_settings_field(
440 'myfixed_element_content_txt_color',
441 esc_html__("Content Text Color", 'mystickyelements'),
442 array( $this, 'myfixed_element8_content_txt_color_callback' ),
443 'my-sticky-elements-settings8',
444 'setting_section_id'
445 );
446 add_settings_field(
447 'myfixed_element_content_width',
448 esc_html__("Content Width", 'mystickyelements'),
449 array( $this, 'myfixed_element8_content_width_callback' ),
450 'my-sticky-elements-settings8',
451 'setting_section_id'
452 );
453 add_settings_field(
454 'myfixed_element_content_padding',
455 esc_html__("Content Padding", 'mystickyelements'),
456 array( $this, 'myfixed_element8_content_padding_callback' ),
457 'my-sticky-elements-settings8',
458 'setting_section_id'
459 );
460 add_settings_field(
461 'myfixed_element_content',
462 esc_html__("Content", 'mystickyelements'),
463 array( $this, 'myfixed_element8_content_callback' ),
464 'my-sticky-elements-settings8',
465 'setting_section_id'
466 );
467
468 //** Third element 7 **//
469
470 add_settings_section(
471 'setting_section_id',
472 esc_html__("myStickyElements Options", 'mystickyelements'),
473 array( $this, 'print_section_info7' ),
474 'my-sticky-elements-settings7'
475 );
476 add_settings_field(
477 'myfixed_element_enable',
478 esc_html__("Enable Element", 'mystickyelements'),
479 array( $this, 'myfixed_element7_enable_callback' ),
480 'my-sticky-elements-settings7',
481 'setting_section_id'
482 );
483 add_settings_field(
484 'myfixed_element_side_position',
485 esc_html__("Horizontal Position", 'mystickyelements'),
486 array( $this, 'myfixed_element7_side_position_callback' ),
487 'my-sticky-elements-settings7',
488 'setting_section_id'
489 );
490 add_settings_field(
491 'myfixed_element_top_position',
492 esc_html__("Vertical Position", 'mystickyelements'),
493 array( $this, 'myfixed_element7_top_position_callback' ),
494 'my-sticky-elements-settings7',
495 'setting_section_id'
496 );
497 add_settings_field(
498 'myfixed_element_icon_bg_color',
499 esc_html__("Icon bg Color", 'mystickyelements'),
500 array( $this, 'myfixed_element7_icon_bg_color_callback' ),
501 'my-sticky-elements-settings7',
502 'setting_section_id'
503 );
504 add_settings_field(
505 'myfixed_element_icon_bg_img',
506 esc_html__("Icon bg Image", 'mystickyelements'),
507 array( $this, 'myfixed_element7_icon_bg_img_callback' ),
508 'my-sticky-elements-settings7',
509 'setting_section_id'
510 );
511 add_settings_field(
512 'myfixed_element_content_bg_color',
513 esc_html__("Content bg Color", 'mystickyelements'),
514 array( $this, 'myfixed_element7_content_bg_color_callback' ),
515 'my-sticky-elements-settings7',
516 'setting_section_id'
517 );
518 add_settings_field(
519 'myfixed_element_content_txt_color',
520 esc_html__("Content Text Color", 'mystickyelements'),
521 array( $this, 'myfixed_element7_content_txt_color_callback' ),
522 'my-sticky-elements-settings7',
523 'setting_section_id'
524 );
525 add_settings_field(
526 'myfixed_element_content_width',
527 esc_html__("Content Width", 'mystickyelements'),
528 array( $this, 'myfixed_element7_content_width_callback' ),
529 'my-sticky-elements-settings7',
530 'setting_section_id'
531 );
532 add_settings_field(
533 'myfixed_element_content_padding',
534 esc_html__("Content Padding", 'mystickyelements'),
535 array( $this, 'myfixed_element7_content_padding_callback' ),
536 'my-sticky-elements-settings7',
537 'setting_section_id'
538 );
539 add_settings_field(
540 'myfixed_element_content',
541 esc_html__("Content", 'mystickyelements'),
542 array( $this, 'myfixed_element7_content_callback' ),
543 'my-sticky-elements-settings7',
544 'setting_section_id'
545 );
546
547 //** Fourth element 6 **//
548
549 add_settings_section(
550 'setting_section_id',
551 esc_html__("myStickyElements Options", 'mystickyelements'),
552 array( $this, 'print_section_info6' ),
553 'my-sticky-elements-settings6'
554 );
555 add_settings_field(
556 'myfixed_element_enable',
557 esc_html__("Enable Element", 'mystickyelements'),
558 array( $this, 'myfixed_element6_enable_callback' ),
559 'my-sticky-elements-settings6',
560 'setting_section_id'
561 );
562 add_settings_field(
563 'myfixed_element_side_position',
564 esc_html__("Horizontal Position", 'mystickyelements'),
565 array( $this, 'myfixed_element6_side_position_callback' ),
566 'my-sticky-elements-settings6',
567 'setting_section_id'
568 );
569 add_settings_field(
570 'myfixed_element_top_position',
571 esc_html__("Vertical Position", 'mystickyelements'),
572 array( $this, 'myfixed_element6_top_position_callback' ),
573 'my-sticky-elements-settings6',
574 'setting_section_id'
575 );
576 add_settings_field(
577 'myfixed_element_icon_bg_color',
578 esc_html__("Icon bg Color", 'mystickyelements'),
579 array( $this, 'myfixed_element6_icon_bg_color_callback' ),
580 'my-sticky-elements-settings6',
581 'setting_section_id'
582 );
583 add_settings_field(
584 'myfixed_element_icon_bg_img',
585 esc_html__("Icon bg Image", 'mystickyelements'),
586 array( $this, 'myfixed_element6_icon_bg_img_callback' ),
587 'my-sticky-elements-settings6',
588 'setting_section_id'
589 );
590 add_settings_field(
591 'myfixed_element_content_bg_color',
592 esc_html__("Content bg Color", 'mystickyelements'),
593 array( $this, 'myfixed_element6_content_bg_color_callback' ),
594 'my-sticky-elements-settings6',
595 'setting_section_id'
596 );
597 add_settings_field(
598 'myfixed_element_content_txt_color',
599 esc_html__("Content Text Color", 'mystickyelements'),
600 array( $this, 'myfixed_element6_content_txt_color_callback' ),
601 'my-sticky-elements-settings6',
602 'setting_section_id'
603 );
604 add_settings_field(
605 'myfixed_element_content_width',
606 esc_html__("Content Width", 'mystickyelements'),
607 array( $this, 'myfixed_element6_content_width_callback' ),
608 'my-sticky-elements-settings6',
609 'setting_section_id'
610 );
611 add_settings_field(
612 'myfixed_element_content_padding',
613 esc_html__("Content Padding", 'mystickyelements'),
614 array( $this, 'myfixed_element6_content_padding_callback' ),
615 'my-sticky-elements-settings6',
616 'setting_section_id'
617 );
618 add_settings_field(
619 'myfixed_element_content',
620 esc_html__("Content", 'mystickyelements'),
621 array( $this, 'myfixed_element6_content_callback' ),
622 'my-sticky-elements-settings6',
623 'setting_section_id'
624 );
625
626 //** Fifth element 5 **//
627
628 add_settings_section(
629 'setting_section_id',
630 esc_html__("myStickyElements Options", 'mystickyelements'),
631 array( $this, 'print_section_info5' ),
632 'my-sticky-elements-settings5'
633 );
634 add_settings_field(
635 'myfixed_element_enable',
636 esc_html__("Enable Element", 'mystickyelements'),
637 array( $this, 'myfixed_element5_enable_callback' ),
638 'my-sticky-elements-settings5',
639 'setting_section_id'
640 );
641
642
643 add_settings_field(
644 'myfixed_element_side_position',
645 esc_html__("Horizontal Position", 'mystickyelements'),
646 array( $this, 'myfixed_element5_side_position_callback' ),
647 'my-sticky-elements-settings5',
648 'setting_section_id'
649 );
650 add_settings_field(
651 'myfixed_element_top_position',
652 esc_html__("Vertical Position", 'mystickyelements'),
653 array( $this, 'myfixed_element5_top_position_callback' ),
654 'my-sticky-elements-settings5',
655 'setting_section_id'
656 );
657 add_settings_field(
658 'myfixed_element_icon_bg_color',
659 esc_html__("Icon bg Color", 'mystickyelements'),
660 array( $this, 'myfixed_element5_icon_bg_color_callback' ),
661 'my-sticky-elements-settings5',
662 'setting_section_id'
663 );
664 add_settings_field(
665 'myfixed_element_icon_bg_img',
666 esc_html__("Icon bg Image", 'mystickyelements'),
667 array( $this, 'myfixed_element5_icon_bg_img_callback' ),
668 'my-sticky-elements-settings5',
669 'setting_section_id'
670 );
671 add_settings_field(
672 'myfixed_element_content_bg_color',
673 esc_html__("Content bg Color", 'mystickyelements'),
674 array( $this, 'myfixed_element5_content_bg_color_callback' ),
675 'my-sticky-elements-settings5',
676 'setting_section_id'
677 );
678 add_settings_field(
679 'myfixed_element_content_txt_color',
680 esc_html__("Content Text Color", 'mystickyelements'),
681 array( $this, 'myfixed_element5_content_txt_color_callback' ),
682 'my-sticky-elements-settings5',
683 'setting_section_id'
684 );
685 add_settings_field(
686 'myfixed_element_content_width',
687 esc_html__("Content Width", 'mystickyelements'),
688 array( $this, 'myfixed_element5_content_width_callback' ),
689 'my-sticky-elements-settings5',
690 'setting_section_id'
691 );
692 add_settings_field(
693 'myfixed_element_content_padding',
694 esc_html__("Content Padding", 'mystickyelements'),
695 array( $this, 'myfixed_element5_content_padding_callback' ),
696 'my-sticky-elements-settings5',
697 'setting_section_id'
698 );
699 add_settings_field(
700 'myfixed_element_content',
701 esc_html__("Content", 'mystickyelements'),
702 array( $this, 'myfixed_element5_content_callback' ),
703 'my-sticky-elements-settings5',
704 'setting_section_id'
705 );
706
707
708 //** Sixth element 4 **//
709
710 add_settings_section(
711 'setting_section_id',
712 esc_html__("myStickyElements Options", 'mystickyelements'),
713 array( $this, 'print_section_info4' ),
714 'my-sticky-elements-settings4'
715 );
716 add_settings_field(
717 'myfixed_element_enable',
718 esc_html__("Enable Element", 'mystickyelements'),
719 array( $this, 'myfixed_element4_enable_callback' ),
720 'my-sticky-elements-settings4',
721 'setting_section_id'
722 );
723
724
725 add_settings_field(
726 'myfixed_element_side_position',
727 esc_html__("Horizontal Position", 'mystickyelements'),
728 array( $this, 'myfixed_element4_side_position_callback' ),
729 'my-sticky-elements-settings4',
730 'setting_section_id'
731 );
732 add_settings_field(
733 'myfixed_element_top_position',
734 esc_html__("Vertical Position", 'mystickyelements'),
735 array( $this, 'myfixed_element4_top_position_callback' ),
736 'my-sticky-elements-settings4',
737 'setting_section_id'
738 );
739 add_settings_field(
740 'myfixed_element_icon_bg_color',
741 esc_html__("Icon bg Color", 'mystickyelements'),
742 array( $this, 'myfixed_element4_icon_bg_color_callback' ),
743 'my-sticky-elements-settings4',
744 'setting_section_id'
745 );
746 add_settings_field(
747 'myfixed_element_icon_bg_img',
748 esc_html__("Icon bg Image", 'mystickyelements'),
749 array( $this, 'myfixed_element4_icon_bg_img_callback' ),
750 'my-sticky-elements-settings4',
751 'setting_section_id'
752 );
753 add_settings_field(
754 'myfixed_element_content_bg_color',
755 esc_html__("Content bg Color", 'mystickyelements'),
756 array( $this, 'myfixed_element4_content_bg_color_callback' ),
757 'my-sticky-elements-settings4',
758 'setting_section_id'
759 );
760 add_settings_field(
761 'myfixed_element_content_txt_color',
762 esc_html__("Content Text Color", 'mystickyelements'),
763 array( $this, 'myfixed_element4_content_txt_color_callback' ),
764 'my-sticky-elements-settings4',
765 'setting_section_id'
766 );
767 add_settings_field(
768 'myfixed_element_content_width',
769 esc_html__("Content Width", 'mystickyelements'),
770 array( $this, 'myfixed_element4_content_width_callback' ),
771 'my-sticky-elements-settings4',
772 'setting_section_id'
773 );
774 add_settings_field(
775 'myfixed_element_content_padding',
776 esc_html__("Content Padding", 'mystickyelements'),
777 array( $this, 'myfixed_element4_content_padding_callback' ),
778 'my-sticky-elements-settings4',
779 'setting_section_id'
780 );
781 add_settings_field(
782 'myfixed_element_content',
783 esc_html__("Content", 'mystickyelements'),
784 array( $this, 'myfixed_element4_content_callback' ),
785 'my-sticky-elements-settings4',
786 'setting_section_id'
787 );
788
789
790
791
792
793 //** Sevnth element 3 **//
794
795 add_settings_section(
796 'setting_section_id',
797 esc_html__("myStickyElements Options", 'mystickyelements'),
798 array( $this, 'print_section_info3' ),
799 'my-sticky-elements-settings3'
800 );
801 add_settings_field(
802 'myfixed_element_enable',
803 esc_html__("Enable Element", 'mystickyelements'),
804 array( $this, 'myfixed_element3_enable_callback' ),
805 'my-sticky-elements-settings3',
806 'setting_section_id'
807 );
808
809
810 add_settings_field(
811 'myfixed_element_side_position',
812 esc_html__("Horizontal Position", 'mystickyelements'),
813 array( $this, 'myfixed_element3_side_position_callback' ),
814 'my-sticky-elements-settings3',
815 'setting_section_id'
816 );
817 add_settings_field(
818 'myfixed_element_top_position',
819 esc_html__("Vertical Position", 'mystickyelements'),
820 array( $this, 'myfixed_element3_top_position_callback' ),
821 'my-sticky-elements-settings3',
822 'setting_section_id'
823 );
824 add_settings_field(
825 'myfixed_element_icon_bg_color',
826 esc_html__("Icon bg Color", 'mystickyelements'),
827 array( $this, 'myfixed_element3_icon_bg_color_callback' ),
828 'my-sticky-elements-settings3',
829 'setting_section_id'
830 );
831 add_settings_field(
832 'myfixed_element_icon_bg_img',
833 esc_html__("Icon bg Image", 'mystickyelements'),
834 array( $this, 'myfixed_element3_icon_bg_img_callback' ),
835 'my-sticky-elements-settings3',
836 'setting_section_id'
837 );
838 add_settings_field(
839 'myfixed_element_content_bg_color',
840 esc_html__("Content bg Color", 'mystickyelements'),
841 array( $this, 'myfixed_element3_content_bg_color_callback' ),
842 'my-sticky-elements-settings3',
843 'setting_section_id'
844 );
845 add_settings_field(
846 'myfixed_element_content_txt_color',
847 esc_html__("Content Text Color", 'mystickyelements'),
848 array( $this, 'myfixed_element3_content_txt_color_callback' ),
849 'my-sticky-elements-settings3',
850 'setting_section_id'
851 );
852 add_settings_field(
853 'myfixed_element_content_width',
854 esc_html__("Content Width", 'mystickyelements'),
855 array( $this, 'myfixed_element3_content_width_callback' ),
856 'my-sticky-elements-settings3',
857 'setting_section_id'
858 );
859 add_settings_field(
860 'myfixed_element_content_padding',
861 esc_html__("Content Padding", 'mystickyelements'),
862 array( $this, 'myfixed_element3_content_padding_callback' ),
863 'my-sticky-elements-settings3',
864 'setting_section_id'
865 );
866 add_settings_field(
867 'myfixed_element_content',
868 esc_html__("Content", 'mystickyelements'),
869 array( $this, 'myfixed_element3_content_callback' ),
870 'my-sticky-elements-settings3',
871 'setting_section_id'
872 );
873
874
875 //** Eight element 2 **//
876
877 add_settings_section(
878 'setting_section_id',
879 esc_html__("myStickyElements Options", 'mystickyelements'),
880 array( $this, 'print_section_info2' ),
881 'my-sticky-elements-settings2'
882 );
883 add_settings_field(
884 'myfixed_element_enable',
885 esc_html__("Enable Element", 'mystickyelements'),
886 array( $this, 'myfixed_element2_enable_callback' ),
887 'my-sticky-elements-settings2',
888 'setting_section_id'
889 );
890
891
892 add_settings_field(
893 'myfixed_element_side_position',
894 esc_html__("Horizontal Position", 'mystickyelements'),
895 array( $this, 'myfixed_element2_side_position_callback' ),
896 'my-sticky-elements-settings2',
897 'setting_section_id'
898 );
899 add_settings_field(
900 'myfixed_element_top_position',
901 esc_html__("Vertical Position", 'mystickyelements'),
902 array( $this, 'myfixed_element2_top_position_callback' ),
903 'my-sticky-elements-settings2',
904 'setting_section_id'
905 );
906 add_settings_field(
907 'myfixed_element_icon_bg_color',
908 esc_html__("Icon bg Color", 'mystickyelements'),
909 array( $this, 'myfixed_element2_icon_bg_color_callback' ),
910 'my-sticky-elements-settings2',
911 'setting_section_id'
912 );
913 add_settings_field(
914 'myfixed_element_icon_bg_img',
915 esc_html__("Icon bg Image", 'mystickyelements'),
916 array( $this, 'myfixed_element2_icon_bg_img_callback' ),
917 'my-sticky-elements-settings2',
918 'setting_section_id'
919 );
920 add_settings_field(
921 'myfixed_element_content_bg_color',
922 esc_html__("Content bg Color", 'mystickyelements'),
923 array( $this, 'myfixed_element2_content_bg_color_callback' ),
924 'my-sticky-elements-settings2',
925 'setting_section_id'
926 );
927 add_settings_field(
928 'myfixed_element_content_txt_color',
929 esc_html__("Content Text Color", 'mystickyelements'),
930 array( $this, 'myfixed_element2_content_txt_color_callback' ),
931 'my-sticky-elements-settings2',
932 'setting_section_id'
933 );
934 add_settings_field(
935 'myfixed_element_content_width',
936 esc_html__("Content Width", 'mystickyelements'),
937 array( $this, 'myfixed_element2_content_width_callback' ),
938 'my-sticky-elements-settings2',
939 'setting_section_id'
940 );
941 add_settings_field(
942 'myfixed_element_content_padding',
943 esc_html__("Content Padding", 'mystickyelements'),
944 array( $this, 'myfixed_element2_content_padding_callback' ),
945 'my-sticky-elements-settings2',
946 'setting_section_id'
947 );
948 add_settings_field(
949 'myfixed_element_content',
950 esc_html__("Content", 'mystickyelements'),
951 array( $this, 'myfixed_element2_content_callback' ),
952 'my-sticky-elements-settings2',
953 'setting_section_id'
954 );
955
956
957 //** Ninth element 1 **//
958
959 add_settings_section(
960 'setting_section_id',
961 esc_html__("myStickyElements Options", 'mystickyelements'),
962 array( $this, 'print_section_info1' ),
963 'my-sticky-elements-settings1'
964 );
965 add_settings_field(
966 'myfixed_element_enable',
967 esc_html__("Enable Element", 'mystickyelements'),
968 array( $this, 'myfixed_element1_enable_callback' ),
969 'my-sticky-elements-settings1',
970 'setting_section_id'
971 );
972
973
974 add_settings_field(
975 'myfixed_element_side_position',
976 esc_html__("Horizontal Position", 'mystickyelements'),
977 array( $this, 'myfixed_element1_side_position_callback' ),
978 'my-sticky-elements-settings1',
979 'setting_section_id'
980 );
981 add_settings_field(
982 'myfixed_element_top_position',
983 esc_html__("Vertical Position", 'mystickyelements'),
984 array( $this, 'myfixed_element1_top_position_callback' ),
985 'my-sticky-elements-settings1',
986 'setting_section_id'
987 );
988 add_settings_field(
989 'myfixed_element_icon_bg_color',
990 esc_html__("Icon bg Color", 'mystickyelements'),
991 array( $this, 'myfixed_element1_icon_bg_color_callback' ),
992 'my-sticky-elements-settings1',
993 'setting_section_id'
994 );
995 add_settings_field(
996 'myfixed_element_icon_bg_img',
997 esc_html__("Icon bg Image", 'mystickyelements'),
998 array( $this, 'myfixed_element1_icon_bg_img_callback' ),
999 'my-sticky-elements-settings1',
1000 'setting_section_id'
1001 );
1002 add_settings_field(
1003 'myfixed_element_content_bg_color',
1004 esc_html__("Content bg Color", 'mystickyelements'),
1005 array( $this, 'myfixed_element1_content_bg_color_callback' ),
1006 'my-sticky-elements-settings1',
1007 'setting_section_id'
1008 );
1009 add_settings_field(
1010 'myfixed_element_content_txt_color',
1011 esc_html__("Content Text Color", 'mystickyelements'),
1012 array( $this, 'myfixed_element1_content_txt_color_callback' ),
1013 'my-sticky-elements-settings1',
1014 'setting_section_id'
1015 );
1016 add_settings_field(
1017 'myfixed_element_content_width',
1018 esc_html__("Content Width", 'mystickyelements'),
1019 array( $this, 'myfixed_element1_content_width_callback' ),
1020 'my-sticky-elements-settings1',
1021 'setting_section_id'
1022 );
1023 add_settings_field(
1024 'myfixed_element_content_padding',
1025 esc_html__("Content Padding", 'mystickyelements'),
1026 array( $this, 'myfixed_element1_content_padding_callback' ),
1027 'my-sticky-elements-settings1',
1028 'setting_section_id'
1029 );
1030 add_settings_field(
1031 'myfixed_element_content',
1032 esc_html__("Content", 'mystickyelements'),
1033 array( $this, 'myfixed_element1_content_callback' ),
1034 'my-sticky-elements-settings1',
1035 'setting_section_id'
1036 );
1037
1038
1039 //** Tenth element 0 **//
1040
1041 add_settings_section(
1042 'setting_section_id',
1043 esc_html__("myStickyElements Options", 'mystickyelements'),
1044 array( $this, 'print_section_info0' ),
1045 'my-sticky-elements-settings0'
1046 );
1047 add_settings_field(
1048 'myfixed_element_enable',
1049 esc_html__("Enable Element", 'mystickyelements'),
1050 array( $this, 'myfixed_element0_enable_callback' ),
1051 'my-sticky-elements-settings0',
1052 'setting_section_id'
1053 );
1054
1055
1056 add_settings_field(
1057 'myfixed_element_side_position',
1058 esc_html__("Horizontal Position", 'mystickyelements'),
1059 array( $this, 'myfixed_element0_side_position_callback' ),
1060 'my-sticky-elements-settings0',
1061 'setting_section_id'
1062 );
1063 add_settings_field(
1064 'myfixed_element_top_position',
1065 esc_html__("Vertical Position", 'mystickyelements'),
1066 array( $this, 'myfixed_element0_top_position_callback' ),
1067 'my-sticky-elements-settings0',
1068 'setting_section_id'
1069 );
1070 add_settings_field(
1071 'myfixed_element_icon_bg_color',
1072 esc_html__("Icon bg Color", 'mystickyelements'),
1073 array( $this, 'myfixed_element0_icon_bg_color_callback' ),
1074 'my-sticky-elements-settings0',
1075 'setting_section_id'
1076 );
1077 add_settings_field(
1078 'myfixed_element_icon_bg_img',
1079 esc_html__("Icon bg Image", 'mystickyelements'),
1080 array( $this, 'myfixed_element0_icon_bg_img_callback' ),
1081 'my-sticky-elements-settings0',
1082 'setting_section_id'
1083 );
1084 add_settings_field(
1085 'myfixed_element_content_bg_color',
1086 esc_html__("Content bg Color", 'mystickyelements'),
1087 array( $this, 'myfixed_element0_content_bg_color_callback' ),
1088 'my-sticky-elements-settings0',
1089 'setting_section_id'
1090 );
1091 add_settings_field(
1092 'myfixed_element_content_txt_color',
1093 esc_html__("Content Text Color", 'mystickyelements'),
1094 array( $this, 'myfixed_element0_content_txt_color_callback' ),
1095 'my-sticky-elements-settings0',
1096 'setting_section_id'
1097 );
1098 add_settings_field(
1099 'myfixed_element_content_width',
1100 esc_html__("Content Width", 'mystickyelements'),
1101 array( $this, 'myfixed_element0_content_width_callback' ),
1102 'my-sticky-elements-settings0',
1103 'setting_section_id'
1104 );
1105 add_settings_field(
1106 'myfixed_element_content_padding',
1107 esc_html__("Content Padding", 'mystickyelements'),
1108 array( $this, 'myfixed_element0_content_padding_callback' ),
1109 'my-sticky-elements-settings0',
1110 'setting_section_id'
1111 );
1112 add_settings_field(
1113 'myfixed_element_content',
1114 esc_html__("Content", 'mystickyelements'),
1115 array( $this, 'myfixed_element0_content_callback' ),
1116 'my-sticky-elements-settings0',
1117 'setting_section_id'
1118 );
1119
1120 }
1121
1122
1123
1124 /**
1125 * Sanitize each setting field as needed
1126 * @param array $input Contains all settings fields as array keys
1127 */
1128 public function sanitize( $input )
1129 {
1130
1131 $new_input = array();
1132 if( isset( $input['myfixed_element_enable'] ) )
1133 $new_input['myfixed_element_enable'] = sanitize_text_field( $input['myfixed_element_enable'] );
1134
1135 if( isset( $input['myfixed_element_side_position'] ) )
1136 $new_input['myfixed_element_side_position'] = sanitize_text_field( $input['myfixed_element_side_position'] );
1137
1138 if( isset( $input['myfixed_element_top_position'] ) )
1139 $new_input['myfixed_element_top_position'] = absint( $input['myfixed_element_top_position'] );
1140
1141 if( isset( $input['myfixed_element_icon_bg_color'] ) )
1142 $new_input['myfixed_element_icon_bg_color'] = sanitize_text_field( $input['myfixed_element_icon_bg_color'] );
1143
1144 if( isset( $input['myfixed_element_icon_bg_img'] ) )
1145 $new_input['myfixed_element_icon_bg_img'] = sanitize_text_field( $input['myfixed_element_icon_bg_img'] );
1146
1147 if( isset( $input['myfixed_element_content_bg_color'] ) )
1148 $new_input['myfixed_element_content_bg_color'] = sanitize_text_field( $input['myfixed_element_content_bg_color'] );
1149
1150 if( isset( $input['myfixed_element_content_txt_color'] ) )
1151 $new_input['myfixed_element_content_txt_color'] = sanitize_text_field( $input['myfixed_element_content_txt_color'] );
1152
1153 if( isset( $input['myfixed_element_content_width'] ) )
1154 $new_input['myfixed_element_content_width'] = absint( $input['myfixed_element_content_width'] );
1155
1156 if( isset( $input['myfixed_element_content_padding'] ) )
1157 $new_input['myfixed_element_content_padding'] = absint( $input['myfixed_element_content_padding'] );
1158
1159 if( isset( $input['myfixed_element_content'] ) )
1160 $new_input['myfixed_element_content'] = wp_kses($input['myfixed_element_content'],
1161
1162 array(
1163 'a' => array(
1164 'href' => array(),
1165 'title' => array(),
1166 'target' => array(),
1167 'rel' => array()
1168 ),
1169 'br' => array(),
1170 'h1' => array(),
1171 'h2' => array(),
1172 'h3' => array(),
1173 'h4' => array(),
1174 'h5' => array(),
1175 'h6' => array(),
1176 '&nbsp;' => array(),
1177 'hr' => array(),
1178 'p' => array(),
1179 'em' => array(),
1180 'strong' => array(),
1181 'ul' => array(),
1182 'ol' => array(),
1183 'li' => array(),
1184 'blockquote' => array(),
1185 'iframe' => array(
1186 'src' => array(),
1187 'width' => array(),
1188 'height' => array(),
1189 'frameborder' => array(),
1190 'allowfullscreen' => array(),
1191 'scrolling' => array(),
1192 'style' => array(),
1193 'allowtransparency' => array()
1194 ),
1195 'img' => array(
1196 'src' => array(),
1197 'alt' => array(),
1198 'class' => array(),
1199 'width' => array(),
1200 'height' => array(),
1201 'rel' => array()
1202 ),
1203 'span' => array(
1204 'style' => array(),
1205 'class' => array()
1206 )
1207
1208 )
1209 );
1210
1211
1212 if( isset( $input['myfixed_zindex'] ) )
1213 $new_input['myfixed_zindex'] = absint( $input['myfixed_zindex'] );
1214
1215 if( isset( $input['myfixed_disable_small_screen'] ) )
1216 $new_input['myfixed_disable_small_screen'] = absint( $input['myfixed_disable_small_screen'] );
1217
1218
1219 if( isset( $input['myfixed_click'] ) )
1220 $new_input['myfixed_click'] = sanitize_text_field( $input['myfixed_click'] );
1221
1222 if( isset( $input['myfixed_cssstyle'] ) )
1223 $new_input['myfixed_cssstyle'] = sanitize_text_field( $input['myfixed_cssstyle'] );
1224
1225
1226 return $new_input;
1227 }
1228
1229 public function mw_enqueue_color_picker( )
1230 {
1231 $min = MSE_DEV_MODE ? '' : '.min';
1232 wp_enqueue_style( 'wp-color-picker' );
1233 wp_enqueue_script( 'my-script-handle', plugins_url('js/iris-script'.esc_attr($min).'.js', __FILE__ ), array( 'wp-color-picker' ), false, true );
1234 }
1235
1236
1237
1238 /* ***** GENERAL ***** */
1239
1240 public function print_section_info()
1241 {
1242 esc_html_e('Add sticky elements to your blog.', 'mystickyelements');
1243
1244 }
1245 /**
1246 * Get the settings option array and print one of its values
1247 */
1248
1249 public function myfixed_disable_small_screen_callback()
1250 {
1251 printf(
1252 '<p class="description">'. esc_html__('less than ', 'mystickyelements') .'<input type="text" size="4" id="myfixed_disable_small_screen" name="mysticky_elements_options[myfixed_disable_small_screen]" value="%s" />'. esc_html__('px width, 0 to disable.', 'mystickyelements') .'</p>',
1253 isset( $this->options['myfixed_disable_small_screen'] ) ? esc_attr( $this->options['myfixed_disable_small_screen']) : ''
1254 );
1255 }
1256
1257 /*public function mysticky_active_on_height_callback()
1258 {
1259 printf(
1260 '<p class="description">after <input type="text" size="4" id="mysticky_active_on_height" name="mysticky_elements_options[mysticky_active_on_height]" value="%s" />px</p>',
1261 isset( $this->options['mysticky_active_on_height'] ) ? esc_attr( $this->options['mysticky_active_on_height']) : ''
1262 );
1263 }*/
1264
1265
1266 public function myfixed_click_callback()
1267 {
1268 printf(
1269 '<select id="myfixed_click" name="mysticky_elements_options[myfixed_click]" selected="%s">',
1270 isset( $this->options['myfixed_click'] ) ? esc_attr( $this->options['myfixed_click']) : ''
1271 );
1272 if ($this->options['myfixed_click'] == 'click') {
1273 printf(
1274 '<option name="click" value="click" selected>'. esc_html__('click', 'mystickyelements') .'</option>
1275 <option name="hover" value="hover">'. esc_html__('hover', 'mystickyelements') .'</option>
1276 </select>'
1277 );
1278 }
1279 if ($this->options['myfixed_click'] == 'hover') {
1280 printf(
1281 '<option name="click" value="click">'. esc_html__('click', 'mystickyelements') .'</option>
1282 <option name="hover" value="hover" selected >'. esc_html__('hover', 'mystickyelements') .'</option>
1283 </select>'
1284 );
1285 }
1286 if ($this->options['myfixed_click'] == '') {
1287 printf(
1288 '<option name="click" value="click" selected>'. esc_html__('click', 'mystickyelements') .'</option>
1289 <option name="hover" value="hover">'. esc_html__('hover', 'mystickyelements') .'</option>
1290 </select>'
1291 );
1292 }
1293 }
1294
1295 public function myfixed_cssstyle_callback()
1296
1297 {
1298 printf(
1299 '
1300 <p class="description">'. esc_html__('Add/Edit css to manage advanced elements style.', 'mystickyelements') .'</p> <textarea type="text" rows="4" cols="60" id="myfixed_cssstyle" name="mysticky_elements_options[myfixed_cssstyle]">%s</textarea> <br />
1301 ' ,
1302 isset( $this->options['myfixed_cssstyle'] ) ? esc_attr( $this->options['myfixed_cssstyle']) : ''
1303 );
1304 echo '</p>';
1305 }
1306
1307
1308 /* ***** ELEMENT 1 ***** */
1309
1310 public function print_section_info9()
1311 {
1312 esc_html_e('Element 1 Settings.', 'mystickyelements');
1313 }
1314
1315
1316 public function myfixed_element9_enable_callback()
1317 {
1318 printf(
1319 '<select id="myfixed_element_enable" name="mysticky_elements_options9[myfixed_element_enable]" selected="%s">',
1320 isset( $this->options9['myfixed_element_enable'] ) ? esc_attr( $this->options9['myfixed_element_enable']) : ''
1321 );
1322 if ($this->options9['myfixed_element_enable'] == 'enable') {
1323 printf(
1324 '<option name="enable" value="enable" selected>enable</option>
1325 <option name="disable" value="disable">disable</option>
1326 </select>'
1327 );
1328 }
1329 if ($this->options9['myfixed_element_enable'] == 'disable') {
1330 printf(
1331 '<option name="enable" value="enable">enable</option>
1332 <option name="disable" value="disable" selected >disable</option>
1333 </select>'
1334 );
1335 }
1336 if ($this->options9['myfixed_element_enable'] == '') {
1337 printf(
1338 '<option name="enable" value="enable" >enable</option>
1339 <option name="disable" value="disable" selected >disable</option>
1340 </select>'
1341 );
1342 }
1343 }
1344
1345
1346
1347
1348
1349 public function myfixed_element9_side_position_callback()
1350 {
1351 printf(
1352 '<select id="myfixed_element_side_position" name="mysticky_elements_options9[myfixed_element_side_position]" selected="%s">',
1353 isset( $this->options9['myfixed_element_side_position'] ) ? esc_attr( $this->options9['myfixed_element_side_position']) : ''
1354 );
1355 if ($this->options9['myfixed_element_side_position'] == 'left') {
1356 printf(
1357 '<option name="left" value="left" selected>left</option>
1358 <option name="right" value="right">right</option>
1359 </select>'
1360 );
1361 }
1362 if ($this->options9['myfixed_element_side_position'] == 'right') {
1363 printf(
1364 '<option name="left" value="left">left</option>
1365 <option name="right" value="right" selected >right</option>
1366 </select>'
1367 );
1368 }
1369 if ($this->options9['myfixed_element_side_position'] == '') {
1370 printf(
1371 '<option name="left" value="left" selected>left</option>
1372 <option name="right" value="right">right</option>
1373 </select>'
1374 );
1375 }
1376 }
1377
1378 public function myfixed_element9_top_position_callback()
1379 {
1380 printf(
1381 '<p class="description"><input type="text" size="4" id="myfixed_element_top_position" name="mysticky_elements_options9[myfixed_element_top_position]" value="%s" /> px (top position of an element). Please note that Element 1 must be on top of element 2 and so on, otherwise elements will overlap...</p>',
1382 isset( $this->options9['myfixed_element_top_position'] ) ? esc_attr( $this->options9['myfixed_element_top_position']) : ''
1383 );
1384 }
1385 public function myfixed_element9_icon_bg_color_callback()
1386 {
1387 printf(
1388 '<p class="description"><input type="text" size="8" id="myfixed_element_icon_bg_color" name="mysticky_elements_options9[myfixed_element_icon_bg_color]" value="%s" class="my-color-field" /></p>',
1389 isset( $this->options9['myfixed_element_icon_bg_color'] ) ? esc_attr( $this->options9['myfixed_element_icon_bg_color']) : ''
1390 );
1391 }
1392 public function myfixed_element9_icon_bg_img_callback()
1393 {
1394 printf(
1395 '<p class="description"><input type="text" size="28" id="myfixed_element_icon_bg_img" name="mysticky_elements_options9[myfixed_element_icon_bg_img]" value="%s" /> Icon Image.</p>',
1396 isset( $this->options9['myfixed_element_icon_bg_img'] ) ? esc_attr( $this->options9['myfixed_element_icon_bg_img']) : ''
1397 );
1398 }
1399 public function myfixed_element9_content_bg_color_callback()
1400 {
1401 printf(
1402 '<p class="description"><input type="text" size="8" id="myfixed_element_content_bg_color" name="mysticky_elements_options9[myfixed_element_content_bg_color]" value="%s" class="my-color-field" /></p>',
1403 isset( $this->options9['myfixed_element_content_bg_color'] ) ? esc_attr( $this->options9['myfixed_element_content_bg_color']) : ''
1404 );
1405 }
1406 public function myfixed_element9_content_txt_color_callback()
1407 {
1408 printf(
1409 '<p class="description"><input type="text" size="8" id="myfixed_element_content_txt_color" name="mysticky_elements_options9[myfixed_element_content_txt_color]" value="%s" class="my-color-field" /></p>',
1410 isset( $this->options9['myfixed_element_content_txt_color'] ) ? esc_attr( $this->options9['myfixed_element_content_txt_color']) : ''
1411 );
1412 }
1413 public function myfixed_element9_content_width_callback()
1414 {
1415 printf(
1416 '<p class="description"><input type="text" size="4" id="myfixed_element_content_width" name="mysticky_elements_options9[myfixed_element_content_width]" value="%s" />px</p>',
1417 isset( $this->options9['myfixed_element_content_width'] ) ? esc_attr( $this->options9['myfixed_element_content_width']) : ''
1418 );
1419 }
1420
1421
1422 public function myfixed_element9_content_padding_callback()
1423 {
1424 printf(
1425 '<p class="description"><input type="text" size="4" id="myfixed_element_content_padding" name="mysticky_elements_options9[myfixed_element_content_padding]" value="%s" />px</p>',
1426 isset( $this->options9['myfixed_element_content_padding'] ) ? esc_attr( $this->options9['myfixed_element_content_padding']) : ''
1427 );
1428 }
1429
1430
1431
1432 public function myfixed_element9_content_callback()
1433
1434 {
1435 $content_id = 'myfixed_element_content';
1436 $content = (isset( $this->options9['myfixed_element_content'] ) ? esc_textarea( $this->options9['myfixed_element_content']) : '');
1437
1438 wp_editor( html_entity_decode($content), $content_id,
1439 array(
1440 'textarea_name' => 'mysticky_elements_options9[myfixed_element_content]',
1441 //'teeny' => true,
1442 //'tinymce' => true,
1443 'textarea_rows' => get_option('default_post_edit_rows', 8)
1444 )
1445 );
1446 }
1447
1448
1449 /* ***** ELEMENT 2 ***** */
1450
1451 public function print_section_info8()
1452 {
1453 esc_html_e('Element 2 Settings.', 'mystickyelements');
1454 }
1455
1456 public function myfixed_element8_enable_callback()
1457 {
1458 printf(
1459 '<select id="myfixed_element_enable" name="mysticky_elements_options8[myfixed_element_enable]" selected="%s">',
1460 isset( $this->options8['myfixed_element_enable'] ) ? esc_attr( $this->options8['myfixed_element_enable']) : ''
1461 );
1462 if ($this->options8['myfixed_element_enable'] == 'enable') {
1463 printf(
1464 '<option name="enable" value="enable" selected>enable</option>
1465 <option name="disable" value="disable">disable</option>
1466 </select>'
1467 );
1468 }
1469 if ($this->options8['myfixed_element_enable'] == 'disable') {
1470 printf(
1471 '<option name="enable" value="enable">enable</option>
1472 <option name="disable" value="disable" selected >disable</option>
1473 </select>'
1474 );
1475 }
1476 if ($this->options8['myfixed_element_enable'] == '') {
1477 printf(
1478 '<option name="enable" value="enable" >enable</option>
1479 <option name="disable" value="disable" selected >disable</option>
1480 </select>'
1481 );
1482 }
1483 }
1484
1485
1486 public function myfixed_element8_side_position_callback(){
1487
1488 printf(
1489 '<select id="myfixed_element_side_position" name="mysticky_elements_options8[myfixed_element_side_position]" selected="%s">',
1490 isset( $this->options8['myfixed_element_side_position'] ) ? esc_attr( $this->options8['myfixed_element_side_position']) : ''
1491 );
1492 if ($this->options8['myfixed_element_side_position'] == 'left') {
1493 printf(
1494 '<option name="left" value="left" selected>left</option>
1495 <option name="right" value="right">right</option>
1496 </select>'
1497 );
1498 }
1499 if ($this->options8['myfixed_element_side_position'] == 'right') {
1500 printf(
1501 '<option name="left" value="left">left</option>
1502 <option name="right" value="right" selected >right</option>
1503 </select>'
1504 );
1505 }
1506 if ($this->options8['myfixed_element_side_position'] == '') {
1507 printf(
1508 '<option name="left" value="left" selected>left</option>
1509 <option name="right" value="right">right</option>
1510 </select>'
1511 );
1512 }
1513 }
1514
1515 public function myfixed_element8_top_position_callback()
1516 {
1517 printf(
1518 '<p class="description"><input type="text" size="4" id="myfixed_element_top_position" name="mysticky_elements_options8[myfixed_element_top_position]" value="%s" /> px (top position of an element). Please note that Element 1 must be on top of element 2 and so on, otherwise elements will overlap...</p>',
1519 isset( $this->options8['myfixed_element_top_position'] ) ? esc_attr( $this->options8['myfixed_element_top_position']) : ''
1520 );
1521 }
1522 public function myfixed_element8_icon_bg_color_callback()
1523 {
1524 printf(
1525 '<p class="description"><input type="text" size="8" id="myfixed_element_icon_bg_color" name="mysticky_elements_options8[myfixed_element_icon_bg_color]" value="%s" class="my-color-field" /></p>',
1526 isset( $this->options8['myfixed_element_icon_bg_color'] ) ? esc_attr( $this->options8['myfixed_element_icon_bg_color']) : ''
1527 );
1528 }
1529 public function myfixed_element8_icon_bg_img_callback()
1530 {
1531 printf(
1532 '<p class="description"><input type="text" size="28" id="myfixed_element_icon_bg_img" name="mysticky_elements_options8[myfixed_element_icon_bg_img]" value="%s" /> Icon Image.</p>',
1533 isset( $this->options8['myfixed_element_icon_bg_img'] ) ? esc_attr( $this->options8['myfixed_element_icon_bg_img']) : ''
1534 );
1535 }
1536 public function myfixed_element8_content_bg_color_callback()
1537 {
1538 printf(
1539 '<p class="description"><input type="text" size="8" id="myfixed_element_content_bg_color" name="mysticky_elements_options8[myfixed_element_content_bg_color]" value="%s" class="my-color-field" /></p>',
1540 isset( $this->options8['myfixed_element_content_bg_color'] ) ? esc_attr( $this->options8['myfixed_element_content_bg_color']) : ''
1541 );
1542 }
1543 public function myfixed_element8_content_txt_color_callback()
1544 {
1545 printf(
1546 '<p class="description"><input type="text" size="8" id="myfixed_element_content_txt_color" name="mysticky_elements_options8[myfixed_element_content_txt_color]" value="%s" class="my-color-field" /></p>',
1547 isset( $this->options8['myfixed_element_content_txt_color'] ) ? esc_attr( $this->options8['myfixed_element_content_txt_color']) : ''
1548 );
1549 }
1550 public function myfixed_element8_content_width_callback()
1551 {
1552 printf(
1553 '<p class="description"><input type="text" size="4" id="myfixed_element_content_width" name="mysticky_elements_options8[myfixed_element_content_width]" value="%s" />px</p>',
1554 isset( $this->options8['myfixed_element_content_width'] ) ? esc_attr( $this->options8['myfixed_element_content_width']) : ''
1555 );
1556 }
1557 public function myfixed_element8_content_padding_callback()
1558 {
1559 printf(
1560 '<p class="description"><input type="text" size="4" id="myfixed_element_content_padding" name="mysticky_elements_options8[myfixed_element_content_padding]" value="%s" />px</p>',
1561 isset( $this->options8['myfixed_element_content_padding'] ) ? esc_attr( $this->options8['myfixed_element_content_padding']) : ''
1562 );
1563 }
1564
1565
1566 public function myfixed_element8_content_callback()
1567
1568 {
1569 $content_id = 'myfixed_element_content';
1570 $content = (isset( $this->options8['myfixed_element_content'] ) ? esc_textarea( $this->options8['myfixed_element_content']) : '');
1571
1572 wp_editor( html_entity_decode($content), $content_id,
1573 array(
1574 'textarea_name' => 'mysticky_elements_options8[myfixed_element_content]',
1575 //'teeny' => true,
1576 //'tinymce' => true,
1577 'textarea_rows' => get_option('default_post_edit_rows', 8)
1578 )
1579 );
1580 }
1581
1582
1583 /* ***** ELEMENT 3 ***** */
1584
1585
1586 public function print_section_info7()
1587 {
1588 esc_html_e('Element 3 Settings.', 'mystickyelements');
1589 }
1590
1591
1592 public function myfixed_element7_enable_callback()
1593 {
1594 printf(
1595 '<select id="myfixed_element_enable" name="mysticky_elements_options7[myfixed_element_enable]" selected="%s">',
1596 isset( $this->options7['myfixed_element_enable'] ) ? esc_attr( $this->options7['myfixed_element_enable']) : ''
1597 );
1598 if ($this->options7['myfixed_element_enable'] == 'enable') {
1599 printf(
1600 '<option name="enable" value="enable" selected>enable</option>
1601 <option name="disable" value="disable">disable</option>
1602 </select>'
1603 );
1604 }
1605 if ($this->options7['myfixed_element_enable'] == 'disable') {
1606 printf(
1607 '<option name="enable" value="enable">enable</option>
1608 <option name="disable" value="disable" selected >disable</option>
1609 </select>'
1610 );
1611 }
1612 if ($this->options7['myfixed_element_enable'] == '') {
1613 printf(
1614 '<option name="enable" value="enable" >enable</option>
1615 <option name="disable" value="disable" selected >disable</option>
1616 </select>'
1617 );
1618 }
1619 }
1620
1621
1622
1623 public function myfixed_element7_side_position_callback()
1624 {
1625 printf(
1626 '<select id="myfixed_element_side_position" name="mysticky_elements_options7[myfixed_element_side_position]" selected="%s">',
1627 isset( $this->options7['myfixed_element_side_position'] ) ? esc_attr( $this->options7['myfixed_element_side_position']) : ''
1628 );
1629 if ($this->options7['myfixed_element_side_position'] == 'left') {
1630 printf(
1631 '<option name="left" value="left" selected>left</option>
1632 <option name="right" value="right">right</option>
1633 </select>'
1634 );
1635 }
1636 if ($this->options7['myfixed_element_side_position'] == 'right') {
1637 printf(
1638 '<option name="left" value="left">left</option>
1639 <option name="right" value="right" selected >right</option>
1640 </select>'
1641 );
1642 }
1643 if ($this->options7['myfixed_element_side_position'] == '') {
1644 printf(
1645 '<option name="left" value="left" selected>left</option>
1646 <option name="right" value="right">right</option>
1647 </select>'
1648 );
1649 }
1650 }
1651 public function myfixed_element7_top_position_callback()
1652 {
1653 printf(
1654 '<p class="description"><input type="text" size="4" id="myfixed_element_top_position" name="mysticky_elements_options7[myfixed_element_top_position]" value="%s" /> px (top position of an element). Please note that Element 1 must be on top of element 2 and so on, otherwise elements will overlap...</p>',
1655 isset( $this->options7['myfixed_element_top_position'] ) ? esc_attr( $this->options7['myfixed_element_top_position']) : ''
1656 );
1657 }
1658 public function myfixed_element7_icon_bg_color_callback()
1659 {
1660 printf(
1661 '<p class="description"><input type="text" size="8" id="myfixed_element_icon_bg_color" name="mysticky_elements_options7[myfixed_element_icon_bg_color]" value="%s" class="my-color-field" /></p>',
1662 isset( $this->options7['myfixed_element_icon_bg_color'] ) ? esc_attr( $this->options7['myfixed_element_icon_bg_color']) : ''
1663 );
1664 }
1665 public function myfixed_element7_icon_bg_img_callback()
1666 {
1667 printf(
1668 '<p class="description"><input type="text" size="28" id="myfixed_element_icon_bg_img" name="mysticky_elements_options7[myfixed_element_icon_bg_img]" value="%s" /> Icon Image.</p>',
1669 isset( $this->options7['myfixed_element_icon_bg_img'] ) ? esc_attr( $this->options7['myfixed_element_icon_bg_img']) : ''
1670 );
1671 }
1672 public function myfixed_element7_content_bg_color_callback()
1673 {
1674 printf(
1675 '<p class="description"><input type="text" size="8" id="myfixed_element_content_bg_color" name="mysticky_elements_options7[myfixed_element_content_bg_color]" value="%s" class="my-color-field" /></p>',
1676 isset( $this->options7['myfixed_element_content_bg_color'] ) ? esc_attr( $this->options7['myfixed_element_content_bg_color']) : ''
1677 );
1678 }
1679 public function myfixed_element7_content_txt_color_callback()
1680 {
1681 printf(
1682 '<p class="description"><input type="text" size="8" id="myfixed_element_content_txt_color" name="mysticky_elements_options7[myfixed_element_content_txt_color]" value="%s" class="my-color-field" /></p>',
1683 isset( $this->options7['myfixed_element_content_txt_color'] ) ? esc_attr( $this->options7['myfixed_element_content_txt_color']) : ''
1684 );
1685 }
1686 public function myfixed_element7_content_width_callback()
1687 {
1688 printf(
1689 '<p class="description"><input type="text" size="4" id="myfixed_element_content_width" name="mysticky_elements_options7[myfixed_element_content_width]" value="%s" />px</p>',
1690 isset( $this->options7['myfixed_element_content_width'] ) ? esc_attr( $this->options7['myfixed_element_content_width']) : ''
1691 );
1692 }
1693 public function myfixed_element7_content_padding_callback()
1694 {
1695 printf(
1696 '<p class="description"><input type="text" size="4" id="myfixed_element_content_padding" name="mysticky_elements_options7[myfixed_element_content_padding]" value="%s" />px</p>',
1697 isset( $this->options7['myfixed_element_content_padding'] ) ? esc_attr( $this->options7['myfixed_element_content_padding']) : ''
1698 );
1699 }
1700
1701
1702 public function myfixed_element7_content_callback()
1703
1704 {
1705 $content_id = 'myfixed_element_content';
1706 $content = (isset( $this->options7['myfixed_element_content'] ) ? esc_textarea( $this->options7['myfixed_element_content']) : '');
1707
1708 wp_editor( html_entity_decode($content), $content_id,
1709 array(
1710 'textarea_name' => 'mysticky_elements_options7[myfixed_element_content]',
1711 //'teeny' => true,
1712 //'tinymce' => true,
1713 'textarea_rows' => get_option('default_post_edit_rows', 8)
1714 )
1715 );
1716 }
1717
1718
1719
1720
1721 /* ***** ELEMENT 4 ***** */
1722
1723
1724 public function print_section_info6()
1725 {
1726 esc_html_e('Element 4 Settings.', 'mystickyelements');
1727 }
1728
1729
1730 public function myfixed_element6_enable_callback()
1731 {
1732 printf(
1733 '<select id="myfixed_element_enable" name="mysticky_elements_options6[myfixed_element_enable]" selected="%s">',
1734 isset( $this->options6['myfixed_element_enable'] ) ? esc_attr( $this->options6['myfixed_element_enable']) : ''
1735 );
1736 if ($this->options6['myfixed_element_enable'] == 'enable') {
1737 printf(
1738 '<option name="enable" value="enable" selected>enable</option>
1739 <option name="disable" value="disable">disable</option>
1740 </select>'
1741 );
1742 }
1743 if ($this->options6['myfixed_element_enable'] == 'disable') {
1744 printf(
1745 '<option name="enable" value="enable">enable</option>
1746 <option name="disable" value="disable" selected >disable</option>
1747 </select>'
1748 );
1749 }
1750 if ($this->options6['myfixed_element_enable'] == '') {
1751 printf(
1752 '<option name="enable" value="enable" >enable</option>
1753 <option name="disable" value="disable" selected >disable</option>
1754 </select>'
1755 );
1756 }
1757 }
1758
1759
1760
1761 public function myfixed_element6_side_position_callback()
1762 {
1763 printf(
1764 '<select id="myfixed_element_side_position" name="mysticky_elements_options6[myfixed_element_side_position]" selected="%s">',
1765 isset( $this->options6['myfixed_element_side_position'] ) ? esc_attr( $this->options6['myfixed_element_side_position']) : ''
1766 );
1767 if ($this->options6['myfixed_element_side_position'] == 'left') {
1768 printf(
1769 '<option name="left" value="left" selected>left</option>
1770 <option name="right" value="right">right</option>
1771 </select>'
1772 );
1773 }
1774 if ($this->options6['myfixed_element_side_position'] == 'right') {
1775 printf(
1776 '<option name="left" value="left">left</option>
1777 <option name="right" value="right" selected >right</option>
1778 </select>'
1779 );
1780 }
1781 if ($this->options6['myfixed_element_side_position'] == '') {
1782 printf(
1783 '<option name="left" value="left" selected>left</option>
1784 <option name="right" value="right">right</option>
1785 </select>'
1786 );
1787 }
1788 }
1789 public function myfixed_element6_top_position_callback()
1790 {
1791 printf(
1792 '<p class="description"><input type="text" size="4" id="myfixed_element_top_position" name="mysticky_elements_options6[myfixed_element_top_position]" value="%s" /> px (top position of an element). Please note that Element 1 must be on top of element 2 and so on, otherwise elements will overlap...</p>',
1793 isset( $this->options6['myfixed_element_top_position'] ) ? esc_attr( $this->options6['myfixed_element_top_position']) : ''
1794 );
1795 }
1796 public function myfixed_element6_icon_bg_color_callback()
1797 {
1798 printf(
1799 '<p class="description"><input type="text" size="8" id="myfixed_element_icon_bg_color" name="mysticky_elements_options6[myfixed_element_icon_bg_color]" value="%s" class="my-color-field" /></p>',
1800 isset( $this->options6['myfixed_element_icon_bg_color'] ) ? esc_attr( $this->options6['myfixed_element_icon_bg_color']) : ''
1801 );
1802 }
1803 public function myfixed_element6_icon_bg_img_callback()
1804 {
1805 printf(
1806 '<p class="description"><input type="text" size="28" id="myfixed_element_icon_bg_img" name="mysticky_elements_options6[myfixed_element_icon_bg_img]" value="%s" /> Icon Image.</p>',
1807 isset( $this->options6['myfixed_element_icon_bg_img'] ) ? esc_attr( $this->options6['myfixed_element_icon_bg_img']) : ''
1808 );
1809 }
1810 public function myfixed_element6_content_bg_color_callback()
1811 {
1812 printf(
1813 '<p class="description"><input type="text" size="8" id="myfixed_element_content_bg_color" name="mysticky_elements_options6[myfixed_element_content_bg_color]" value="%s" class="my-color-field" /></p>',
1814 isset( $this->options6['myfixed_element_content_bg_color'] ) ? esc_attr( $this->options6['myfixed_element_content_bg_color']) : ''
1815 );
1816 }
1817 public function myfixed_element6_content_txt_color_callback()
1818 {
1819 printf(
1820 '<p class="description"><input type="text" size="8" id="myfixed_element_content_txt_color" name="mysticky_elements_options6[myfixed_element_content_txt_color]" value="%s" class="my-color-field" /></p>',
1821 isset( $this->options6['myfixed_element_content_txt_color'] ) ? esc_attr( $this->options6['myfixed_element_content_txt_color']) : ''
1822 );
1823 }
1824 public function myfixed_element6_content_width_callback()
1825 {
1826 printf(
1827 '<p class="description"><input type="text" size="4" id="myfixed_element_content_width" name="mysticky_elements_options6[myfixed_element_content_width]" value="%s" />px</p>',
1828 isset( $this->options6['myfixed_element_content_width'] ) ? esc_attr( $this->options6['myfixed_element_content_width']) : ''
1829 );
1830 }
1831 public function myfixed_element6_content_padding_callback()
1832 {
1833 printf(
1834 '<p class="description"><input type="text" size="4" id="myfixed_element_content_padding" name="mysticky_elements_options6[myfixed_element_content_padding]" value="%s" />px</p>',
1835 isset( $this->options6['myfixed_element_content_padding'] ) ? esc_attr( $this->options6['myfixed_element_content_padding']) : ''
1836 );
1837 }
1838
1839
1840 public function myfixed_element6_content_callback()
1841
1842 {
1843 $content_id = 'myfixed_element_content';
1844 $content = (isset( $this->options6['myfixed_element_content'] ) ? esc_textarea( $this->options6['myfixed_element_content']) : '');
1845
1846 wp_editor( html_entity_decode($content), $content_id,
1847 array(
1848 'textarea_name' => 'mysticky_elements_options6[myfixed_element_content]',
1849 //'teeny' => true,
1850 //'tinymce' => true,
1851 'textarea_rows' => get_option('default_post_edit_rows', 8)
1852 )
1853 );
1854 }
1855
1856
1857
1858 /* ***** ELEMENT 5 ***** */
1859
1860
1861 public function print_section_info5()
1862 {
1863 esc_html_e('Element 5 Settings.', 'mystickyelements');
1864 }
1865
1866
1867 public function myfixed_element5_enable_callback()
1868 {
1869 printf(
1870 '<select id="myfixed_element_enable" name="mysticky_elements_options5[myfixed_element_enable]" selected="%s">',
1871 isset( $this->options5['myfixed_element_enable'] ) ? esc_attr( $this->options5['myfixed_element_enable']) : ''
1872 );
1873 if ($this->options5['myfixed_element_enable'] == 'enable') {
1874 printf(
1875 '<option name="enable" value="enable" selected>enable</option>
1876 <option name="disable" value="disable">disable</option>
1877 </select>'
1878 );
1879 }
1880 if ($this->options5['myfixed_element_enable'] == 'disable') {
1881 printf(
1882 '<option name="enable" value="enable">enable</option>
1883 <option name="disable" value="disable" selected >disable</option>
1884 </select>'
1885 );
1886 }
1887 if ($this->options5['myfixed_element_enable'] == '') {
1888 printf(
1889 '<option name="enable" value="enable" >enable</option>
1890 <option name="disable" value="disable" selected >disable</option>
1891 </select>'
1892 );
1893 }
1894 }
1895
1896
1897
1898 public function myfixed_element5_side_position_callback()
1899 {
1900 printf(
1901 '<select id="myfixed_element_side_position" name="mysticky_elements_options5[myfixed_element_side_position]" selected="%s">',
1902 isset( $this->options5['myfixed_element_side_position'] ) ? esc_attr( $this->options5['myfixed_element_side_position']) : ''
1903 );
1904 if ($this->options5['myfixed_element_side_position'] == 'left') {
1905 printf(
1906 '<option name="left" value="left" selected>left</option>
1907 <option name="right" value="right">right</option>
1908 </select>'
1909 );
1910 }
1911 if ($this->options5['myfixed_element_side_position'] == 'right') {
1912 printf(
1913 '<option name="left" value="left">left</option>
1914 <option name="right" value="right" selected >right</option>
1915 </select>'
1916 );
1917 }
1918 if ($this->options5['myfixed_element_side_position'] == '') {
1919 printf(
1920 '<option name="left" value="left" selected>left</option>
1921 <option name="right" value="right">right</option>
1922 </select>'
1923 );
1924 }
1925 }
1926 public function myfixed_element5_top_position_callback()
1927 {
1928 printf(
1929 '<p class="description"><input type="text" size="4" id="myfixed_element_top_position" name="mysticky_elements_options5[myfixed_element_top_position]" value="%s" /> px (top position of an element). Please note that Element 1 must be on top of element 2 and so on, otherwise elements will overlap...</p>',
1930 isset( $this->options5['myfixed_element_top_position'] ) ? esc_attr( $this->options5['myfixed_element_top_position']) : ''
1931 );
1932 }
1933 public function myfixed_element5_icon_bg_color_callback()
1934 {
1935 printf(
1936 '<p class="description"><input type="text" size="8" id="myfixed_element_icon_bg_color" name="mysticky_elements_options5[myfixed_element_icon_bg_color]" value="%s" class="my-color-field" /></p>',
1937 isset( $this->options5['myfixed_element_icon_bg_color'] ) ? esc_attr( $this->options5['myfixed_element_icon_bg_color']) : ''
1938 );
1939 }
1940 public function myfixed_element5_icon_bg_img_callback()
1941 {
1942 printf(
1943 '<p class="description"><input type="text" size="28" id="myfixed_element_icon_bg_img" name="mysticky_elements_options5[myfixed_element_icon_bg_img]" value="%s" /> Icon Image.</p>',
1944 isset( $this->options5['myfixed_element_icon_bg_img'] ) ? esc_attr( $this->options5['myfixed_element_icon_bg_img']) : ''
1945 );
1946 }
1947 public function myfixed_element5_content_bg_color_callback()
1948 {
1949 printf(
1950 '<p class="description"><input type="text" size="8" id="myfixed_element_content_bg_color" name="mysticky_elements_options5[myfixed_element_content_bg_color]" value="%s" class="my-color-field" /></p>',
1951 isset( $this->options5['myfixed_element_content_bg_color'] ) ? esc_attr( $this->options5['myfixed_element_content_bg_color']) : ''
1952 );
1953 }
1954 public function myfixed_element5_content_txt_color_callback()
1955 {
1956 printf(
1957 '<p class="description"><input type="text" size="8" id="myfixed_element_content_txt_color" name="mysticky_elements_options5[myfixed_element_content_txt_color]" value="%s" class="my-color-field" /></p>',
1958 isset( $this->options5['myfixed_element_content_txt_color'] ) ? esc_attr( $this->options5['myfixed_element_content_txt_color']) : ''
1959 );
1960 }
1961 public function myfixed_element5_content_width_callback()
1962 {
1963 printf(
1964 '<p class="description"><input type="text" size="4" id="myfixed_element_content_width" name="mysticky_elements_options5[myfixed_element_content_width]" value="%s" />px</p>',
1965 isset( $this->options5['myfixed_element_content_width'] ) ? esc_attr( $this->options5['myfixed_element_content_width']) : ''
1966 );
1967 }
1968 public function myfixed_element5_content_padding_callback()
1969 {
1970 printf(
1971 '<p class="description"><input type="text" size="4" id="myfixed_element_content_padding" name="mysticky_elements_options5[myfixed_element_content_padding]" value="%s" />px</p>',
1972 isset( $this->options5['myfixed_element_content_padding'] ) ? esc_attr( $this->options5['myfixed_element_content_padding']) : ''
1973 );
1974 }
1975
1976
1977 public function myfixed_element5_content_callback()
1978
1979 {
1980 $content_id = 'myfixed_element_content';
1981 $content = (isset( $this->options5['myfixed_element_content'] ) ? esc_textarea( $this->options5['myfixed_element_content']) : '');
1982
1983 wp_editor( html_entity_decode($content), $content_id,
1984 array(
1985 'textarea_name' => 'mysticky_elements_options5[myfixed_element_content]',
1986 //'teeny' => true,
1987 //'tinymce' => true,
1988 'textarea_rows' => get_option('default_post_edit_rows', 8)
1989 )
1990 );
1991 }
1992
1993
1994
1995
1996 /* ***** ELEMENT 6 ***** */
1997
1998
1999 public function print_section_info4()
2000 {
2001 esc_html_e('Element 6 Settings.', 'mystickyelements');
2002 }
2003
2004
2005 public function myfixed_element4_enable_callback()
2006 {
2007 printf(
2008 '<select id="myfixed_element_enable" name="mysticky_elements_options4[myfixed_element_enable]" selected="%s">',
2009 isset( $this->options4['myfixed_element_enable'] ) ? esc_attr( $this->options4['myfixed_element_enable']) : ''
2010 );
2011 if ($this->options4['myfixed_element_enable'] == 'enable') {
2012 printf(
2013 '<option name="enable" value="enable" selected>enable</option>
2014 <option name="disable" value="disable">disable</option>
2015 </select>'
2016 );
2017 }
2018 if ($this->options4['myfixed_element_enable'] == 'disable') {
2019 printf(
2020 '<option name="enable" value="enable">enable</option>
2021 <option name="disable" value="disable" selected >disable</option>
2022 </select>'
2023 );
2024 }
2025 if ($this->options4['myfixed_element_enable'] == '') {
2026 printf(
2027 '<option name="enable" value="enable" >enable</option>
2028 <option name="disable" value="disable" selected >disable</option>
2029 </select>'
2030 );
2031 }
2032 }
2033
2034
2035
2036 public function myfixed_element4_side_position_callback()
2037 {
2038 printf(
2039 '<select id="myfixed_element_side_position" name="mysticky_elements_options4[myfixed_element_side_position]" selected="%s">',
2040 isset( $this->options4['myfixed_element_side_position'] ) ? esc_attr( $this->options4['myfixed_element_side_position']) : ''
2041 );
2042 if ($this->options4['myfixed_element_side_position'] == 'left') {
2043 printf(
2044 '<option name="left" value="left" selected>left</option>
2045 <option name="right" value="right">right</option>
2046 </select>'
2047 );
2048 }
2049 if ($this->options4['myfixed_element_side_position'] == 'right') {
2050 printf(
2051 '<option name="left" value="left">left</option>
2052 <option name="right" value="right" selected >right</option>
2053 </select>'
2054 );
2055 }
2056 if ($this->options4['myfixed_element_side_position'] == '') {
2057 printf(
2058 '<option name="left" value="left" selected>left</option>
2059 <option name="right" value="right">right</option>
2060 </select>'
2061 );
2062 }
2063 }
2064 public function myfixed_element4_top_position_callback()
2065 {
2066 printf(
2067 '<p class="description"><input type="text" size="4" id="myfixed_element_top_position" name="mysticky_elements_options4[myfixed_element_top_position]" value="%s" /> px (top position of an element). Please note that Element 1 must be on top of element 2 and so on, otherwise elements will overlap...</p>',
2068 isset( $this->options4['myfixed_element_top_position'] ) ? esc_attr( $this->options4['myfixed_element_top_position']) : ''
2069 );
2070 }
2071 public function myfixed_element4_icon_bg_color_callback()
2072 {
2073 printf(
2074 '<p class="description"><input type="text" size="8" id="myfixed_element_icon_bg_color" name="mysticky_elements_options4[myfixed_element_icon_bg_color]" value="%s" class="my-color-field" /></p>',
2075 isset( $this->options4['myfixed_element_icon_bg_color'] ) ? esc_attr( $this->options4['myfixed_element_icon_bg_color']) : ''
2076 );
2077 }
2078 public function myfixed_element4_icon_bg_img_callback()
2079 {
2080 printf(
2081 '<p class="description"><input type="text" size="28" id="myfixed_element_icon_bg_img" name="mysticky_elements_options4[myfixed_element_icon_bg_img]" value="%s" /> Icon Image.</p>',
2082 isset( $this->options4['myfixed_element_icon_bg_img'] ) ? esc_attr( $this->options4['myfixed_element_icon_bg_img']) : ''
2083 );
2084 }
2085 public function myfixed_element4_content_bg_color_callback()
2086 {
2087 printf(
2088 '<p class="description"><input type="text" size="8" id="myfixed_element_content_bg_color" name="mysticky_elements_options4[myfixed_element_content_bg_color]" value="%s" class="my-color-field" /></p>',
2089 isset( $this->options4['myfixed_element_content_bg_color'] ) ? esc_attr( $this->options4['myfixed_element_content_bg_color']) : ''
2090 );
2091 }
2092 public function myfixed_element4_content_txt_color_callback()
2093 {
2094 printf(
2095 '<p class="description"><input type="text" size="8" id="myfixed_element_content_txt_color" name="mysticky_elements_options4[myfixed_element_content_txt_color]" value="%s" class="my-color-field" /></p>',
2096 isset( $this->options4['myfixed_element_content_txt_color'] ) ? esc_attr( $this->options4['myfixed_element_content_txt_color']) : ''
2097 );
2098 }
2099 public function myfixed_element4_content_width_callback()
2100 {
2101 printf(
2102 '<p class="description"><input type="text" size="4" id="myfixed_element_content_width" name="mysticky_elements_options4[myfixed_element_content_width]" value="%s" />px</p>',
2103 isset( $this->options4['myfixed_element_content_width'] ) ? esc_attr( $this->options4['myfixed_element_content_width']) : ''
2104 );
2105 }
2106 public function myfixed_element4_content_padding_callback()
2107 {
2108 printf(
2109 '<p class="description"><input type="text" size="4" id="myfixed_element_content_padding" name="mysticky_elements_options4[myfixed_element_content_padding]" value="%s" />px</p>',
2110 isset( $this->options4['myfixed_element_content_padding'] ) ? esc_attr( $this->options4['myfixed_element_content_padding']) : ''
2111 );
2112 }
2113
2114
2115 public function myfixed_element4_content_callback()
2116
2117 {
2118 $content_id = 'myfixed_element_content';
2119 $content = (isset( $this->options4['myfixed_element_content'] ) ? esc_textarea( $this->options4['myfixed_element_content']) : '');
2120
2121 wp_editor( html_entity_decode($content), $content_id,
2122 array(
2123 'textarea_name' => 'mysticky_elements_options4[myfixed_element_content]',
2124 //'teeny' => true,
2125 //'tinymce' => true,
2126 'textarea_rows' => get_option('default_post_edit_rows', 8)
2127 )
2128 );
2129 }
2130
2131
2132 /* ***** ELEMENT 7 ***** */
2133
2134
2135 public function print_section_info3()
2136 {
2137 esc_html_e('Element 7 Settings.', 'mystickyelements');
2138 }
2139
2140
2141 public function myfixed_element3_enable_callback()
2142 {
2143 printf(
2144 '<select id="myfixed_element_enable" name="mysticky_elements_options3[myfixed_element_enable]" selected="%s">',
2145 isset( $this->options3['myfixed_element_enable'] ) ? esc_attr( $this->options3['myfixed_element_enable']) : ''
2146 );
2147 if ($this->options3['myfixed_element_enable'] == 'enable') {
2148 printf(
2149 '<option name="enable" value="enable" selected>enable</option>
2150 <option name="disable" value="disable">disable</option>
2151 </select>'
2152 );
2153 }
2154 if ($this->options3['myfixed_element_enable'] == 'disable') {
2155 printf(
2156 '<option name="enable" value="enable">enable</option>
2157 <option name="disable" value="disable" selected >disable</option>
2158 </select>'
2159 );
2160 }
2161 if ($this->options3['myfixed_element_enable'] == '') {
2162 printf(
2163 '<option name="enable" value="enable" >enable</option>
2164 <option name="disable" value="disable" selected >disable</option>
2165 </select>'
2166 );
2167 }
2168 }
2169
2170
2171
2172 public function myfixed_element3_side_position_callback()
2173 {
2174 printf(
2175 '<select id="myfixed_element_side_position" name="mysticky_elements_options3[myfixed_element_side_position]" selected="%s">',
2176 isset( $this->options3['myfixed_element_side_position'] ) ? esc_attr( $this->options3['myfixed_element_side_position']) : ''
2177 );
2178 if ($this->options3['myfixed_element_side_position'] == 'left') {
2179 printf(
2180 '<option name="left" value="left" selected>left</option>
2181 <option name="right" value="right">right</option>
2182 </select>'
2183 );
2184 }
2185 if ($this->options3['myfixed_element_side_position'] == 'right') {
2186 printf(
2187 '<option name="left" value="left">left</option>
2188 <option name="right" value="right" selected >right</option>
2189 </select>'
2190 );
2191 }
2192 if ($this->options3['myfixed_element_side_position'] == '') {
2193 printf(
2194 '<option name="left" value="left" selected>left</option>
2195 <option name="right" value="right">right</option>
2196 </select>'
2197 );
2198 }
2199 }
2200 public function myfixed_element3_top_position_callback()
2201 {
2202 printf(
2203 '<p class="description"><input type="text" size="4" id="myfixed_element_top_position" name="mysticky_elements_options3[myfixed_element_top_position]" value="%s" /> px (top position of an element). Please note that Element 1 must be on top of element 2 and so on, otherwise elements will overlap...</p>',
2204 isset( $this->options3['myfixed_element_top_position'] ) ? esc_attr( $this->options3['myfixed_element_top_position']) : ''
2205 );
2206 }
2207 public function myfixed_element3_icon_bg_color_callback()
2208 {
2209 printf(
2210 '<p class="description"><input type="text" size="8" id="myfixed_element_icon_bg_color" name="mysticky_elements_options3[myfixed_element_icon_bg_color]" value="%s" class="my-color-field" /></p>',
2211 isset( $this->options3['myfixed_element_icon_bg_color'] ) ? esc_attr( $this->options3['myfixed_element_icon_bg_color']) : ''
2212 );
2213 }
2214 public function myfixed_element3_icon_bg_img_callback()
2215 {
2216 printf(
2217 '<p class="description"><input type="text" size="28" id="myfixed_element_icon_bg_img" name="mysticky_elements_options3[myfixed_element_icon_bg_img]" value="%s" /> Icon Image.</p>',
2218 isset( $this->options3['myfixed_element_icon_bg_img'] ) ? esc_attr( $this->options3['myfixed_element_icon_bg_img']) : ''
2219 );
2220 }
2221 public function myfixed_element3_content_bg_color_callback()
2222 {
2223 printf(
2224 '<p class="description"><input type="text" size="8" id="myfixed_element_content_bg_color" name="mysticky_elements_options3[myfixed_element_content_bg_color]" value="%s" class="my-color-field" /></p>',
2225 isset( $this->options3['myfixed_element_content_bg_color'] ) ? esc_attr( $this->options3['myfixed_element_content_bg_color']) : ''
2226 );
2227 }
2228 public function myfixed_element3_content_txt_color_callback()
2229 {
2230 printf(
2231 '<p class="description"><input type="text" size="8" id="myfixed_element_content_txt_color" name="mysticky_elements_options3[myfixed_element_content_txt_color]" value="%s" class="my-color-field" /></p>',
2232 isset( $this->options3['myfixed_element_content_txt_color'] ) ? esc_attr( $this->options3['myfixed_element_content_txt_color']) : ''
2233 );
2234 }
2235 public function myfixed_element3_content_width_callback()
2236 {
2237 printf(
2238 '<p class="description"><input type="text" size="4" id="myfixed_element_content_width" name="mysticky_elements_options3[myfixed_element_content_width]" value="%s" />px</p>',
2239 isset( $this->options3['myfixed_element_content_width'] ) ? esc_attr( $this->options3['myfixed_element_content_width']) : ''
2240 );
2241 }
2242 public function myfixed_element3_content_padding_callback()
2243 {
2244 printf(
2245 '<p class="description"><input type="text" size="4" id="myfixed_element_content_padding" name="mysticky_elements_options3[myfixed_element_content_padding]" value="%s" />px</p>',
2246 isset( $this->options3['myfixed_element_content_padding'] ) ? esc_attr( $this->options3['myfixed_element_content_padding']) : ''
2247 );
2248 }
2249
2250
2251 public function myfixed_element3_content_callback()
2252
2253 {
2254 $content_id = 'myfixed_element_content';
2255 $content = (isset( $this->options3['myfixed_element_content'] ) ? esc_textarea( $this->options3['myfixed_element_content']) : '');
2256
2257 wp_editor( html_entity_decode($content), $content_id,
2258 array(
2259 'textarea_name' => 'mysticky_elements_options3[myfixed_element_content]',
2260 //'teeny' => true,
2261 //'tinymce' => true,
2262 'textarea_rows' => get_option('default_post_edit_rows', 8)
2263 )
2264 );
2265 }
2266
2267
2268 /* ***** ELEMENT 8 ***** */
2269
2270
2271 public function print_section_info2()
2272 {
2273 esc_html_e('Element 8 Settings.', 'mystickyelements');
2274 }
2275
2276
2277 public function myfixed_element2_enable_callback()
2278 {
2279 printf(
2280 '<select id="myfixed_element_enable" name="mysticky_elements_options2[myfixed_element_enable]" selected="%s">',
2281 isset( $this->options2['myfixed_element_enable'] ) ? esc_attr( $this->options2['myfixed_element_enable']) : ''
2282 );
2283 if ($this->options2['myfixed_element_enable'] == 'enable') {
2284 printf(
2285 '<option name="enable" value="enable" selected>enable</option>
2286 <option name="disable" value="disable">disable</option>
2287 </select>'
2288 );
2289 }
2290 if ($this->options2['myfixed_element_enable'] == 'disable') {
2291 printf(
2292 '<option name="enable" value="enable">enable</option>
2293 <option name="disable" value="disable" selected >disable</option>
2294 </select>'
2295 );
2296 }
2297 if ($this->options2['myfixed_element_enable'] == '') {
2298 printf(
2299 '<option name="enable" value="enable" >enable</option>
2300 <option name="disable" value="disable" selected >disable</option>
2301 </select>'
2302 );
2303 }
2304 }
2305
2306
2307
2308 public function myfixed_element2_side_position_callback()
2309 {
2310 printf(
2311 '<select id="myfixed_element_side_position" name="mysticky_elements_options2[myfixed_element_side_position]" selected="%s">',
2312 isset( $this->options2['myfixed_element_side_position'] ) ? esc_attr( $this->options2['myfixed_element_side_position']) : ''
2313 );
2314 if ($this->options2['myfixed_element_side_position'] == 'left') {
2315 printf(
2316 '<option name="left" value="left" selected>left</option>
2317 <option name="right" value="right">right</option>
2318 </select>'
2319 );
2320 }
2321 if ($this->options2['myfixed_element_side_position'] == 'right') {
2322 printf(
2323 '<option name="left" value="left">left</option>
2324 <option name="right" value="right" selected >right</option>
2325 </select>'
2326 );
2327 }
2328 if ($this->options2['myfixed_element_side_position'] == '') {
2329 printf(
2330 '<option name="left" value="left" selected>left</option>
2331 <option name="right" value="right">right</option>
2332 </select>'
2333 );
2334 }
2335 }
2336 public function myfixed_element2_top_position_callback()
2337 {
2338 printf(
2339 '<p class="description"><input type="text" size="4" id="myfixed_element_top_position" name="mysticky_elements_options2[myfixed_element_top_position]" value="%s" /> px (top position of an element). Please note that Element 1 must be on top of element 2 and so on, otherwise elements will overlap...</p>',
2340 isset( $this->options2['myfixed_element_top_position'] ) ? esc_attr( $this->options2['myfixed_element_top_position']) : ''
2341 );
2342 }
2343 public function myfixed_element2_icon_bg_color_callback()
2344 {
2345 printf(
2346 '<p class="description"><input type="text" size="8" id="myfixed_element_icon_bg_color" name="mysticky_elements_options2[myfixed_element_icon_bg_color]" value="%s" class="my-color-field" /></p>',
2347 isset( $this->options2['myfixed_element_icon_bg_color'] ) ? esc_attr( $this->options2['myfixed_element_icon_bg_color']) : ''
2348 );
2349 }
2350 public function myfixed_element2_icon_bg_img_callback()
2351 {
2352 printf(
2353 '<p class="description"><input type="text" size="28" id="myfixed_element_icon_bg_img" name="mysticky_elements_options2[myfixed_element_icon_bg_img]" value="%s" /> Icon Image.</p>',
2354 isset( $this->options2['myfixed_element_icon_bg_img'] ) ? esc_attr( $this->options2['myfixed_element_icon_bg_img']) : ''
2355 );
2356 }
2357 public function myfixed_element2_content_bg_color_callback()
2358 {
2359 printf(
2360 '<p class="description"><input type="text" size="8" id="myfixed_element_content_bg_color" name="mysticky_elements_options2[myfixed_element_content_bg_color]" value="%s" class="my-color-field" /></p>',
2361 isset( $this->options2['myfixed_element_content_bg_color'] ) ? esc_attr( $this->options2['myfixed_element_content_bg_color']) : ''
2362 );
2363 }
2364 public function myfixed_element2_content_txt_color_callback()
2365 {
2366 printf(
2367 '<p class="description"><input type="text" size="8" id="myfixed_element_content_txt_color" name="mysticky_elements_options2[myfixed_element_content_txt_color]" value="%s" class="my-color-field" /></p>',
2368 isset( $this->options2['myfixed_element_content_txt_color'] ) ? esc_attr( $this->options2['myfixed_element_content_txt_color']) : ''
2369 );
2370 }
2371 public function myfixed_element2_content_width_callback()
2372 {
2373 printf(
2374 '<p class="description"><input type="text" size="4" id="myfixed_element_content_width" name="mysticky_elements_options2[myfixed_element_content_width]" value="%s" />px</p>',
2375 isset( $this->options2['myfixed_element_content_width'] ) ? esc_attr( $this->options2['myfixed_element_content_width']) : ''
2376 );
2377 }
2378 public function myfixed_element2_content_padding_callback()
2379 {
2380 printf(
2381 '<p class="description"><input type="text" size="4" id="myfixed_element_content_padding" name="mysticky_elements_options2[myfixed_element_content_padding]" value="%s" />px</p>',
2382 isset( $this->options2['myfixed_element_content_padding'] ) ? esc_attr( $this->options2['myfixed_element_content_padding']) : ''
2383 );
2384 }
2385
2386
2387 public function myfixed_element2_content_callback()
2388
2389 {
2390 $content_id = 'myfixed_element_content';
2391 $content = (isset( $this->options2['myfixed_element_content'] ) ? esc_textarea( $this->options2['myfixed_element_content']) : '');
2392
2393 wp_editor( html_entity_decode($content), $content_id,
2394 array(
2395 'textarea_name' => 'mysticky_elements_options2[myfixed_element_content]',
2396 //'teeny' => true,
2397 //'tinymce' => true,
2398 'textarea_rows' => get_option('default_post_edit_rows', 8)
2399 )
2400 );
2401 }
2402
2403
2404
2405
2406 /* ***** ELEMENT 9 ***** */
2407
2408
2409 public function print_section_info1()
2410 {
2411 esc_html_e('Element 9 Settings.', 'mystickyelements');
2412 }
2413
2414
2415 public function myfixed_element1_enable_callback()
2416 {
2417 printf(
2418 '<select id="myfixed_element_enable" name="mysticky_elements_options1[myfixed_element_enable]" selected="%s">',
2419 isset( $this->options1['myfixed_element_enable'] ) ? esc_attr( $this->options1['myfixed_element_enable']) : ''
2420 );
2421 if ($this->options1['myfixed_element_enable'] == 'enable') {
2422 printf(
2423 '<option name="enable" value="enable" selected>enable</option>
2424 <option name="disable" value="disable">disable</option>
2425 </select>'
2426 );
2427 }
2428 if ($this->options1['myfixed_element_enable'] == 'disable') {
2429 printf(
2430 '<option name="enable" value="enable">enable</option>
2431 <option name="disable" value="disable" selected >disable</option>
2432 </select>'
2433 );
2434 }
2435 if ($this->options1['myfixed_element_enable'] == '') {
2436 printf(
2437 '<option name="enable" value="enable" >enable</option>
2438 <option name="disable" value="disable" selected >disable</option>
2439 </select>'
2440 );
2441 }
2442 }
2443
2444
2445
2446 public function myfixed_element1_side_position_callback()
2447 {
2448 printf(
2449 '<select id="myfixed_element_side_position" name="mysticky_elements_options1[myfixed_element_side_position]" selected="%s">',
2450 isset( $this->options1['myfixed_element_side_position'] ) ? esc_attr( $this->options1['myfixed_element_side_position']) : ''
2451 );
2452 if ($this->options1['myfixed_element_side_position'] == 'left') {
2453 printf(
2454 '<option name="left" value="left" selected>left</option>
2455 <option name="right" value="right">right</option>
2456 </select>'
2457 );
2458 }
2459 if ($this->options1['myfixed_element_side_position'] == 'right') {
2460 printf(
2461 '<option name="left" value="left">left</option>
2462 <option name="right" value="right" selected >right</option>
2463 </select>'
2464 );
2465 }
2466 if ($this->options1['myfixed_element_side_position'] == '') {
2467 printf(
2468 '<option name="left" value="left" selected>left</option>
2469 <option name="right" value="right">right</option>
2470 </select>'
2471 );
2472 }
2473 }
2474 public function myfixed_element1_top_position_callback()
2475 {
2476 printf(
2477 '<p class="description"><input type="text" size="4" id="myfixed_element_top_position" name="mysticky_elements_options1[myfixed_element_top_position]" value="%s" /> px (top position of an element). Please note that Element 1 must be on top of element 2 and so on, otherwise elements will overlap...</p>',
2478 isset( $this->options1['myfixed_element_top_position'] ) ? esc_attr( $this->options1['myfixed_element_top_position']) : ''
2479 );
2480 }
2481 public function myfixed_element1_icon_bg_color_callback()
2482 {
2483 printf(
2484 '<p class="description"><input type="text" size="8" id="myfixed_element_icon_bg_color" name="mysticky_elements_options1[myfixed_element_icon_bg_color]" value="%s" class="my-color-field" /></p>',
2485 isset( $this->options1['myfixed_element_icon_bg_color'] ) ? esc_attr( $this->options1['myfixed_element_icon_bg_color']) : ''
2486 );
2487 }
2488 public function myfixed_element1_icon_bg_img_callback()
2489 {
2490 printf(
2491 '<p class="description"><input type="text" size="28" id="myfixed_element_icon_bg_img" name="mysticky_elements_options1[myfixed_element_icon_bg_img]" value="%s" /> Icon Image.</p>',
2492 isset( $this->options1['myfixed_element_icon_bg_img'] ) ? esc_attr( $this->options1['myfixed_element_icon_bg_img']) : ''
2493 );
2494 }
2495 public function myfixed_element1_content_bg_color_callback()
2496 {
2497 printf(
2498 '<p class="description"><input type="text" size="8" id="myfixed_element_content_bg_color" name="mysticky_elements_options1[myfixed_element_content_bg_color]" value="%s" class="my-color-field" /></p>',
2499 isset( $this->options1['myfixed_element_content_bg_color'] ) ? esc_attr( $this->options1['myfixed_element_content_bg_color']) : ''
2500 );
2501 }
2502 public function myfixed_element1_content_txt_color_callback()
2503 {
2504 printf(
2505 '<p class="description"><input type="text" size="8" id="myfixed_element_content_txt_color" name="mysticky_elements_options1[myfixed_element_content_txt_color]" value="%s" class="my-color-field" /></p>',
2506 isset( $this->options1['myfixed_element_content_txt_color'] ) ? esc_attr( $this->options1['myfixed_element_content_txt_color']) : ''
2507 );
2508 }
2509 public function myfixed_element1_content_width_callback()
2510 {
2511 printf(
2512 '<p class="description"><input type="text" size="4" id="myfixed_element_content_width" name="mysticky_elements_options1[myfixed_element_content_width]" value="%s" />px</p>',
2513 isset( $this->options1['myfixed_element_content_width'] ) ? esc_attr( $this->options1['myfixed_element_content_width']) : ''
2514 );
2515 }
2516 public function myfixed_element1_content_padding_callback()
2517 {
2518 printf(
2519 '<p class="description"><input type="text" size="4" id="myfixed_element_content_padding" name="mysticky_elements_options1[myfixed_element_content_padding]" value="%s" />px</p>',
2520 isset( $this->options1['myfixed_element_content_padding'] ) ? esc_attr( $this->options1['myfixed_element_content_padding']) : ''
2521 );
2522 }
2523
2524
2525 public function myfixed_element1_content_callback()
2526
2527 {
2528 $content_id = 'myfixed_element_content';
2529 $content = (isset( $this->options1['myfixed_element_content'] ) ? esc_textarea( $this->options1['myfixed_element_content']) : '');
2530
2531 wp_editor( html_entity_decode($content), $content_id,
2532 array(
2533 'textarea_name' => 'mysticky_elements_options1[myfixed_element_content]',
2534 //'teeny' => true,
2535 //'tinymce' => true,
2536 'textarea_rows' => get_option('default_post_edit_rows', 8)
2537 )
2538 );
2539 }
2540
2541
2542
2543 /* ***** ELEMENT 10 ***** */
2544
2545
2546 public function print_section_info0()
2547 {
2548 esc_html_e('Element 10 Settings.', 'mystickyelements');
2549 }
2550
2551
2552 public function myfixed_element0_enable_callback()
2553 {
2554 printf(
2555 '<select id="myfixed_element_enable" name="mysticky_elements_options0[myfixed_element_enable]" selected="%s">',
2556 isset( $this->options0['myfixed_element_enable'] ) ? esc_attr( $this->options0['myfixed_element_enable']) : ''
2557 );
2558 if ($this->options0['myfixed_element_enable'] == 'enable') {
2559 printf(
2560 '<option name="enable" value="enable" selected>enable</option>
2561 <option name="disable" value="disable">disable</option>
2562 </select>'
2563 );
2564 }
2565 if ($this->options0['myfixed_element_enable'] == 'disable') {
2566 printf(
2567 '<option name="enable" value="enable">enable</option>
2568 <option name="disable" value="disable" selected >disable</option>
2569 </select>'
2570 );
2571 }
2572 if ($this->options0['myfixed_element_enable'] == '') {
2573 printf(
2574 '<option name="enable" value="enable" >enable</option>
2575 <option name="disable" value="disable" selected >disable</option>
2576 </select>'
2577 );
2578 }
2579 }
2580
2581
2582
2583 public function myfixed_element0_side_position_callback()
2584 {
2585 printf(
2586 '<select id="myfixed_element_side_position" name="mysticky_elements_options0[myfixed_element_side_position]" selected="%s">',
2587 isset( $this->options0['myfixed_element_side_position'] ) ? esc_attr( $this->options0['myfixed_element_side_position']) : ''
2588 );
2589 if ($this->options0['myfixed_element_side_position'] == 'left') {
2590 printf(
2591 '<option name="left" value="left" selected>left</option>
2592 <option name="right" value="right">right</option>
2593 </select>'
2594 );
2595 }
2596 if ($this->options0['myfixed_element_side_position'] == 'right') {
2597 printf(
2598 '<option name="left" value="left">left</option>
2599 <option name="right" value="right" selected >right</option>
2600 </select>'
2601 );
2602 }
2603 if ($this->options0['myfixed_element_side_position'] == '') {
2604 printf(
2605 '<option name="left" value="left" selected>left</option>
2606 <option name="right" value="right">right</option>
2607 </select>'
2608 );
2609 }
2610 }
2611 public function myfixed_element0_top_position_callback()
2612 {
2613 printf(
2614 '<p class="description"><input type="text" size="4" id="myfixed_element_top_position" name="mysticky_elements_options0[myfixed_element_top_position]" value="%s" /> px (top position of an element). Please note that Element 1 must be on top of element 2 and so on, otherwise elements will overlap...</p>',
2615 isset( $this->options0['myfixed_element_top_position'] ) ? esc_attr( $this->options0['myfixed_element_top_position']) : ''
2616 );
2617 }
2618 public function myfixed_element0_icon_bg_color_callback()
2619 {
2620 printf(
2621 '<p class="description"><input type="text" size="8" id="myfixed_element_icon_bg_color" name="mysticky_elements_options0[myfixed_element_icon_bg_color]" value="%s" class="my-color-field" /></p>',
2622 isset( $this->options0['myfixed_element_icon_bg_color'] ) ? esc_attr( $this->options0['myfixed_element_icon_bg_color']) : ''
2623 );
2624 }
2625 public function myfixed_element0_icon_bg_img_callback()
2626 {
2627 printf(
2628 '<p class="description"><input type="text" size="28" id="myfixed_element_icon_bg_img" name="mysticky_elements_options0[myfixed_element_icon_bg_img]" value="%s" /> Icon Image.</p>',
2629 isset( $this->options0['myfixed_element_icon_bg_img'] ) ? esc_attr( $this->options0['myfixed_element_icon_bg_img']) : ''
2630 );
2631 }
2632 public function myfixed_element0_content_bg_color_callback()
2633 {
2634 printf(
2635 '<p class="description"><input type="text" size="8" id="myfixed_element_content_bg_color" name="mysticky_elements_options0[myfixed_element_content_bg_color]" value="%s" class="my-color-field" /></p>',
2636 isset( $this->options0['myfixed_element_content_bg_color'] ) ? esc_attr( $this->options0['myfixed_element_content_bg_color']) : ''
2637 );
2638 }
2639 public function myfixed_element0_content_txt_color_callback()
2640 {
2641 printf(
2642 '<p class="description"><input type="text" size="8" id="myfixed_element_content_txt_color" name="mysticky_elements_options0[myfixed_element_content_txt_color]" value="%s" class="my-color-field" /></p>',
2643 isset( $this->options0['myfixed_element_content_txt_color'] ) ? esc_attr( $this->options0['myfixed_element_content_txt_color']) : ''
2644 );
2645 }
2646 public function myfixed_element0_content_width_callback()
2647 {
2648 printf(
2649 '<p class="description"><input type="text" size="4" id="myfixed_element_content_width" name="mysticky_elements_options0[myfixed_element_content_width]" value="%s" />px</p>',
2650 isset( $this->options0['myfixed_element_content_width'] ) ? esc_attr( $this->options0['myfixed_element_content_width']) : ''
2651 );
2652 }
2653 public function myfixed_element0_content_padding_callback()
2654 {
2655 printf(
2656 '<p class="description"><input type="text" size="4" id="myfixed_element_content_padding" name="mysticky_elements_options0[myfixed_element_content_padding]" value="%s" />px</p>',
2657 isset( $this->options0['myfixed_element_content_padding'] ) ? esc_attr( $this->options0['myfixed_element_content_padding']) : ''
2658 );
2659 }
2660
2661
2662 public function myfixed_element0_content_callback()
2663
2664 {
2665 $content_id = 'myfixed_element_content';
2666 $content = (isset( $this->options0['myfixed_element_content'] ) ? esc_textarea( $this->options0['myfixed_element_content']) : '');
2667
2668 wp_editor( html_entity_decode($content), $content_id,
2669 array(
2670 'textarea_name' => 'mysticky_elements_options0[myfixed_element_content]',
2671 //'teeny' => true,
2672 //'tinymce' => true,
2673 'textarea_rows' => get_option('default_post_edit_rows', 8)
2674 )
2675 );
2676 }
2677
2678
2679
2680
2681
2682
2683
2684 }
2685
2686
2687 // end plugin admin settings
2688
2689
2690
2691
2692
2693 // Create style from options
2694
2695 function mysticky_element_build_stylesheet_content() {
2696
2697 $mysticky_options = get_option( 'mysticky_elements_options' );
2698
2699
2700 echo
2701 '<style type="text/css">';
2702 if ( $mysticky_options['myfixed_cssstyle'] == "" ) {
2703 echo '';
2704 }
2705 echo
2706 $mysticky_options ['myfixed_cssstyle'] ;
2707
2708 if ($mysticky_options ['myfixed_disable_small_screen'] > 0 ){
2709 echo
2710 '
2711 @media only screen and (max-width: ' . esc_attr($mysticky_options ['myfixed_disable_small_screen']) . 'px) { .mysticky-block-left, .mysticky-block-right { display: none; } }
2712 ';
2713
2714 }
2715 echo
2716 '</style>
2717 ';
2718 }
2719
2720
2721
2722
2723 function insert_my_footerrr() {
2724
2725 $mysticky_options0 = get_option( 'mysticky_elements_options0' );
2726 $mysticky_options1 = get_option( 'mysticky_elements_options1' );
2727 $mysticky_options2 = get_option( 'mysticky_elements_options2' );
2728 $mysticky_options3 = get_option( 'mysticky_elements_options3' );
2729 $mysticky_options4 = get_option( 'mysticky_elements_options4' );
2730 $mysticky_options5 = get_option( 'mysticky_elements_options5' );
2731 $mysticky_options6 = get_option( 'mysticky_elements_options6' );
2732 $mysticky_options7 = get_option( 'mysticky_elements_options7' );
2733 $mysticky_options8 = get_option( 'mysticky_elements_options8' );
2734 $mysticky_options9 = get_option( 'mysticky_elements_options9' );
2735
2736 $mysticky_options_arr = array($mysticky_options0, $mysticky_options1, $mysticky_options2, $mysticky_options3, $mysticky_options4, $mysticky_options5, $mysticky_options6, $mysticky_options7, $mysticky_options8, $mysticky_options9);
2737
2738 foreach ($mysticky_options_arr as &$mysticky_option) {
2739
2740 //$mysticky_option
2741 if ($mysticky_option ['myfixed_element_enable'] == "enable") {
2742
2743 $plugins_url = plugins_url();
2744
2745 echo '
2746 <div class="mysticky-block-' . esc_attr($mysticky_option ['myfixed_element_side_position']) . '" style="width: ' . esc_attr($mysticky_option ['myfixed_element_content_width']) . 'px; ' . esc_attr($mysticky_option ['myfixed_element_side_position']) . ': -' . esc_attr($mysticky_option ['myfixed_element_content_width']) . 'px; top: ' . esc_attr($mysticky_option ['myfixed_element_top_position']) . 'px; position: fixed; background:' . esc_attr($mysticky_option ['myfixed_element_content_bg_color']) . ';">
2747 <div class="mysticky-block-icon" style="background-color:' . esc_attr($mysticky_option ['myfixed_element_icon_bg_color']) . '; background-image: url(' . plugins_url( ''. esc_attr($mysticky_option ['myfixed_element_icon_bg_img']) . '', __FILE__ ) . ');"></div>
2748 <div class="mysticky-block-content" style="min-height: 50px; color:' . esc_attr($mysticky_option ['myfixed_element_content_txt_color']) . '; padding: ' . esc_attr($mysticky_option ['myfixed_element_content_padding']) . 'px;">' . do_shortcode ($mysticky_option ['myfixed_element_content'] ) . '</div>
2749
2750 </div>
2751 ';
2752 }; // endif
2753
2754
2755 if ($mysticky_option ['myfixed_element_enable'] == "disable") {
2756
2757 echo '';
2758 }; // endif
2759
2760
2761 }
2762
2763 unset($mysticky_options_arr); // break the reference with the last element
2764
2765 }
2766
2767
2768
2769 function mystickyelements_script() {
2770
2771 $mysticky_options = get_option( 'mysticky_elements_options' );
2772
2773 $min = MSE_DEV_MODE ? '' : '.min';
2774
2775 if( wp_script_is( 'jquery' ) ) {
2776 // do nothing
2777 } else {
2778 wp_enqueue_script( 'jquery' );
2779 }
2780 //wp_enqueue_script( 'mystickyelements', 'https://code.jquery.com/jquery-3.5.0.js',false,'1.0.0', true );
2781 wp_register_script('mystickyelements', WP_PLUGIN_URL. '/mystickyelements/js/mystickyelements'.esc_attr($min).'.js', false,'1.0.0', true);
2782 wp_enqueue_script( 'mystickyelements' );
2783
2784 // Localize mystickyelements.js script with myStickyElements options
2785 $mysticky_translation_array = array(
2786 'myfixed_click_string' => $mysticky_options['myfixed_click'] ,
2787 /* 'mysticky_active_on_height_string' => $mysticky_options['mysticky_active_on_height'],*/
2788 'mysticky_disable_at_width_string' => $mysticky_options['myfixed_disable_small_screen'],
2789
2790 );
2791
2792 wp_localize_script( 'mystickyelements', 'mysticky_element', $mysticky_translation_array );
2793 }
2794
2795
2796
2797
2798 if ( !function_exists( 'mystickyelement_activate' )) {
2799 function mystickyelement_activate() {
2800 global $wpdb;
2801 require_once( ABSPATH . 'wp-admin/includes/upgrade.php');
2802 $charset_collate = $wpdb->get_charset_collate();
2803
2804 $contact_lists_table = $wpdb->prefix . 'mystickyelement_contact_lists';
2805 if ($wpdb->get_var("show tables like '$contact_lists_table'") != $contact_lists_table) {
2806
2807 $contact_lists_table_sql = "CREATE TABLE $contact_lists_table (
2808 ID int(11) NOT NULL AUTO_INCREMENT,
2809 contact_name varchar(255) NULL,
2810 contact_phone varchar(255) NULL,
2811 contact_email varchar(255) NULL,
2812 contact_message text NULL,
2813 contact_option varchar(255) NULL,
2814 message_date DATETIME NOT NULL default '0000-00-00 00:00:00',
2815 PRIMARY KEY (ID)
2816 ) $charset_collate;";
2817 dbDelta($contact_lists_table_sql);
2818 }
2819
2820 if ( get_option('mystickyelements-contact-form') == false ) {
2821 $contact_form = array(
2822 'enable' => 1,
2823 'name' => 1,
2824 'name_require' => '',
2825 'name_value' => '',
2826 'phone' => 1,
2827 'phone_require' => 1,
2828 'phone_value' => '',
2829 'email' => 1,
2830 'email_require' => 1,
2831 'email_value' => '',
2832 'message' => 1,
2833 'message_value' => '',
2834 'dropdown' => '',
2835 'dropdown_require' => '',
2836 'submit_button_background_color'=> '#7761DF',
2837 'submit_button_text_color' => '#FFFFFF',
2838 'submit_button_text' => 'Submit',
2839 'desktop' => 1,
2840 'mobile' => 1,
2841 'direction' => 'LTR',
2842 'tab_background_color' => '#7761DF',
2843 'tab_text_color' => '#FFFFFF',
2844 'headine_text_color' => '#7761DF',
2845 'text_in_tab' => 'Contact Us',
2846 'send_leads' => 'database',
2847 'sent_to_mail' => '',
2848 'form_css' => '' ,
2849 'contact_title_text' => 'Contact Form',
2850 );
2851
2852 //update_option( 'mystickyelements-contact-form', $contact_form);
2853 }
2854
2855 if ( get_option('mystickyelements-social-channels') == false ) {
2856 $social_channels = array(
2857 'enable' => 1,
2858 'whatsapp' => 1,
2859 //'facebook_messenger'=> 1,
2860 );
2861
2862 //update_option( 'mystickyelements-social-channels', $social_channels);
2863 }
2864 if ( get_option('mystickyelements-social-channels-tabs') == false ) {
2865 $social_channels_tabs['whatsapp'] = array(
2866 'text' => "",
2867 'hover_text' => "WhatsApp",
2868 'bg_color' => "#26D367",
2869 'desktop' => 1,
2870 'mobile' => 1,
2871 );
2872 /*
2873 $social_channels_tabs['facebook_messenger'] = array(
2874 'text' => "",
2875 'hover_text' => "Facebook Messenger",
2876 'bg_color' => "#007FF7",
2877 'desktop' => 1,
2878 'mobile' => 1,
2879 );
2880 */
2881 //update_option( 'mystickyelements-social-channels-tabs', $social_channels_tabs);
2882 }
2883
2884 if ( get_option('mystickyelements-general-settings') == false ) {
2885 $general_settings = array(
2886 'position' => 'left',
2887 'position_mobile' => 'left',
2888 'open_tabs_when' => 'hover',
2889 'mobile_behavior' => 'disable',
2890 'flyout' => 'disable',
2891 'custom_position' => '',
2892 'tabs_css' => '',
2893 'minimize_tab' => '1',
2894 'on_load_when' => 'open',
2895 'minimize_tab_background_color' => '#000000',
2896 'page_settings' => '',
2897 'placeholder_color' => '#4F4F4F',
2898 );
2899
2900 //update_option( 'mystickyelements-general-settings', $general_settings);
2901 }
2902
2903 $mystickyelements_popup_status = get_option( 'mystickyelements_intro_popup' );
2904 if( ( $mystickyelements_popup_status === false || empty( $mystickyelements_popup_status ) ) && !isset($_GET['update_version']) ) {
2905 add_option( 'mystickyelements_intro_popup', 'show' );
2906 }
2907
2908 update_option( 'mystickyelements-update_2_0', true);
2909 }
2910 }
2911
2912 register_activation_hook( __FILE__, 'mystickyelement_activate' );
2913
2914
2915 if ( !function_exists('mystickyelements_social_channels')) {
2916
2917 function mystickyelements_social_channels() {
2918 $social_channels = array(
2919 'whatsapp' => array(
2920 'text' => "WhatsApp",
2921 'icon_text' => "",
2922 'hover_text' => "WhatsApp",
2923 'background_color' => "#26D367",
2924 'placeholder' => 'Example: +18006927753',
2925 'class' => "fab fa-whatsapp",
2926 'tooltip' => 'Add your full WhatsApp number with country code. E.g., +18006927753',
2927 'is_pre_set_message' => 1,
2928 'use_whatsapp_web' => 1,
2929 'number_validation' => 1,
2930 'icon_color' => 1
2931 ),
2932 'facebook_messenger' => array(
2933 'text' => "Facebook Messenger",
2934 'icon_text' => "",
2935 'hover_text' => "Facebook Messenger",
2936 'background_color' => "#007FF7",
2937 'placeholder' => 'Example: Coca-Cola',
2938 'class' => "fab fa-facebook-messenger",
2939 'tooltip' => '<ul><li>1. Go to <a href="" target="_blank">Facebook.com</a></li><li>2. Click on your name tab</li><li>3. Copy the last part of the URL <img src="'.MYSTICKYELEMENTS_URL.'images/facebook-image.png" /></li><li>4. Add your Messenger username. If your page\'s username is "cocacola" add only the username part. E.g., cocacola</li></ul>',
2940 'icon_color' => 1
2941 ),
2942 'facebook' => array(
2943 'text' => "Facebook",
2944 'icon_text' => "",
2945 'hover_text' => "Facebook",
2946 'background_color' => "#4267B2",
2947 'placeholder' => 'Example: https://facebook.com/coca-cola/',
2948 'class' => "fab fa-facebook-f",
2949 'tooltip' => 'Add the link of of your Facebook page or URL. E.g., <a href="https://facebook.com/cocacola" target="_blank">https://facebook.com/cocacola</a>',
2950 'icon_color' => 1
2951 ),
2952 'SMS' => array(
2953 'text' => "SMS",
2954 'icon_text' => "",
2955 'hover_text' => "SMS",
2956 'background_color' => "#ff549c",
2957 'placeholder' => 'Example: +1507854875',
2958 'class' => "fas fa-sms",
2959 'tooltip' => 'Add your full phone number with country code. E.g., +18006927753',
2960 'number_validation' => 1,
2961 'is_pre_set_message' => 1,
2962 'icon_color' => 1
2963 ),
2964 'phone' => array(
2965 'text' => "Phone",
2966 'icon_text' => "",
2967 'hover_text' => "Phone",
2968 'background_color' => "#26D37C",
2969 'placeholder' => 'Example: +18006927753',
2970 'class' => "fa fa-phone",
2971 'tooltip' => 'Add your full phone number with country code. E.g., +18006927753',
2972 'number_validation' => 1,
2973 'icon_color' => 1
2974 ),
2975 'email' => array(
2976 'text' => "Email",
2977 'icon_text' => "",
2978 'hover_text' => "Email",
2979 'background_color' => "#DC483C",
2980 'placeholder' => 'Example: john@example.com',
2981 'class' => "far fa-envelope",
2982 'tooltip' => 'Add your email address. E.g., support@premio.io',
2983 'is_pre_set_message' => 1,
2984 'icon_color' => 1
2985 ),
2986 'insagram' => array(
2987 'text' => "Instagram Page",
2988 'icon_text' => "",
2989 'hover_text' => "Instagram Page",
2990 'background_color' => "",
2991 'placeholder' => 'Example: https://instagram.com/cocacola',
2992 'class' => "fab fa-instagram",
2993 'tooltip' => 'Add the link of of your Instagram profile E.g., <a href="https://instagram.com/cocacola" target="_blank">https://instagram.com/cocacola</a>',
2994 'icon_color' => 1
2995 ),
2996 'instagram_dm' => [
2997 'text' => "Instagram DM",
2998 'icon_text' => "",
2999 'hover_text' => "Instagram DM",
3000 'background_color' => "",
3001 'placeholder' => 'Instagram DM Example: Instagram_handle',
3002 'channel_class' => 'social-insagram',
3003 'class' => "mystickyelement_instagramdm_icon",
3004 'tooltip' => 'Add the link to your Instagram profile, e.g. <a href="https://instagram.com/cocacola" target="_blank">https://instagram.com/cocacola</a> or directly add the Instagram handle, e.g. cocacola',
3005 'custom_svg_icon' => file_get_contents(MYSTICKYELEMENTS_PATH.'/images/instagramdm-logo.svg'),
3006 'icon_color' => 1,
3007 ],
3008 'threads' => [
3009 'text' => "Threads",
3010 'icon_text' => "",
3011 'hover_text' => "Threads",
3012 'background_color' => "#000000",
3013 'placeholder' => 'Example: https://www.threads.net/@demo_link',
3014 'class' => "fa-brands fa-threads",
3015 'tooltip' => 'Add a link to your Threads profile here. For example: <a href="https://www.threads.net/@demo_link" target="_blank">https://www.threads.net/@demo_link</a>',
3016 'icon_color' => 1,
3017 ],
3018 'telegram' => array(
3019 'text' => "Telegram",
3020 'icon_text' => "",
3021 'hover_text' => "Telegram",
3022 'background_color' => "#2CA5E0",
3023 'placeholder' => 'Enter Telegram username of channel or personal profile',
3024 'class' => "fab fa-telegram-plane",
3025 'tooltip' => 'Enter the username of your Telegram profile or channel. You can find your username by going into the Telegram profile. E.g., TelegramTips',
3026 'icon_color' => 1
3027 ),
3028 'address' => array(
3029 'text' => "Address",
3030 'icon_text' => "",
3031 'icon_label' => "Address",
3032 'icon_new_tab' => "0",
3033 'hover_text' => "Address",
3034 'background_color' => "#23D28C",
3035 'placeholder' => 'Example: 3229, Royalway, Houston, TX 77058, US',
3036 'class' => "fas fa-map-marker-alt",
3037 'tooltip' => 'Add your full address. E.g., 3229, Royalway, Houston, TX 77058, US',
3038 'icon_color' => 1
3039 ),
3040 'business_hours' => array(
3041 'text' => "Open Hours",
3042 'icon_text' => "",
3043 'icon_label' => "Opening Hours",
3044 'icon_new_tab' => "0",
3045 'hover_text' => "Open Hours",
3046 'background_color' => "#E85F65",
3047 'placeholder' => 'Example: 9:00 - 5:00',
3048 'class' => "fas fa-calendar-alt",
3049 'tooltip' => 'Write your opening hours. E.g, 9:00am - 5:00pm or 9:00 - 5:00 or 9:00 - 15:30',
3050 'icon_color' => 1
3051 ),
3052 'youtube' => array(
3053 'text' => "YouTube",
3054 'icon_text' => "",
3055 'hover_text' => "YouTube",
3056 'background_color' => "#F54E4E",
3057 'placeholder' => 'Example: https://youtube.com/username',
3058 'class' => "fab fa-youtube",
3059 'tooltip' => 'Add your YouTube channel link. E.g., <a href="https://youtube.com/username" target="_blank">https://youtube.com/username</a>',
3060 'icon_color' => 1
3061 ),
3062 'poptin_popups' => array(
3063 'text' => "Poptin Popups",
3064 'icon_text' => "",
3065 "icon_label"=>"Popup link",
3066 'hover_text' => "Poptin Popups",
3067 'background_color' => "#47a2b1",
3068 'placeholder' => 'Example: https://app.popt.in/APIRequest/click/96Y4a02XXa15e',
3069 'class' => "mystickyelement_poptin_icon",
3070 'tooltip' => 'Copy your Poptin popup link from "On-click", from Display Rules. Check the <a href="https://premio.io/help/mystickyelements/how-to-launch-a-poptin-pop-up-in-my-sticky-elements/" target="_blank">documentation</a> for more. E.g., <a href="https://app.popt.in/APIRequest/click/96Y4a02XXa15e" target="_blank">https://app.popt.in/APIRequest/click/96Y4a02XXa15e</a>',
3071 'icon_color' => 1
3072 ),
3073 'wechat' => array(
3074 'text' => "WeChat",
3075 'icon_text' => "",
3076 'hover_text' => "WeChat",
3077 'background_color' => "#00AD19",
3078 'placeholder' => 'Enter weChat ID. E.g., cocacola',
3079 'class' => "fab fa-weixin",
3080 'tooltip' => "Enter the weChat ID of the profile you want to add. You will usually find the 'WeChat ID' written next to the avatar photo of the profile.Unfortunately, WeChat doesn't have a click-to-chat API, therefore we can only show your username on-click so visitors can look-up for it",
3081 'icon_color' => 1
3082 ),
3083 'snapchat' => array(
3084 'text' => "Snapchat",
3085 'icon_text' => "",
3086 'hover_text' => "Snapchat",
3087 'background_color' => "#fffc00",
3088 'placeholder' => 'Example: Enter your Snapchat Username',
3089 'class' => "fab fa-snapchat-ghost",
3090 'tooltip' => 'Enter your Snapchat username. E.g., username',
3091 'icon_color' => 1
3092 ),
3093
3094 'twitter' => array(
3095 'text' => "X",
3096 'icon_text' => "",
3097 'hover_text' => "X",
3098 'search_class' => "X",
3099 'background_color' => "#000000",
3100 'placeholder' => 'Example: https://twitter.com/cocacola',
3101 'class' => "fa-brands fa-x-twitter",
3102 'tooltip' => 'Add the link of of your Twitter profile E.g., <a href="https://twitter.com/cocacola" target="_blank">https://twitter.com/cocacola</a>',
3103 'icon_color' => 1
3104 ),
3105 'linkedin' => array(
3106 'text' => "LinkedIn",
3107 'icon_text' => "",
3108 'hover_text' => "LinkedIn",
3109 'background_color' => "#0077b5",
3110 'placeholder' => 'Example: https://linkedin.com/in/username',
3111 'class' => "fab fa-linkedin-in",
3112 'tooltip' => 'Enter the full link of your LinkedIn profile. E.g., <a href="https://linkedin.com/in/username" target="_blank">https://linkedin.com/in/username</a>',
3113 'icon_color' => 1
3114 ),
3115 'viber' => array(
3116 'text' => "Viber",
3117 'icon_text' => "",
3118 'hover_text' => "Viber",
3119 'background_color' => "#59267c",
3120 'placeholder' => 'Example: +1507854875',
3121 'class' => "fab fa-viber",
3122 'tooltip' => 'Enter your full phone number that you registered with Viber. E.g., +1507854875',
3123 'number_validation' => 1,
3124 'icon_color' => 1
3125 ),
3126 'tiktok' => array(
3127 'text' => "TikTok",
3128 'icon_text' => "",
3129 'hover_text' => "TikTok",
3130 'background_color' => "#000",
3131 'placeholder' => 'Example: @TikTok_username',
3132 'class' => "fab fa-tiktok",
3133 'tooltip' => '',
3134 'icon_color' => 1
3135 ),
3136 'vimeo' => array(
3137 'text' => "Vimeo",
3138 'icon_text' => "",
3139 'hover_text' => "Vimeo",
3140 'background_color' => "#1ab7ea",
3141 'placeholder' => 'Example: https://vimeo.com/channel-name',
3142 'class' => "fab fa-vimeo-v",
3143 'tooltip' => 'Add your Vimeo channel link. E.g., <a href="https://vimeo.com/channel-name" target="_blank">https://vimeo.com/channel-name</a>',
3144 'icon_color' => 1,
3145 ),
3146 'pinterest' => array(
3147 'text' => "Pinterest",
3148 'icon_text' => "",
3149 'hover_text' => "Pinterest",
3150 'background_color' => "#E85F65",
3151 'placeholder' => 'Example: https://pinterest/username',
3152 'class' => "fab fa-pinterest-p",
3153 'tooltip' => 'Add the link of of your Pinterest profile E.g., <a href="https://pinterest.com/username" target="_blank">https://pinterest.com/username</a>',
3154 'icon_color' => 1
3155 ),
3156 'line' => array(
3157 'text' => "Line",
3158 'icon_text' => "",
3159 'hover_text' => "Line",
3160 'background_color' => "#00c300",
3161 'placeholder' => 'Example: http://line.me/ti/p/2a-s5A2B8B',
3162 'class' => "mystickyelement_line_icon",
3163 'tooltip' => 'Add your full profile link of Line. E.g., <a href="http://line.me/ti/p/2a-s5A2B8B" target="_blank">http://line.me/ti/p/2a-s5A2B8B</a>',
3164 'icon_color' => 1,
3165 'custom_svg_icon' => file_get_contents( MYSTICKYELEMENTS_PATH . '/images/line-logo.svg')
3166 ),
3167 'itunes' => array(
3168 'text' => "iTunes",
3169 'icon_text' => "",
3170 'hover_text' => "iTunes",
3171 'background_color' => "#495057",
3172 'placeholder' => 'Example: https://www.apple.com/us/itunes/channel-link',
3173 'class' => "fab fa-itunes-note",
3174 'tooltip' => 'Add your iTunes channel link. E.g., <a href="https://www.apple.com/us/itunes/channel-link" target="_blank">https://www.apple.com/us/itunes/channel-link</a>',
3175 'icon_color' => 1
3176 ),
3177 'SoundCloud' => array(
3178 'text' => "SoundCloud",
3179 'icon_text' => "",
3180 'hover_text' => "SoundCloud",
3181 'background_color' => "#ff5500",
3182 'placeholder' => 'Example: https://soundcloud.com/channel-link',
3183 'class' => "fab fa-soundcloud",
3184 'tooltip' => 'Add your SoundCloud channel link. E.g., <a href="https://soundcloud.com/channel-link" target="_blank">https://soundcloud.com/channel-link</a>',
3185 'icon_color' => 1
3186 ),
3187 'vk' => array(
3188 'text' => "Vkontakte",
3189 'icon_text' => "",
3190 'hover_text' => "Vkontakte",
3191 'background_color' => "#4a76a8",
3192 'placeholder' => 'Enter your Vk username. If "vk.com/example" is the URL, username is "example"',
3193 'class' => "fab fa-vk",
3194 'tooltip' => 'Username for the VK account part of the web page address, for "vk.com/example" the username is "example". Only enter the username',
3195 'icon_color' => 1
3196 ),
3197 'spotify' => array(
3198 'text' => "Spotify",
3199 'icon_text' => "",
3200 'hover_text' => "Spotify",
3201 'background_color' => "#ff5500",
3202 'placeholder' => 'Example: https://www.spotify.com/channel-link',
3203 'class' => "fab fa-spotify",
3204 'tooltip' => 'Add your Spotify channel link. E.g., <a href="https://www.spotify.com/channel-link" target="_blank">https://www.spotify.com/channel-link</a>',
3205 'icon_color' => 1
3206 ),
3207 'tumblr' => array(
3208 'text' => "Tumblr",
3209 'icon_text' => "",
3210 'hover_text' => "Tumblr",
3211 'background_color' => "#35465d",
3212 'placeholder' => 'Example: https://www.tumblr.com/channel-link',
3213 'class' => "fab fa-tumblr",
3214 'tooltip' => 'Add your full profile link of Tumblr. E.g, <a href="https://www.tumblr.com/channel-link" target="_blank">https://www.tumblr.com/channel-link</a>',
3215 'icon_color' => 1
3216 ),
3217 'qzone' => array(
3218 'text' => "Qzone",
3219 'icon_text' => "",
3220 'hover_text' => "Qzone",
3221 'background_color' => "#1a87da",
3222 'placeholder' => 'Example: https://qzone.qq.com/channel-link',
3223 'class' => "mystickyelement_qzone_icon",
3224 'tooltip' => 'Add your full profile link of Qzone. E.g, <a href="https://qzone.qq.com/channel-link" target="_blank">https://qzone.qq.com/channel-link</a>',
3225 'icon_color' => 1,
3226 'custom_svg_icon' => file_get_contents( MYSTICKYELEMENTS_PATH . '/images/qzone-logo.svg')
3227 ),
3228 'qq' => array(
3229 'text' => "QQ",
3230 'icon_text' => "",
3231 'hover_text' => "QQ",
3232 'background_color' => "#212529",
3233 'placeholder' => 'Example: Enter your QQ Username',
3234 'class' => "fab fa-qq",
3235 'tooltip' => 'Enter your QQ username. E.g., username',
3236 'icon_color' => 1
3237 ),
3238 'behance' => array(
3239 'text' => "Behance",
3240 'icon_text' => "",
3241 'hover_text' => "Behance",
3242 'background_color' => "#131418",
3243 'placeholder' => 'Example: https://www.behance.net/channel-link',
3244 'class' => "fab fa-behance",
3245 'tooltip' => 'Add your full profile link of Behance. E.g, <a href="https://www.behance.net/channel-link" target="_blank">https://www.behance.net/channel-link</a>',
3246 'icon_color' => 1
3247 ),
3248 'dribbble' => array(
3249 'text' => "Dribbble",
3250 'icon_text' => "",
3251 'hover_text' => "Dribbble",
3252 'background_color' => "#ea4c89",
3253 'placeholder' => 'Example: https://dribbble.com/channel-link',
3254 'class' => "fab fa-dribbble",
3255 'tooltip' => 'Add your full profile link of Dribble. E.g, <a href="https://dribbble.com/channel-link" target="_blank">https://dribbble.com/channel-link</a>',
3256 'icon_color' => 1
3257 ),
3258 'quora' => array(
3259 'text' => "Quora",
3260 'icon_text' => "",
3261 'hover_text' => "Quora",
3262 'background_color' => "#aa2200",
3263 'placeholder' => 'Example: https://www.quora.com/channel-link',
3264 'class' => "fab fa-quora",
3265 'tooltip' => 'Add your full profile link of Quora. E.g, <a href="https://www.quora.com/channel-link" target="_blank">https://www.quora.com/channel-link</a>',
3266 'icon_color' => 1
3267 ),
3268 'yelp' => array(
3269 'text' => "yelp",
3270 'icon_text' => "",
3271 'hover_text' => "yelp",
3272 'background_color' => "#c41200",
3273 'placeholder' => 'Example: https://www.yelp.com/biz/your_business_here',
3274 'class' => "fab fa-yelp",
3275 'tooltip' => 'Add your Yelp business link. E.g, <a href="https://www.yelp.com/biz/your_business_here" target="_blank">https://www.yelp.com/biz/your_business_here</a>',
3276 'icon_color' => 1
3277 ),
3278 'amazon' => array(
3279 'text' => "Amazon",
3280 'icon_text' => "",
3281 'hover_text' => "Amazon",
3282 'background_color' => "#3b7a57",
3283 'placeholder' => 'Example: https://www.amazon.com/your_store_or_product',
3284 'class' => "mystickyelement_amazon_icon",
3285 'tooltip' => 'Add your Amazon product link. E.g, <a href="https://www.amazon.com/your_store_or_product" target="_blank">https://www.amazon.com/your_store_or_product</a>',
3286 'icon_color' => 1
3287 ),
3288 'reddit' => array(
3289 'text' => "Reddit",
3290 'icon_text' => "",
3291 'hover_text' => "Reddit",
3292 'background_color' => "#FF4301",
3293 'placeholder' => 'Example: https://www.reddit.com/r/your_community',
3294 'class' => "fab fa-reddit-alien",
3295 'tooltip' => 'Add your Reddit community or profile link. E.g, <a href="https://www.reddit.com/r/your_community" target="_blank">https://www.reddit.com/r/your_community</a>',
3296 'icon_color' => 1
3297 ),
3298 'RSS' => array(
3299 'text' => "RSS",
3300 'icon_text' => "",
3301 'hover_text' => "RSS",
3302 'background_color' => "#ee802f",
3303 'placeholder' => 'Example: https://www.example.com/your_rss_feed',
3304 'class' => "fa fa-rss",
3305 'tooltip' => 'Add your RSS feed link. E.g, <a href="https://www.example.com/your_rss_feed" target="_blank">https://www.example.com/your_rss_feed</a>',
3306 'icon_color' => 1
3307 ),
3308 'flickr' => array(
3309 'text' => "Flickr",
3310 'icon_text' => "",
3311 'hover_text' => "Flickr",
3312 'background_color' => "#ff0084",
3313 'placeholder' => 'Example: https://www.flickr.com/photos/your_profile',
3314 'class' => "mystickyelement_flickr_icon",
3315 'tooltip' => 'Add your full profile link of Flickr E.g, <a href="https://www.flickr.com/photos/your_profile" target="_blank">https://www.flickr.com/photos/your_profile</a>',
3316 'icon_color' => 1
3317 ),
3318 'ebay' => array(
3319 'text' => "eBay",
3320 'icon_text' => "",
3321 'hover_text' => "eBay",
3322 'background_color' => "#000000",
3323 'placeholder' => 'Example: https://www.ebay.com/str/your_store',
3324 'class' => "mystickyelement_ebay_icon",
3325 'tooltip' => 'Add your eBay profile/product link. E.g, <a href="https://www.ebay.com/str/your_store" target="_blank">https://www.ebay.com/str/your_store</a>',
3326 'icon_color' => 1
3327 ),
3328 'etsy' => array(
3329 'text' => "Etsy",
3330 'icon_text' => "",
3331 'hover_text' => "Etsy",
3332 'background_color' => "#eb6d20",
3333 'placeholder' => 'Example: https://www.etsy.com/shop/your_shop',
3334 'class' => "fab fa-etsy",
3335 'tooltip' => 'Add your full shop link of Etsy. E.g, <a href="https://www.etsy.com/shop/your_shop" target="_blank">https://www.etsy.com/shop/your_shop</a>',
3336 'icon_color' => 1
3337 ),
3338 'slack' => array(
3339 'text' => "Slack",
3340 'icon_text' => "",
3341 'hover_text' => "Slack",
3342 'background_color' => "#3f0e40",
3343 'placeholder' => 'Example: https://your_workspace.slack.com/',
3344 'class' => "mystickyelement_slack_icon",
3345 'tooltip' => 'Add your Slack workspace link. E.g, <a href="https://your_workspace.slack.com/" target="">https://your_workspace.slack.com/</a>',
3346 'icon_color' => 1
3347 ),
3348 'trip_advisor' => array(
3349 'text' => "Trip Advisor",
3350 'icon_text' => "",
3351 'hover_text' => "Trip Advisor",
3352 'background_color' => "#00af87",
3353 'placeholder' => 'Example: https://www.tripadvisor.com/your_place',
3354 'class' => "fab fa-tripadvisor",
3355 'tooltip' => 'Add your place link of TripAdvisor E.g, <a href="https://www.tripadvisor.com/your_place" target="_blank">https://www.tripadvisor.com/your_place</a>',
3356 'icon_color' => 1
3357 ),
3358 'medium' => array(
3359 'text' => "Medium",
3360 'icon_text' => "",
3361 'hover_text' => "Medium",
3362 'background_color' => "#0000cd",
3363 'placeholder' => 'Example: https://medium.com/your_publication',
3364 'class' => "fab fa-medium",
3365 'tooltip' => 'Add your full profile link of Medium. E.g, <a href="https://medium.com/your_publication" target="">https://medium.com/your_publication</a>',
3366 'icon_color' => 1
3367 ),
3368 'google_play' => array(
3369 'text' => "Google Play",
3370 'icon_text' => "",
3371 'hover_text' => "Google Play",
3372 'background_color' => "#747474",
3373 'placeholder' => 'Example: https://play.google.com/store/apps/details?id=your_app',
3374 'class' => "mystickyelement_google_play_icon",
3375 'tooltip' => 'Add your Google Play link. E.g, <a href="https://play.google.com/store/apps/details?id=your_app" target="_blank">https://play.google.com/store/apps/details?id=your_app</a>',
3376 'icon_color' => 1
3377 ),
3378 'app_store' => array(
3379 'text' => "App Store (apple)",
3380 'icon_text' => "",
3381 'hover_text' => "App Store (apple)",
3382 'background_color' => "#1d77f2",
3383 'placeholder' => 'Example: https://apps.apple.com/app/your_app',
3384 'class' => "fab fa-app-store",
3385 'tooltip' => 'Add your Apple Appstore link. E.g, <a href="https://apps.apple.com/app/your_app" target="_blank">https://apps.apple.com/app/your_app</a>',
3386 'icon_color' => 1
3387 ),
3388 'fiverr' => array(
3389 'text' => "Fiverr",
3390 'icon_text' => "",
3391 'hover_text' => "Fiverr",
3392 'background_color' => "#00b22d",
3393 'placeholder' => 'Example: https://www.fiverr.com/your_profile',
3394 'class' => "mystickyelement_fiverr_icon",
3395 'tooltip' => 'Add your Fiverr profile link. E.g, <a href="https://www.fiverr.com/your_profile" target="_blank">https://www.fiverr.com/your_profile</a>',
3396 'icon_color' => 1
3397 ),
3398 'shopify' => array(
3399 'text' => "Shopify",
3400 'icon_text' => "",
3401 'hover_text' => "Shopify",
3402 'background_color' => "#96BF47",
3403 'placeholder' => 'Example: http://your_storemyshopify.com/',
3404 'class' => "mystickyelement_shopify_icon",
3405 'tooltip' => 'Add your Shopify store or product link. E.g, <a href="http://your_storemyshopify.com/" target="_blank">http://your_storemyshopify.com/</a>',
3406 'icon_color' => 1
3407 ),
3408 'printful' => array(
3409 'text' => "Printful",
3410 'icon_text' => "",
3411 'hover_text' => "Printful",
3412 'background_color' => "#000",
3413 'placeholder' => 'Example: https://www.printful.com/your_prudct',
3414 'class' => "mystickyelement_printful_icon",
3415 'tooltip' => 'Add your Printful product link. E.g, <a href="https://www.printful.com/your_prudct" target="_blank">https://www.printful.com/your_prudct</a>',
3416 'icon_color' => 1
3417 ),
3418 'gumroad' => array(
3419 'text' => "Gumroad",
3420 'icon_text' => "",
3421 'hover_text' => "Gumroad",
3422 'background_color' => "#36a9ae",
3423 'placeholder' => 'Example: https://gumroad.com/your_profile',
3424 'class' => "mystickyelement_gumroad_icon",
3425 'tooltip' => 'Add your Gumroad product link. E.g, <a href="https://gumroad.com/your_profile" target="_blank">https://gumroad.com/your_profile</a>',
3426 'icon_color' => 1
3427 ),
3428 'ok' => array(
3429 'text' => "OK.ru",
3430 'icon_text' => "",
3431 'hover_text' => "OK.ru",
3432 'background_color' => "#F6902C",
3433 'placeholder' => 'Example: https://ok.ru/your_proflie',
3434 'class' => "fab fa-odnoklassniki",
3435 'tooltip' => 'Add your full profile link of Ok.ru. E.g, <a href="https://ok.ru/your_proflie" target="_blank">https://ok.ru/your_proflie</a>',
3436 'icon_color' => 1
3437 ),
3438
3439 'custom_one' => array(
3440 'text' => "Custom Link 1",
3441 'custom_tooltip' => "Custom Link 1",
3442 'icon_text' => "",
3443 'hover_text' => "Custom Link 1",
3444 'background_color' => "#7761DF",
3445 'placeholder' => 'Enter your custom social link',
3446 'class' => "fas fa-cloud-upload-alt",
3447 'custom' => 1,
3448 'tooltip' => '',
3449 'icon_color' => 1
3450 ),
3451 'custom_two' => array(
3452 'text' => "Custom Link 2",
3453 'custom_tooltip' => "Custom Link 2",
3454 'hover_text' => "Custom Link 2",
3455 'background_color' => "#7761DF",
3456 'placeholder' => 'Enter your custom social link',
3457 'class' => "fas fa-cloud-upload-alt",
3458 'is_locked' => 1,
3459 'custom' => 1,
3460 'tooltip' => '',
3461 'icon_color' => 1
3462 ),
3463 'custom_three' => array(
3464 'text' => "Custom Link 3",
3465 'custom_tooltip' => "Custom Link 3",
3466 'icon_text' => "",
3467 'hover_text' => "Custom Link 3",
3468 'background_color' => "#7761DF",
3469 'placeholder' => 'Enter your custom social link',
3470 'class' => "fas fa-cloud-upload-alt",
3471 'is_locked' => 1,
3472 'custom' => 1,
3473 'tooltip' => '',
3474 'icon_color' => 1
3475 ),
3476 'custom_four' => array(
3477 'text' => "Custom Link 4",
3478 'custom_tooltip' => "Custom Link 4",
3479 'icon_text' => "",
3480 'hover_text' => "Custom Link 4",
3481 'background_color' => "#7761DF",
3482 'placeholder' => 'Enter your custom social link',
3483 'class' => "fas fa-cloud-upload-alt",
3484 'is_locked' => 1,
3485 'custom' => 1,
3486 'tooltip' => '',
3487 'icon_color' => 1
3488 ),
3489 'custom_five' => array(
3490 'text' => "Custom Link 5",
3491 'custom_tooltip' => "Custom Link 5",
3492 'icon_text' => "",
3493 'hover_text' => "Custom Link 5",
3494 'background_color' => "#7761DF",
3495 'placeholder' => 'Enter your custom social link',
3496 'class' => "fas fa-cloud-upload-alt",
3497 'is_locked' => 1,
3498 'custom' => 1,
3499 'tooltip' => '',
3500 'icon_color' => 1
3501 ),
3502 'custom_six' => array(
3503 'text' => "Custom Link 6",
3504 'custom_tooltip' => "Custom Link 6",
3505 'icon_text' => "",
3506 'hover_text' => "Custom Link 6",
3507 'background_color' => "#7761DF",
3508 'placeholder' => 'Enter your custom social link',
3509 'class' => "fas fa-cloud-upload-alt",
3510 'is_locked' => 1,
3511 'custom' => 1,
3512 'tooltip' => '',
3513 'icon_color' => 1
3514 ),
3515 'custom_seven' => array(
3516 'text' => "Custom Shortcode/HTML 1",
3517 'custom_tooltip' => "Custom Shortcode/HTML 1",
3518 'icon_text' => "",
3519 'hover_text' => "Custom Shortcode/HTML 1",
3520 'background_color' => "#7761DF",
3521 'placeholder' => 'Enter your shortcode or custom IFRAME/HTML code',
3522 'class' => "fas fa-code",
3523 'custom' => 1,
3524 'custom_html' => 1,
3525 'tooltip' => '',
3526 'icon_color' => 1
3527 ),
3528 'custom_eight' => array(
3529 'text' => "Custom Shortcode/HTML 2",
3530 'custom_tooltip' => "Custom Shortcode/HTML 2",
3531 'icon_text' => "",
3532 'hover_text' => "Custom Shortcode/HTML 2",
3533 'background_color' => "#7761DF",
3534 'placeholder' => 'Enter your shortcode or custom IFRAME/HTML code',
3535 'class' => "fas fa-code",
3536 'is_locked' => 1,
3537 'custom' => 1,
3538 'custom_html' => 1,
3539 'icon_color' => 1,
3540 'tooltip' => ''
3541 ),
3542 'custom_nine' => array(
3543 'text' => "Custom Shortcode/HTML 3",
3544 'custom_tooltip' => "Custom Shortcode/HTML 3",
3545 'icon_text' => "",
3546 'hover_text' => "Custom Shortcode/HTML 3",
3547 'background_color' => "#7761DF",
3548 'placeholder' => 'Enter your shortcode or custom IFRAME/HTML code',
3549 'class' => "fas fa-code",
3550 'is_locked' => 1,
3551 'custom' => 1,
3552 'custom_html' => 1,
3553 'tooltip' => '',
3554 'icon_color' => 1
3555 ),
3556 'custom_ten' => array(
3557 'text' => "Custom Shortcode/HTML 4",
3558 'custom_tooltip' => "Custom Shortcode/HTML 4",
3559 'icon_text' => "",
3560 'hover_text' => "Custom Shortcode/HTML 4",
3561 'background_color' => "#7761DF",
3562 'placeholder' => 'Enter your shortcode or custom IFRAME/HTML code',
3563 'class' => "fas fa-code",
3564 'is_locked' => 1,
3565 'custom' => 1,
3566 'custom_html' => 1,
3567 'tooltip' => '',
3568 'icon_color' => 1
3569 ),
3570 'custom_eleven' => array(
3571 'text' => "Custom Shortcode/HTML 5",
3572 'custom_tooltip' => "Custom Shortcode/HTML 5",
3573 'icon_text' => "",
3574 'hover_text' => "Custom Shortcode/HTML 5",
3575 'background_color' => "#7761DF",
3576 'placeholder' => 'Enter your shortcode or custom IFRAME/HTML code',
3577 'class' => "fas fa-code",
3578 'is_locked' => 1,
3579 'custom' => 1,
3580 'custom_html' => 1,
3581 'tooltip' => '',
3582 'icon_color' => 1
3583 ),
3584 'custom_twelve' => array(
3585 'text' => "Custom Shortcode/HTML 6",
3586 'custom_tooltip' => "Custom Shortcode/HTML 6",
3587 'icon_text' => "",
3588 'hover_text' => "Custom Shortcode/HTML 6",
3589 'background_color' => "#7761DF",
3590 'placeholder' => 'Enter your shortcode or custom IFRAME/HTML code',
3591 'class' => "fas fa-code",
3592 'is_locked' => 1,
3593 'custom' => 1,
3594 'custom_html' => 1,
3595 'tooltip' => '',
3596 'icon_color' => 1
3597 ),
3598 );
3599
3600 return apply_filters( 'mystickyelements_social_channels_info', $social_channels);
3601 }
3602 }
3603
3604
3605
3606
3607 function mystickyelements_custom_social_channels(){
3608 $social_channels = array(
3609 'custom_channel' => array(
3610 'text' => "Custom Link",
3611 'custom_tooltip' => "Custom Link",
3612 'icon_text' => "",
3613 'hover_text' => "Custom Link",
3614 'background_color' => "#7761DF",
3615 'placeholder' => 'Enter your custom social link',
3616 'class' => "fas fa-cloud-upload-alt",
3617 'is_locked' => 0,
3618 'custom' => 1,
3619 'tooltip' => '',
3620 'icon_color' => 1
3621 ),
3622 'custom_shortcode' => array(
3623 'text' => "Custom Shortcode/HTML",
3624 'custom_tooltip' => "Custom Shortcode/HTML",
3625 'icon_text' => "",
3626 'hover_text' => "Custom Shortcode/HTML",
3627 'background_color' => "#7761DF",
3628 'placeholder' => 'Enter your shortcode or custom IFRAME/HTML code',
3629 'class' => "fas fa-code",
3630 'custom' => 1,
3631 'custom_html' => 1,
3632 'tooltip' => '',
3633 'icon_color' => 1
3634 ),
3635
3636 );
3637 return $social_channels;
3638 }
3639 function mystickyelements_admin_notices(){
3640
3641 if ( isset($_GET['page']) && $_GET['page'] == 'my-sticky-elements-settings' ) {
3642
3643
3644 $activation_url = wp_nonce_url( 'options-general.php?page=my-sticky-elements-settings&update_version=1', 'mystickyelement_new_version', 'update_nonce');
3645 $admin_message = '<p>' . sprintf( '<a href="%s" id="mystickyelement-update" class="button-primary">%s</a>', $activation_url, esc_html__( 'Move to the new version', 'mystickyelements' ) ) . '</p>';
3646
3647 echo '<div class="updated settings-error notice is-dismissible">' . $admin_message . '</div>';
3648 }
3649 }
3650
3651 function mystickyelements_admin_init_update_version(){
3652
3653 if (isset($_GET['update_version']) && $_GET['update_version'] == 1) {
3654 if (isset($_GET['update_nonce']) && wp_verify_nonce($_GET['update_nonce'], 'mystickyelement_new_version')) {
3655 delete_option( 'mysticky_elements_options');
3656 delete_option( 'mysticky_elements_options0');
3657 delete_option( 'mysticky_elements_options1');
3658 delete_option( 'mysticky_elements_options2');
3659 delete_option( 'mysticky_elements_options3');
3660 delete_option( 'mysticky_elements_options4');
3661 delete_option( 'mysticky_elements_options5');
3662 delete_option( 'mysticky_elements_options6');
3663 delete_option( 'mysticky_elements_options7');
3664 delete_option( 'mysticky_elements_options8');
3665 delete_option( 'mysticky_elements_options9');
3666 mystickyelement_activate();
3667 wp_redirect( admin_url( 'admin.php?page=my-sticky-elements-settings' ) ) ;
3668 exit;
3669 }
3670 }
3671 }
3672 add_action( 'admin_init', 'mystickyelements_admin_init_update_version');
3673
3674 function mystickyelements_change_menu_text()
3675 {
3676 global $submenu;
3677 if(isset($submenu['my-sticky-elements'])) {
3678 $totalItems = count($submenu['my-sticky-elements'])-1;
3679 if(isset($submenu['my-sticky-elements'][$totalItems][0])) {
3680 $submenu['my-sticky-elements'][$totalItems][0] = '<span><svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
3681 <path d="M13.0518 4.01946C12.9266 3.91499 12.7747 3.84781 12.6132 3.82557C12.4517 3.80333 12.2872 3.82693 12.1385 3.89367L9.3713 5.12414L7.76349 2.22571C7.68664 2.09039 7.5753 1.97785 7.44081 1.89956C7.30632 1.82127 7.15348 1.78003 6.99786 1.78003C6.84224 1.78003 6.6894 1.82127 6.55491 1.89956C6.42042 1.97785 6.30908 2.09039 6.23224 2.22571L4.62442 5.12414L1.85724 3.89367C1.70822 3.82703 1.54352 3.8034 1.38178 3.82545C1.22003 3.84751 1.06768 3.91437 0.941941 4.01849C0.816207 4.1226 0.722106 4.25982 0.670275 4.41461C0.618444 4.56941 0.610951 4.73562 0.648642 4.89446L2.0377 10.8171C2.06427 10.9318 2.11383 11.0399 2.18339 11.1348C2.25295 11.2297 2.34107 11.3096 2.44239 11.3695C2.57957 11.4516 2.73642 11.495 2.8963 11.4952C2.97402 11.4951 3.05133 11.484 3.12599 11.4624C5.65792 10.7624 8.33233 10.7624 10.8643 11.4624C11.0955 11.5232 11.3413 11.4898 11.5479 11.3695C11.6498 11.3103 11.7384 11.2307 11.8081 11.1357C11.8777 11.0406 11.9269 10.9321 11.9525 10.8171L13.3471 4.89446C13.3843 4.73558 13.3764 4.56945 13.3243 4.41482C13.2721 4.2602 13.1777 4.12326 13.0518 4.01946V4.01946Z" fill="white"/>
3682 </svg></span> '.esc_html__( 'Upgrade to Pro' , 'mystickyelements');
3683 }
3684 }
3685 }
3686 add_action( 'admin_init', 'mystickyelements_change_menu_text');
3687
3688
3689
3690 /*
3691 * Check condition for older user
3692 *
3693 */
3694 $mysticky_elements_options = get_option( 'mysticky_elements_options' );
3695 if ( !empty($mysticky_elements_options)) {
3696 if( is_admin() ) {
3697 $my_settings_page = new MyStickyElementsPage();
3698 }
3699
3700 add_action('wp_head', 'mysticky_element_build_stylesheet_content');
3701 add_action( 'wp_enqueue_scripts', 'mystickyelements_script' );
3702 add_action('wp_footer', 'insert_my_footerrr');
3703
3704 add_action('admin_notices', 'mystickyelements_admin_notices');
3705
3706 } else {
3707
3708 add_action( 'admin_init' , 'mystickyelements_admin_init' );
3709
3710 require_once MYSTICKYELEMENTS_PATH . 'mystickyelements-fonts.php';
3711 require_once MYSTICKYELEMENTS_PATH . 'mystickyelements-fontawesome-icons.php';
3712 require_once MYSTICKYELEMENTS_PATH . 'class-email-signup.php';
3713 require_once MYSTICKYELEMENTS_PATH . 'class-help.php';
3714 require_once MYSTICKYELEMENTS_PATH . 'mystickyelements-admin.php';
3715 require_once MYSTICKYELEMENTS_PATH . 'mystickyelements-front.php';
3716 }
3717
3718
3719
3720 function mystickyelements_admin_init() {
3721 global $wpdb, $pagenow;
3722
3723 if ( $pagenow == 'plugins.php' || ( isset($_GET['page']) && $_GET['page'] == 'my-sticky-elements' ) ) {
3724
3725 $field_check = $wpdb->get_var( "SHOW COLUMNS FROM {$wpdb->prefix}mystickyelement_contact_lists LIKE 'contact_option'" );
3726 if ( 'contact_option' != $field_check ) {
3727 $wpdb->query( "ALTER TABLE {$wpdb->prefix}mystickyelement_contact_lists ADD contact_option VARCHAR(255) NULL DEFAULT NULL" );
3728 }
3729
3730 $field_check = $wpdb->get_var( "SHOW COLUMNS FROM {$wpdb->prefix}mystickyelement_contact_lists LIKE 'message_date'" );
3731 if ( 'message_date' != $field_check ) {
3732 $wpdb->query( "ALTER TABLE {$wpdb->prefix}mystickyelement_contact_lists ADD message_date DATETIME NOT NULL default '0000-00-00 00:00:00'" );
3733 }
3734
3735 $field_check = $wpdb->get_var( "SHOW COLUMNS FROM {$wpdb->prefix}mystickyelement_contact_lists LIKE 'page_link'" );
3736 if ( 'page_link' != $field_check ) {
3737 $wpdb->query( "ALTER TABLE {$wpdb->prefix}mystickyelement_contact_lists ADD page_link TEXT NULL DEFAULT NULL" );
3738 }
3739 }
3740
3741 if ( !get_option( 'mystickyelements-widgets' ) && !get_option( 'mystickyelements-update_2_0')) {
3742 update_option( 'mystickyelements-widgets', array('MyStickyElements #1'));
3743 update_option( 'mystickyelements-update_2_0', true);
3744 }
3745 }
3746
3747 function mystickyelement_default_settings( $section ) {
3748
3749 $contact_form = array(
3750 'enable' => 1,
3751 'name' => 1,
3752 'name_require' => '',
3753 'name_value' => '',
3754 'phone' => 1,
3755 'phone_require' => 1,
3756 'phone_value' => '',
3757 'email' => 1,
3758 'email_require' => 1,
3759 'email_value' => '',
3760 'message' => 1,
3761 'message_value' => '',
3762 'dropdown' => '',
3763 'dropdown_require' => '',
3764 'submit_button_background_color'=> '#7761DF',
3765 'submit_button_text_color' => '#FFFFFF',
3766 'submit_button_text' => 'Submit',
3767 'desktop' => 1,
3768 'mobile' => 1,
3769 'direction' => 'LTR',
3770 'tab_background_color' => '#7761DF',
3771 'tab_text_color' => '#FFFFFF',
3772 'headine_text_color' => '#7761DF',
3773 'text_in_tab' => 'Contact Us',
3774 'send_leads' => 'database',
3775 'sent_to_mail' => '',
3776 'form_css' => '',
3777 'placeholder_color' => '#4F4F4F',
3778 'contact_title_text' => 'Contact Form',
3779 );
3780
3781
3782 $social_channels = array(
3783 'enable' => 1,
3784 'whatsapp' => 1,
3785 //'facebook_messenger'=> 1,
3786 );
3787
3788
3789
3790 $social_channels_tabs['whatsapp'] = array(
3791 'text' => "",
3792 'hover_text' => "WhatsApp",
3793 'bg_color' => "#26D367",
3794 'desktop' => 1,
3795 'mobile' => 1,
3796 );
3797
3798
3799
3800
3801 $general_settings = array(
3802 'position' => 'left',
3803 'position_mobile' => 'left',
3804 'open_tabs_when' => 'hover',
3805 'mobile_behavior' => 'disable',
3806 'flyout' => 'disable',
3807 'custom_position' => '',
3808 'tabs_css' => '',
3809 'minimize_tab' => '1',
3810 'on_load_when' => 'open',
3811 'minimize_tab_background_color' => '#000000',
3812 'page_settings' => '',
3813 'placeholder_color' => '#4F4F4F',
3814 );
3815
3816 return $$section;
3817 }
3818
3819
3820
3821 add_action('admin_footer', 'mystickyelements_admin_footer_style');
3822 function mystickyelements_admin_footer_style() {
3823 ?>
3824 <style>
3825 #adminmenu .toplevel_page_my-sticky-elements > ul > li:last-child {
3826 padding: 5px 10px;
3827 }
3828 #adminmenu .toplevel_page_my-sticky-elements > ul > li:last-child a {
3829 display: flex;
3830 background-color: #B78DEB;
3831 border-radius: 6px;
3832 font-size: 12px;
3833 gap: 4px;
3834 padding: 4px 8px;
3835 color: #ffffff;
3836 align-items: center;
3837 transition: all 0.2s linear;
3838 font-weight: normal;
3839 box-shadow: 0px 6px 8px 0px #B78DEB3D;
3840 justify-content: center;
3841 }
3842 #adminmenu .toplevel_page_my-sticky-elements > ul > li:last-child a:hover, #adminmenu .toplevel_page_my-sticky-elements > ul > li:last-child a.current {
3843 box-shadow: 0px 6px 8px 0px #B78DEB3D;
3844 color: #ffffff;
3845 background-color: #9565d0;
3846 font-weight: normal;
3847 }
3848 #adminmenu .toplevel_page_my-sticky-elements > ul > li:last-child a span {
3849 flex: 0 0 16px;
3850 height: 16px;
3851 background-color: #c5a4ef;
3852 border-radius: 4px;
3853 padding: 2px;
3854 display: inline-flex;
3855 transition: all 0.2s linear;
3856 }
3857 #adminmenu .toplevel_page_my-sticky-elements > ul > li:last-child a:hover span {
3858 background-color: #B78DEB;
3859 }
3860 #adminmenu .toplevel_page_my-sticky-elements > ul > li:last-child a span svg {
3861 width: 100%;
3862 height: 100%;
3863 }
3864 </style>
3865 <?php
3866 }
3867