Version Description
- Tested with latest wordpress version 5.9.3
- Optimized Code
Download this release
Release Info
Developer | india-web-developer |
Plugin | Custom Share Buttons with Floating Sidebar |
Version | 4.2 |
Comparing to | |
See all releases |
Code changes from version 4.0 to 4.2
- csbwfs-class.php +754 -760
- custom-share-buttons-with-floating-sidebar.php +96 -109
- images/mrweb-logo.jpg +0 -0
- images/mrweb.jpg +0 -0
- images/raghu.jpg +0 -0
- lib/settings.php +294 -294
- lib/shortcode.php +89 -86
- readme.txt +25 -18
csbwfs-class.php
CHANGED
@@ -1,760 +1,754 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
* Custom Share Buttons With Floating Sidebar (C)
|
4 |
-
* @get_csbwf_sidebar_options()
|
5 |
-
* @get_csbwf_sidebar_content()
|
6 |
-
* */
|
7 |
-
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
8 |
-
// get all options value for "Custom Share Buttons with Floating Sidebar"
|
9 |
-
function get_csbwf_sidebar_options() {
|
10 |
-
global $wpdb;
|
11 |
-
$ctOptions = $wpdb->get_results("SELECT option_name, option_value FROM $wpdb->options WHERE option_name LIKE 'csbwfs_%'");
|
12 |
-
|
13 |
-
foreach ($ctOptions as $option) {
|
14 |
-
$ctOptions[$option->option_name] = $option->option_value;
|
15 |
-
}
|
16 |
-
|
17 |
-
return $ctOptions;
|
18 |
-
}
|
19 |
-
/** Get the current url*/
|
20 |
-
if(!function_exists('csbwfs_current_path_protocol')):
|
21 |
-
function csbwfs_current_path_protocol($s, $use_forwarded_host=false)
|
22 |
-
{
|
23 |
-
$pwahttp = (!empty($s['HTTPS']) && $s['HTTPS'] == 'on') ? true:false;
|
24 |
-
$pwasprotocal = strtolower($s['SERVER_PROTOCOL']);
|
25 |
-
$pwa_protocol = substr($pwasprotocal, 0, strpos($pwasprotocal, '/')) . (($pwahttp) ? 's' : '');
|
26 |
-
$port = $s['SERVER_PORT'];
|
27 |
-
$port = ((!$pwahttp && $port=='80') || ($pwahttp && $port=='443')) ? '' : ':'.$port;
|
28 |
-
$host = ($use_forwarded_host && isset($s['HTTP_X_FORWARDED_HOST'])) ? $s['HTTP_X_FORWARDED_HOST'] : (isset($s['HTTP_HOST']) ? $s['HTTP_HOST'] : null);
|
29 |
-
$host = isset($host) ? $host : $s['SERVER_NAME'] . $port;
|
30 |
-
return $pwa_protocol . '://' . $host;
|
31 |
-
}
|
32 |
-
endif;
|
33 |
-
if(!function_exists('csbwfs_get_current_page_url')):
|
34 |
-
function csbwfs_get_current_page_url($s, $use_forwarded_host=false)
|
35 |
-
{
|
36 |
-
return csbwfs_current_path_protocol($s, $use_forwarded_host) . $s['REQUEST_URI'];
|
37 |
-
}
|
38 |
-
endif;
|
39 |
-
/*
|
40 |
-
* Site is browsing in mobile or not
|
41 |
-
* @csbwfsIsMobile()
|
42 |
-
* */
|
43 |
-
if(!function_exists('csbwfsIsMobile')):
|
44 |
-
function csbwfsIsMobile() {
|
45 |
-
// Check the server headers to see if they're mobile friendly
|
46 |
-
if(isset($_SERVER["HTTP_X_WAP_PROFILE"])) {
|
47 |
-
return true;
|
48 |
-
}
|
49 |
-
// Let's NOT return "mobile" if it's an iPhone, because the iPhone can render normal pages quite well.
|
50 |
-
if(isset($_SERVER["HTTP_USER_AGENT"])):
|
51 |
-
if(strstr($_SERVER['HTTP_USER_AGENT'], 'iPad')) {
|
52 |
-
return false;
|
53 |
-
}
|
54 |
-
endif;
|
55 |
-
|
56 |
-
// If the http_accept header supports wap then it's a mobile too
|
57 |
-
if(isset($_SERVER["HTTP_ACCEPT"])):
|
58 |
-
if(preg_match("/wap\.|\.wap/i",$_SERVER["HTTP_ACCEPT"])) {
|
59 |
-
return true;
|
60 |
-
}
|
61 |
-
endif;
|
62 |
-
// Still no luck? Let's have a look at the user agent on the browser. If it contains
|
63 |
-
// any of the following, it's probably a mobile device. Kappow!
|
64 |
-
if(isset($_SERVER["HTTP_USER_AGENT"])){
|
65 |
-
$user_agents = array("midp", "j2me", "avantg", "docomo", "novarra", "palmos", "palmsource", "240x320", "opwv", "chtml", "pda", "windows\ ce", "mmp\/", "blackberry", "mib\/", "symbian", "wireless", "nokia", "hand", "mobi", "phone", "cdm", "up\.b", "audio", "SIE\-", "SEC\-", "samsung", "HTC", "mot\-", "mitsu", "sagem", "sony", "alcatel", "lg", "erics", "vx", "NEC", "philips", "mmm", "xx", "panasonic", "sharp", "wap", "sch", "rover", "pocket", "benq", "java", "pt", "pg", "vox", "amoi", "bird", "compal", "kg", "voda", "sany", "kdd", "dbt", "sendo", "sgh", "gradi", "jb", "\d\d\di", "moto");
|
66 |
-
foreach($user_agents as $user_string){
|
67 |
-
if(preg_match("/".$user_string."/i",$_SERVER["HTTP_USER_AGENT"])) {
|
68 |
-
return true;
|
69 |
-
}
|
70 |
-
}
|
71 |
-
}
|
72 |
-
// None of the above? Then it's probably not a mobile device.
|
73 |
-
return false;
|
74 |
-
}
|
75 |
-
endif;
|
76 |
-
// Get plugin options
|
77 |
-
$pluginOptionsVal=get_csbwf_sidebar_options();
|
78 |
-
//check plugin in enable or not
|
79 |
-
if(isset($pluginOptionsVal['csbwfs_active']) && $pluginOptionsVal['csbwfs_active']==1){
|
80 |
-
|
81 |
-
if((csbwfsIsMobile()) &&
|
82 |
-
isset($pluginOptionsVal['csbwfs_deactive_for_mob']) && $pluginOptionsVal['csbwfs_deactive_for_mob']!='')
|
83 |
-
{
|
84 |
-
// silent is Gold;
|
85 |
-
}else
|
86 |
-
{
|
87 |
-
add_action('wp_footer','get_csbwf_sidebar_content');
|
88 |
-
add_action( 'wp_enqueue_scripts', 'csbwf_sidebar_scripts' );
|
89 |
-
add_action('
|
90 |
-
add_action('
|
91 |
-
}
|
92 |
-
|
93 |
-
}
|
94 |
-
|
95 |
-
function csbwfs_cookie()
|
96 |
-
{
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
var
|
106 |
-
var
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
var
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
}
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
$
|
226 |
-
|
227 |
-
$
|
228 |
-
|
229 |
-
//get
|
230 |
-
if($pluginOptionsVal['
|
231 |
-
else{$
|
232 |
-
//get
|
233 |
-
if($pluginOptionsVal['
|
234 |
-
else{$
|
235 |
-
//get
|
236 |
-
if($pluginOptionsVal['
|
237 |
-
else{$
|
238 |
-
//get
|
239 |
-
if($pluginOptionsVal['
|
240 |
-
else{$
|
241 |
-
//get
|
242 |
-
if($pluginOptionsVal['
|
243 |
-
else{$
|
244 |
-
//get
|
245 |
-
if(isset($pluginOptionsVal['
|
246 |
-
else{$
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
//get
|
255 |
-
if($pluginOptionsVal['
|
256 |
-
else{$
|
257 |
-
//get
|
258 |
-
if($pluginOptionsVal['
|
259 |
-
else{$
|
260 |
-
//get
|
261 |
-
if($pluginOptionsVal['
|
262 |
-
else{$
|
263 |
-
//get
|
264 |
-
if($pluginOptionsVal['
|
265 |
-
else{$
|
266 |
-
//get
|
267 |
-
if($pluginOptionsVal['
|
268 |
-
else{$
|
269 |
-
//get
|
270 |
-
if(isset($pluginOptionsVal['
|
271 |
-
else{$
|
272 |
-
//get
|
273 |
-
if(
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
$style=' style="top:'.$margin.';
|
297 |
-
}
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
{
|
302 |
-
|
303 |
-
}
|
304 |
-
|
305 |
-
//get
|
306 |
-
if($pluginOptionsVal['
|
307 |
-
else{$
|
308 |
-
//get
|
309 |
-
if($pluginOptionsVal['
|
310 |
-
else{$
|
311 |
-
//get
|
312 |
-
if($pluginOptionsVal['
|
313 |
-
else{$
|
314 |
-
|
315 |
-
|
316 |
-
else{$
|
317 |
-
//get
|
318 |
-
if($pluginOptionsVal['
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
//get
|
326 |
-
if(
|
327 |
-
|
328 |
-
|
329 |
-
if($pluginOptionsVal['
|
330 |
-
else{$
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
$isActiveHideShowBtn
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
$floatingSidebarContent
|
345 |
-
|
346 |
-
|
347 |
-
$
|
348 |
-
|
349 |
-
|
350 |
-
$
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
$
|
360 |
-
|
361 |
-
$
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
$floatingSidebarContent .='
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
$
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
$
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
$
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
$floatingSidebarContent .='</a></div></div>';
|
434 |
-
endif;
|
435 |
-
/**
|
436 |
-
if(
|
437 |
-
$floatingSidebarContent .='<div class="csbwfs-sbutton csbwfsbtns"><div id="csbwfs-
|
438 |
-
$
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
$floatingSidebarContent .='
|
451 |
-
endif;
|
452 |
-
|
453 |
-
$floatingSidebarContent .='</div>'; //End social-inner
|
454 |
-
|
455 |
-
|
456 |
-
$
|
457 |
-
|
458 |
-
|
459 |
-
$floatingSidebarContent
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
/**
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
$
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
$
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
$ShareTitle='
|
500 |
-
|
501 |
-
$ShareTitle='
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
$
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
//get
|
526 |
-
if($pluginOptionsVal['
|
527 |
-
else{$
|
528 |
-
//get
|
529 |
-
if($pluginOptionsVal['
|
530 |
-
else{$
|
531 |
-
//get
|
532 |
-
if($pluginOptionsVal['
|
533 |
-
else{$
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
//get
|
542 |
-
if(isset($pluginOptionsVal['
|
543 |
-
else{$
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
//get
|
553 |
-
if($pluginOptionsVal['
|
554 |
-
else{$
|
555 |
-
//get
|
556 |
-
if($pluginOptionsVal['
|
557 |
-
else{$
|
558 |
-
//get
|
559 |
-
if($pluginOptionsVal['
|
560 |
-
else{$
|
561 |
-
//get
|
562 |
-
if($pluginOptionsVal['
|
563 |
-
else{$
|
564 |
-
//get
|
565 |
-
if($pluginOptionsVal['
|
566 |
-
else{$
|
567 |
-
//get
|
568 |
-
if(isset($pluginOptionsVal['
|
569 |
-
else{$
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
//get
|
579 |
-
if($pluginOptionsVal['
|
580 |
-
else{$
|
581 |
-
//get
|
582 |
-
if($pluginOptionsVal['
|
583 |
-
else{$
|
584 |
-
//get
|
585 |
-
if($pluginOptionsVal['
|
586 |
-
else{$
|
587 |
-
|
588 |
-
|
589 |
-
else{$
|
590 |
-
//get
|
591 |
-
if($pluginOptionsVal['
|
592 |
-
|
593 |
-
|
594 |
-
//get
|
595 |
-
if(
|
596 |
-
|
597 |
-
if(
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
if(isset($pluginOptionsVal['
|
610 |
-
$
|
611 |
-
else:
|
612 |
-
$
|
613 |
-
endif;
|
614 |
-
|
615 |
-
|
616 |
-
$btnText
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
$shareButtonContent
|
622 |
-
|
623 |
-
$
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
$
|
633 |
-
|
634 |
-
$
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
$
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
$shareButtonContent .='</a></div></div>';
|
703 |
-
endif;
|
704 |
-
|
705 |
-
if(
|
706 |
-
$shareButtonContent
|
707 |
-
$
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
$
|
720 |
-
|
721 |
-
$
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
endif;
|
738 |
-
//
|
739 |
-
if(
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
}else
|
756 |
-
{
|
757 |
-
$finalContent = $content.$shareButtonContentReturn;
|
758 |
-
}
|
759 |
-
return $finalContent;
|
760 |
-
}
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Custom Share Buttons With Floating Sidebar (C)
|
4 |
+
* @get_csbwf_sidebar_options()
|
5 |
+
* @get_csbwf_sidebar_content()
|
6 |
+
* */
|
7 |
+
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
8 |
+
// get all options value for "Custom Share Buttons with Floating Sidebar"
|
9 |
+
function get_csbwf_sidebar_options() {
|
10 |
+
global $wpdb;
|
11 |
+
$ctOptions = $wpdb->get_results("SELECT option_name, option_value FROM $wpdb->options WHERE option_name LIKE 'csbwfs_%'");
|
12 |
+
|
13 |
+
foreach ($ctOptions as $option) {
|
14 |
+
$ctOptions[$option->option_name] = esc_attr( $option->option_value );
|
15 |
+
}
|
16 |
+
|
17 |
+
return $ctOptions;
|
18 |
+
}
|
19 |
+
/** Get the current url*/
|
20 |
+
if(!function_exists('csbwfs_current_path_protocol')):
|
21 |
+
function csbwfs_current_path_protocol($s, $use_forwarded_host=false)
|
22 |
+
{
|
23 |
+
$pwahttp = (!empty($s['HTTPS']) && $s['HTTPS'] == 'on') ? true:false;
|
24 |
+
$pwasprotocal = strtolower($s['SERVER_PROTOCOL']);
|
25 |
+
$pwa_protocol = substr($pwasprotocal, 0, strpos($pwasprotocal, '/')) . (($pwahttp) ? 's' : '');
|
26 |
+
$port = $s['SERVER_PORT'];
|
27 |
+
$port = ((!$pwahttp && $port=='80') || ($pwahttp && $port=='443')) ? '' : ':'.$port;
|
28 |
+
$host = ($use_forwarded_host && isset($s['HTTP_X_FORWARDED_HOST'])) ? $s['HTTP_X_FORWARDED_HOST'] : (isset($s['HTTP_HOST']) ? $s['HTTP_HOST'] : null);
|
29 |
+
$host = isset($host) ? $host : $s['SERVER_NAME'] . $port;
|
30 |
+
return $pwa_protocol . '://' . $host;
|
31 |
+
}
|
32 |
+
endif;
|
33 |
+
if(!function_exists('csbwfs_get_current_page_url')):
|
34 |
+
function csbwfs_get_current_page_url($s, $use_forwarded_host=false)
|
35 |
+
{
|
36 |
+
return csbwfs_current_path_protocol($s, $use_forwarded_host) . $s['REQUEST_URI'];
|
37 |
+
}
|
38 |
+
endif;
|
39 |
+
/*
|
40 |
+
* Site is browsing in mobile or not
|
41 |
+
* @csbwfsIsMobile()
|
42 |
+
* */
|
43 |
+
if(!function_exists('csbwfsIsMobile')):
|
44 |
+
function csbwfsIsMobile() {
|
45 |
+
// Check the server headers to see if they're mobile friendly
|
46 |
+
if(isset($_SERVER["HTTP_X_WAP_PROFILE"])) {
|
47 |
+
return true;
|
48 |
+
}
|
49 |
+
// Let's NOT return "mobile" if it's an iPhone, because the iPhone can render normal pages quite well.
|
50 |
+
if(isset($_SERVER["HTTP_USER_AGENT"])):
|
51 |
+
if(strstr($_SERVER['HTTP_USER_AGENT'], 'iPad')) {
|
52 |
+
return false;
|
53 |
+
}
|
54 |
+
endif;
|
55 |
+
|
56 |
+
// If the http_accept header supports wap then it's a mobile too
|
57 |
+
if(isset($_SERVER["HTTP_ACCEPT"])):
|
58 |
+
if(preg_match("/wap\.|\.wap/i",$_SERVER["HTTP_ACCEPT"])) {
|
59 |
+
return true;
|
60 |
+
}
|
61 |
+
endif;
|
62 |
+
// Still no luck? Let's have a look at the user agent on the browser. If it contains
|
63 |
+
// any of the following, it's probably a mobile device. Kappow!
|
64 |
+
if(isset($_SERVER["HTTP_USER_AGENT"])){
|
65 |
+
$user_agents = array("midp", "j2me", "avantg", "docomo", "novarra", "palmos", "palmsource", "240x320", "opwv", "chtml", "pda", "windows\ ce", "mmp\/", "blackberry", "mib\/", "symbian", "wireless", "nokia", "hand", "mobi", "phone", "cdm", "up\.b", "audio", "SIE\-", "SEC\-", "samsung", "HTC", "mot\-", "mitsu", "sagem", "sony", "alcatel", "lg", "erics", "vx", "NEC", "philips", "mmm", "xx", "panasonic", "sharp", "wap", "sch", "rover", "pocket", "benq", "java", "pt", "pg", "vox", "amoi", "bird", "compal", "kg", "voda", "sany", "kdd", "dbt", "sendo", "sgh", "gradi", "jb", "\d\d\di", "moto");
|
66 |
+
foreach($user_agents as $user_string){
|
67 |
+
if(preg_match("/".$user_string."/i",$_SERVER["HTTP_USER_AGENT"])) {
|
68 |
+
return true;
|
69 |
+
}
|
70 |
+
}
|
71 |
+
}
|
72 |
+
// None of the above? Then it's probably not a mobile device.
|
73 |
+
return false;
|
74 |
+
}
|
75 |
+
endif;
|
76 |
+
// Get plugin options
|
77 |
+
$pluginOptionsVal=get_csbwf_sidebar_options();
|
78 |
+
//check plugin in enable or not
|
79 |
+
if(isset($pluginOptionsVal['csbwfs_active']) && $pluginOptionsVal['csbwfs_active']==1){
|
80 |
+
|
81 |
+
if((csbwfsIsMobile()) &&
|
82 |
+
isset($pluginOptionsVal['csbwfs_deactive_for_mob']) && $pluginOptionsVal['csbwfs_deactive_for_mob']!='')
|
83 |
+
{
|
84 |
+
// silent is Gold;
|
85 |
+
}else
|
86 |
+
{
|
87 |
+
add_action('wp_footer','get_csbwf_sidebar_content');
|
88 |
+
add_action( 'wp_enqueue_scripts', 'csbwf_sidebar_scripts' );
|
89 |
+
add_action('wp_enqueue_scripts','csbwf_sidebar_load_inline_js');
|
90 |
+
add_action('wp_enqueue_scripts','csbwfs_cookie');
|
91 |
+
}
|
92 |
+
|
93 |
+
}
|
94 |
+
|
95 |
+
function csbwfs_cookie() {
|
96 |
+
$cookieVal=' csbwfsCheckCookie();function csbwfsSetCookie(cname,cvalue,exdays) {
|
97 |
+
var d = new Date();
|
98 |
+
d.setTime(d.getTime() + (exdays*24*60*60*1000));
|
99 |
+
var expires = "expires=" + d.toGMTString();
|
100 |
+
document.cookie = cname+"="+cvalue+"; "+expires;
|
101 |
+
}
|
102 |
+
|
103 |
+
function csbwfsGetCookie(cname) {
|
104 |
+
var name = cname + "=";
|
105 |
+
var ca = document.cookie.split(\';\');
|
106 |
+
for(var i=0; i<ca.length; i++) {
|
107 |
+
var c = ca[i];
|
108 |
+
while (c.charAt(0)==\' \') c = c.substring(1);
|
109 |
+
if (c.indexOf(name) != -1) {
|
110 |
+
return c.substring(name.length, c.length);
|
111 |
+
}
|
112 |
+
}
|
113 |
+
return "";
|
114 |
+
}
|
115 |
+
|
116 |
+
function csbwfsCheckCookie() {
|
117 |
+
var hideshowhide = "'.esc_attr( get_option('csbwfs_rmSHBtn') ).'"
|
118 |
+
var button_status=csbwfsGetCookie("csbwfs_show_hide_status");
|
119 |
+
if (button_status != "") {
|
120 |
+
|
121 |
+
} else {
|
122 |
+
csbwfsSetCookie("csbwfs_show_hide_status", "active",1);
|
123 |
+
}
|
124 |
+
if(hideshowhide=="yes")
|
125 |
+
{
|
126 |
+
csbwfsSetCookie("csbwfs_show_hide_status", "active",0);
|
127 |
+
}
|
128 |
+
}
|
129 |
+
';
|
130 |
+
wp_add_inline_script( 'jquery-core', $cookieVal );
|
131 |
+
}
|
132 |
+
if(isset($pluginOptionsVal['csbwfs_buttons_active']) && $pluginOptionsVal['csbwfs_buttons_active']==1){
|
133 |
+
add_filter( 'the_content', 'csbfs_the_content_filter', 20);
|
134 |
+
add_action( 'wp_enqueue_scripts', 'csbwf_sidebar_scripts' );
|
135 |
+
}
|
136 |
+
//register style and scrip files
|
137 |
+
function csbwf_sidebar_scripts() {
|
138 |
+
wp_enqueue_script( 'jquery' ); // wordpress jQuery
|
139 |
+
wp_register_style( 'csbwf_sidebar_style', plugins_url( 'css/csbwfs.css',__FILE__ ) );
|
140 |
+
wp_enqueue_style( 'csbwf_sidebar_style' );
|
141 |
+
}
|
142 |
+
/*********************************************************
|
143 |
+
"Add the jQuery code in head section using hooks"
|
144 |
+
*********************************************************/
|
145 |
+
function csbwf_sidebar_load_inline_js() {
|
146 |
+
$pluginOptionsVal=get_csbwf_sidebar_options();
|
147 |
+
$jscnt='
|
148 |
+
var windWidth=jQuery( window ).width();
|
149 |
+
//alert(windWidth);
|
150 |
+
var animateWidth;
|
151 |
+
var defaultAnimateWidth;';
|
152 |
+
$jscnt.=' jQuery(document).ready(function() {
|
153 |
+
animateWidth="55";
|
154 |
+
defaultAnimateWidth= animateWidth-10;
|
155 |
+
animateHeight="49";
|
156 |
+
defaultAnimateHeight= animateHeight-2;';
|
157 |
+
if($pluginOptionsVal['csbwfs_delayTimeBtn']!='0'):
|
158 |
+
$jscnt.='jQuery("#csbwfs-delaydiv").hide();
|
159 |
+
setTimeout(function(){
|
160 |
+
jQuery("#csbwfs-delaydiv").fadeIn();}, '.esc_attr($pluginOptionsVal['csbwfs_delayTimeBtn']).');';
|
161 |
+
endif;
|
162 |
+
|
163 |
+
if($pluginOptionsVal['csbwfs_position']=='right' || $pluginOptionsVal['csbwfs_position']=='left'){
|
164 |
+
|
165 |
+
$jscnt.='jQuery("div.csbwfsbtns a").hover(function(){
|
166 |
+
jQuery(this).animate({width:animateWidth});
|
167 |
+
},function(){
|
168 |
+
jQuery(this).stop( true, true ).animate({width:defaultAnimateWidth});
|
169 |
+
});';
|
170 |
+
}else
|
171 |
+
{
|
172 |
+
//silent
|
173 |
+
|
174 |
+
}
|
175 |
+
|
176 |
+
if(isset($pluginOptionsVal['csbwfs_auto_hide']) && $pluginOptionsVal['csbwfs_auto_hide']!=''):
|
177 |
+
$jscnt.='csbwfsSetCookie("csbwfs_show_hide_status","in_active","1");';
|
178 |
+
endif;
|
179 |
+
$jscnt.='jQuery("div.csbwfs-show").hide();
|
180 |
+
jQuery("div.csbwfs-show a").click(function(){
|
181 |
+
jQuery("div#csbwfs-social-inner").show(500);
|
182 |
+
jQuery("div.csbwfs-show").hide(500);
|
183 |
+
jQuery("div.csbwfs-hide").show(500);
|
184 |
+
csbwfsSetCookie("csbwfs_show_hide_status","active","1");
|
185 |
+
});
|
186 |
+
|
187 |
+
jQuery("div.csbwfs-hide a").click(function(){
|
188 |
+
jQuery("div.csbwfs-show").show(500);
|
189 |
+
jQuery("div.csbwfs-hide").hide(500);
|
190 |
+
jQuery("div#csbwfs-social-inner").hide(500);
|
191 |
+
csbwfsSetCookie("csbwfs_show_hide_status","in_active","1");
|
192 |
+
});';
|
193 |
+
|
194 |
+
$jscnt.='var button_status=csbwfsGetCookie("csbwfs_show_hide_status");
|
195 |
+
if (button_status =="in_active") {
|
196 |
+
jQuery("div.csbwfs-show").show();
|
197 |
+
jQuery("div.csbwfs-hide").hide();
|
198 |
+
jQuery("div#csbwfs-social-inner").hide();
|
199 |
+
} else {
|
200 |
+
jQuery("div#csbwfs-social-inner").show();
|
201 |
+
jQuery("div.csbwfs-show").hide();
|
202 |
+
jQuery("div.csbwfs-hide").show();
|
203 |
+
}';
|
204 |
+
|
205 |
+
|
206 |
+
$jscnt.='});';
|
207 |
+
|
208 |
+
wp_add_inline_script( 'jquery-core', $jscnt );
|
209 |
+
|
210 |
+
}
|
211 |
+
|
212 |
+
/********************************************************
|
213 |
+
"Custom Share Buttons with Floating Sidebar" HTML
|
214 |
+
*********************************************************/
|
215 |
+
function get_csbwf_sidebar_content() {
|
216 |
+
global $post;
|
217 |
+
$pluginOptionsVal=get_csbwf_sidebar_options();
|
218 |
+
$shareurl = esc_url(htmlspecialchars(csbwfs_get_current_page_url($_SERVER), ENT_QUOTES, 'UTF-8'));
|
219 |
+
$ShareTitle = (is_front_page() && is_home()) ? get_bloginfo('name'): trim(wp_title('',false));
|
220 |
+
$ShareTitle= htmlspecialchars(rawurlencode($ShareTitle));
|
221 |
+
$ShareTitle = str_replace("%26%23039%3B","",$ShareTitle);// remove single quate
|
222 |
+
/* Get All buttons Image */
|
223 |
+
//get facebook button image
|
224 |
+
if($pluginOptionsVal['csbwfs_fb_image']!=''){ $fImg=$pluginOptionsVal['csbwfs_fb_image'];}
|
225 |
+
else{$fImg='';}
|
226 |
+
//get twitter button image
|
227 |
+
if($pluginOptionsVal['csbwfs_tw_image']!=''){ $tImg=$pluginOptionsVal['csbwfs_tw_image'];}
|
228 |
+
else{$tImg='';}
|
229 |
+
//get Linkedin button image
|
230 |
+
if($pluginOptionsVal['csbwfs_li_image']!=''){ $lImg=$pluginOptionsVal['csbwfs_li_image'];}
|
231 |
+
else{$lImg='';}
|
232 |
+
//get mail button image
|
233 |
+
if($pluginOptionsVal['csbwfs_mail_image']!=''){ $mImg=$pluginOptionsVal['csbwfs_mail_image'];}
|
234 |
+
else{$mImg='';}
|
235 |
+
//get pinterest button image
|
236 |
+
if($pluginOptionsVal['csbwfs_pin_image']!=''){ $pImg=$pluginOptionsVal['csbwfs_pin_image'];}
|
237 |
+
else{$pImg='';}
|
238 |
+
//get youtube button image
|
239 |
+
if(isset($pluginOptionsVal['csbwfs_yt_image']) && $pluginOptionsVal['csbwfs_yt_image']!=''){ $ytImg=$pluginOptionsVal['csbwfs_yt_image'];}
|
240 |
+
else{$ytImg='';}
|
241 |
+
//get reddit plus button image
|
242 |
+
if(isset($pluginOptionsVal['csbwfs_re_image']) && $pluginOptionsVal['csbwfs_re_image']!=''){ $reImg=$pluginOptionsVal['csbwfs_re_image'];}
|
243 |
+
else{$reImg='';}
|
244 |
+
//get stumbleupon button image
|
245 |
+
if(isset($pluginOptionsVal['csbwfs_st_image']) && $pluginOptionsVal['csbwfs_st_image']!=''){ $stImg=$pluginOptionsVal['csbwfs_st_image'];}
|
246 |
+
else{$stImg='';}
|
247 |
+
/* Get All buttons Image Alt/Title */
|
248 |
+
//get facebook button image alt/title
|
249 |
+
if($pluginOptionsVal['csbwfs_fb_title']!=''){ $fImgAlt=$pluginOptionsVal['csbwfs_fb_title'];}
|
250 |
+
else{$fImgAlt='Share On Facebook';}
|
251 |
+
//get twitter button image alt/title
|
252 |
+
if($pluginOptionsVal['csbwfs_tw_title']!=''){ $tImgAlt=$pluginOptionsVal['csbwfs_tw_title'];}
|
253 |
+
else{$tImgAlt='Share On Twitter';}
|
254 |
+
//get Linkedin button image alt/title
|
255 |
+
if($pluginOptionsVal['csbwfs_li_title']!=''){ $lImgAlt=$pluginOptionsVal['csbwfs_li_title'];}
|
256 |
+
else{$lImgAlt='Share On Linkedin';}
|
257 |
+
//get mail button image alt/title
|
258 |
+
if($pluginOptionsVal['csbwfs_mail_title']!=''){ $mImgAlt=$pluginOptionsVal['csbwfs_mail_title'];}
|
259 |
+
else{$mImgAlt='Contact us';}
|
260 |
+
//get pinterest button image alt/title
|
261 |
+
if($pluginOptionsVal['csbwfs_pin_title']!=''){ $pImgAlt=$pluginOptionsVal['csbwfs_pin_title'];}
|
262 |
+
else{$pImgAlt='Share On Pinterest';}
|
263 |
+
//get youtube button image alt/title
|
264 |
+
if(isset($pluginOptionsVal['csbwfs_yt_title']) && $pluginOptionsVal['csbwfs_yt_title']!=''){ $ytImgAlt=$pluginOptionsVal['csbwfs_yt_title'];}
|
265 |
+
else{$ytImgAlt='Share On Youtube';}
|
266 |
+
//get reddit plus button image alt/title
|
267 |
+
if(isset($pluginOptionsVal['csbwfs_re_title']) && $pluginOptionsVal['csbwfs_re_title']!=''){ $reImgAlt=$pluginOptionsVal['csbwfs_re_title'];}
|
268 |
+
else{$reImgAlt='Share On Reddit';}
|
269 |
+
//get stumbleupon button image alt/title
|
270 |
+
if(isset($pluginOptionsVal['csbwfs_st_title']) && $pluginOptionsVal['csbwfs_st_title']!=''){ $stImgAlt=$pluginOptionsVal['csbwfs_st_title'];}
|
271 |
+
else{$stImgAlt='Share On Stumbleupon';}
|
272 |
+
//get email message
|
273 |
+
if(is_page() || is_single() || is_category() || is_archive()){
|
274 |
+
if($pluginOptionsVal['csbwfs_mailMessage']!=''){ $mailMsg=$pluginOptionsVal['csbwfs_mailMessage'];} else{
|
275 |
+
$mailMsg='?subject='.$ShareTitle.'&body='.$shareurl;}
|
276 |
+
}else
|
277 |
+
{
|
278 |
+
$mailMsg='?subject='.get_bloginfo('name').'&body='.home_url('/');
|
279 |
+
}
|
280 |
+
// Top Margin
|
281 |
+
if($pluginOptionsVal['csbwfs_top_margin']!=''){
|
282 |
+
$margin=$pluginOptionsVal['csbwfs_top_margin'];
|
283 |
+
}else
|
284 |
+
{
|
285 |
+
$margin='25%';
|
286 |
+
}
|
287 |
+
|
288 |
+
//Sidebar Position
|
289 |
+
if($pluginOptionsVal['csbwfs_position']=='right'){
|
290 |
+
$style=' style="top:'.$margin.';right:-5px;"'; $idName=' id="csbwfs-right"'; $showImg='hide-r.png'; $hideImg='show.png';
|
291 |
+
}else if($pluginOptionsVal['csbwfs_position']=='bottom'){
|
292 |
+
$style=' style="bottom:0;"'; $idName=' id="csbwfs-bottom"'; $showImg='hide-b.png'; $hideImg='show.png';
|
293 |
+
}
|
294 |
+
else
|
295 |
+
{
|
296 |
+
$idName=' id="csbwfs-left"'; $style=' style="top:'.$margin.';left:0;"'; $showImg='hide-l.png';$hideImg='hide.png';
|
297 |
+
}
|
298 |
+
/* Get All buttons background color */
|
299 |
+
//get facebook button image background color
|
300 |
+
if($pluginOptionsVal['csbwfs_fb_bg']!=''){ $fImgbg=' style="background:'.$pluginOptionsVal['csbwfs_fb_bg'].';"';}
|
301 |
+
else{$fImgbg='';}
|
302 |
+
//get twitter button image background color
|
303 |
+
if($pluginOptionsVal['csbwfs_tw_bg']!=''){ $tImgbg=' style="background:'.$pluginOptionsVal['csbwfs_tw_bg'].';"';}
|
304 |
+
else{$tImgbg='';}
|
305 |
+
//get Linkedin button image background color
|
306 |
+
if($pluginOptionsVal['csbwfs_li_bg']!=''){ $lImgbg=' style="background:'.$pluginOptionsVal['csbwfs_li_bg'].';"';}
|
307 |
+
else{$lImgbg='';}
|
308 |
+
//get mail button image background color
|
309 |
+
if($pluginOptionsVal['csbwfs_mail_bg']!=''){ $mImgbg=' style="background:'.$pluginOptionsVal['csbwfs_mail_bg'].';"';}
|
310 |
+
else{$mImgbg='';}
|
311 |
+
//get pinterest button image background color
|
312 |
+
if($pluginOptionsVal['csbwfs_pin_bg']!=''){ $pImgbg=' style="background:'.$pluginOptionsVal['csbwfs_pin_bg'].';"';}
|
313 |
+
else{$pImgbg='';}
|
314 |
+
|
315 |
+
//get youtube button image background color
|
316 |
+
if(isset($pluginOptionsVal['csbwfs_yt_bg']) && $pluginOptionsVal['csbwfs_yt_bg']!=''){ $ytImgbg=' style="background:'.$pluginOptionsVal['csbwfs_yt_bg'].';"';}else{$ytImgbg='';}
|
317 |
+
//get reddit button image background color
|
318 |
+
if(isset($pluginOptionsVal['csbwfs_re_bg']) && $pluginOptionsVal['csbwfs_re_bg']!=''){ $reImgbg=' style="background:'.$pluginOptionsVal['csbwfs_re_bg'].';"';}else{$reImgbg='';}
|
319 |
+
//get stumbleupon button image background color
|
320 |
+
if(isset($pluginOptionsVal['csbwfs_st_bg']) && $pluginOptionsVal['csbwfs_st_bg']!=''){ $stImgbg=' style="background:'.$pluginOptionsVal['csbwfs_st_bg'].';"';} else{$stImgbg='';}
|
321 |
+
|
322 |
+
/** Message */
|
323 |
+
if($pluginOptionsVal['csbwfs_show_btn']!=''){ $showbtn=$pluginOptionsVal['csbwfs_show_btn'];}
|
324 |
+
else{$showbtn='Show Buttons';}
|
325 |
+
//get show/hide button message
|
326 |
+
if($pluginOptionsVal['csbwfs_hide_btn']!=''){ $hidebtn=$pluginOptionsVal['csbwfs_hide_btn'];}
|
327 |
+
else{$hidebtn='Hide Buttons';}
|
328 |
+
//get mail button message
|
329 |
+
if($pluginOptionsVal['csbwfs_share_msg']!=''){ $sharemsg=$pluginOptionsVal['csbwfs_share_msg'];}
|
330 |
+
else{$sharemsg='Share This With Your Friends';}
|
331 |
+
|
332 |
+
/** Check display Show/Hide button or not*/
|
333 |
+
if(isset($pluginOptionsVal['csbwfs_rmSHBtn']) && $pluginOptionsVal['csbwfs_rmSHBtn']!=''):
|
334 |
+
$isActiveHideShowBtn='yes';
|
335 |
+
else:
|
336 |
+
$isActiveHideShowBtn='no';
|
337 |
+
endif;
|
338 |
+
$floatingSidebarContent='<div id="csbwfs-delaydiv"><div class="csbwfs-social-widget" '.$idName.' title="'.$sharemsg.'" '.$style.'>';
|
339 |
+
|
340 |
+
if($isActiveHideShowBtn!='yes') :
|
341 |
+
$floatingSidebarContent .= '<div class="csbwfs-show"><a href="javascript:" title="'.$showbtn.'" id="csbwfs-show"><img src="'.plugin_dir_url( __FILE__ ).'images/'.$showImg.'" alt="'.$showbtn.'"></a></div>';
|
342 |
+
endif;
|
343 |
+
|
344 |
+
$floatingSidebarContent .= '<div id="csbwfs-social-inner">';
|
345 |
+
|
346 |
+
/** FB */
|
347 |
+
if($pluginOptionsVal['csbwfs_fpublishBtn']!=''):
|
348 |
+
$floatingSidebarContent .='<div class="csbwfs-sbutton csbwfsbtns"><div id="csbwfs-fb" class="csbwfs-fb"><a href="javascript:" onclick="javascript:window.open(\'//www.facebook.com/sharer/sharer.php?u='.$shareurl.'\', \'\', \'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600\');return false;" target="_blank" title="'.$fImgAlt.'" '.$fImgbg.'>';
|
349 |
+
|
350 |
+
if($fImg!=''){
|
351 |
+
$floatingSidebarContent .='<img src="'.$fImg.'" alt="'.$fImgAlt.'" width="35" height="35" >';
|
352 |
+
}else{
|
353 |
+
$floatingSidebarContent .='<i class="csbwfs_facebook"></i>';
|
354 |
+
}
|
355 |
+
$floatingSidebarContent .='</a></div></div>';
|
356 |
+
endif;
|
357 |
+
|
358 |
+
/** TW */
|
359 |
+
if($pluginOptionsVal['csbwfs_tpublishBtn']!=''):
|
360 |
+
$floatingSidebarContent .='<div class="csbwfs-sbutton csbwfsbtns"><div id="csbwfs-tw" class="csbwfs-tw"><a href="javascript:" onclick="window.open(\'//twitter.com/share?url='.$shareurl.'&text='.$ShareTitle.'\',\'_blank\',\'width=800,height=300\')" title="'.$tImgAlt.'" '.$tImgbg.'>';
|
361 |
+
if($tImg!='')
|
362 |
+
{
|
363 |
+
$floatingSidebarContent .='<img src="'.$tImg.'" alt="'.$tImgAlt.'" width="35" height="35" >';
|
364 |
+
}else{
|
365 |
+
$floatingSidebarContent .='<i class="csbwfs_twitter"></i>';
|
366 |
+
}
|
367 |
+
$floatingSidebarContent .='</a></div></div>';
|
368 |
+
|
369 |
+
endif;
|
370 |
+
|
371 |
+
/** LI */
|
372 |
+
if($pluginOptionsVal['csbwfs_lpublishBtn']!=''):
|
373 |
+
$floatingSidebarContent .='<div class="csbwfs-sbutton csbwfsbtns"><div id="csbwfs-li" class="csbwfs-li"><a href="javascript:" onclick="javascript:window.open(\'//www.linkedin.com/cws/share?mini=true&url='. $shareurl.'\',\'\',\'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=800\');return false;" title="'.$lImgAlt.'" '.$lImgbg.'>';
|
374 |
+
if($lImg!='')
|
375 |
+
{
|
376 |
+
$floatingSidebarContent .='<img src="'.$lImg.'" alt="'.$lImgAlt.'" width="35" height="35" >';
|
377 |
+
}else{
|
378 |
+
$floatingSidebarContent .='<i class="csbwfs_linkedin"></i>';
|
379 |
+
}
|
380 |
+
$floatingSidebarContent .='</a></div></div>';
|
381 |
+
endif;
|
382 |
+
|
383 |
+
/** PIN */
|
384 |
+
if($pluginOptionsVal['csbwfs_ppublishBtn']!=''):
|
385 |
+
$floatingSidebarContent .='<div class="csbwfs-sbutton csbwfsbtns"><div id="csbwfs-pin" class="csbwfs-pin"><a onclick="javascript:void((function(){var e=document.createElement(\'script\');e.setAttribute(\'type\',\'text/javascript\');e.setAttribute(\'charset\',\'UTF-8\');e.setAttribute(\'src\',\'//assets.pinterest.com/js/pinmarklet.js?r=\'+Math.random()*99999999);document.body.appendChild(e)})());" href="javascript:void(0);" '.$pImgbg.' title="'.$pImgAlt.'">';
|
386 |
+
if($pImg!='')
|
387 |
+
{
|
388 |
+
$floatingSidebarContent .='<img src="'.$pImg.'" alt="'.$pImgAlt.'" width="35" height="35" >';
|
389 |
+
}else{
|
390 |
+
$floatingSidebarContent .='<i class="csbwfs_pinterest"></i>';
|
391 |
+
}
|
392 |
+
$floatingSidebarContent .='</a></div></div>';
|
393 |
+
endif;
|
394 |
+
|
395 |
+
/** Reddit */
|
396 |
+
if(isset($pluginOptionsVal['csbwfs_republishBtn']) && $pluginOptionsVal['csbwfs_republishBtn']!=''):
|
397 |
+
$floatingSidebarContent .='<div class="csbwfs-sbutton csbwfsbtns"><div id="csbwfs-re" class="csbwfs-re"><a onclick="window.open(\'//reddit.com/submit?url='.$shareurl.'&title='.$ShareTitle.'\',\'Reddit\',\'toolbar=0,status=0,width=1000,height=800\');" href="javascript:void(0);" '.$reImgbg.' title="'.$reImgAlt.'">';
|
398 |
+
if($reImg!='')
|
399 |
+
{
|
400 |
+
$floatingSidebarContent .='<img src="'.$reImg.'" alt="'.$reImgAlt.'" width="35" height="35" >';
|
401 |
+
}else{
|
402 |
+
$floatingSidebarContent .='<i class="csbwfs_reddit"></i>';
|
403 |
+
}
|
404 |
+
$floatingSidebarContent .='</a></div></div>';
|
405 |
+
endif;
|
406 |
+
|
407 |
+
/** Stumbleupon/Mix */
|
408 |
+
if(isset($pluginOptionsVal['csbwfs_stpublishBtn']) && $pluginOptionsVal['csbwfs_stpublishBtn']!=''):
|
409 |
+
$floatingSidebarContent .='<div class="csbwfs-sbutton csbwfsbtns"><div id="csbwfs-st" class="csbwfs-st"><a onclick="window.open(\'//mix.com/mixit?su=submit&url='.$shareurl.'\',\'Mix\',\'toolbar=0,status=0,width=1000,height=800\');" href="javascript:void(0);" '.$stImgbg.' title="'.$stImgAlt.'">';
|
410 |
+
if($stImg!='')
|
411 |
+
{
|
412 |
+
$floatingSidebarContent .='<img src="'.$stImg.'" alt="'.$stImgAlt.'" width="35" height="35" >';
|
413 |
+
}else{
|
414 |
+
$floatingSidebarContent .='<i class="csbwfs_stumbleupon"></i>';
|
415 |
+
}
|
416 |
+
$floatingSidebarContent .='</a></div></div>';
|
417 |
+
endif;
|
418 |
+
/** YT */
|
419 |
+
if(isset($pluginOptionsVal['csbwfs_ytpublishBtn']) && $pluginOptionsVal['csbwfs_ytpublishBtn']!=''):
|
420 |
+
$floatingSidebarContent .='<div class="csbwfs-sbutton csbwfsbtns"><div id="csbwfs-yt" class="csbwfs-yt"><a onclick="window.open(\''.$pluginOptionsVal['csbwfs_ytPath'].'\');" href="javascript:void(0);" '.$ytImgbg.' title="'.$ytImgAlt.'">';
|
421 |
+
if($ytImg!='')
|
422 |
+
{
|
423 |
+
$floatingSidebarContent .='<img src="'.$ytImg.'" alt="'.$ytImgAlt.'" width="35" height="35" >';
|
424 |
+
}else{
|
425 |
+
$floatingSidebarContent .='<i class="csbwfs_youtube"></i>';
|
426 |
+
}
|
427 |
+
$floatingSidebarContent .='</a></div></div>';
|
428 |
+
endif;
|
429 |
+
/** Skype */
|
430 |
+
if((isset($pluginOptionsVal['csbwfs_skpublishBtn']) && $pluginOptionsVal['csbwfs_skpublishBtn']!='') && (isset($pluginOptionsVal['csbwfs_skPath']) && $pluginOptionsVal['csbwfs_skPath']!='')):
|
431 |
+
$floatingSidebarContent .='<div class="csbwfs-sbutton csbwfsbtns"><div id="csbwfs-sk" class="csbwfs-sk"><a href="skype:'.$pluginOptionsVal['csbwfs_skPath'].'" >';
|
432 |
+
$floatingSidebarContent .='<i class="csbwfs_skype"></i>';
|
433 |
+
$floatingSidebarContent .='</a></div></div>';
|
434 |
+
endif;
|
435 |
+
/** Mail*/
|
436 |
+
if($pluginOptionsVal['csbwfs_mpublishBtn']!=''):
|
437 |
+
$floatingSidebarContent .='<div class="csbwfs-sbutton csbwfsbtns"><div id="csbwfs-ml" class="csbwfs-ml"><a href="mailto:'.$mailMsg.'" title="'.$mImgAlt.'" '.$mImgbg.' >';
|
438 |
+
if($mImg!='')
|
439 |
+
{
|
440 |
+
$floatingSidebarContent .='<img src="'.$mImg.'" alt="'.$mImgAlt.'" width="35" height="35" >';
|
441 |
+
}else{
|
442 |
+
$floatingSidebarContent .='<i class="csbwfs_mail"></i>';
|
443 |
+
}
|
444 |
+
$floatingSidebarContent .='</a></div></div>';
|
445 |
+
endif;
|
446 |
+
|
447 |
+
$floatingSidebarContent .='</div>'; //End social-inner
|
448 |
+
|
449 |
+
if($isActiveHideShowBtn!='yes') :
|
450 |
+
$floatingSidebarContent .='<div class="csbwfs-hide"><a href="javascript:" title="'.$hidebtn.'" id="csbwfs-hide"><img src="'.plugin_dir_url( __FILE__ ).'images/'.$hideImg.'" alt="'.$hidebtn.'"></a></div>';
|
451 |
+
endif;
|
452 |
+
|
453 |
+
$floatingSidebarContent .='</div></div>'; //End social-inner
|
454 |
+
/** Check conditions */
|
455 |
+
// Returns the content.
|
456 |
+
if(isset($pluginOptionsVal['csbwfs_hide_home'])){$hideOnHome=$pluginOptionsVal['csbwfs_hide_home']; }else{ $hideOnHome='';}
|
457 |
+
|
458 |
+
if((is_home() && is_front_page()) && $hideOnHome=='yes'):
|
459 |
+
$floatingSidebarContent='';
|
460 |
+
endif;
|
461 |
+
if(is_front_page() && $hideOnHome=='yes' ):
|
462 |
+
$floatingSidebarContent='';
|
463 |
+
endif;
|
464 |
+
/** hide on 404 pages */
|
465 |
+
if(is_404()):$floatingSidebarContent='';endif;
|
466 |
+
|
467 |
+
_e($floatingSidebarContent,'wpexpertsin');
|
468 |
+
}
|
469 |
+
|
470 |
+
/**
|
471 |
+
* Add social share bottons to the end of every post/page.
|
472 |
+
*
|
473 |
+
* @uses is_home()
|
474 |
+
* @uses is_page()
|
475 |
+
* @uses is_single()
|
476 |
+
*/
|
477 |
+
function csbfs_the_content_filter( $content ) {
|
478 |
+
|
479 |
+
global $post;
|
480 |
+
$pluginOptionsVal=get_csbwf_sidebar_options();
|
481 |
+
if(is_category())
|
482 |
+
{
|
483 |
+
$category_id = get_query_var('cat');
|
484 |
+
$cats = get_the_category();
|
485 |
+
$ShareTitle=$cats[0]->name;
|
486 |
+
}elseif($post && is_singular($post->post_type))
|
487 |
+
{
|
488 |
+
$ShareTitle=$post->post_title;
|
489 |
+
}
|
490 |
+
elseif(is_archive()){
|
491 |
+
global $wp;
|
492 |
+
if ( is_day() ) :
|
493 |
+
$ShareTitle='Daily Archives: '. get_the_date();
|
494 |
+
elseif ( is_month() ) :
|
495 |
+
$ShareTitle='Monthly Archives: '. get_the_date('F Y');
|
496 |
+
elseif ( is_year() ) :
|
497 |
+
$ShareTitle='Yearly Archives: '. get_the_date('Y');
|
498 |
+
elseif ( is_author() ) :
|
499 |
+
$ShareTitle='Author Archives: '. get_the_author();
|
500 |
+
else :
|
501 |
+
$ShareTitle ='Blog Archives';
|
502 |
+
endif;
|
503 |
+
}
|
504 |
+
else
|
505 |
+
{
|
506 |
+
$ShareTitle=get_bloginfo('name');
|
507 |
+
}
|
508 |
+
/* Set title and url for home page */
|
509 |
+
if(is_home() && is_front_page()){
|
510 |
+
$ShareTitle=get_bloginfo('name');
|
511 |
+
}
|
512 |
+
|
513 |
+
$shareurl = esc_url(htmlspecialchars(csbwfs_get_current_page_url($_SERVER), ENT_QUOTES, 'UTF-8'));
|
514 |
+
|
515 |
+
$ShareTitle= htmlspecialchars(rawurlencode($ShareTitle));
|
516 |
+
|
517 |
+
/* Get All buttons Image */
|
518 |
+
|
519 |
+
//get facebook button image
|
520 |
+
if($pluginOptionsVal['csbwfs_page_fb_image']!=''){ $fImg=$pluginOptionsVal['csbwfs_page_fb_image'];}
|
521 |
+
else{$fImg='';}
|
522 |
+
//get twitter button image
|
523 |
+
if($pluginOptionsVal['csbwfs_page_tw_image']!=''){ $tImg=$pluginOptionsVal['csbwfs_page_tw_image'];}
|
524 |
+
else{$tImg='';}
|
525 |
+
//get Linkedin button image
|
526 |
+
if($pluginOptionsVal['csbwfs_page_li_image']!=''){ $lImg=$pluginOptionsVal['csbwfs_page_li_image'];}
|
527 |
+
else{$lImg='';}
|
528 |
+
//get mail button image
|
529 |
+
if($pluginOptionsVal['csbwfs_page_mail_image']!=''){ $mImg=$pluginOptionsVal['csbwfs_page_mail_image'];}
|
530 |
+
else{$mImg='';}
|
531 |
+
//get pinterest button image
|
532 |
+
if($pluginOptionsVal['csbwfs_page_pin_image']!=''){ $pImg=$pluginOptionsVal['csbwfs_page_pin_image'];}
|
533 |
+
else{$pImg='';}
|
534 |
+
|
535 |
+
//get youtube button image
|
536 |
+
if(isset($pluginOptionsVal['csbwfs_page_yt_image']) && $pluginOptionsVal['csbwfs_page_yt_image']!=''){ $ytImg=$pluginOptionsVal['csbwfs_page_yt_image'];}
|
537 |
+
else{$ytImg='';}
|
538 |
+
//get reddit plus button image
|
539 |
+
if(isset($pluginOptionsVal['csbwfs_page_re_image']) && $pluginOptionsVal['csbwfs_page_re_image']!=''){ $reImg=$pluginOptionsVal['csbwfs_page_re_image'];}
|
540 |
+
else{$reImg='';}
|
541 |
+
//get stumbleupon button image
|
542 |
+
if(isset($pluginOptionsVal['csbwfs_page_st_image']) && $pluginOptionsVal['csbwfs_page_st_image']!=''){ $stImg=$pluginOptionsVal['csbwfs_page_st_image'];}
|
543 |
+
else{$stImg='';}
|
544 |
+
|
545 |
+
/* Get All buttons Image Alt/Title */
|
546 |
+
//get facebook button image alt/title
|
547 |
+
if($pluginOptionsVal['csbwfs_page_fb_title']!=''){ $fImgAlt=$pluginOptionsVal['csbwfs_page_fb_title'];}
|
548 |
+
else{$fImgAlt='Share On Facebook';}
|
549 |
+
//get twitter button image alt/title
|
550 |
+
if($pluginOptionsVal['csbwfs_page_tw_title']!=''){ $tImgAlt=$pluginOptionsVal['csbwfs_page_tw_title'];}
|
551 |
+
else{$tImgAlt='Share On Twitter';}
|
552 |
+
//get Linkedin button image alt/title
|
553 |
+
if($pluginOptionsVal['csbwfs_page_li_title']!=''){ $lImgAlt=$pluginOptionsVal['csbwfs_page_li_title'];}
|
554 |
+
else{$lImgAlt='Share On Linkedin';}
|
555 |
+
//get mail button image alt/title
|
556 |
+
if($pluginOptionsVal['csbwfs_page_mail_title']!=''){ $mImgAlt=$pluginOptionsVal['csbwfs_page_mail_title'];}
|
557 |
+
else{$mImgAlt='Contact us';}
|
558 |
+
//get pinterest button image alt/title
|
559 |
+
if($pluginOptionsVal['csbwfs_page_pin_title']!=''){ $pImgAlt=$pluginOptionsVal['csbwfs_page_pin_title'];}
|
560 |
+
else{$pImgAlt='Share On Pinterest';}
|
561 |
+
//get youtube button image alt/title
|
562 |
+
if(isset($pluginOptionsVal['csbwfs_page_yt_title']) && $pluginOptionsVal['csbwfs_page_yt_title']!=''){ $ytImgAlt=$pluginOptionsVal['csbwfs_page_yt_title'];}
|
563 |
+
else{$ytImgAlt='Share On Youtube';}
|
564 |
+
//get reddit plus button image alt/title
|
565 |
+
if(isset($pluginOptionsVal['csbwfs_page_re_title']) && $pluginOptionsVal['csbwfs_page_re_title']!=''){ $reImgAlt=$pluginOptionsVal['csbwfs_page_re_title'];}
|
566 |
+
else{$reImgAlt='Share On Reddit';}
|
567 |
+
//get stumbleupon button image alt/title
|
568 |
+
if(isset($pluginOptionsVal['csbwfs_page_st_title']) && $pluginOptionsVal['csbwfs_page_st_title']!=''){ $stImgAlt=$pluginOptionsVal['csbwfs_page_st_title'];}
|
569 |
+
else{$stImgAlt='Share On Stumbleupon';}
|
570 |
+
|
571 |
+
/* Get All buttons background color */
|
572 |
+
//get facebook button image background color
|
573 |
+
if($pluginOptionsVal['csbwfs_page_fb_bg']!=''){ $fImgbg=' style="background:'.$pluginOptionsVal['csbwfs_page_fb_bg'].';"';}
|
574 |
+
else{$fImgbg='';}
|
575 |
+
//get twitter button image background color
|
576 |
+
if($pluginOptionsVal['csbwfs_page_tw_bg']!=''){ $tImgbg=' style="background:'.$pluginOptionsVal['csbwfs_page_tw_bg'].';"';}
|
577 |
+
else{$tImgbg='';}
|
578 |
+
//get Linkedin button image background color
|
579 |
+
if($pluginOptionsVal['csbwfs_page_li_bg']!=''){ $lImgbg=' style="background:'.$pluginOptionsVal['csbwfs_page_li_bg'].';"';}
|
580 |
+
else{$lImgbg='';}
|
581 |
+
//get mail button image background color
|
582 |
+
if($pluginOptionsVal['csbwfs_page_mail_bg']!=''){ $mImgbg=' style="background:'.$pluginOptionsVal['csbwfs_page_mail_bg'].';"';}
|
583 |
+
else{$mImgbg='';}
|
584 |
+
//get pinterest button image background color
|
585 |
+
if($pluginOptionsVal['csbwfs_page_pin_bg']!=''){ $pImgbg=' style="background:'.$pluginOptionsVal['csbwfs_page_pin_bg'].';"';}
|
586 |
+
else{$pImgbg='';}
|
587 |
+
|
588 |
+
//get youtube button image background color
|
589 |
+
if(isset($pluginOptionsVal['csbwfs_page_yt_bg']) && $pluginOptionsVal['csbwfs_page_yt_bg']!=''){ $ytImgbg=' style="background:'.$pluginOptionsVal['csbwfs_page_yt_bg'].';"';}else{$ytImgbg='';}
|
590 |
+
//get reddit button image background color
|
591 |
+
if(isset($pluginOptionsVal['csbwfs_page_re_bg']) && $pluginOptionsVal['csbwfs_page_re_bg']!=''){ $reImgbg=' style="background:'.$pluginOptionsVal['csbwfs_page_re_bg'].';"';}else{$reImgbg='';}
|
592 |
+
//get stumbleupon button image background color
|
593 |
+
if(isset($pluginOptionsVal['csbwfs_page_st_bg']) && $pluginOptionsVal['csbwfs_page_st_bg']!=''){ $stImgbg=' style="background:'.$pluginOptionsVal['csbwfs_page_st_bg'].';"';} else{$stImgbg='';}
|
594 |
+
//get email message
|
595 |
+
if(is_page() || is_single() || is_category() || is_archive()){
|
596 |
+
|
597 |
+
if($pluginOptionsVal['csbwfs_mailMessage']!=''){ $mailMsg=$pluginOptionsVal['csbwfs_mailMessage'];} else{
|
598 |
+
$mailMsg='?subject='.get_the_title().'&body='.$shareurl;}
|
599 |
+
}else
|
600 |
+
{
|
601 |
+
$mailMsg='?subject='.get_bloginfo('name').'&body='.home_url('/');
|
602 |
+
}
|
603 |
+
if(isset($pluginOptionsVal['csbwfs_btn_position']) && $pluginOptionsVal['csbwfs_btn_position']!=''):
|
604 |
+
$btnPosition=$pluginOptionsVal['csbwfs_btn_position'];
|
605 |
+
else:
|
606 |
+
$btnPosition='left';
|
607 |
+
endif;
|
608 |
+
|
609 |
+
if(isset($pluginOptionsVal['csbwfs_btn_text']) && $pluginOptionsVal['csbwfs_btn_text']!=''):
|
610 |
+
$btnText=$pluginOptionsVal['csbwfs_btn_text'];
|
611 |
+
else:
|
612 |
+
$btnText='';
|
613 |
+
endif;
|
614 |
+
|
615 |
+
$shareButtonContent='<div id="socialButtonOnPage" class="'.$btnPosition.'SocialButtonOnPage">';
|
616 |
+
if($btnText!=''):
|
617 |
+
$shareButtonContent.='<div class="sharethis-arrow" title="'.$btnText.'"><span>'.$btnText.'</span></div>';
|
618 |
+
endif;
|
619 |
+
/* Facebook*/
|
620 |
+
if($pluginOptionsVal['csbwfs_fpublishBtn']!=''):
|
621 |
+
$shareButtonContent.='<div class="csbwfs-sbutton-post"><div id="fb-p" class="csbwfs-fb"><a href="javascript:" onclick="window.open(\'//www.facebook.com/sharer/sharer.php?u='.$shareurl.'\',\'Facebook\',\'width=800,height=300\');return false;"
|
622 |
+
target="_blank" title="'.$fImgAlt.'" '.$fImgbg.'>';
|
623 |
+
if($fImg!=''){
|
624 |
+
$shareButtonContent .='<img src="'.$fImg.'" alt="'.$fImgAlt.'" width="35" height="35" >';
|
625 |
+
}else{
|
626 |
+
$shareButtonContent .='<i class="csbwfs_facebook"></i>';
|
627 |
+
}
|
628 |
+
$shareButtonContent .='</a></div></div>';
|
629 |
+
endif;
|
630 |
+
|
631 |
+
/* Twitter */
|
632 |
+
if($pluginOptionsVal['csbwfs_tpublishBtn']!=''):
|
633 |
+
$shareButtonContent.='<div class="csbwfs-sbutton-post"><div id="tw-p" class="csbwfs-tw"><a href="javascript:" onclick="window.open(\'//twitter.com/share?url='.$shareurl.'&text='.$ShareTitle.' \', \'_blank\', \'width=800,height=300\')" title="'.$tImgAlt.'" '.$tImgbg.'>';
|
634 |
+
if($tImg!='')
|
635 |
+
{
|
636 |
+
$shareButtonContent .='<img src="'.$tImg.'" alt="'.$tImgAlt.'" width="35" height="35" >';
|
637 |
+
}else{
|
638 |
+
$shareButtonContent .='<i class="csbwfs_twitter"></i>';
|
639 |
+
}
|
640 |
+
$shareButtonContent .='</a></div></div>';
|
641 |
+
endif;
|
642 |
+
/* Linkedin */
|
643 |
+
if($pluginOptionsVal['csbwfs_lpublishBtn']!=''):
|
644 |
+
$shareButtonContent.='<div class="csbwfs-sbutton-post"><div id="li-p" class="csbwfs-li"><a href="javascript:" onclick="javascript:window.open(\'//www.linkedin.com/shareArticle?mini=true&url='.$shareurl.'\',\'\', \'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600\');return false;" title="'.$lImgAlt.'" '.$lImgbg.'>';
|
645 |
+
if($lImg!='')
|
646 |
+
{
|
647 |
+
$shareButtonContent .='<img src="'.$lImg.'" alt="'.$lImgAlt.'" width="35" height="35" >';
|
648 |
+
}else{
|
649 |
+
$shareButtonContent .='<i class="csbwfs_linkedin"></i>';
|
650 |
+
}
|
651 |
+
$shareButtonContent .='</a></div></div>';
|
652 |
+
endif;
|
653 |
+
|
654 |
+
/* Pinterest */
|
655 |
+
if($pluginOptionsVal['csbwfs_ppublishBtn']!=''):
|
656 |
+
$shareButtonContent.='<div class="csbwfs-sbutton-post"><div id="pin-p" class="csbwfs-pin"><a onclick="javascript:void((function(){var e=document.createElement(\'script\');e.setAttribute(\'type\',\'text/javascript\');e.setAttribute(\'charset\',\'UTF-8\');e.setAttribute(\'src\',\'//assets.pinterest.com/js/pinmarklet.js?r=\'+Math.random()*99999999);document.body.appendChild(e)})());" href="javascript:void(0);" title="'.$pImgAlt.'" '.$pImgbg.'>';
|
657 |
+
if($pImg!='')
|
658 |
+
{
|
659 |
+
$shareButtonContent .='<img src="'.$pImg.'" alt="'.$pImgAlt.'" width="35" height="35" >';
|
660 |
+
}else{
|
661 |
+
$shareButtonContent .='<i class="csbwfs_pinterest"></i>';
|
662 |
+
}
|
663 |
+
$shareButtonContent .='</a></div></div>';
|
664 |
+
endif;
|
665 |
+
/* Reddit */
|
666 |
+
if(isset($pluginOptionsVal['csbwfs_republishBtn']) && $pluginOptionsVal['csbwfs_republishBtn']!=''):
|
667 |
+
$shareButtonContent.='<div class="csbwfs-sbutton-post"><div id="re-p" class="csbwfs-re"><a onclick="window.open(\'//reddit.com/submit?url='.$shareurl.'&title='.$ShareTitle.'\',\'Reddit\',\'toolbar=0,status=0,width=1000,height=800\');" href="javascript:void(0);" title="'.$reImgAlt.'" '.$reImgbg.'>';
|
668 |
+
if($reImg!='')
|
669 |
+
{
|
670 |
+
$shareButtonContent .='<img src="'.$reImg.'" alt="'.$reImgAlt.'" width="35" height="35" >';
|
671 |
+
}else{
|
672 |
+
$shareButtonContent .='<i class="csbwfs_reddit"></i>';
|
673 |
+
}
|
674 |
+
$shareButtonContent .='</a></div></div>';
|
675 |
+
endif;
|
676 |
+
/* Stumbleupon/Mix */
|
677 |
+
if(isset($pluginOptionsVal['csbwfs_stpublishBtn']) && $pluginOptionsVal['csbwfs_stpublishBtn']!=''):
|
678 |
+
$shareButtonContent.='<div class="csbwfs-sbutton-post"><div id="st-p" class="csbwfs-st"><a onclick="window.open(\'//mix.com/mixit?su=submit&url='.$shareurl.'\',\'Mix\',\'toolbar=0,status=0,width=1000,height=800\');" href="javascript:void(0);" title="'.$stImgAlt.'" '.$stImgbg.'>';
|
679 |
+
if($stImg!='')
|
680 |
+
{
|
681 |
+
$shareButtonContent .='<img src="'.$stImg.'" alt="'.$stImgAlt.'" width="35" height="35" >';
|
682 |
+
}else{
|
683 |
+
$shareButtonContent .='<i class="csbwfs_stumbleupon"></i>';
|
684 |
+
}
|
685 |
+
$shareButtonContent .='</a></div></div>';
|
686 |
+
endif;
|
687 |
+
/* Youtube */
|
688 |
+
if(isset($pluginOptionsVal['csbwfs_ytpublishBtn']) && $pluginOptionsVal['csbwfs_ytpublishBtn']!=''):
|
689 |
+
$shareButtonContent.='<div class="csbwfs-sbutton-post"><div id="yt-p" class="csbwfs-yt"><a onclick="window.open(\''.$pluginOptionsVal['csbwfs_ytPath'].'\');" href="javascript:void(0);" title="'.$ytImgAlt.'" '.$ytImgbg.'>';
|
690 |
+
if($ytImg!='')
|
691 |
+
{
|
692 |
+
$shareButtonContent .='<img src="'.$ytImg.'" alt="'.$ytImgAlt.'" width="35" height="35" >';
|
693 |
+
}else{
|
694 |
+
$shareButtonContent .='<i class="csbwfs_youtube"></i>';
|
695 |
+
}
|
696 |
+
$shareButtonContent .='</a></div></div>';
|
697 |
+
endif;
|
698 |
+
/** Skype */
|
699 |
+
if((isset($pluginOptionsVal['csbwfs_skpublishBtn']) && $pluginOptionsVal['csbwfs_skpublishBtn']!='') && (isset($pluginOptionsVal['csbwfs_skPath']) && $pluginOptionsVal['csbwfs_skPath']!='')):
|
700 |
+
$shareButtonContent .='<div class="csbwfs-sbutton-post"><div id="sk-p" class="csbwfs-sk"><a href="skype:'.$pluginOptionsVal['csbwfs_skPath'].'" >';
|
701 |
+
$shareButtonContent .='<i class="csbwfs_skype"></i>';
|
702 |
+
$shareButtonContent .='</a></div></div>';
|
703 |
+
endif;
|
704 |
+
/* Email */
|
705 |
+
if($pluginOptionsVal['csbwfs_mpublishBtn']!=''):
|
706 |
+
$shareButtonContent.='<div class="csbwfs-sbutton-post"><div id="ml-p" class="csbwfs-ml"><a href="mailto:'.$mailMsg.'" title="'.$mImgAlt.'" '.$mImgbg.'>';
|
707 |
+
if($mImg!='')
|
708 |
+
{
|
709 |
+
$shareButtonContent .='<img src="'.$mImg.'" alt="'.$mImgAlt.'" width="35" height="35" >';
|
710 |
+
}else{
|
711 |
+
$shareButtonContent .='<i class="csbwfs_mail"></i>';
|
712 |
+
}
|
713 |
+
$shareButtonContent .='</a></div></div>';
|
714 |
+
endif;
|
715 |
+
$shareButtonContent.='</div>';
|
716 |
+
|
717 |
+
// Returns the content.
|
718 |
+
global $post;
|
719 |
+
$shareButtonContentReturn='';
|
720 |
+
/* DEFAULT HOME */
|
721 |
+
if((is_home() && is_front_page()) && $pluginOptionsVal['csbwfs_page_hide_home']=='yes'):
|
722 |
+
$shareButtonContentReturn=$shareButtonContent;
|
723 |
+
endif;
|
724 |
+
/* STATIC front page */
|
725 |
+
if(is_front_page() && $pluginOptionsVal['csbwfs_page_hide_home']=='yes'):
|
726 |
+
$shareButtonContentReturn=$shareButtonContent;
|
727 |
+
endif;
|
728 |
+
//post
|
729 |
+
if(is_single() && $pluginOptionsVal['csbwfs_page_hide_post']=='yes'):
|
730 |
+
$shareButtonContentReturn=$shareButtonContent;
|
731 |
+
endif;
|
732 |
+
//page
|
733 |
+
if(is_page() && $pluginOptionsVal['csbwfs_page_hide_page']=='yes'):
|
734 |
+
if(!is_front_page()):
|
735 |
+
$shareButtonContentReturn=$shareButtonContent;
|
736 |
+
endif;
|
737 |
+
endif;
|
738 |
+
//archive
|
739 |
+
if(is_archive() && $pluginOptionsVal['csbwfs_page_hide_archive']=='yes'):
|
740 |
+
$shareButtonContentReturn=$shareButtonContent;
|
741 |
+
endif;
|
742 |
+
// 404
|
743 |
+
if(is_404()):
|
744 |
+
$shareButtonContentReturn='';
|
745 |
+
endif;
|
746 |
+
/** Buttons position on content */
|
747 |
+
if(isset($pluginOptionsVal['csbwfs_btn_display']) && $pluginOptionsVal['csbwfs_btn_display']=='above'){
|
748 |
+
$finalContent= $shareButtonContentReturn.$content;
|
749 |
+
}else
|
750 |
+
{
|
751 |
+
$finalContent = $content.$shareButtonContentReturn;
|
752 |
+
}
|
753 |
+
return $finalContent;
|
754 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
custom-share-buttons-with-floating-sidebar.php
CHANGED
@@ -2,13 +2,13 @@
|
|
2 |
/*
|
3 |
Plugin Name: Custom Share Buttons with Floating Sidebar
|
4 |
Plugin URI: https://www.wp-experts.in
|
5 |
-
Description: Share buttons with extra features to sharing your website posts/pages on Facebook, Twitter, Instagram, Whatsapp, Pinterest etc.
|
6 |
Author: WP Experts Team
|
7 |
Author URI: https://www.wp-experts.in
|
8 |
-
Version: 4.
|
9 |
*/
|
10 |
|
11 |
-
/* Copyright 2018-
|
12 |
|
13 |
This program is free software; you can redistribute it and/or modify
|
14 |
it under the terms of the GNU General Public License, version 2, as
|
@@ -25,15 +25,13 @@ Version: 4.0
|
|
25 |
*/
|
26 |
//Admin "Custom Share Buttons with Floating Sidebar" Menu Item
|
27 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
28 |
-
|
29 |
-
{
|
30 |
-
class Csbwfs_Class
|
31 |
-
{
|
32 |
/**
|
33 |
* Construct the plugin object
|
34 |
*/
|
35 |
-
public function __construct()
|
36 |
-
{
|
37 |
// register actions
|
38 |
add_action('admin_init', array(&$this, 'csbwfs_admin_init'));
|
39 |
add_action('admin_menu', array(&$this, 'csbwf_sidebar_menu'));
|
@@ -66,8 +64,7 @@ if(!class_exists('Csbwfs_Class'))
|
|
66 |
/**
|
67 |
* hook into WP's admin_init action hook
|
68 |
*/
|
69 |
-
public function csbwfs_admin_init()
|
70 |
-
{
|
71 |
// Set up the settings for this plugin
|
72 |
$this->csbwf_sidebar_init();
|
73 |
// Possibly do additional admin_init tasks
|
@@ -75,105 +72,102 @@ if(!class_exists('Csbwfs_Class'))
|
|
75 |
/**
|
76 |
* Initialize some custom settings
|
77 |
*/
|
78 |
-
public function csbwf_sidebar_init()
|
79 |
-
{
|
80 |
// register the settings for this plugin
|
81 |
-
register_setting('csbwf_sidebar_options','csbwfs_active');
|
82 |
-
register_setting('csbwf_sidebar_options','csbwfs_position');
|
83 |
-
register_setting('csbwf_sidebar_options','csbwfs_btn_position');
|
84 |
-
register_setting('csbwf_sidebar_options','csbwfs_btn_text');
|
85 |
-
register_setting('csbwf_sidebar_options','csbwfs_fb_image');
|
86 |
-
register_setting('csbwf_sidebar_options','csbwfs_tw_image');
|
87 |
-
register_setting('csbwf_sidebar_options','csbwfs_li_image');
|
88 |
-
register_setting('csbwf_sidebar_options','csbwfs_re_image');
|
89 |
-
register_setting('csbwf_sidebar_options','csbwfs_st_image');
|
90 |
-
register_setting('csbwf_sidebar_options','csbwfs_mail_image');
|
91 |
-
register_setting('csbwf_sidebar_options','csbwfs_pin_image');
|
92 |
-
register_setting('csbwf_sidebar_options','csbwfs_yt_image');
|
93 |
-
register_setting('csbwf_sidebar_options','csbwfs_fb_bg');
|
94 |
-
register_setting('csbwf_sidebar_options','csbwfs_tw_bg');
|
95 |
-
register_setting('csbwf_sidebar_options','csbwfs_li_bg');
|
96 |
-
register_setting('csbwf_sidebar_options','csbwfs_mail_bg');
|
97 |
-
register_setting('csbwf_sidebar_options','csbwfs_pin_bg');
|
98 |
-
register_setting('csbwf_sidebar_options','csbwfs_re_bg');
|
99 |
-
register_setting('csbwf_sidebar_options','csbwfs_st_bg');
|
100 |
-
register_setting('csbwf_sidebar_options','csbwfs_yt_bg');
|
101 |
-
register_setting('csbwf_sidebar_options','csbwfs_page_fb_bg');
|
102 |
-
register_setting('csbwf_sidebar_options','csbwfs_page_tw_bg');
|
103 |
-
register_setting('csbwf_sidebar_options','csbwfs_page_li_bg');
|
104 |
-
register_setting('csbwf_sidebar_options','csbwfs_page_mail_bg');
|
105 |
-
register_setting('csbwf_sidebar_options','csbwfs_page_pin_bg');
|
106 |
-
register_setting('csbwf_sidebar_options','csbwfs_page_re_bg');
|
107 |
-
register_setting('csbwf_sidebar_options','csbwfs_page_st_bg');
|
108 |
-
register_setting('csbwf_sidebar_options','csbwfs_page_yt_bg');
|
109 |
-
register_setting('csbwf_sidebar_options','csbwfs_fpublishBtn');
|
110 |
-
register_setting('csbwf_sidebar_options','csbwfs_tpublishBtn');
|
111 |
-
register_setting('csbwf_sidebar_options','csbwfs_ppublishBtn');
|
112 |
-
register_setting('csbwf_sidebar_options','csbwfs_ytpublishBtn');
|
113 |
-
register_setting('csbwf_sidebar_options','csbwfs_skpublishBtn');
|
114 |
-
register_setting('csbwf_sidebar_options','csbwfs_skPath');
|
115 |
-
register_setting('csbwf_sidebar_options','csbwfs_republishBtn');
|
116 |
-
register_setting('csbwf_sidebar_options','csbwfs_stpublishBtn');
|
117 |
-
register_setting('csbwf_sidebar_options','csbwfs_ytPath');
|
118 |
-
register_setting('csbwf_sidebar_options','csbwfs_lpublishBtn');
|
119 |
-
register_setting('csbwf_sidebar_options','csbwfs_mpublishBtn');
|
120 |
-
register_setting('csbwf_sidebar_options','csbwfs_mailMessage');
|
121 |
-
register_setting('csbwf_sidebar_options','csbwfs_top_margin');
|
122 |
-
register_setting('csbwf_sidebar_options','csbwfs_delayTimeBtn');
|
123 |
-
register_setting('csbwf_sidebar_options','csbwfs_btn_display');
|
124 |
/** Image Alt */
|
125 |
-
register_setting('csbwf_sidebar_options','csbwfs_fb_title');
|
126 |
-
register_setting('csbwf_sidebar_options','csbwfs_tw_title');
|
127 |
-
register_setting('csbwf_sidebar_options','csbwfs_li_title');
|
128 |
-
register_setting('csbwf_sidebar_options','csbwfs_pin_title');
|
129 |
-
register_setting('csbwf_sidebar_options','csbwfs_mail_title');
|
130 |
-
register_setting('csbwf_sidebar_options','csbwfs_yt_title');
|
131 |
-
register_setting('csbwf_sidebar_options','csbwfs_re_title');
|
132 |
-
register_setting('csbwf_sidebar_options','csbwfs_st_title');
|
133 |
-
register_setting('csbwf_sidebar_options','csbwfs_page_fb_title');
|
134 |
-
register_setting('csbwf_sidebar_options','csbwfs_page_tw_title');
|
135 |
-
register_setting('csbwf_sidebar_options','csbwfs_page_li_title');
|
136 |
-
register_setting('csbwf_sidebar_options','csbwfs_page_pin_title');
|
137 |
-
register_setting('csbwf_sidebar_options','csbwfs_page_mail_title');
|
138 |
-
register_setting('csbwf_sidebar_options','csbwfs_page_yt_title');
|
139 |
-
register_setting('csbwf_sidebar_options','csbwfs_page_re_title');
|
140 |
-
register_setting('csbwf_sidebar_options','csbwfs_page_st_title');
|
141 |
-
register_setting('csbwf_sidebar_options','csbwfs_auto_hide');
|
142 |
//Options for post/pages
|
143 |
-
register_setting('csbwf_sidebar_options','csbwfs_buttons_active');
|
144 |
-
register_setting('csbwf_sidebar_options','csbwfs_page_hide_home');
|
145 |
-
register_setting('csbwf_sidebar_options','csbwfs_page_hide_post');
|
146 |
-
register_setting('csbwf_sidebar_options','csbwfs_page_hide_page');
|
147 |
-
register_setting('csbwf_sidebar_options','csbwfs_page_hide_archive');
|
148 |
-
register_setting('csbwf_sidebar_options','csbwfs_hide_home');
|
149 |
-
register_setting('csbwf_sidebar_options','csbwfs_page_fb_image');
|
150 |
-
register_setting('csbwf_sidebar_options','csbwfs_page_tw_image');
|
151 |
-
register_setting('csbwf_sidebar_options','csbwfs_page_li_image');
|
152 |
-
register_setting('csbwf_sidebar_options','csbwfs_page_mail_image');
|
153 |
-
register_setting('csbwf_sidebar_options','csbwfs_page_pin_image');
|
154 |
-
register_setting('csbwf_sidebar_options','csbwfs_page_re_image');
|
155 |
-
register_setting('csbwf_sidebar_options','csbwfs_page_st_image');
|
156 |
-
register_setting('csbwf_sidebar_options','csbwfs_page_yt_image');
|
157 |
/** message content */
|
158 |
-
register_setting('csbwf_sidebar_options','csbwfs_show_btn');
|
159 |
-
register_setting('csbwf_sidebar_options','csbwfs_hide_btn');
|
160 |
-
register_setting('csbwf_sidebar_options','csbwfs_share_msg');
|
161 |
-
register_setting('csbwf_sidebar_options','csbwfs_rmSHBtn');
|
162 |
//register_setting('csbwf_sidebar_options','csbwfs_featuredshrimg');
|
163 |
//register_setting('csbwf_sidebar_options','csbwfs_defaultfeaturedshrimg');
|
164 |
-
register_setting('csbwf_sidebar_options','csbwfs_deactive_for_mob');
|
165 |
} // END public function init_custom_settings()
|
166 |
/**
|
167 |
* add a menu
|
168 |
*/
|
169 |
-
public function csbwf_sidebar_menu()
|
170 |
-
{
|
171 |
add_options_page('Social Share Buttons(CSBWFS)','Social Share Buttons(CSBWFS)','manage_options','csbwfs-settings',array(&$this,'csbwf_sidebar_admin_option_page'));
|
172 |
|
173 |
} // END public function add_menu()
|
174 |
|
175 |
-
public function csbwf_sidebar_admin_option_page()
|
176 |
-
{
|
177 |
if(!current_user_can('manage_options'))
|
178 |
{
|
179 |
wp_die(__('You do not have sufficient permissions to access this page.'));
|
@@ -202,15 +196,14 @@ if(!class_exists('Csbwfs_Class'))
|
|
202 |
*/
|
203 |
public static function csbwfs_add_settings_link( $links ) {
|
204 |
$settings_link = '<a href="options-general.php?page=csbwfs-settings">' . __( 'Settings', 'csbwfs' ) . '</a>';
|
205 |
-
$settings_link .= ' | <a href="https://www.wp-experts.in/products/share-buttons-with-floating-sidebar-pro-addon" target="_blank">' . __( 'FLAT
|
206 |
array_unshift( $links, $settings_link );
|
207 |
return $links;
|
208 |
}
|
209 |
/**
|
210 |
* uninstall the plugin
|
211 |
*/
|
212 |
-
public function csbwfs_uninstall()
|
213 |
-
{
|
214 |
delete_option('csbwfs_active');
|
215 |
delete_option('csbbuttons_active');
|
216 |
delete_option('csbwfs_position');
|
@@ -271,24 +264,21 @@ if(!class_exists('Csbwfs_Class'))
|
|
271 |
/**
|
272 |
* Activate the plugin
|
273 |
*/
|
274 |
-
public static function csbwfs_activate()
|
275 |
-
{
|
276 |
// Do nothing
|
277 |
} // END public static function activate
|
278 |
|
279 |
/**
|
280 |
* Deactivate the plugin
|
281 |
*/
|
282 |
-
public static function csbwfs_deactivate()
|
283 |
-
{
|
284 |
// Do nothing
|
285 |
} // END public static function deactivate
|
286 |
|
287 |
} // END class Csbwfs_Class
|
288 |
} // END if(!class_exists('Csbwfs_Class'))
|
289 |
|
290 |
-
if(class_exists('Csbwfs_Class'))
|
291 |
-
{
|
292 |
// Installation and uninstallation hooks
|
293 |
register_activation_hook(__FILE__, array('Csbwfs_Class', 'csbwfs_activate'));
|
294 |
register_deactivation_hook(__FILE__, array('Csbwfs_Class', 'csbwfs_deactivate'));
|
@@ -296,14 +286,11 @@ if(class_exists('Csbwfs_Class'))
|
|
296 |
// instantiate the plugin class
|
297 |
$csbwfs_plugin_template = new Csbwfs_Class();
|
298 |
// Add a link to the settings page onto the plugin page
|
299 |
-
if(isset($csbwfs_plugin_template))
|
300 |
-
{
|
301 |
$plugin = plugin_basename(__FILE__);
|
302 |
add_filter("plugin_action_links_$plugin", array('Csbwfs_Class','csbwfs_add_settings_link'));
|
303 |
require dirname(__FILE__).'/csbwfs-class.php';
|
304 |
//shortcode
|
305 |
require dirname(__FILE__).'/lib/shortcode.php';
|
306 |
}
|
307 |
-
|
308 |
-
|
309 |
}
|
2 |
/*
|
3 |
Plugin Name: Custom Share Buttons with Floating Sidebar
|
4 |
Plugin URI: https://www.wp-experts.in
|
5 |
+
Description: Share buttons with extra features to sharing your website posts/pages on social sites (like Facebook, Twitter, Instagram, Whatsapp, Pinterest etc.)
|
6 |
Author: WP Experts Team
|
7 |
Author URI: https://www.wp-experts.in
|
8 |
+
Version: 4.2
|
9 |
*/
|
10 |
|
11 |
+
/* Copyright 2018-2022 custom-share-buttons-with-floating-sidebar (email : raghunath.0087@gmail.com)
|
12 |
|
13 |
This program is free software; you can redistribute it and/or modify
|
14 |
it under the terms of the GNU General Public License, version 2, as
|
25 |
*/
|
26 |
//Admin "Custom Share Buttons with Floating Sidebar" Menu Item
|
27 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
28 |
+
|
29 |
+
if(!class_exists('Csbwfs_Class')) {
|
30 |
+
class Csbwfs_Class {
|
|
|
31 |
/**
|
32 |
* Construct the plugin object
|
33 |
*/
|
34 |
+
public function __construct() {
|
|
|
35 |
// register actions
|
36 |
add_action('admin_init', array(&$this, 'csbwfs_admin_init'));
|
37 |
add_action('admin_menu', array(&$this, 'csbwf_sidebar_menu'));
|
64 |
/**
|
65 |
* hook into WP's admin_init action hook
|
66 |
*/
|
67 |
+
public function csbwfs_admin_init() {
|
|
|
68 |
// Set up the settings for this plugin
|
69 |
$this->csbwf_sidebar_init();
|
70 |
// Possibly do additional admin_init tasks
|
72 |
/**
|
73 |
* Initialize some custom settings
|
74 |
*/
|
75 |
+
public function csbwf_sidebar_init() {
|
|
|
76 |
// register the settings for this plugin
|
77 |
+
register_setting('csbwf_sidebar_options','csbwfs_active','sanitize_text_field');
|
78 |
+
register_setting('csbwf_sidebar_options','csbwfs_position','sanitize_text_field');
|
79 |
+
register_setting('csbwf_sidebar_options','csbwfs_btn_position','sanitize_text_field');
|
80 |
+
register_setting('csbwf_sidebar_options','csbwfs_btn_text','sanitize_text_field');
|
81 |
+
register_setting('csbwf_sidebar_options','csbwfs_fb_image','sanitize_text_field');
|
82 |
+
register_setting('csbwf_sidebar_options','csbwfs_tw_image','sanitize_text_field');
|
83 |
+
register_setting('csbwf_sidebar_options','csbwfs_li_image','sanitize_text_field');
|
84 |
+
register_setting('csbwf_sidebar_options','csbwfs_re_image','sanitize_text_field');
|
85 |
+
register_setting('csbwf_sidebar_options','csbwfs_st_image','sanitize_text_field');
|
86 |
+
register_setting('csbwf_sidebar_options','csbwfs_mail_image','sanitize_text_field');
|
87 |
+
register_setting('csbwf_sidebar_options','csbwfs_pin_image','sanitize_text_field');
|
88 |
+
register_setting('csbwf_sidebar_options','csbwfs_yt_image','sanitize_text_field');
|
89 |
+
register_setting('csbwf_sidebar_options','csbwfs_fb_bg','sanitize_text_field');
|
90 |
+
register_setting('csbwf_sidebar_options','csbwfs_tw_bg','sanitize_text_field');
|
91 |
+
register_setting('csbwf_sidebar_options','csbwfs_li_bg','sanitize_text_field');
|
92 |
+
register_setting('csbwf_sidebar_options','csbwfs_mail_bg','sanitize_text_field');
|
93 |
+
register_setting('csbwf_sidebar_options','csbwfs_pin_bg','sanitize_text_field');
|
94 |
+
register_setting('csbwf_sidebar_options','csbwfs_re_bg','sanitize_text_field');
|
95 |
+
register_setting('csbwf_sidebar_options','csbwfs_st_bg','sanitize_text_field');
|
96 |
+
register_setting('csbwf_sidebar_options','csbwfs_yt_bg','sanitize_text_field');
|
97 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_fb_bg','sanitize_text_field');
|
98 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_tw_bg','sanitize_text_field');
|
99 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_li_bg','sanitize_text_field');
|
100 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_mail_bg','sanitize_text_field');
|
101 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_pin_bg','sanitize_text_field');
|
102 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_re_bg','sanitize_text_field');
|
103 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_st_bg','sanitize_text_field');
|
104 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_yt_bg','sanitize_text_field');
|
105 |
+
register_setting('csbwf_sidebar_options','csbwfs_fpublishBtn','sanitize_text_field');
|
106 |
+
register_setting('csbwf_sidebar_options','csbwfs_tpublishBtn','sanitize_text_field');
|
107 |
+
register_setting('csbwf_sidebar_options','csbwfs_ppublishBtn','sanitize_text_field');
|
108 |
+
register_setting('csbwf_sidebar_options','csbwfs_ytpublishBtn','sanitize_text_field');
|
109 |
+
register_setting('csbwf_sidebar_options','csbwfs_skpublishBtn','sanitize_text_field');
|
110 |
+
register_setting('csbwf_sidebar_options','csbwfs_skPath','sanitize_text_field');
|
111 |
+
register_setting('csbwf_sidebar_options','csbwfs_republishBtn','sanitize_text_field');
|
112 |
+
register_setting('csbwf_sidebar_options','csbwfs_stpublishBtn','sanitize_text_field');
|
113 |
+
register_setting('csbwf_sidebar_options','csbwfs_ytPath','sanitize_text_field');
|
114 |
+
register_setting('csbwf_sidebar_options','csbwfs_lpublishBtn','sanitize_text_field');
|
115 |
+
register_setting('csbwf_sidebar_options','csbwfs_mpublishBtn','sanitize_text_field');
|
116 |
+
register_setting('csbwf_sidebar_options','csbwfs_mailMessage','sanitize_text_field');
|
117 |
+
register_setting('csbwf_sidebar_options','csbwfs_top_margin','sanitize_text_field');
|
118 |
+
register_setting('csbwf_sidebar_options','csbwfs_delayTimeBtn','sanitize_text_field');
|
119 |
+
register_setting('csbwf_sidebar_options','csbwfs_btn_display','sanitize_text_field');
|
120 |
/** Image Alt */
|
121 |
+
register_setting('csbwf_sidebar_options','csbwfs_fb_title','sanitize_text_field');
|
122 |
+
register_setting('csbwf_sidebar_options','csbwfs_tw_title','sanitize_text_field');
|
123 |
+
register_setting('csbwf_sidebar_options','csbwfs_li_title','sanitize_text_field');
|
124 |
+
register_setting('csbwf_sidebar_options','csbwfs_pin_title','sanitize_text_field');
|
125 |
+
register_setting('csbwf_sidebar_options','csbwfs_mail_title','sanitize_text_field');
|
126 |
+
register_setting('csbwf_sidebar_options','csbwfs_yt_title','sanitize_text_field');
|
127 |
+
register_setting('csbwf_sidebar_options','csbwfs_re_title','sanitize_text_field');
|
128 |
+
register_setting('csbwf_sidebar_options','csbwfs_st_title','sanitize_text_field');
|
129 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_fb_title','sanitize_text_field');
|
130 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_tw_title','sanitize_text_field');
|
131 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_li_title','sanitize_text_field');
|
132 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_pin_title','sanitize_text_field');
|
133 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_mail_title','sanitize_text_field');
|
134 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_yt_title','sanitize_text_field');
|
135 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_re_title','sanitize_text_field');
|
136 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_st_title','sanitize_text_field');
|
137 |
+
register_setting('csbwf_sidebar_options','csbwfs_auto_hide','sanitize_text_field');
|
138 |
//Options for post/pages
|
139 |
+
register_setting('csbwf_sidebar_options','csbwfs_buttons_active','sanitize_text_field');
|
140 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_hide_home','sanitize_text_field');
|
141 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_hide_post','sanitize_text_field');
|
142 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_hide_page','sanitize_text_field');
|
143 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_hide_archive','sanitize_text_field');
|
144 |
+
register_setting('csbwf_sidebar_options','csbwfs_hide_home','sanitize_text_field');
|
145 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_fb_image','sanitize_text_field');
|
146 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_tw_image','sanitize_text_field');
|
147 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_li_image','sanitize_text_field');
|
148 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_mail_image','sanitize_text_field');
|
149 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_pin_image','sanitize_text_field');
|
150 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_re_image','sanitize_text_field');
|
151 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_st_image','sanitize_text_field');
|
152 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_yt_image','sanitize_text_field');
|
153 |
/** message content */
|
154 |
+
register_setting('csbwf_sidebar_options','csbwfs_show_btn','sanitize_text_field');
|
155 |
+
register_setting('csbwf_sidebar_options','csbwfs_hide_btn','sanitize_text_field');
|
156 |
+
register_setting('csbwf_sidebar_options','csbwfs_share_msg','sanitize_text_field');
|
157 |
+
register_setting('csbwf_sidebar_options','csbwfs_rmSHBtn','sanitize_text_field');
|
158 |
//register_setting('csbwf_sidebar_options','csbwfs_featuredshrimg');
|
159 |
//register_setting('csbwf_sidebar_options','csbwfs_defaultfeaturedshrimg');
|
160 |
+
register_setting('csbwf_sidebar_options','csbwfs_deactive_for_mob','sanitize_text_field');
|
161 |
} // END public function init_custom_settings()
|
162 |
/**
|
163 |
* add a menu
|
164 |
*/
|
165 |
+
public function csbwf_sidebar_menu() {
|
|
|
166 |
add_options_page('Social Share Buttons(CSBWFS)','Social Share Buttons(CSBWFS)','manage_options','csbwfs-settings',array(&$this,'csbwf_sidebar_admin_option_page'));
|
167 |
|
168 |
} // END public function add_menu()
|
169 |
|
170 |
+
public function csbwf_sidebar_admin_option_page() {
|
|
|
171 |
if(!current_user_can('manage_options'))
|
172 |
{
|
173 |
wp_die(__('You do not have sufficient permissions to access this page.'));
|
196 |
*/
|
197 |
public static function csbwfs_add_settings_link( $links ) {
|
198 |
$settings_link = '<a href="options-general.php?page=csbwfs-settings">' . __( 'Settings', 'csbwfs' ) . '</a>';
|
199 |
+
$settings_link .= ' | <a href="https://www.wp-experts.in/products/share-buttons-with-floating-sidebar-pro-addon" target="_blank">' . __( 'FLAT 10% DISCOUNT! GET ADD-ON', 'csbwfs' ) . '</a>';
|
200 |
array_unshift( $links, $settings_link );
|
201 |
return $links;
|
202 |
}
|
203 |
/**
|
204 |
* uninstall the plugin
|
205 |
*/
|
206 |
+
public function csbwfs_uninstall() {
|
|
|
207 |
delete_option('csbwfs_active');
|
208 |
delete_option('csbbuttons_active');
|
209 |
delete_option('csbwfs_position');
|
264 |
/**
|
265 |
* Activate the plugin
|
266 |
*/
|
267 |
+
public static function csbwfs_activate() {
|
|
|
268 |
// Do nothing
|
269 |
} // END public static function activate
|
270 |
|
271 |
/**
|
272 |
* Deactivate the plugin
|
273 |
*/
|
274 |
+
public static function csbwfs_deactivate() {
|
|
|
275 |
// Do nothing
|
276 |
} // END public static function deactivate
|
277 |
|
278 |
} // END class Csbwfs_Class
|
279 |
} // END if(!class_exists('Csbwfs_Class'))
|
280 |
|
281 |
+
if(class_exists('Csbwfs_Class')) {
|
|
|
282 |
// Installation and uninstallation hooks
|
283 |
register_activation_hook(__FILE__, array('Csbwfs_Class', 'csbwfs_activate'));
|
284 |
register_deactivation_hook(__FILE__, array('Csbwfs_Class', 'csbwfs_deactivate'));
|
286 |
// instantiate the plugin class
|
287 |
$csbwfs_plugin_template = new Csbwfs_Class();
|
288 |
// Add a link to the settings page onto the plugin page
|
289 |
+
if(isset($csbwfs_plugin_template)) {
|
|
|
290 |
$plugin = plugin_basename(__FILE__);
|
291 |
add_filter("plugin_action_links_$plugin", array('Csbwfs_Class','csbwfs_add_settings_link'));
|
292 |
require dirname(__FILE__).'/csbwfs-class.php';
|
293 |
//shortcode
|
294 |
require dirname(__FILE__).'/lib/shortcode.php';
|
295 |
}
|
|
|
|
|
296 |
}
|
images/mrweb-logo.jpg
ADDED
Binary file
|
images/mrweb.jpg
ADDED
Binary file
|
images/raghu.jpg
ADDED
Binary file
|
lib/settings.php
CHANGED
@@ -1,294 +1,294 @@
|
|
1 |
-
<div style="width: 80%; padding: 10px; margin: 10px;">
|
2 |
-
<h1>Custom Share Buttons With Floating Sidebar Settings</h1>
|
3 |
-
<!-- Start Options Form -->
|
4 |
-
|
5 |
-
<form action="options.php" method="post" id="csbwf-sidebar-admin-form">
|
6 |
-
|
7 |
-
<div id="csbwf-tab-menu"><a id="csbwfs-general" class="csbwf-tab-links active" >General</a> <a id="csbwfs-sidebar" class="csbwf-tab-links">Floating Sidebar</a> <a id="csbwfs-share-buttons" class="csbwf-tab-links">Social Share Buttons</a> <a id="csbwfs-pro" class="csbwf-tab-links">GO PRO</a> <a id="csbwfs-support" class="csbwf-tab-links">Support</a></div>
|
8 |
-
<p align="right"><span class="submit-btn"><?php
|
9 |
-
<div class="csbwfs-setting">
|
10 |
-
<!-- General Setting -->
|
11 |
-
<div class="first csbwfs-tab" id="div-csbwfs-general">
|
12 |
-
<h2>General Settings</h2>
|
13 |
-
<table cellpadding="10">
|
14 |
-
<tr>
|
15 |
-
<td valign="top" nowrap>
|
16 |
-
<p><input type="checkbox" id="csbwfs_active" name="csbwfs_active" value='1' <?php checked(get_option('csbwfs_active'),1);?>/> <b><?php
|
17 |
-
<p><h3><strong><?php
|
18 |
-
<p><input type="checkbox" id="publish1" value="yes" name="csbwfs_fpublishBtn" <?php checked(get_option('csbwfs_fpublishBtn'),'yes');?>/><b>Facebook</b></p>
|
19 |
-
<p><input type="checkbox" id="publish2" name="csbwfs_tpublishBtn" value="yes" <?php checked(get_option('csbwfs_tpublishBtn'),'yes');?>/> <b>Twitter</b></p>
|
20 |
-
<p><input type="checkbox" id="publish4" name="csbwfs_lpublishBtn" value="yes" <?php checked(get_option('csbwfs_lpublishBtn'),'yes');?>/> <b>Linkedin</b></p>
|
21 |
-
<p><input type="checkbox" id="publish6" name="csbwfs_ppublishBtn" value="yes" <?php checked(get_option('csbwfs_ppublishBtn'),'yes');?>/> <b>Pinterest</b></p>
|
22 |
-
<p><input type="checkbox" id="publish7" name="csbwfs_republishBtn" value="yes" <?php checked(get_option('csbwfs_republishBtn'),'yes');?>/> <b>Reddit</b></p>
|
23 |
-
<p><input type="checkbox" id="publish8" name="csbwfs_stpublishBtn" value="yes" <?php checked(get_option('csbwfs_stpublishBtn'),'yes');?>/> <b>Stumbleupon</b></p>
|
24 |
-
<p><input type="checkbox" id="publish5" name="csbwfs_mpublishBtn" value="yes" <?php checked(get_option('csbwfs_mpublishBtn'),'yes');?>/> <b>Mail</b></p>
|
25 |
-
<?php if(get_option('csbwfs_mpublishBtn')=='yes');{?>
|
26 |
-
<p id="mailmsg"><input type="text" name="csbwfs_mailMessage" id="csbwfs_mailMessage" value="<?php
|
27 |
-
<?php } ?>
|
28 |
-
<p><input type="checkbox" id="ytBtns" name="csbwfs_ytpublishBtn" value="yes" <?php checked(get_option('csbwfs_ytpublishBtn'),'yes');?>/> <b>Youtube</b></p>
|
29 |
-
<p id="ytpath"><input type="text" name="csbwfs_ytPath" id="csbwfs_ytPath" value="<?php
|
30 |
-
<p><input type="checkbox" id="skBtns" name="csbwfs_skpublishBtn" value="yes" <?php checked(get_option('csbwfs_skpublishBtn'),'yes');?>/> <b>Skype</b></p>
|
31 |
-
<p id="skpath"><input type="text" name="csbwfs_skPath" id="csbwfs_skPath" value="<?php
|
32 |
-
<p><label><h3 ><strong><?php
|
33 |
-
<p><label><?php
|
34 |
-
<p><label><?php
|
35 |
-
<p><label><?php
|
36 |
-
</td>
|
37 |
-
<td valign="top" style="border-left:1px solid #ccc;padding-left:20px;">
|
38 |
-
<h2>Shortcode</h2>
|
39 |
-
<code>[csbwfs_buttons buttons='fb,tw,li,pi,yt,re,st,ml,sk']</code> <br>(sk-Skype, tw-Twitter, li-Linkedin, pi-Pinterest, yt-Youtube, re-Reddit, st-Stumbleupon/Mix, ml-Mail, sk-Skype)
|
40 |
-
<p style="font-size:16px;">Watch given below video to view addon features and settings</p>
|
41 |
-
<iframe width="100%" height="500" src="https://www.youtube.com/embed/L8UAqBbqqoU?rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
|
42 |
-
<h2><a href="http://www.wp-experts.in/products/share-buttons-with-floating-sidebar-pro-addon" target="_blank" class="contact-author"><strong>Click Here</strong></a> to download addon.</h2>
|
43 |
-
</tr>
|
44 |
-
</table>
|
45 |
-
</div>
|
46 |
-
<!-- Floating Sidebar -->
|
47 |
-
<div class="csbwfs-tab" id="div-csbwfs-sidebar">
|
48 |
-
<h2>Floating Sidebar Settings</h2>
|
49 |
-
<table>
|
50 |
-
<tr>
|
51 |
-
<th nowrap><?php
|
52 |
-
<td>
|
53 |
-
<select id="csbwfs_position" name="csbwfs_position" >
|
54 |
-
<option value="left" <?php selected(get_option('csbwfs_position'),'left');?>>Left</option>
|
55 |
-
<option value="right" <?php selected(get_option('csbwfs_position'),'right');?>>Right</option>
|
56 |
-
<option value="bottom" <?php selected(get_option('csbwfs_position'),'bottom');?>>Bottom</option>
|
57 |
-
</select>
|
58 |
-
</td>
|
59 |
-
</tr>
|
60 |
-
<tr>
|
61 |
-
<th> </th>
|
62 |
-
<td><input type="checkbox" id="csbwfs_rmSHBtn" name="csbwfs_rmSHBtn" value="yes" <?php checked(get_option('csbwfs_rmSHBtn'),'yes');?>/> <strong><?php
|
63 |
-
</tr>
|
64 |
-
<tr><th nowrap valign="top"><?php
|
65 |
-
<tr>
|
66 |
-
<th> </th>
|
67 |
-
<td><input type="checkbox" id="csbwfs_deactive_for_mob" name="csbwfs_deactive_for_mob" value="yes" <?php checked(get_option('csbwfs_deactive_for_mob'),'yes');?>/><?php
|
68 |
-
</tr>
|
69 |
-
<tr><th></th>
|
70 |
-
<td><input type="checkbox" id="csbwfs_auto_hide" name="csbwfs_auto_hide" value="yes" <?php checked(get_option('csbwfs_auto_hide'),'yes');?>/><?php
|
71 |
-
</tr>
|
72 |
-
<tr><th> </th><td><input type="checkbox" id="csbwfs_hide_home" value="yes" name="csbwfs_hide_home" <?php checked(get_option('csbwfs_hide_home'),'yes');?>/>Hide Sidebar On Home Page</td></tr>
|
73 |
-
<tr><td colspan="2"><strong><h4>Social Share Button Images 32X32 (Optional) :</h4></strong></td></tr>
|
74 |
-
<tr><td colspan="2" align="right"><input type="button" id="csbwfs_resetpage" value="Reset"></td></tr>
|
75 |
-
<tr>
|
76 |
-
<th><?php
|
77 |
-
<td class="csbwfsButtonsImg" id="csbwfsButtonsFbImg">
|
78 |
-
<input type="text" id="csbwfs_fb_image" name="csbwfs_fb_image" value="<?php
|
79 |
-
</td>
|
80 |
-
</tr>
|
81 |
-
<tr><th><?php
|
82 |
-
<td class="csbwfsButtonsImg" id="csbwfsButtonsTwImg">
|
83 |
-
<input type="text" id="csbwfs_tw_image" name="csbwfs_tw_image" value="<?php
|
84 |
-
</td>
|
85 |
-
</tr>
|
86 |
-
<tr>
|
87 |
-
<th><?php
|
88 |
-
<td class="csbwfsButtonsImg" id="csbwfsButtonsLiImg">
|
89 |
-
<input type="text" id="csbwfs_li_image" name="csbwfs_li_image" value="<?php
|
90 |
-
</td>
|
91 |
-
</tr>
|
92 |
-
<tr><th><?php
|
93 |
-
<td class="csbwfsButtonsImg" id="csbwfsButtonsPiImg">
|
94 |
-
<input type="text" id="csbwfs_pin_image" name="csbwfs_pin_image" value="<?php
|
95 |
-
</td>
|
96 |
-
</tr>
|
97 |
-
|
98 |
-
<tr><th><?php
|
99 |
-
<td class="csbwfsButtonsImg" id="csbwfsButtonsReImg">
|
100 |
-
<input type="text" id="csbwfs_re_image" name="csbwfs_re_image" value="<?php
|
101 |
-
</td>
|
102 |
-
</tr>
|
103 |
-
<tr><th><?php
|
104 |
-
<td class="csbwfsButtonsImg" id="csbwfsButtonsStImg">
|
105 |
-
<input type="text" id="csbwfs_st_image" name="csbwfs_st_image" value="<?php
|
106 |
-
<input type="text" id="csbwfs_st_title" name="csbwfs_st_title" value="<?php
|
107 |
-
</td>
|
108 |
-
</tr>
|
109 |
-
<tr><th><?php
|
110 |
-
<td class="csbwfsButtonsImg" id="csbwfsButtonsMaImg">
|
111 |
-
<input type="text" id="csbwfs_mail_image" name="csbwfs_mail_image" value="<?php
|
112 |
-
</td>
|
113 |
-
</tr>
|
114 |
-
<tr><th><?php
|
115 |
-
<td class="csbwfsButtonsImg" id="csbwfsButtonsYtImg">
|
116 |
-
<input type="text" id="csbwfs_yt_image" name="csbwfs_yt_image" value="<?php
|
117 |
-
</td>
|
118 |
-
</tr>
|
119 |
-
<tr><td colspan="2"><h3><strong>Style(Optional):</strong></h3></td></tr>
|
120 |
-
|
121 |
-
<tr>
|
122 |
-
<th><?php
|
123 |
-
<td>
|
124 |
-
|
125 |
-
<input type="textbox" id="csbwfs_top_margin" name="csbwfs_top_margin" value="<?php
|
126 |
-
</td>
|
127 |
-
</tr>
|
128 |
-
</table>
|
129 |
-
</div>
|
130 |
-
<!-- Share Buttons -->
|
131 |
-
<div class="csbwfs-tab" id="div-csbwfs-share-buttons">
|
132 |
-
<h2>Social Share Buttons Settings</h2>
|
133 |
-
<table>
|
134 |
-
<td><?php
|
135 |
-
<td colspan="2">
|
136 |
-
<input type="checkbox" id="csbwfs_buttons_active" name="csbwfs_buttons_active" value='1' <?php checked(get_option('csbwfs_buttons_active'),1);?>/>
|
137 |
-
</td>
|
138 |
-
</tr>
|
139 |
-
<tr>
|
140 |
-
<th nowrap><?php
|
141 |
-
<td>
|
142 |
-
<select id="csbwfs_btn_position" name="csbwfs_btn_position" >
|
143 |
-
<option value="left" <?php selected(get_option('csbwfs_btn_position'),'left');?>>Left</option>
|
144 |
-
<option value="right" <?php selected(get_option('csbwfs_btn_position'),'right');?>>Right</option>
|
145 |
-
</select>
|
146 |
-
</td>
|
147 |
-
</tr>
|
148 |
-
<tr>
|
149 |
-
<th nowrap><?php
|
150 |
-
<td>
|
151 |
-
<select id="csbwfs_btn_display" name="csbwfs_btn_display" >
|
152 |
-
<option value="below" <?php selected(get_option('csbwfs_btn_display'),'below');?>>Bottom Of The Content</option>
|
153 |
-
<option value="above" <?php selected(get_option('csbwfs_btn_display'),'above');?>>Top Of The Content</option>
|
154 |
-
</select>
|
155 |
-
</td>
|
156 |
-
</tr>
|
157 |
-
<tr>
|
158 |
-
<th nowrap><?php
|
159 |
-
<td>
|
160 |
-
<input type="textbox" id="csbwfs_btn_text" name="csbwfs_btn_text" value="<?php
|
161 |
-
<i>(Leave blank if you want hide button)</i></td>
|
162 |
-
</tr>
|
163 |
-
<tr><td colspan="2"><strong>Show Share Buttons On :</strong> Home <input type="checkbox" id="csbwfs_page_hide_home" value="yes" name="csbwfs_page_hide_home" <?php checked(get_option('csbwfs_page_hide_home'),'yes');?>/> Page <input type="checkbox" id="csbwfs_page_hide_page" value="yes" name="csbwfs_page_hide_page" <?php checked(get_option('csbwfs_page_hide_page'),'yes');?>/> Post <input type="checkbox" id="csbwfs_page_hide_post" value="yes" name="csbwfs_page_hide_post" <?php checked(get_option('csbwfs_page_hide_post'),'yes');?>/> Category/Archive <input type="checkbox" id="csbwfs_page_hide_archive" value="yes" name="csbwfs_page_hide_archive" <?php checked(get_option('csbwfs_page_hide_archive'),'yes');?>/> <br>
|
164 |
-
</td></tr>
|
165 |
-
|
166 |
-
<tr><td colspan="2"><strong><h4>Social Share Button Images 32X32 (Optional) :</h4></strong></td></tr>
|
167 |
-
<tr><td colspan="2" align="right"><input type="button" id="csbwfsresetpage" value="RESET"></td></tr>
|
168 |
-
<tr><th><?php
|
169 |
-
<td class="csbwfsButtonsImg" id="csbwfsButtonsFbImg2"><input type="text" id="csbwfs_page_fb_image" name="csbwfs_page_fb_image" value="<?php
|
170 |
-
<input id="csbwfs_fb_image_button2" type="button" value="Upload Image" class="cswbfsUploadBtn"/> <input type="text" id="csbwfs_page_fb_bg" data-default-color="#305891" class="color-field" name="csbwfs_page_fb_bg" value="<?php
|
171 |
-
</td>
|
172 |
-
</tr>
|
173 |
-
<tr>
|
174 |
-
<th><?php
|
175 |
-
<td class="csbwfsButtonsImg" id="csbwfsButtonsTwImg2">
|
176 |
-
<input type="text" id="csbwfs_page_tw_image" name="csbwfs_page_tw_image" value="<?php
|
177 |
-
<input id="csbwfs_tw_image_button2" type="button" value="Upload Image" class="cswbfsUploadBtn"/> <input type="text" id="csbwfs_page_tw_bg" data-default-color="#2ca8d2" class="color-field" name="csbwfs_page_tw_bg" value="<?php
|
178 |
-
</td>
|
179 |
-
</tr>
|
180 |
-
<tr><th><?php
|
181 |
-
<td class="csbwfsButtonsImg" id="csbwfsButtonsLiImg2"><input type="text" id="csbwfs_page_li_image" name="csbwfs_page_li_image" value="<?php
|
182 |
-
<input id="csbwfs_li_image_button2" type="button" value="Upload Image" class="cswbfsUploadBtn"/> <input type="text" id="csbwfs_page_li_bg" data-default-color="#dd4c39" class="color-field" name="csbwfs_page_li_bg" value="<?php
|
183 |
-
</td>
|
184 |
-
</tr>
|
185 |
-
<tr>
|
186 |
-
<th><?php
|
187 |
-
<td class="csbwfsButtonsImg" id="csbwfsButtonsPiImg2"><input type="text" id="csbwfs_page_pin_image" name="csbwfs_page_pin_image" value="<?php
|
188 |
-
<input id="csbwfs_pi_image_button2" type="button" value="Upload Image" class="cswbfsUploadBtn"/> <input type="text" id="csbwfs_page_pin_bg" data-default-color="#ca2027" class="color-field" name="csbwfs_page_pin_bg" value="<?php
|
189 |
-
</td>
|
190 |
-
</tr>
|
191 |
-
|
192 |
-
<tr>
|
193 |
-
<th><?php
|
194 |
-
<td class="csbwfsButtonsImg" id="csbwfsButtonsReImg2">
|
195 |
-
<input type="text" id="csbwfs_page_re_image" name="csbwfs_page_re_image" value="<?php
|
196 |
-
<input id="csbwfs_re_image_button2" type="button" value="Upload Image" class="cswbfsUploadBtn"/> <input type="text" id="csbwfs_page_re_bg" data-default-color="#ff1a00" class="color-field" name="csbwfs_page_re_bg" value="<?php
|
197 |
-
</td>
|
198 |
-
</tr>
|
199 |
-
<tr>
|
200 |
-
<th><?php
|
201 |
-
<td class="csbwfsButtonsImg" id="csbwfsButtonsStImg2">
|
202 |
-
<input type="text" id="csbwfs_page_st_image" name="csbwfs_page_st_image" value="<?php
|
203 |
-
<input id="csbwfs_st_image_button2" type="button" value="Upload Image" class="cswbfsUploadBtn"/> <input type="text" id="csbwfs_page_st_bg" data-default-color="#eb4924" class="color-field" name="csbwfs_page_st_bg" value="<?php
|
204 |
-
</td>
|
205 |
-
</tr>
|
206 |
-
<tr>
|
207 |
-
<th><?php
|
208 |
-
<td class="csbwfsButtonsImg" id="csbwfsButtonsMlImg2">
|
209 |
-
<input type="text" id="csbwfs_page_mail_image" name="csbwfs_page_mail_image" value="<?php
|
210 |
-
<input id="csbwfs_ml_image_button2" type="button" value="Upload Image" class="cswbfsUploadBtn"/> <input type="text" id="csbwfs_page_mail_bg" data-default-color="#738a8d" class="color-field" name="csbwfs_page_mail_bg" value="<?php
|
211 |
-
</td>
|
212 |
-
</tr>
|
213 |
-
<tr>
|
214 |
-
<th><?php
|
215 |
-
<td class="csbwfsButtonsImg" id="csbwfsButtonsYtImg2">
|
216 |
-
<input type="text" id="csbwfs_page_yt_image" name="csbwfs_page_yt_image" value="<?php
|
217 |
-
<input id="csbwfs_yt_image_button2" type="button" value="Upload Image" class="cswbfsUploadBtn"/> <input type="text" id="csbwfs_page_yt_bg" data-default-color="#ffffff" class="color-field" name="csbwfs_page_yt_bg" value="<?php
|
218 |
-
</td>
|
219 |
-
</tr>
|
220 |
-
</table>
|
221 |
-
|
222 |
-
</div>
|
223 |
-
<!-- Support -->
|
224 |
-
<div class="last author csbwfs-tab" id="div-csbwfs-support">
|
225 |
-
|
226 |
-
<h2>Plugin Support</h2>
|
227 |
-
|
228 |
-
<p><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ZEMSYQUZRUK6A" target="_blank" style="font-size: 17px; font-weight: bold;"><img src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" title="Donate for this plugin"></a></p>
|
229 |
-
|
230 |
-
<p><strong>Plugin Author:</strong><br><a href="https://www.ep-experts.in" target="_blank">WP-Experts.In Team</a></p>
|
231 |
-
<p><a href="mailto:raghunath.0087@gmail.com" target="_blank" class="contact-author">Contact Author</a></p>
|
232 |
-
<p><strong>Our Other Plugins:</strong><br>
|
233 |
-
<ol>
|
234 |
-
<li><a href="https://wordpress.org/plugins/custom-share-buttons-with-floating-sidebar" target="_blank">Custom Share Buttons With Floating Sidebar</a></li>
|
235 |
-
<li><a href="https://wordpress.org/plugins/protect-wp-admin/" target="_blank">Protect WP-Admin</a></li>
|
236 |
-
<li><a href="https://wordpress.org/plugins/wp-sales-notifier/" target="_blank">WP Sales Notifier</a></li>
|
237 |
-
<li><a href="https://wordpress.org/plugins/wp-categories-widget/" target="_blank">WP Categories Widget</a></li>
|
238 |
-
<li><a href="https://wordpress.org/plugins/wp-protect-content/" target="_blank">WP Protect Content</a></li>
|
239 |
-
<li><a href="https://wordpress.org/plugins/wp-version-remover/" target="_blank">WP Version Remover</a></li>
|
240 |
-
<li><a href="https://wordpress.org/plugins/wp-posts-widget/" target="_blank">WP Post Widget</a></li>
|
241 |
-
<li><a href="https://wordpress.org/plugins/wp-importer" target="_blank">WP Importer</a></li>
|
242 |
-
<li><a href="https://wordpress.org/plugins/wp-csv-importer/" target="_blank">WP CSV Importer</a></li>
|
243 |
-
<li><a href="https://wordpress.org/plugins/wp-testimonial/" target="_blank">WP Testimonial</a></li>
|
244 |
-
<li><a href="https://wordpress.org/plugins/wc-sales-count-manager/" target="_blank">WooCommerce Sales Count Manager</a></li>
|
245 |
-
<li><a href="https://wordpress.org/plugins/wp-social-buttons/" target="_blank">WP Social Buttons</a></li>
|
246 |
-
<li><a href="https://wordpress.org/plugins/wp-youtube-gallery/" target="_blank">WP Youtube Gallery</a></li>
|
247 |
-
<li><a href="https://wordpress.org/plugins/tweets-slider/" target="_blank">Tweets Slider</a></li>
|
248 |
-
<li><a href="https://wordpress.org/plugins/rg-responsive-gallery/" target="_blank">RG Responsive Slider</a></li>
|
249 |
-
<li><a href="https://wordpress.org/plugins/cf7-advance-security" target="_blank">Contact Form 7 Advance Security WP-Admin</a></li>
|
250 |
-
<li><a href="https://wordpress.org/plugins/wp-easy-recipe/" target="_blank">WP Easy Recipe</a></li>
|
251 |
-
</ol>
|
252 |
-
</div>
|
253 |
-
<!-- GO PRO -->
|
254 |
-
<div class="last author csbwfs-tab" id="div-csbwfs-pro">
|
255 |
-
<h2 style="color:green;text-align:center;"><strong>Pay one time use lifetime!!!!!</strong></h2>
|
256 |
-
<table>
|
257 |
-
<tr>
|
258 |
-
<td valign="top" width="30%">
|
259 |
-
<h2>GO PRO</h2>
|
260 |
-
<p><a href="https://www.wp-experts.in/products/share-buttons-with-floating-sidebar-pro-addon" target="_blank" class="contact-author">Click here</a> to download addon.</p>
|
261 |
-
<p>We have released an add-on for Custom Share Buttons With Floating Sidebar which not only demonstrates the flexibility of CSBWFS, but also adds some important features:</p>
|
262 |
-
<iframe width="560" height="450" src="https://www.youtube.com/embed/f_qk4qxAsz8" frameborder="0" allowfullscreen></iframe>
|
263 |
-
</td>
|
264 |
-
<td><h2>Key Features</h2><hr>
|
265 |
-
<ol>
|
266 |
-
<li>Responsive Floating Sidebar</li>
|
267 |
-
<li>Shortcode</li>
|
268 |
-
<li>Hide floating sidebar for any post type</li>
|
269 |
-
<li>Hide Floating Sidebar for any taxonomy</li>
|
270 |
-
<li>Show Share Buttons for any taxonomy</li>
|
271 |
-
<li>Define sidebar/share buttons position</li>
|
272 |
-
<li>Responsive Popup box Contact Form</li>
|
273 |
-
<li> Shortcode supportable light box</li>
|
274 |
-
<li>OG meta tags fields</li>
|
275 |
-
<li>Choose different style of sidebar</li>
|
276 |
-
<li>Use share buttons as social buttons</li>
|
277 |
-
<li>Define Twitter username</li>
|
278 |
-
<li>Share count buttons(FB, ST, PIN,Xing and Reddit)</li>
|
279 |
-
<li>Manage buttons image, title, background color and url</li>
|
280 |
-
<li>10 extra custom sidebar buttons to use it as your button</li>
|
281 |
-
<li>Show/Hide social share buttons on specific page/post</li>
|
282 |
-
<li>Page specific sidebar position (Left/Right/Bottom)</li>
|
283 |
-
<li>add social site official page URL for all social buttons</li>
|
284 |
-
</ol>
|
285 |
-
</td>
|
286 |
-
</tr>
|
287 |
-
</table>
|
288 |
-
</div>
|
289 |
-
</div>
|
290 |
-
<span class="submit-btn"><?php
|
291 |
-
<?php settings_fields('csbwf_sidebar_options'); ?>
|
292 |
-
</form>
|
293 |
-
<!-- End Options Form -->
|
294 |
-
</div>
|
1 |
+
<div style="width: 80%; padding: 10px; margin: 10px;">
|
2 |
+
<h1>Custom Share Buttons With Floating Sidebar Settings</h1>
|
3 |
+
<!-- Start Options Form -->
|
4 |
+
|
5 |
+
<form action="options.php" method="post" id="csbwf-sidebar-admin-form">
|
6 |
+
|
7 |
+
<div id="csbwf-tab-menu"><a id="csbwfs-general" class="csbwf-tab-links active" >General</a> <a id="csbwfs-sidebar" class="csbwf-tab-links">Floating Sidebar</a> <a id="csbwfs-share-buttons" class="csbwf-tab-links">Social Share Buttons</a> <a id="csbwfs-pro" class="csbwf-tab-links">GO PRO</a> <a id="csbwfs-support" class="csbwf-tab-links">Support</a></div>
|
8 |
+
<p align="right"><span class="submit-btn"><?php _e( get_submit_button('Save Settings','button-primary extrabtn','submit','',''),'wpexpertsin');?></span></p>
|
9 |
+
<div class="csbwfs-setting">
|
10 |
+
<!-- General Setting -->
|
11 |
+
<div class="first csbwfs-tab" id="div-csbwfs-general">
|
12 |
+
<h2>General Settings</h2>
|
13 |
+
<table cellpadding="10">
|
14 |
+
<tr>
|
15 |
+
<td valign="top" nowrap>
|
16 |
+
<p><input type="checkbox" id="csbwfs_active" name="csbwfs_active" value='1' <?php checked(get_option('csbwfs_active'),1);?>/> <b><?php esc_attr_e('Enable Sidebar','wpexpertsin');?> </b></p>
|
17 |
+
<p><h3><strong><?php esc_attr_e('Social Share Button Publish Options:','wpexpertsin');?></strong></h3></p>
|
18 |
+
<p><input type="checkbox" id="publish1" value="yes" name="csbwfs_fpublishBtn" <?php checked(get_option('csbwfs_fpublishBtn'),'yes');?>/><b>Facebook</b></p>
|
19 |
+
<p><input type="checkbox" id="publish2" name="csbwfs_tpublishBtn" value="yes" <?php checked(get_option('csbwfs_tpublishBtn'),'yes');?>/> <b>Twitter</b></p>
|
20 |
+
<p><input type="checkbox" id="publish4" name="csbwfs_lpublishBtn" value="yes" <?php checked(get_option('csbwfs_lpublishBtn'),'yes');?>/> <b>Linkedin</b></p>
|
21 |
+
<p><input type="checkbox" id="publish6" name="csbwfs_ppublishBtn" value="yes" <?php checked(get_option('csbwfs_ppublishBtn'),'yes');?>/> <b>Pinterest</b></p>
|
22 |
+
<p><input type="checkbox" id="publish7" name="csbwfs_republishBtn" value="yes" <?php checked(get_option('csbwfs_republishBtn'),'yes');?>/> <b>Reddit</b></p>
|
23 |
+
<p><input type="checkbox" id="publish8" name="csbwfs_stpublishBtn" value="yes" <?php checked(get_option('csbwfs_stpublishBtn'),'yes');?>/> <b>Stumbleupon</b></p>
|
24 |
+
<p><input type="checkbox" id="publish5" name="csbwfs_mpublishBtn" value="yes" <?php checked(get_option('csbwfs_mpublishBtn'),'yes');?>/> <b>Mail</b></p>
|
25 |
+
<?php if(get_option('csbwfs_mpublishBtn')=='yes');{?>
|
26 |
+
<p id="mailmsg"><input type="text" name="csbwfs_mailMessage" id="csbwfs_mailMessage" value="<?php esc_attr_e( get_option('csbwfs_mailMessage'),'wpexpertsin');?>" placeholder="your@email.com?subject=Your Subject" size="40" class="regular-text ltr"><br><i>Leave empty to add current page title as subject line and url as body text </i></p>
|
27 |
+
<?php } ?>
|
28 |
+
<p><input type="checkbox" id="ytBtns" name="csbwfs_ytpublishBtn" value="yes" <?php checked(get_option('csbwfs_ytpublishBtn'),'yes');?>/> <b>Youtube</b></p>
|
29 |
+
<p id="ytpath"><input type="text" name="csbwfs_ytPath" id="csbwfs_ytPath" value="<?php esc_attr_e( get_option('csbwfs_ytPath'),'wpexpertsin');?>" placeholder="http://www.youtube.com" size="40" class="regular-text ltr"><br>add youtube channel url</p>
|
30 |
+
<p><input type="checkbox" id="skBtns" name="csbwfs_skpublishBtn" value="yes" <?php checked(get_option('csbwfs_skpublishBtn'),'yes');?>/> <b>Skype</b></p>
|
31 |
+
<p id="skpath"><input type="text" name="csbwfs_skPath" id="csbwfs_skPath" value="<?php esc_attr_e( get_option('csbwfs_skPath'),'wpexpertsin');?>" placeholder="skype_user_id" size="40" class="regular-text ltr"><br>Define skype user id</p>
|
32 |
+
<p><label><h3 ><strong><?php esc_attr_e('Define your custom message:','csbwfs');?></strong></h3></label></p>
|
33 |
+
<p><label><?php esc_attr_e('Show:','wpexpertsin');?></label><input type="text" id="csbwfs_show_btn" name="csbwfs_show_btn" value="<?php esc_attr_e( get_option('csbwfs_show_btn'),'wpexpertsin'); ?>" placeholder="Show Buttons" size="40"/></p>
|
34 |
+
<p><label><?php esc_attr_e('Hide:','wpexpertsin');?></label><input type="text" id="csbwfs_hide_btn" name="csbwfs_hide_btn" value="<?php esc_attr_e( get_option('csbwfs_hide_btn'),'wpexpertsin'); ?>" placeholder="Hide Buttons" size="40"/></p>
|
35 |
+
<p><label><?php esc_attr_e('Message:','wpexpertsin');?></label><input type="textbox" id="csbwfs_share_msg" name="csbwfs_share_msg" value="<?php esc_attr_e( get_option('csbwfs_share_msg'),'wpexpertsin'); ?>" placeholder="Share This With Your Friends" size="40"/></p>
|
36 |
+
</td>
|
37 |
+
<td valign="top" style="border-left:1px solid #ccc;padding-left:20px;">
|
38 |
+
<h2>Shortcode</h2>
|
39 |
+
<code>[csbwfs_buttons buttons='fb,tw,li,pi,yt,re,st,ml,sk']</code> <br>(sk-Skype, tw-Twitter, li-Linkedin, pi-Pinterest, yt-Youtube, re-Reddit, st-Stumbleupon/Mix, ml-Mail, sk-Skype)
|
40 |
+
<p style="font-size:16px;">Watch given below video to view addon features and settings</p>
|
41 |
+
<iframe width="100%" height="500" src="https://www.youtube.com/embed/L8UAqBbqqoU?rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
|
42 |
+
<h2><a href="http://www.wp-experts.in/products/share-buttons-with-floating-sidebar-pro-addon" target="_blank" class="contact-author"><strong>Click Here</strong></a> to download addon.</h2>
|
43 |
+
</tr>
|
44 |
+
</table>
|
45 |
+
</div>
|
46 |
+
<!-- Floating Sidebar -->
|
47 |
+
<div class="csbwfs-tab" id="div-csbwfs-sidebar">
|
48 |
+
<h2>Floating Sidebar Settings</h2>
|
49 |
+
<table>
|
50 |
+
<tr>
|
51 |
+
<th nowrap><?php esc_attr_e( 'Siderbar Position:','wpexpertsin');?></th>
|
52 |
+
<td>
|
53 |
+
<select id="csbwfs_position" name="csbwfs_position" >
|
54 |
+
<option value="left" <?php selected(get_option('csbwfs_position'),'left');?>>Left</option>
|
55 |
+
<option value="right" <?php selected(get_option('csbwfs_position'),'right');?>>Right</option>
|
56 |
+
<option value="bottom" <?php selected(get_option('csbwfs_position'),'bottom');?>>Bottom</option>
|
57 |
+
</select>
|
58 |
+
</td>
|
59 |
+
</tr>
|
60 |
+
<tr>
|
61 |
+
<th> </th>
|
62 |
+
<td><input type="checkbox" id="csbwfs_rmSHBtn" name="csbwfs_rmSHBtn" value="yes" <?php checked(get_option('csbwfs_rmSHBtn'),'yes');?>/> <strong><?php esc_attr_e('Remove Show/Hide Button:','wpexpertsin');?></strong></td>
|
63 |
+
</tr>
|
64 |
+
<tr><th nowrap valign="top"><?php esc_attr_e( 'Delay Time: ','wpexpertsin'); ?></th><td><input type="text" name="csbwfs_delayTimeBtn" id="csbwfs_delayTimeBtn" value="<?php esc_attr_e( get_option('csbwfs_delayTimeBtn')? get_option('csbwfs_delayTimeBtn'):0,'wpexpertsin');?>" size="40" class="regular-text ltr"><br><i>Publish share buttons after given time(millisecond)</i></td></tr>
|
65 |
+
<tr>
|
66 |
+
<th> </th>
|
67 |
+
<td><input type="checkbox" id="csbwfs_deactive_for_mob" name="csbwfs_deactive_for_mob" value="yes" <?php checked(get_option('csbwfs_deactive_for_mob'),'yes');?>/><?php esc_attr_e('Disable Sidebar For Mobile','csbwfs');?></td>
|
68 |
+
</tr>
|
69 |
+
<tr><th></th>
|
70 |
+
<td><input type="checkbox" id="csbwfs_auto_hide" name="csbwfs_auto_hide" value="yes" <?php checked(get_option('csbwfs_auto_hide'),'yes');?>/><?php esc_attr_e('Auto Hide Sidebar On Page Load','csbwfs');?></td>
|
71 |
+
</tr>
|
72 |
+
<tr><th> </th><td><input type="checkbox" id="csbwfs_hide_home" value="yes" name="csbwfs_hide_home" <?php checked(get_option('csbwfs_hide_home'),'yes');?>/>Hide Sidebar On Home Page</td></tr>
|
73 |
+
<tr><td colspan="2"><strong><h4>Social Share Button Images 32X32 (Optional) :</h4></strong></td></tr>
|
74 |
+
<tr><td colspan="2" align="right"><input type="button" id="csbwfs_resetpage" value="Reset"></td></tr>
|
75 |
+
<tr>
|
76 |
+
<th><?php esc_attr_e( 'Facebook:','wpexpertsin');?></th>
|
77 |
+
<td class="csbwfsButtonsImg" id="csbwfsButtonsFbImg">
|
78 |
+
<input type="text" id="csbwfs_fb_image" name="csbwfs_fb_image" value="<?php esc_attr_e( get_option('csbwfs_fb_image'),'wpexpertsin'); ?>" placeholder="Insert facebook button image path" size="30" class="inputButtonid"/> <input id="csbwfs_fb_image_button" type="button" value="Upload Image" class="cswbfsUploadBtn"/> <input type="text" id="csbwfs_fb_bg" data-default-color="#305891" class="color-field" name="csbwfs_fb_bg" value="<?php esc_attr_e( get_option('csbwfs_fb_bg'),'wpexpertsin'); ?>" size="20"/> <input type="text" id="csbwfs_fb_title" name="csbwfs_fb_title" value="<?php esc_attr_e( get_option('csbwfs_fb_title'),'wpexpertsin'); ?>" placeholder="Share on facebook" size="20" class="csbwfs_title"/>
|
79 |
+
</td>
|
80 |
+
</tr>
|
81 |
+
<tr><th><?php esc_attr_e( 'Twitter:','wpexpertsin');?></th>
|
82 |
+
<td class="csbwfsButtonsImg" id="csbwfsButtonsTwImg">
|
83 |
+
<input type="text" id="csbwfs_tw_image" name="csbwfs_tw_image" value="<?php esc_attr_e( get_option('csbwfs_tw_image'),'wpexpertsin'); ?>" placeholder="Insert twitter button image path" size="30" class="inputButtonid"/><input id="csbwfs_tw_image_button" type="button" value="Upload Image" class="cswbfsUploadBtn"/> <input type="text" id="csbwfs_tw_bg" name="csbwfs_tw_bg" value="<?php esc_attr_e( get_option('csbwfs_tw_bg'),'wpexpertsin'); ?>" data-default-color="#2ca8d2" class="color-field" size="20"/> <input type="text" id="csbwfs_tw_title" name="csbwfs_tw_title" value="<?php esc_attr_e( get_option('csbwfs_tw_title'),'wpexpertsin'); ?>" placeholder="Share on twitter" size="20" class="csbwfs_title"/>
|
84 |
+
</td>
|
85 |
+
</tr>
|
86 |
+
<tr>
|
87 |
+
<th><?php esc_attr_e( 'Linkedin:','wpexpertsin');?></th>
|
88 |
+
<td class="csbwfsButtonsImg" id="csbwfsButtonsLiImg">
|
89 |
+
<input type="text" id="csbwfs_li_image" name="csbwfs_li_image" value="<?php esc_attr_e( get_option('csbwfs_li_image'),'wpexpertsin'); ?>" placeholder="Insert Linkedin button image path" class="inputButtonid" size="30" class="buttonimg"/><input id="csbwfs_li_image_button" type="button" value="Upload Image" class="cswbfsUploadBtn"/> <input type="text" id="csbwfs_li_bg" name="csbwfs_li_bg" value="<?php esc_attr_e( get_option('csbwfs_li_bg'),'wpexpertsin'); ?>" data-default-color="#dd4c39" class="color-field" size="20"/> <input type="text" id="csbwfs_li_title" name="csbwfs_li_title" value="<?php esc_attr_e( get_option('csbwfs_li_title'),'wpexpertsin'); ?>" placeholder="Share on Linkedin" size="20" class="csbwfs_title"/>
|
90 |
+
</td>
|
91 |
+
</tr>
|
92 |
+
<tr><th><?php esc_attr_e( 'Pintrest:','wpexpertsin');?></th>
|
93 |
+
<td class="csbwfsButtonsImg" id="csbwfsButtonsPiImg">
|
94 |
+
<input type="text" id="csbwfs_pin_image" name="csbwfs_pin_image" value="<?php esc_attr_e( get_option('csbwfs_pin_image'),'wpexpertsin'); ?>" class="inputButtonid" placeholder="Insert pinterest button image path" size="30" class="buttonimg"/><input id="csbwfs_pin_image_button" type="button" value="Upload Image" class="cswbfsUploadBtn"/> <input type="text" id="csbwfs_pin_bg" name="csbwfs_pin_bg" value="<?php esc_attr_e( get_option('csbwfs_pin_bg'),'wpexpertsin'); ?>" data-default-color="#ca2027" class="color-field" size="20"/> <input type="text" id="csbwfs_pin_title" name="csbwfs_pin_title" value="<?php esc_attr_e( get_option('csbwfs_pin_title'),'wpexpertsin'); ?>" placeholder="Share on pintrest" size="20" class="csbwfs_title"/>
|
95 |
+
</td>
|
96 |
+
</tr>
|
97 |
+
|
98 |
+
<tr><th><?php esc_attr_e( 'Reddit:','wpexpertsin');?></th>
|
99 |
+
<td class="csbwfsButtonsImg" id="csbwfsButtonsReImg">
|
100 |
+
<input type="text" id="csbwfs_re_image" name="csbwfs_re_image" value="<?php esc_attr_e( get_option('csbwfs_re_image'),'wpexpertsin'); ?>" placeholder="Insert reddit button image path" size="30" class="inputButtonid"/><input id="csbwfs_re_image_button" type="button" value="Upload Image" class="cswbfsUploadBtn"/> <input type="text" id="csbwfs_re_bg" name="csbwfs_re_bg" value="<?php esc_attr_e( get_option('csbwfs_re_bg'),'wpexpertsin'); ?>" data-default-color="#ff1a00" class="color-field" size="20"/> <input type="text" id="csbwfs_re_title" name="csbwfs_re_title" value="<?php esc_attr_e( get_option('csbwfs_re_title'),'wpexpertsin'); ?>" placeholder="Share on reddit" size="20" class="csbwfs_title"/>
|
101 |
+
</td>
|
102 |
+
</tr>
|
103 |
+
<tr><th><?php esc_attr_e( 'Stumbleupon:','wpexpertsin');?></th>
|
104 |
+
<td class="csbwfsButtonsImg" id="csbwfsButtonsStImg">
|
105 |
+
<input type="text" id="csbwfs_st_image" name="csbwfs_st_image" value="<?php esc_attr_e( get_option('csbwfs_st_image'),'wpexpertsin'); ?>" placeholder="Insert stumbleupon button image path" size="30" class="inputButtonid"/><input id="csbwfs_st_image_button" type="button" value="Upload Image" class="cswbfsUploadBtn"/> <input type="text" id="csbwfs_st_bg" name="csbwfs_st_bg" value="<?php esc_attr_e( get_option('csbwfs_st_bg'),'wpexpertsin'); ?>" data-default-color="#eb4924" class="color-field" size="20"/>
|
106 |
+
<input type="text" id="csbwfs_st_title" name="csbwfs_st_title" value="<?php esc_attr_e( get_option('csbwfs_st_title'),'wpexpertsin'); ?>" placeholder="Share on stumbleupon" size="20" class="csbwfs_title"/>
|
107 |
+
</td>
|
108 |
+
</tr>
|
109 |
+
<tr><th><?php esc_attr_e( 'Mail:','wpexpertsin');?></th>
|
110 |
+
<td class="csbwfsButtonsImg" id="csbwfsButtonsMaImg">
|
111 |
+
<input type="text" id="csbwfs_mail_image" name="csbwfs_mail_image" value="<?php esc_attr_e( get_option('csbwfs_mail_image'),'wpexpertsin'); ?>" placeholder="Insert mail button image path" size="30" class="inputButtonid"/><input id="csbwfs_mail_image_button" type="button" value="Upload Image" class="cswbfsUploadBtn"/> <input type="text" id="csbwfs_mail_bg" name="csbwfs_mail_bg" value="<?php esc_attr_e( get_option('csbwfs_mail_bg'),'wpexpertsin'); ?>" data-default-color="#738a8d" class="color-field" size="20"/> <input type="text" id="csbwfs_mail_title" name="csbwfs_mail_title" value="<?php esc_attr_e( get_option('csbwfs_mail_title'),'wpexpertsin'); ?>" placeholder="Send contact request" size="20" class="csbwfs_title"/>
|
112 |
+
</td>
|
113 |
+
</tr>
|
114 |
+
<tr><th><?php esc_attr_e( 'Youtube:','wpexpertsin');?></th>
|
115 |
+
<td class="csbwfsButtonsImg" id="csbwfsButtonsYtImg">
|
116 |
+
<input type="text" id="csbwfs_yt_image" name="csbwfs_yt_image" value="<?php esc_attr_e( get_option('csbwfs_yt_image'),'wpexpertsin'); ?>" placeholder="Insert youtube button image path" size="30" class="inputButtonid"/><input id="csbwfs_yt_image_button" type="button" value="Upload Image" class="cswbfsUploadBtn"/> <input type="text" id="csbwfs_yt_bg" name="csbwfs_yt_bg" value="<?php esc_attr_e( get_option('csbwfs_yt_bg'),'wpexpertsin'); ?>" data-default-color="#ffffff" class="color-field" size="20"/> <input type="text" id="csbwfs_yt_title" name="csbwfs_yt_title" value="<?php esc_attr_e( get_option('csbwfs_yt_title'),'wpexpertsin'); ?>" placeholder="Youtube" size="20" class="csbwfs_title"/>
|
117 |
+
</td>
|
118 |
+
</tr>
|
119 |
+
<tr><td colspan="2"><h3><strong>Style(Optional):</strong></h3></td></tr>
|
120 |
+
|
121 |
+
<tr>
|
122 |
+
<th><?php esc_attr_e( 'Top Margin:','wpexpertsin');?></th>
|
123 |
+
<td>
|
124 |
+
|
125 |
+
<input type="textbox" id="csbwfs_top_margin" name="csbwfs_top_margin" value="<?php esc_attr_e( get_option('csbwfs_top_margin'),'wpexpertsin'); ?>" placeholder="10% OR 10px" size="10"/>
|
126 |
+
</td>
|
127 |
+
</tr>
|
128 |
+
</table>
|
129 |
+
</div>
|
130 |
+
<!-- Share Buttons -->
|
131 |
+
<div class="csbwfs-tab" id="div-csbwfs-share-buttons">
|
132 |
+
<h2>Social Share Buttons Settings</h2>
|
133 |
+
<table>
|
134 |
+
<td><?php esc_attr_e('Enable:','wpexpertsin');?></td>
|
135 |
+
<td colspan="2">
|
136 |
+
<input type="checkbox" id="csbwfs_buttons_active" name="csbwfs_buttons_active" value='1' <?php checked(get_option('csbwfs_buttons_active'),1);?>/>
|
137 |
+
</td>
|
138 |
+
</tr>
|
139 |
+
<tr>
|
140 |
+
<th nowrap><?php esc_attr_e( 'Share Button Position:','wpexpertsin');?></th>
|
141 |
+
<td>
|
142 |
+
<select id="csbwfs_btn_position" name="csbwfs_btn_position" >
|
143 |
+
<option value="left" <?php selected(get_option('csbwfs_btn_position'),'left');?>>Left</option>
|
144 |
+
<option value="right" <?php selected(get_option('csbwfs_btn_position'),'right');?>>Right</option>
|
145 |
+
</select>
|
146 |
+
</td>
|
147 |
+
</tr>
|
148 |
+
<tr>
|
149 |
+
<th nowrap><?php esc_attr_e( 'Display Buttons On ','wpexpertsin');?></th>
|
150 |
+
<td>
|
151 |
+
<select id="csbwfs_btn_display" name="csbwfs_btn_display" >
|
152 |
+
<option value="below" <?php selected(get_option('csbwfs_btn_display'),'below');?>>Bottom Of The Content</option>
|
153 |
+
<option value="above" <?php selected(get_option('csbwfs_btn_display'),'above');?>>Top Of The Content</option>
|
154 |
+
</select>
|
155 |
+
</td>
|
156 |
+
</tr>
|
157 |
+
<tr>
|
158 |
+
<th nowrap><?php esc_attr_e( 'Share Button Text:','wpexpertsin');?></th>
|
159 |
+
<td>
|
160 |
+
<input type="textbox" id="csbwfs_btn_text" name="csbwfs_btn_text" value="<?php esc_attr_e( get_option('csbwfs_btn_text'),'wpexpertsin'); ?>" placeholder="Share This!" size="20"/>
|
161 |
+
<i>(Leave blank if you want hide button)</i></td>
|
162 |
+
</tr>
|
163 |
+
<tr><td colspan="2"><strong>Show Share Buttons On :</strong> Home <input type="checkbox" id="csbwfs_page_hide_home" value="yes" name="csbwfs_page_hide_home" <?php checked(get_option('csbwfs_page_hide_home'),'yes');?>/> Page <input type="checkbox" id="csbwfs_page_hide_page" value="yes" name="csbwfs_page_hide_page" <?php checked(get_option('csbwfs_page_hide_page'),'yes');?>/> Post <input type="checkbox" id="csbwfs_page_hide_post" value="yes" name="csbwfs_page_hide_post" <?php checked(get_option('csbwfs_page_hide_post'),'yes');?>/> Category/Archive <input type="checkbox" id="csbwfs_page_hide_archive" value="yes" name="csbwfs_page_hide_archive" <?php checked(get_option('csbwfs_page_hide_archive'),'yes');?>/> <br>
|
164 |
+
</td></tr>
|
165 |
+
|
166 |
+
<tr><td colspan="2"><strong><h4>Social Share Button Images 32X32 (Optional) :</h4></strong></td></tr>
|
167 |
+
<tr><td colspan="2" align="right"><input type="button" id="csbwfsresetpage" value="RESET"></td></tr>
|
168 |
+
<tr><th><?php esc_attr_e( 'Facebook:','wpexpertsin');?></th>
|
169 |
+
<td class="csbwfsButtonsImg" id="csbwfsButtonsFbImg2"><input type="text" id="csbwfs_page_fb_image" name="csbwfs_page_fb_image" value="<?php esc_attr_e( get_option('csbwfs_page_fb_image'),'wpexpertsin'); ?>" placeholder="Insert facebook button image path" size="40" class="inputButtonid"/>
|
170 |
+
<input id="csbwfs_fb_image_button2" type="button" value="Upload Image" class="cswbfsUploadBtn"/> <input type="text" id="csbwfs_page_fb_bg" data-default-color="#305891" class="color-field" name="csbwfs_page_fb_bg" value="<?php esc_attr_e( get_option('csbwfs_page_fb_bg'),'wpexpertsin'); ?>" size="20"/> <input type="text" id="csbwfs_page_fb_title" name="csbwfs_page_fb_title" value="<?php esc_attr_e( get_option('csbwfs_page_fb_title'),'wpexpertsin'); ?>" placeholder="Alt Text" size="20" class="csbwfs_title"/>
|
171 |
+
</td>
|
172 |
+
</tr>
|
173 |
+
<tr>
|
174 |
+
<th><?php esc_attr_e( 'Twitter:','wpexpertsin');?></th>
|
175 |
+
<td class="csbwfsButtonsImg" id="csbwfsButtonsTwImg2">
|
176 |
+
<input type="text" id="csbwfs_page_tw_image" name="csbwfs_page_tw_image" value="<?php esc_attr_e( get_option('csbwfs_page_tw_image'),'wpexpertsin'); ?>" placeholder="Insert twitter button image path" size="40" class="inputButtonid"/>
|
177 |
+
<input id="csbwfs_tw_image_button2" type="button" value="Upload Image" class="cswbfsUploadBtn"/> <input type="text" id="csbwfs_page_tw_bg" data-default-color="#2ca8d2" class="color-field" name="csbwfs_page_tw_bg" value="<?php esc_attr_e( get_option('csbwfs_page_tw_bg'),'wpexpertsin'); ?>" size="20"/> <input type="text" id="csbwfs_page_tw_title" name="csbwfs_page_tw_title" value="<?php esc_attr_e( get_option('csbwfs_page_tw_title'),'wpexpertsin'); ?>" placeholder="Alt Text" size="20" class="csbwfs_title"/>
|
178 |
+
</td>
|
179 |
+
</tr>
|
180 |
+
<tr><th><?php esc_attr_e( 'Linkedin:','wpexpertsin');?></th>
|
181 |
+
<td class="csbwfsButtonsImg" id="csbwfsButtonsLiImg2"><input type="text" id="csbwfs_page_li_image" name="csbwfs_page_li_image" value="<?php esc_attr_e( get_option('csbwfs_page_li_image'),'wpexpertsin'); ?>" placeholder="Insert Linkedin button image path" size="40" class="inputButtonid"/>
|
182 |
+
<input id="csbwfs_li_image_button2" type="button" value="Upload Image" class="cswbfsUploadBtn"/> <input type="text" id="csbwfs_page_li_bg" data-default-color="#dd4c39" class="color-field" name="csbwfs_page_li_bg" value="<?php esc_attr_e( get_option('csbwfs_page_li_bg'),'wpexpertsin'); ?>" size="20"/> <input type="text" id="csbwfs_page_li_title" name="csbwfs_page_li_title" value="<?php esc_attr_e( get_option('csbwfs_page_li_title'),'wpexpertsin'); ?>" placeholder="Alt Text" size="20" class="csbwfs_title"/>
|
183 |
+
</td>
|
184 |
+
</tr>
|
185 |
+
<tr>
|
186 |
+
<th><?php esc_attr_e( 'Pintrest:','wpexpertsin');?></th>
|
187 |
+
<td class="csbwfsButtonsImg" id="csbwfsButtonsPiImg2"><input type="text" id="csbwfs_page_pin_image" name="csbwfs_page_pin_image" value="<?php esc_attr_e( get_option('csbwfs_page_pin_image'),'wpexpertsin'); ?>" placeholder="Insert pinterest button image path" size="40" class="inputButtonid"/>
|
188 |
+
<input id="csbwfs_pi_image_button2" type="button" value="Upload Image" class="cswbfsUploadBtn"/> <input type="text" id="csbwfs_page_pin_bg" data-default-color="#ca2027" class="color-field" name="csbwfs_page_pin_bg" value="<?php esc_attr_e( get_option('csbwfs_page_pin_bg'),'wpexpertsin'); ?>" size="20"/> <input type="text" id="csbwfs_page_pin_title" name="csbwfs_page_pin_title" value="<?php esc_attr_e( get_option('csbwfs_page_pin_title'),'wpexpertsin'); ?>" placeholder="Alt Text" size="20" class="csbwfs_title"/>
|
189 |
+
</td>
|
190 |
+
</tr>
|
191 |
+
|
192 |
+
<tr>
|
193 |
+
<th><?php esc_attr_e( 'Reddit:','wpexpertsin');?></th>
|
194 |
+
<td class="csbwfsButtonsImg" id="csbwfsButtonsReImg2">
|
195 |
+
<input type="text" id="csbwfs_page_re_image" name="csbwfs_page_re_image" value="<?php esc_attr_e( get_option('csbwfs_page_re_image'),'wpexpertsin'); ?>" placeholder="Insert reddit button image path" size="40" class="inputButtonid"/>
|
196 |
+
<input id="csbwfs_re_image_button2" type="button" value="Upload Image" class="cswbfsUploadBtn"/> <input type="text" id="csbwfs_page_re_bg" data-default-color="#ff1a00" class="color-field" name="csbwfs_page_re_bg" value="<?php esc_attr_e( get_option('csbwfs_page_re_bg'),'wpexpertsin'); ?>" size="20"/> <input type="text" id="csbwfs_page_re_title" name="csbwfs_page_re_title" value="<?php esc_attr_e( get_option('csbwfs_page_re_title'),'wpexpertsin'); ?>" placeholder="Alt Text" size="20" class="csbwfs_title"/>
|
197 |
+
</td>
|
198 |
+
</tr>
|
199 |
+
<tr>
|
200 |
+
<th><?php esc_attr_e( 'Stumbleupon:','wpexpertsin');?></th>
|
201 |
+
<td class="csbwfsButtonsImg" id="csbwfsButtonsStImg2">
|
202 |
+
<input type="text" id="csbwfs_page_st_image" name="csbwfs_page_st_image" value="<?php esc_attr_e( get_option('csbwfs_page_st_image'),'wpexpertsin'); ?>" placeholder="Insert stumbleupon button image path" size="40" class="inputButtonid"/>
|
203 |
+
<input id="csbwfs_st_image_button2" type="button" value="Upload Image" class="cswbfsUploadBtn"/> <input type="text" id="csbwfs_page_st_bg" data-default-color="#eb4924" class="color-field" name="csbwfs_page_st_bg" value="<?php esc_attr_e( get_option('csbwfs_page_st_bg'),'wpexpertsin'); ?>" size="20"/> <input type="text" id="csbwfs_page_st_title" name="csbwfs_page_st_title" value="<?php esc_attr_e( get_option('csbwfs_page_st_title'),'wpexpertsin'); ?>" placeholder="Alt Text" size="20" class="csbwfs_title"/>
|
204 |
+
</td>
|
205 |
+
</tr>
|
206 |
+
<tr>
|
207 |
+
<th><?php esc_attr_e( 'Mail:','wpexpertsin');?></th>
|
208 |
+
<td class="csbwfsButtonsImg" id="csbwfsButtonsMlImg2">
|
209 |
+
<input type="text" id="csbwfs_page_mail_image" name="csbwfs_page_mail_image" value="<?php esc_attr_e( get_option('csbwfs_page_mail_image'),'wpexpertsin'); ?>" placeholder="Insert mail button image path" size="40" class="inputButtonid"/>
|
210 |
+
<input id="csbwfs_ml_image_button2" type="button" value="Upload Image" class="cswbfsUploadBtn"/> <input type="text" id="csbwfs_page_mail_bg" data-default-color="#738a8d" class="color-field" name="csbwfs_page_mail_bg" value="<?php esc_attr_e( get_option('csbwfs_page_mail_bg'),'wpexpertsin'); ?>" size="20"/> <input type="text" id="csbwfs_page_mail_title" name="csbwfs_page_mail_title" value="<?php esc_attr_e( get_option('csbwfs_page_mail_title'),'wpexpertsin'); ?>" placeholder="Alt Text" size="20" class="csbwfs_title"/>
|
211 |
+
</td>
|
212 |
+
</tr>
|
213 |
+
<tr>
|
214 |
+
<th><?php esc_attr_e( 'Youtube:','wpexpertsin');?></th>
|
215 |
+
<td class="csbwfsButtonsImg" id="csbwfsButtonsYtImg2">
|
216 |
+
<input type="text" id="csbwfs_page_yt_image" name="csbwfs_page_yt_image" value="<?php esc_attr_e( get_option('csbwfs_page_yt_image'),'wpexpertsin'); ?>" placeholder="Insert youtube button image path" size="40" class="inputButtonid"/>
|
217 |
+
<input id="csbwfs_yt_image_button2" type="button" value="Upload Image" class="cswbfsUploadBtn"/> <input type="text" id="csbwfs_page_yt_bg" data-default-color="#ffffff" class="color-field" name="csbwfs_page_yt_bg" value="<?php esc_attr_e( get_option('csbwfs_page_yt_bg'),'wpexpertsin'); ?>" size="20"/> <input type="text" id="csbwfs_page_yt_title" name="csbwfs_page_yt_title" value="<?php esc_attr_e( get_option('csbwfs_page_yt_title'),'wpexpertsin'); ?>" placeholder="Alt Text" size="20" class="csbwfs_title"/>
|
218 |
+
</td>
|
219 |
+
</tr>
|
220 |
+
</table>
|
221 |
+
|
222 |
+
</div>
|
223 |
+
<!-- Support -->
|
224 |
+
<div class="last author csbwfs-tab" id="div-csbwfs-support">
|
225 |
+
|
226 |
+
<h2>Plugin Support</h2>
|
227 |
+
|
228 |
+
<p><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ZEMSYQUZRUK6A" target="_blank" style="font-size: 17px; font-weight: bold;"><img src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" title="Donate for this plugin"></a></p>
|
229 |
+
|
230 |
+
<p><strong>Plugin Author:</strong><br><a href="https://www.ep-experts.in" target="_blank">WP-Experts.In Team</a></p>
|
231 |
+
<p><a href="mailto:raghunath.0087@gmail.com" target="_blank" class="contact-author">Contact Author</a></p>
|
232 |
+
<p><strong>Our Other Plugins:</strong><br>
|
233 |
+
<ol>
|
234 |
+
<li><a href="https://wordpress.org/plugins/custom-share-buttons-with-floating-sidebar" target="_blank">Custom Share Buttons With Floating Sidebar</a></li>
|
235 |
+
<li><a href="https://wordpress.org/plugins/protect-wp-admin/" target="_blank">Protect WP-Admin</a></li>
|
236 |
+
<li><a href="https://wordpress.org/plugins/wp-sales-notifier/" target="_blank">WP Sales Notifier</a></li>
|
237 |
+
<li><a href="https://wordpress.org/plugins/wp-categories-widget/" target="_blank">WP Categories Widget</a></li>
|
238 |
+
<li><a href="https://wordpress.org/plugins/wp-protect-content/" target="_blank">WP Protect Content</a></li>
|
239 |
+
<li><a href="https://wordpress.org/plugins/wp-version-remover/" target="_blank">WP Version Remover</a></li>
|
240 |
+
<li><a href="https://wordpress.org/plugins/wp-posts-widget/" target="_blank">WP Post Widget</a></li>
|
241 |
+
<li><a href="https://wordpress.org/plugins/wp-importer" target="_blank">WP Importer</a></li>
|
242 |
+
<li><a href="https://wordpress.org/plugins/wp-csv-importer/" target="_blank">WP CSV Importer</a></li>
|
243 |
+
<li><a href="https://wordpress.org/plugins/wp-testimonial/" target="_blank">WP Testimonial</a></li>
|
244 |
+
<li><a href="https://wordpress.org/plugins/wc-sales-count-manager/" target="_blank">WooCommerce Sales Count Manager</a></li>
|
245 |
+
<li><a href="https://wordpress.org/plugins/wp-social-buttons/" target="_blank">WP Social Buttons</a></li>
|
246 |
+
<li><a href="https://wordpress.org/plugins/wp-youtube-gallery/" target="_blank">WP Youtube Gallery</a></li>
|
247 |
+
<li><a href="https://wordpress.org/plugins/tweets-slider/" target="_blank">Tweets Slider</a></li>
|
248 |
+
<li><a href="https://wordpress.org/plugins/rg-responsive-gallery/" target="_blank">RG Responsive Slider</a></li>
|
249 |
+
<li><a href="https://wordpress.org/plugins/cf7-advance-security" target="_blank">Contact Form 7 Advance Security WP-Admin</a></li>
|
250 |
+
<li><a href="https://wordpress.org/plugins/wp-easy-recipe/" target="_blank">WP Easy Recipe</a></li>
|
251 |
+
</ol>
|
252 |
+
</div>
|
253 |
+
<!-- GO PRO -->
|
254 |
+
<div class="last author csbwfs-tab" id="div-csbwfs-pro">
|
255 |
+
<h2 style="color:green;text-align:center;"><strong>Pay one time use lifetime!!!!!</strong></h2>
|
256 |
+
<table>
|
257 |
+
<tr>
|
258 |
+
<td valign="top" width="30%">
|
259 |
+
<h2>GO PRO</h2>
|
260 |
+
<p><a href="https://www.wp-experts.in/products/share-buttons-with-floating-sidebar-pro-addon" target="_blank" class="contact-author">Click here</a> to download addon.</p>
|
261 |
+
<p>We have released an add-on for Custom Share Buttons With Floating Sidebar which not only demonstrates the flexibility of CSBWFS, but also adds some important features:</p>
|
262 |
+
<iframe width="560" height="450" src="https://www.youtube.com/embed/f_qk4qxAsz8" frameborder="0" allowfullscreen></iframe>
|
263 |
+
</td>
|
264 |
+
<td><h2>Key Features</h2><hr>
|
265 |
+
<ol>
|
266 |
+
<li>Responsive Floating Sidebar</li>
|
267 |
+
<li>Shortcode</li>
|
268 |
+
<li>Hide floating sidebar for any post type</li>
|
269 |
+
<li>Hide Floating Sidebar for any taxonomy</li>
|
270 |
+
<li>Show Share Buttons for any taxonomy</li>
|
271 |
+
<li>Define sidebar/share buttons position</li>
|
272 |
+
<li>Responsive Popup box Contact Form</li>
|
273 |
+
<li> Shortcode supportable light box</li>
|
274 |
+
<li>OG meta tags fields</li>
|
275 |
+
<li>Choose different style of sidebar</li>
|
276 |
+
<li>Use share buttons as social buttons</li>
|
277 |
+
<li>Define Twitter username</li>
|
278 |
+
<li>Share count buttons(FB, ST, PIN,Xing and Reddit)</li>
|
279 |
+
<li>Manage buttons image, title, background color and url</li>
|
280 |
+
<li>10 extra custom sidebar buttons to use it as your button</li>
|
281 |
+
<li>Show/Hide social share buttons on specific page/post</li>
|
282 |
+
<li>Page specific sidebar position (Left/Right/Bottom)</li>
|
283 |
+
<li>add social site official page URL for all social buttons</li>
|
284 |
+
</ol>
|
285 |
+
</td>
|
286 |
+
</tr>
|
287 |
+
</table>
|
288 |
+
</div>
|
289 |
+
</div>
|
290 |
+
<span class="submit-btn"><?php _e( get_submit_button('Save Settings','button-primary','submit','',''),'wpexpertsin');?></span>
|
291 |
+
<?php settings_fields('csbwf_sidebar_options'); ?>
|
292 |
+
</form>
|
293 |
+
<!-- End Options Form -->
|
294 |
+
</div>
|
lib/shortcode.php
CHANGED
@@ -1,86 +1,89 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
* Template files to define CSBWFS Shortcodes
|
4 |
-
* @add_shortcode()
|
5 |
-
* @do_shortcode()
|
6 |
-
* shortcode [csbwfs_buttons]
|
7 |
-
**/
|
8 |
-
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
9 |
-
|
10 |
-
if(!class_exists('CsbwfsShortcodeClass')):
|
11 |
-
class CsbwfsShortcodeClass {
|
12 |
-
/**
|
13 |
-
* Construct the plugin object
|
14 |
-
*/
|
15 |
-
public function __construct()
|
16 |
-
{
|
17 |
-
// register actions
|
18 |
-
add_shortcode( 'csbwfs_buttons', array(&$this, 'csbwfs_shortcode_func' ) );
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Template files to define CSBWFS Shortcodes
|
4 |
+
* @add_shortcode()
|
5 |
+
* @do_shortcode()
|
6 |
+
* shortcode [csbwfs_buttons]
|
7 |
+
**/
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
9 |
+
|
10 |
+
if(!class_exists('CsbwfsShortcodeClass')):
|
11 |
+
class CsbwfsShortcodeClass {
|
12 |
+
/**
|
13 |
+
* Construct the plugin object
|
14 |
+
*/
|
15 |
+
public function __construct()
|
16 |
+
{
|
17 |
+
// register actions
|
18 |
+
add_shortcode( 'csbwfs_buttons', array(&$this, 'csbwfs_shortcode_func' ) );
|
19 |
+
// register shortcode style
|
20 |
+
add_action( 'wp_enqueue_scripts', array(&$this, 'csbwfs_shortcode_style_func' ) );
|
21 |
+
add_filter( 'widget_text', 'do_shortcode' );
|
22 |
+
} // END public function __construct
|
23 |
+
|
24 |
+
|
25 |
+
public function csbwfs_shortcode_style_func() {
|
26 |
+
$csb_shortcodecss = ' .csbwfs-shortcode a{box-shadow:inherit}.csbwfs-shortcode a i{display:inline-block;position:relative;width:35px;height:36px;background-image:url('.plugin_dir_url( __FILE__ ).'../images/minify-social.png)}.csbwfs-shortcode{display:inline-block;position:relative;width:auto;}.csbwfs-shortcode i.csbwfs_facebook{background-position:68% 4%}.csbwfs-shortcode i.csbwfs_twitter{background-position:14% 4%}.csbwfs-shortcode i.csbwfs_plus{background-position:80% 4%}.csbwfs-shortcode i.csbwfs_linkedin{background-position:92% 4%}.csbwfs-shortcode i.csbwfs_pinterest{background-position:14% 19%}.csbwfs-shortcode i.csbwfs_youtube{background-position:32% 4%}.csbwfs-shortcode i.csbwfs_reddit{background-position:26% 19%}.csbwfs-shortcode i.csbwfs_stumbleupon{background-position:44% 19%}.csbwfs-shortcode i.csbwfs_mail{background-position:8% 19%}.csbwfs-shortcode i.csbwfs_skype {background-position: 38% 19%;} ';
|
27 |
+
wp_register_style( 'csbwfs_shortcode_style', false );
|
28 |
+
wp_add_inline_style( 'csbwfs_shortcode_style', $csb_shortcodecss );
|
29 |
+
}
|
30 |
+
|
31 |
+
public static function csbwfs_shortcode_func($atts) {
|
32 |
+
//[csbwfs_buttons buttons='fb,tw,li,pi,yt,re,st,ml']
|
33 |
+
$shortcode_html = '';
|
34 |
+
$btnsordaryy = isset($atts['buttons']) ? explode(',',$atts['buttons']) : array();
|
35 |
+
$class = isset($atts['class']) ? $atts['class'] : '';
|
36 |
+
if(is_array($btnsordaryy) && count($btnsordaryy) > 0 ){
|
37 |
+
wp_enqueue_style( 'csbwfs_shortcode_style' ); //load shortcode style
|
38 |
+
$shortcode_html .= '<div id="csbwfs-shortcode" class="'.esc_attr($class).'">';
|
39 |
+
foreach($btnsordaryy as $btnsVal) {
|
40 |
+
/** FB */
|
41 |
+
if($btnsVal=='fb'):
|
42 |
+
$shortcode_html .='<div id="csbwfs-fb" class="csbwfs-shortcode"><a href="javascript:" onclick="javascript:window.open(\'//www.facebook.com/sharer/sharer.php?u=\'+encodeURIComponent(location.href)+\'&title=\'+encodeURIComponent(document.title)+\'&jump=close\', \'\', \'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600\');return false;" target="_blank" ><i class="csbwfs_facebook"></i></a></div>';
|
43 |
+
endif;
|
44 |
+
/** TW */
|
45 |
+
if($btnsVal=='tw'):
|
46 |
+
$shortcode_html .='<div id="csbwfs-tw" class="csbwfs-shortcode"><a href="javascript:" onclick="window.open(\'//twitter.com/share?url=\'+encodeURIComponent(location.href)+\'&text=\'+encodeURIComponent(document.title)+\'&jump=close\',\'_blank\',\'width=800,height=300\')" ><i class="csbwfs_twitter"></i></a></div>';
|
47 |
+
|
48 |
+
endif;
|
49 |
+
|
50 |
+
/** LI */
|
51 |
+
if($btnsVal=='li'):
|
52 |
+
$shortcode_html .='<div id="csbwfs-li" class="csbwfs-shortcode"><a href="javascript:" onclick="javascript:window.open(\'//www.linkedin.com/shareArticle?mini=true&url=\'+encodeURIComponent(location.href)+\'&title=\'+encodeURIComponent(document.title)+\'&jump=close\',\'\',\'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=800\');return false;" ><i class="csbwfs_linkedin"></i></a></div>';
|
53 |
+
endif;
|
54 |
+
|
55 |
+
/** PIN */
|
56 |
+
if($btnsVal=='pi'):
|
57 |
+
$shortcode_html .='<div id="csbwfs-pin" class="csbwfs-shortcode"><a onclick="javascript:void((function(){var e=document.createElement(\'script\');e.setAttribute(\'type\',\'text/javascript\');e.setAttribute(\'charset\',\'UTF-8\');e.setAttribute(\'src\',\'//assets.pinterest.com/js/pinmarklet.js?r=\'+Math.random()*99999999);document.body.appendChild(e)})());" href="javascript:void(0);"><i class="csbwfs_pinterest"></i></a></div>';
|
58 |
+
endif;
|
59 |
+
|
60 |
+
/** Reddit */
|
61 |
+
if($btnsVal=='re'):
|
62 |
+
$shortcode_html .='<div id="csbwfs-re" class="csbwfs-shortcode"><a onclick="window.open(\'//reddit.com/submit?url=\'+encodeURIComponent(location.href)+\'&title=\'+encodeURIComponent(document.title)+\'&jump=close\',\'Reddit\',\'toolbar=0,status=0,width=1000,height=800\');" href="javascript:void(0);"><i class="csbwfs_reddit"></i></a></div>';
|
63 |
+
endif;
|
64 |
+
|
65 |
+
/** Stumbleupon/Mix */
|
66 |
+
if($btnsVal=='st'):
|
67 |
+
$shortcode_html .='<div id="csbwfs-st" class="csbwfs-shortcode"><a onclick="window.open(\'//mix.com/mixit?su=submit&url=\'+encodeURIComponent(location.href)+\'&title=\'+encodeURIComponent(document.title)+\'&jump=close\',\'Mix\',\'toolbar=0,status=0,width=1000,height=800\');" href="javascript:void(0);"><i class="csbwfs_stumbleupon"></i></a></div>';
|
68 |
+
endif;
|
69 |
+
/** YT */
|
70 |
+
if($btnsVal=='yt'):
|
71 |
+
$shortcode_html .='<div id="csbwfs-yt" class="csbwfs-shortcode"><a onclick="window.open(\''.get_option('csbwfs_ytPath').'\');" href="javascript:void(0);"><i class="csbwfs_youtube"></i></a></div>';
|
72 |
+
endif;
|
73 |
+
/** Skype */
|
74 |
+
if($btnsVal=='sk'):
|
75 |
+
$shortcode_html .='<div id="csbwfs-sk" class="csbwfs-shortcode"><a href="skype:'.get_option('csbwfs_skPath').'"><i class="csbwfs_skype"></i></a></div>';
|
76 |
+
endif;
|
77 |
+
/** Mail*/
|
78 |
+
if($btnsVal=='ml'):
|
79 |
+
$shortcode_html .='<div id="csbwfs-ml" class="csbwfs-shortcode"><a onclick="javascript:window.location=(\'mailto:'.get_bloginfo('admin_email').'\'+\'?subject=\'+encodeURIComponent(document.title)+\'&body=\'+encodeURIComponent(location.href));" href="javascript:void(0);" ><i class="csbwfs_mail"></i></a></div>';
|
80 |
+
endif;
|
81 |
+
}
|
82 |
+
$shortcode_html .='</div>'; //End #csbwfs-shortcode
|
83 |
+
}
|
84 |
+
return $shortcode_html;
|
85 |
+
}
|
86 |
+
}
|
87 |
+
//init class
|
88 |
+
new CsbwfsShortcodeClass(); //init
|
89 |
+
endif;
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== Custom Share Buttons with Floating Sidebar ===
|
2 |
Contributors: wpexpertsin, india-web-developer
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ZEMSYQUZRUK6A
|
4 |
-
Tags: social share buttons,custom share buttons,facebook, twitter,linkedin,Stumbleupon
|
5 |
-
Requires at least: 5.
|
6 |
-
Tested up to:
|
7 |
-
Stable tag: 4.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -12,16 +12,13 @@ Share buttons with extra features to sharing your website posts/pages on Faceboo
|
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
-
=
|
16 |
|
17 |
-
|
18 |
|
19 |
-
|
20 |
-
|
21 |
-
Install and start driving high quality referrals to your website.
|
22 |
-
|
23 |
-
You can display social share buttons on your website via floating sidebar. Easily Customizable & Extensible social share buttons and they will not affect your site speed as well.
|
24 |
|
|
|
25 |
|
26 |
### [Addon Demo](https://www.wp-experts.in/products/share-buttons-with-floating-sidebar-pro-addon).
|
27 |
|
@@ -58,7 +55,7 @@ fb-facebook, tw-twitter, li-linkedin, pi-pinterest, yt-youtube, re-reddit, st-st
|
|
58 |
|
59 |
= Go Pro =
|
60 |
|
61 |
-
We have also released an addon of Custom Share Buttons With Floating Sidebar which not only demonstrates the flexibility of free version, but also
|
62 |
|
63 |
Add-on Featrues :
|
64 |
|
@@ -92,10 +89,10 @@ We have also released an addon of Custom Share Buttons With Floating Sidebar whi
|
|
92 |
* An option to show/hide sidebar from any specific page
|
93 |
* Faster support
|
94 |
|
95 |
-
**[Download Addon](https://www.wp-experts.in/products/share-buttons-with-floating-sidebar-pro-addon)**
|
96 |
|
97 |
|
98 |
-
|
99 |
|
100 |
|
101 |
== Installation ==
|
@@ -107,19 +104,19 @@ Step 2. Activate the plugin through the Plugins menu in WordPress
|
|
107 |
Step 3. Go to Settings/"Social Share Buttons(CSBWFS)" and configure the plugin settings.
|
108 |
|
109 |
== Frequently Asked Questions ==
|
110 |
-
#How add floating share buttons on my website?
|
111 |
|
112 |
* After active the plugin you have must need to enable this plugin through the plugin settings.
|
113 |
|
114 |
-
#Can
|
115 |
|
116 |
* Yes,admin can changes all social share custom buttons images if you wish, for that you have only need to define the buttons images path from plugins settings page.
|
117 |
|
118 |
-
#Can
|
119 |
|
120 |
* Yes,You can disable the floating sidebar by configure the plugin settings
|
121 |
|
122 |
-
#Can
|
123 |
|
124 |
* Yes, admin can define the top margin from plugin settings page
|
125 |
|
@@ -169,6 +166,16 @@ Step 3. Go to Settings/"Social Share Buttons(CSBWFS)" and configure the plugin s
|
|
169 |
|
170 |
== Changelog ==
|
171 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
172 |
= 3.9 =
|
173 |
* Tested with latest wordpress version 5.4
|
174 |
* Optimized code
|
1 |
=== Custom Share Buttons with Floating Sidebar ===
|
2 |
Contributors: wpexpertsin, india-web-developer
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ZEMSYQUZRUK6A
|
4 |
+
Tags: social share buttons,custom share buttons, facebook, twitter, linkedin, Stumbleupon, Reddit, Pinterest, Xing, social buttons, floating sidebar
|
5 |
+
Requires at least: 5.6
|
6 |
+
Tested up to: 6.0
|
7 |
+
Stable tag: 4.2
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
+
= Most Popular Social Share Wordpress Plugin =
|
16 |
|
17 |
+
Share your website among your friends through social sites( Facebook, Twitter, Instagram, Whatsapp, Pinterest etc.) and grow your business.
|
18 |
|
19 |
+
This plugin provide a very simple social tool to share your website (posts/pages/products) on popular social networks. Install and start driving high quality referrals to your website.
|
|
|
|
|
|
|
|
|
20 |
|
21 |
+
Plugin give you an option to display social share buttons via floating sidebar. Easily Customizable & Extensible social share buttons and they will not affect your site speed as well.
|
22 |
|
23 |
### [Addon Demo](https://www.wp-experts.in/products/share-buttons-with-floating-sidebar-pro-addon).
|
24 |
|
55 |
|
56 |
= Go Pro =
|
57 |
|
58 |
+
We have also released an addon of Custom Share Buttons With Floating Sidebar which not only demonstrates the flexibility of free version, but also providing some more important features.
|
59 |
|
60 |
Add-on Featrues :
|
61 |
|
89 |
* An option to show/hide sidebar from any specific page
|
90 |
* Faster support
|
91 |
|
92 |
+
**[Download Addon](https://www.wp-experts.in/products/share-buttons-with-floating-sidebar-pro-addon/?utm_source=wordpress.org&utm_medium=free-plugin&utm_campaign=15off)**
|
93 |
|
94 |
|
95 |
+
Do You Have Any Query? **[Submit here](https://www.wp-experts.in/contact-us/?utm_source=wordpress.org&utm_medium=free-plugin&utm_campaign=csbwfs-social)**
|
96 |
|
97 |
|
98 |
== Installation ==
|
104 |
Step 3. Go to Settings/"Social Share Buttons(CSBWFS)" and configure the plugin settings.
|
105 |
|
106 |
== Frequently Asked Questions ==
|
107 |
+
#How to add floating share buttons on my website?
|
108 |
|
109 |
* After active the plugin you have must need to enable this plugin through the plugin settings.
|
110 |
|
111 |
+
#Can I change the custom share buttons images from admin?
|
112 |
|
113 |
* Yes,admin can changes all social share custom buttons images if you wish, for that you have only need to define the buttons images path from plugins settings page.
|
114 |
|
115 |
+
#Can I disable the floating sidebar for mobile?
|
116 |
|
117 |
* Yes,You can disable the floating sidebar by configure the plugin settings
|
118 |
|
119 |
+
#Can I define the top margin for share buttons block?
|
120 |
|
121 |
* Yes, admin can define the top margin from plugin settings page
|
122 |
|
166 |
|
167 |
== Changelog ==
|
168 |
|
169 |
+
|
170 |
+
= 4.2 =
|
171 |
+
* Tested with latest wordpress version 5.9.3
|
172 |
+
* Optimized Code
|
173 |
+
|
174 |
+
|
175 |
+
= 4.1 =
|
176 |
+
* Tested with latest wordpress version 5.8
|
177 |
+
|
178 |
+
|
179 |
= 3.9 =
|
180 |
* Tested with latest wordpress version 5.4
|
181 |
* Optimized code
|