Version Description
- Tested with latest wordpress version 5.1.1
- Removed Google+ button
Download this release
Release Info
Developer | india-web-developer |
Plugin | Custom Share Buttons with Floating Sidebar |
Version | 3.7 |
Comparing to | |
See all releases |
Code changes from version 3.6 to 3.7
- csbwfs-class.php +751 -793
- custom-share-buttons-with-floating-sidebar.php +309 -321
- lib/settings.php +301 -312
- lib/shortcode.php +82 -87
- readme.txt +307 -307
csbwfs-class.php
CHANGED
@@ -1,793 +1,751 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
* Custom Share Buttons With Floating Sidebar (C)
|
4 |
-
* @get_csbwf_sidebar_options()
|
5 |
-
* @get_csbwf_sidebar_content()
|
6 |
-
* */
|
7 |
-
?>
|
8 |
-
<?php
|
9 |
-
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
10 |
-
// get all options value for "Custom Share Buttons with Floating Sidebar"
|
11 |
-
function get_csbwf_sidebar_options() {
|
12 |
-
global $wpdb;
|
13 |
-
$ctOptions = $wpdb->get_results("SELECT option_name, option_value FROM $wpdb->options WHERE option_name LIKE 'csbwfs_%'");
|
14 |
-
|
15 |
-
foreach ($ctOptions as $option) {
|
16 |
-
$ctOptions[$option->option_name] = $option->option_value;
|
17 |
-
}
|
18 |
-
|
19 |
-
return $ctOptions;
|
20 |
-
}
|
21 |
-
/** Get the current url*/
|
22 |
-
if(!function_exists('csbwfs_current_path_protocol')):
|
23 |
-
function csbwfs_current_path_protocol($s, $use_forwarded_host=false)
|
24 |
-
{
|
25 |
-
$pwahttp = (!empty($s['HTTPS']) && $s['HTTPS'] == 'on') ? true:false;
|
26 |
-
$pwasprotocal = strtolower($s['SERVER_PROTOCOL']);
|
27 |
-
$pwa_protocol = substr($pwasprotocal, 0, strpos($pwasprotocal, '/')) . (($pwahttp) ? 's' : '');
|
28 |
-
$port = $s['SERVER_PORT'];
|
29 |
-
$port = ((!$pwahttp && $port=='80') || ($pwahttp && $port=='443')) ? '' : ':'.$port;
|
30 |
-
$host = ($use_forwarded_host && isset($s['HTTP_X_FORWARDED_HOST'])) ? $s['HTTP_X_FORWARDED_HOST'] : (isset($s['HTTP_HOST']) ? $s['HTTP_HOST'] : null);
|
31 |
-
$host = isset($host) ? $host : $s['SERVER_NAME'] . $port;
|
32 |
-
return $pwa_protocol . '://' . $host;
|
33 |
-
}
|
34 |
-
endif;
|
35 |
-
if(!function_exists('csbwfs_get_current_page_url')):
|
36 |
-
function csbwfs_get_current_page_url($s, $use_forwarded_host=false)
|
37 |
-
{
|
38 |
-
return csbwfs_current_path_protocol($s, $use_forwarded_host) . $s['REQUEST_URI'];
|
39 |
-
}
|
40 |
-
endif;
|
41 |
-
/*
|
42 |
-
* Site is browsing in mobile or not
|
43 |
-
* @csbwfsIsMobile()
|
44 |
-
* */
|
45 |
-
if(!function_exists('csbwfsIsMobile')):
|
46 |
-
function csbwfsIsMobile() {
|
47 |
-
// Check the server headers to see if they're mobile friendly
|
48 |
-
if(isset($_SERVER["HTTP_X_WAP_PROFILE"])) {
|
49 |
-
return true;
|
50 |
-
}
|
51 |
-
// Let's NOT return "mobile" if it's an iPhone, because the iPhone can render normal pages quite well.
|
52 |
-
if(isset($_SERVER["HTTP_USER_AGENT"])):
|
53 |
-
if(strstr($_SERVER['HTTP_USER_AGENT'], 'iPad')) {
|
54 |
-
return false;
|
55 |
-
}
|
56 |
-
endif;
|
57 |
-
|
58 |
-
// If the http_accept header supports wap then it's a mobile too
|
59 |
-
if(isset($_SERVER["HTTP_ACCEPT"])):
|
60 |
-
if(preg_match("/wap\.|\.wap/i",$_SERVER["HTTP_ACCEPT"])) {
|
61 |
-
return true;
|
62 |
-
}
|
63 |
-
endif;
|
64 |
-
// Still no luck? Let's have a look at the user agent on the browser. If it contains
|
65 |
-
// any of the following, it's probably a mobile device. Kappow!
|
66 |
-
if(isset($_SERVER["HTTP_USER_AGENT"])){
|
67 |
-
$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");
|
68 |
-
foreach($user_agents as $user_string){
|
69 |
-
if(preg_match("/".$user_string."/i",$_SERVER["HTTP_USER_AGENT"])) {
|
70 |
-
return true;
|
71 |
-
}
|
72 |
-
}
|
73 |
-
}
|
74 |
-
// None of the above? Then it's probably not a mobile device.
|
75 |
-
return false;
|
76 |
-
}
|
77 |
-
endif;
|
78 |
-
// Get plugin options
|
79 |
-
$pluginOptionsVal=get_csbwf_sidebar_options();
|
80 |
-
//check plugin in enable or not
|
81 |
-
if(isset($pluginOptionsVal['csbwfs_active']) && $pluginOptionsVal['csbwfs_active']==1){
|
82 |
-
|
83 |
-
if((csbwfsIsMobile()) &&
|
84 |
-
isset($pluginOptionsVal['csbwfs_deactive_for_mob']) && $pluginOptionsVal['csbwfs_deactive_for_mob']!='')
|
85 |
-
{
|
86 |
-
// silent is Gold;
|
87 |
-
}else
|
88 |
-
{
|
89 |
-
add_action('wp_footer','get_csbwf_sidebar_content');
|
90 |
-
add_action( 'wp_enqueue_scripts', 'csbwf_sidebar_scripts' );
|
91 |
-
add_action('wp_footer','csbwf_sidebar_load_inline_js');
|
92 |
-
add_action('wp_footer','csbwfs_cookie');
|
93 |
-
}
|
94 |
-
|
95 |
-
}
|
96 |
-
|
97 |
-
function csbwfs_cookie()
|
98 |
-
{
|
99 |
-
echo $cookieVal='<script>csbwfsCheckCookie();function csbwfsSetCookie(cname,cvalue,exdays) {
|
100 |
-
var d = new Date();
|
101 |
-
d.setTime(d.getTime() + (exdays*24*60*60*1000));
|
102 |
-
var expires = "expires=" + d.toGMTString();
|
103 |
-
document.cookie = cname+"="+cvalue+"; "+expires;
|
104 |
-
}
|
105 |
-
|
106 |
-
function csbwfsGetCookie(cname) {
|
107 |
-
var name = cname + "=";
|
108 |
-
var ca = document.cookie.split(\';\');
|
109 |
-
for(var i=0; i<ca.length; i++) {
|
110 |
-
var c = ca[i];
|
111 |
-
while (c.charAt(0)==\' \') c = c.substring(1);
|
112 |
-
if (c.indexOf(name) != -1) {
|
113 |
-
return c.substring(name.length, c.length);
|
114 |
-
}
|
115 |
-
}
|
116 |
-
return "";
|
117 |
-
}
|
118 |
-
|
119 |
-
function csbwfsCheckCookie() {
|
120 |
-
var hideshowhide = "'.get_option('csbwfs_rmSHBtn').'"
|
121 |
-
var button_status=csbwfsGetCookie("csbwfs_show_hide_status");
|
122 |
-
if (button_status != "") {
|
123 |
-
|
124 |
-
} else {
|
125 |
-
csbwfsSetCookie("csbwfs_show_hide_status", "active",1);
|
126 |
-
}
|
127 |
-
if(hideshowhide=="yes")
|
128 |
-
{
|
129 |
-
csbwfsSetCookie("csbwfs_show_hide_status", "active",0);
|
130 |
-
}
|
131 |
-
}
|
132 |
-
|
133 |
-
</script>';
|
134 |
-
}
|
135 |
-
if(isset($pluginOptionsVal['csbwfs_buttons_active']) && $pluginOptionsVal['csbwfs_buttons_active']==1){
|
136 |
-
add_filter( 'the_content', 'csbfs_the_content_filter', 20);
|
137 |
-
add_action( 'wp_enqueue_scripts', 'csbwf_sidebar_scripts' );
|
138 |
-
}
|
139 |
-
//register style and scrip files
|
140 |
-
function csbwf_sidebar_scripts() {
|
141 |
-
wp_enqueue_script( 'jquery' ); // wordpress jQuery
|
142 |
-
wp_register_style( 'csbwf_sidebar_style', plugins_url( 'css/csbwfs.css',__FILE__ ) );
|
143 |
-
wp_enqueue_style( 'csbwf_sidebar_style' );
|
144 |
-
}
|
145 |
-
/*********************************************************
|
146 |
-
"Add the jQuery code in head section using hooks"
|
147 |
-
*********************************************************/
|
148 |
-
function csbwf_sidebar_load_inline_js()
|
149 |
-
{
|
150 |
-
$pluginOptionsVal=get_csbwf_sidebar_options();
|
151 |
-
$jscnt='<script>
|
152 |
-
var windWidth=jQuery( window ).width();
|
153 |
-
//alert(windWidth);
|
154 |
-
var animateWidth;
|
155 |
-
var defaultAnimateWidth;';
|
156 |
-
$jscnt.='
|
157 |
-
jQuery(document).ready(function()
|
158 |
-
{
|
159 |
-
animateWidth="55";
|
160 |
-
defaultAnimateWidth= animateWidth-10;
|
161 |
-
animateHeight="49";
|
162 |
-
defaultAnimateHeight= animateHeight-2;';
|
163 |
-
if($pluginOptionsVal['csbwfs_delayTimeBtn']!='0'):
|
164 |
-
$jscnt.='jQuery("#csbwfs-delaydiv").hide();
|
165 |
-
setTimeout(function(){
|
166 |
-
jQuery("#csbwfs-delaydiv").fadeIn();}, '.$pluginOptionsVal['csbwfs_delayTimeBtn'].');';
|
167 |
-
endif;
|
168 |
-
|
169 |
-
if($pluginOptionsVal['csbwfs_position']=='right' || $pluginOptionsVal['csbwfs_position']=='left'){
|
170 |
-
|
171 |
-
$jscnt.='jQuery("div.csbwfsbtns a").hover(function(){
|
172 |
-
jQuery(this).animate({width:animateWidth});
|
173 |
-
},function(){
|
174 |
-
jQuery(this).stop( true, true ).animate({width:defaultAnimateWidth});
|
175 |
-
});';
|
176 |
-
}else
|
177 |
-
{
|
178 |
-
//silent
|
179 |
-
|
180 |
-
}
|
181 |
-
|
182 |
-
if(isset($pluginOptionsVal['csbwfs_auto_hide']) && $pluginOptionsVal['csbwfs_auto_hide']!=''):
|
183 |
-
$jscnt.='csbwfsSetCookie("csbwfs_show_hide_status","in_active","1");';
|
184 |
-
endif;
|
185 |
-
|
186 |
-
$jscnt.='jQuery("div.csbwfs-show").hide();
|
187 |
-
jQuery("div.csbwfs-show a").click(function(){
|
188 |
-
jQuery("div#csbwfs-social-inner").show(500);
|
189 |
-
jQuery("div.csbwfs-show").hide(500);
|
190 |
-
jQuery("div.csbwfs-hide").show(500);
|
191 |
-
csbwfsSetCookie("csbwfs_show_hide_status","active","1");
|
192 |
-
});
|
193 |
-
|
194 |
-
jQuery("div.csbwfs-hide a").click(function(){
|
195 |
-
jQuery("div.csbwfs-show").show(500);
|
196 |
-
jQuery("div.csbwfs-hide").hide(500);
|
197 |
-
jQuery("div#csbwfs-social-inner").hide(500);
|
198 |
-
csbwfsSetCookie("csbwfs_show_hide_status","in_active","1");
|
199 |
-
});';
|
200 |
-
|
201 |
-
$jscnt.='var button_status=csbwfsGetCookie("csbwfs_show_hide_status");
|
202 |
-
if (button_status =="in_active") {
|
203 |
-
jQuery("div.csbwfs-show").show();
|
204 |
-
jQuery("div.csbwfs-hide").hide();
|
205 |
-
jQuery("div#csbwfs-social-inner").hide();
|
206 |
-
} else {
|
207 |
-
jQuery("div#csbwfs-social-inner").show();
|
208 |
-
jQuery("div.csbwfs-show").hide();
|
209 |
-
jQuery("div.csbwfs-hide").show();
|
210 |
-
}';
|
211 |
-
|
212 |
-
|
213 |
-
$jscnt.='});
|
214 |
-
|
215 |
-
</script>';
|
216 |
-
|
217 |
-
echo $jscnt;
|
218 |
-
}
|
219 |
-
|
220 |
-
/********************************************************
|
221 |
-
"Custom Share Buttons with Floating Sidebar" HTML
|
222 |
-
*********************************************************/
|
223 |
-
function get_csbwf_sidebar_content() {
|
224 |
-
global $post;
|
225 |
-
$pluginOptionsVal=get_csbwf_sidebar_options();
|
226 |
-
$shareurl = htmlspecialchars(csbwfs_get_current_page_url($_SERVER), ENT_QUOTES, 'UTF-8');
|
227 |
-
$ShareTitle = (is_front_page() && is_home()) ? get_bloginfo('name'): trim(wp_title('',false));
|
228 |
-
$ShareTitle= htmlspecialchars(rawurlencode($ShareTitle));
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
{
|
298 |
-
$
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
{
|
309 |
-
$
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
else{$
|
327 |
-
//get
|
328 |
-
if($pluginOptionsVal['
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
//get
|
334 |
-
if(
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
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 |
-
$floatingSidebarContent .='
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
$floatingSidebarContent .='
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
$floatingSidebarContent .='
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
$floatingSidebarContent .='
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
$floatingSidebarContent .='<
|
443 |
-
}
|
444 |
-
$floatingSidebarContent .='
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
$floatingSidebarContent .='</
|
456 |
-
|
457 |
-
|
458 |
-
if($pluginOptionsVal['
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
endif;
|
468 |
-
|
469 |
-
$floatingSidebarContent
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
$
|
482 |
-
|
483 |
-
if(
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
if(
|
532 |
-
$
|
533 |
-
|
534 |
-
|
535 |
-
$
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
//get
|
561 |
-
if(
|
562 |
-
|
563 |
-
//get
|
564 |
-
if(isset($pluginOptionsVal['
|
565 |
-
|
566 |
-
//get
|
567 |
-
if(isset($pluginOptionsVal['
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
//get
|
575 |
-
if($pluginOptionsVal['
|
576 |
-
else{$
|
577 |
-
//get
|
578 |
-
if($pluginOptionsVal['
|
579 |
-
else{$
|
580 |
-
//get
|
581 |
-
if($pluginOptionsVal['
|
582 |
-
else{$
|
583 |
-
//get
|
584 |
-
if($pluginOptionsVal['
|
585 |
-
else{$
|
586 |
-
//get pinterest button image
|
587 |
-
if($pluginOptionsVal['
|
588 |
-
else{$
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
//get reddit
|
593 |
-
if(isset($pluginOptionsVal['
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
if(
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
if(
|
635 |
-
$
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
$shareButtonContent
|
647 |
-
if($
|
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 |
-
$shareButtonContent .='
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
$shareButtonContent .='<
|
706 |
-
}
|
707 |
-
$shareButtonContent .='
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
$shareButtonContent.='
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
$shareButtonContent
|
719 |
-
endif;
|
720 |
-
/*
|
721 |
-
if(
|
722 |
-
$shareButtonContent
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
$
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
$
|
741 |
-
endif;
|
742 |
-
|
743 |
-
if($pluginOptionsVal['
|
744 |
-
$
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
endif;
|
753 |
-
$shareButtonContent.='</div>';
|
754 |
-
|
755 |
-
// Returns the content.
|
756 |
-
global $post;
|
757 |
-
$shareButtonContentReturn='';
|
758 |
-
/* DEFAULT HOME */
|
759 |
-
if((is_home() && is_front_page()) && $pluginOptionsVal['csbwfs_page_hide_home']=='yes'):
|
760 |
-
$shareButtonContentReturn=$shareButtonContent;
|
761 |
-
endif;
|
762 |
-
/* STATIC front page */
|
763 |
-
if(is_front_page() && $pluginOptionsVal['csbwfs_page_hide_home']=='yes'):
|
764 |
-
$shareButtonContentReturn=$shareButtonContent;
|
765 |
-
endif;
|
766 |
-
//post
|
767 |
-
if(is_single() && $pluginOptionsVal['csbwfs_page_hide_post']=='yes'):
|
768 |
-
$shareButtonContentReturn=$shareButtonContent;
|
769 |
-
endif;
|
770 |
-
//page
|
771 |
-
if(is_page() && $pluginOptionsVal['csbwfs_page_hide_page']=='yes'):
|
772 |
-
if(!is_front_page()):
|
773 |
-
$shareButtonContentReturn=$shareButtonContent;
|
774 |
-
endif;
|
775 |
-
endif;
|
776 |
-
//archive
|
777 |
-
if(is_archive() && $pluginOptionsVal['csbwfs_page_hide_archive']=='yes'):
|
778 |
-
$shareButtonContentReturn=$shareButtonContent;
|
779 |
-
endif;
|
780 |
-
// 404
|
781 |
-
if(is_404()):
|
782 |
-
$shareButtonContentReturn='';
|
783 |
-
endif;
|
784 |
-
/** Buttons position on content */
|
785 |
-
if(isset($pluginOptionsVal['csbwfs_btn_display']) && $pluginOptionsVal['csbwfs_btn_display']=='above'){
|
786 |
-
$finalContent= $shareButtonContentReturn.$content;
|
787 |
-
}else
|
788 |
-
{
|
789 |
-
$finalContent = $content.$shareButtonContentReturn;
|
790 |
-
}
|
791 |
-
return $finalContent;
|
792 |
-
}
|
793 |
-
?>
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Custom Share Buttons With Floating Sidebar (C)
|
4 |
+
* @get_csbwf_sidebar_options()
|
5 |
+
* @get_csbwf_sidebar_content()
|
6 |
+
* */
|
7 |
+
?>
|
8 |
+
<?php
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
10 |
+
// get all options value for "Custom Share Buttons with Floating Sidebar"
|
11 |
+
function get_csbwf_sidebar_options() {
|
12 |
+
global $wpdb;
|
13 |
+
$ctOptions = $wpdb->get_results("SELECT option_name, option_value FROM $wpdb->options WHERE option_name LIKE 'csbwfs_%'");
|
14 |
+
|
15 |
+
foreach ($ctOptions as $option) {
|
16 |
+
$ctOptions[$option->option_name] = $option->option_value;
|
17 |
+
}
|
18 |
+
|
19 |
+
return $ctOptions;
|
20 |
+
}
|
21 |
+
/** Get the current url*/
|
22 |
+
if(!function_exists('csbwfs_current_path_protocol')):
|
23 |
+
function csbwfs_current_path_protocol($s, $use_forwarded_host=false)
|
24 |
+
{
|
25 |
+
$pwahttp = (!empty($s['HTTPS']) && $s['HTTPS'] == 'on') ? true:false;
|
26 |
+
$pwasprotocal = strtolower($s['SERVER_PROTOCOL']);
|
27 |
+
$pwa_protocol = substr($pwasprotocal, 0, strpos($pwasprotocal, '/')) . (($pwahttp) ? 's' : '');
|
28 |
+
$port = $s['SERVER_PORT'];
|
29 |
+
$port = ((!$pwahttp && $port=='80') || ($pwahttp && $port=='443')) ? '' : ':'.$port;
|
30 |
+
$host = ($use_forwarded_host && isset($s['HTTP_X_FORWARDED_HOST'])) ? $s['HTTP_X_FORWARDED_HOST'] : (isset($s['HTTP_HOST']) ? $s['HTTP_HOST'] : null);
|
31 |
+
$host = isset($host) ? $host : $s['SERVER_NAME'] . $port;
|
32 |
+
return $pwa_protocol . '://' . $host;
|
33 |
+
}
|
34 |
+
endif;
|
35 |
+
if(!function_exists('csbwfs_get_current_page_url')):
|
36 |
+
function csbwfs_get_current_page_url($s, $use_forwarded_host=false)
|
37 |
+
{
|
38 |
+
return csbwfs_current_path_protocol($s, $use_forwarded_host) . $s['REQUEST_URI'];
|
39 |
+
}
|
40 |
+
endif;
|
41 |
+
/*
|
42 |
+
* Site is browsing in mobile or not
|
43 |
+
* @csbwfsIsMobile()
|
44 |
+
* */
|
45 |
+
if(!function_exists('csbwfsIsMobile')):
|
46 |
+
function csbwfsIsMobile() {
|
47 |
+
// Check the server headers to see if they're mobile friendly
|
48 |
+
if(isset($_SERVER["HTTP_X_WAP_PROFILE"])) {
|
49 |
+
return true;
|
50 |
+
}
|
51 |
+
// Let's NOT return "mobile" if it's an iPhone, because the iPhone can render normal pages quite well.
|
52 |
+
if(isset($_SERVER["HTTP_USER_AGENT"])):
|
53 |
+
if(strstr($_SERVER['HTTP_USER_AGENT'], 'iPad')) {
|
54 |
+
return false;
|
55 |
+
}
|
56 |
+
endif;
|
57 |
+
|
58 |
+
// If the http_accept header supports wap then it's a mobile too
|
59 |
+
if(isset($_SERVER["HTTP_ACCEPT"])):
|
60 |
+
if(preg_match("/wap\.|\.wap/i",$_SERVER["HTTP_ACCEPT"])) {
|
61 |
+
return true;
|
62 |
+
}
|
63 |
+
endif;
|
64 |
+
// Still no luck? Let's have a look at the user agent on the browser. If it contains
|
65 |
+
// any of the following, it's probably a mobile device. Kappow!
|
66 |
+
if(isset($_SERVER["HTTP_USER_AGENT"])){
|
67 |
+
$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");
|
68 |
+
foreach($user_agents as $user_string){
|
69 |
+
if(preg_match("/".$user_string."/i",$_SERVER["HTTP_USER_AGENT"])) {
|
70 |
+
return true;
|
71 |
+
}
|
72 |
+
}
|
73 |
+
}
|
74 |
+
// None of the above? Then it's probably not a mobile device.
|
75 |
+
return false;
|
76 |
+
}
|
77 |
+
endif;
|
78 |
+
// Get plugin options
|
79 |
+
$pluginOptionsVal=get_csbwf_sidebar_options();
|
80 |
+
//check plugin in enable or not
|
81 |
+
if(isset($pluginOptionsVal['csbwfs_active']) && $pluginOptionsVal['csbwfs_active']==1){
|
82 |
+
|
83 |
+
if((csbwfsIsMobile()) &&
|
84 |
+
isset($pluginOptionsVal['csbwfs_deactive_for_mob']) && $pluginOptionsVal['csbwfs_deactive_for_mob']!='')
|
85 |
+
{
|
86 |
+
// silent is Gold;
|
87 |
+
}else
|
88 |
+
{
|
89 |
+
add_action('wp_footer','get_csbwf_sidebar_content');
|
90 |
+
add_action( 'wp_enqueue_scripts', 'csbwf_sidebar_scripts' );
|
91 |
+
add_action('wp_footer','csbwf_sidebar_load_inline_js');
|
92 |
+
add_action('wp_footer','csbwfs_cookie');
|
93 |
+
}
|
94 |
+
|
95 |
+
}
|
96 |
+
|
97 |
+
function csbwfs_cookie()
|
98 |
+
{
|
99 |
+
echo $cookieVal='<script>csbwfsCheckCookie();function csbwfsSetCookie(cname,cvalue,exdays) {
|
100 |
+
var d = new Date();
|
101 |
+
d.setTime(d.getTime() + (exdays*24*60*60*1000));
|
102 |
+
var expires = "expires=" + d.toGMTString();
|
103 |
+
document.cookie = cname+"="+cvalue+"; "+expires;
|
104 |
+
}
|
105 |
+
|
106 |
+
function csbwfsGetCookie(cname) {
|
107 |
+
var name = cname + "=";
|
108 |
+
var ca = document.cookie.split(\';\');
|
109 |
+
for(var i=0; i<ca.length; i++) {
|
110 |
+
var c = ca[i];
|
111 |
+
while (c.charAt(0)==\' \') c = c.substring(1);
|
112 |
+
if (c.indexOf(name) != -1) {
|
113 |
+
return c.substring(name.length, c.length);
|
114 |
+
}
|
115 |
+
}
|
116 |
+
return "";
|
117 |
+
}
|
118 |
+
|
119 |
+
function csbwfsCheckCookie() {
|
120 |
+
var hideshowhide = "'.get_option('csbwfs_rmSHBtn').'"
|
121 |
+
var button_status=csbwfsGetCookie("csbwfs_show_hide_status");
|
122 |
+
if (button_status != "") {
|
123 |
+
|
124 |
+
} else {
|
125 |
+
csbwfsSetCookie("csbwfs_show_hide_status", "active",1);
|
126 |
+
}
|
127 |
+
if(hideshowhide=="yes")
|
128 |
+
{
|
129 |
+
csbwfsSetCookie("csbwfs_show_hide_status", "active",0);
|
130 |
+
}
|
131 |
+
}
|
132 |
+
|
133 |
+
</script>';
|
134 |
+
}
|
135 |
+
if(isset($pluginOptionsVal['csbwfs_buttons_active']) && $pluginOptionsVal['csbwfs_buttons_active']==1){
|
136 |
+
add_filter( 'the_content', 'csbfs_the_content_filter', 20);
|
137 |
+
add_action( 'wp_enqueue_scripts', 'csbwf_sidebar_scripts' );
|
138 |
+
}
|
139 |
+
//register style and scrip files
|
140 |
+
function csbwf_sidebar_scripts() {
|
141 |
+
wp_enqueue_script( 'jquery' ); // wordpress jQuery
|
142 |
+
wp_register_style( 'csbwf_sidebar_style', plugins_url( 'css/csbwfs.css',__FILE__ ) );
|
143 |
+
wp_enqueue_style( 'csbwf_sidebar_style' );
|
144 |
+
}
|
145 |
+
/*********************************************************
|
146 |
+
"Add the jQuery code in head section using hooks"
|
147 |
+
*********************************************************/
|
148 |
+
function csbwf_sidebar_load_inline_js()
|
149 |
+
{
|
150 |
+
$pluginOptionsVal=get_csbwf_sidebar_options();
|
151 |
+
$jscnt='<script>
|
152 |
+
var windWidth=jQuery( window ).width();
|
153 |
+
//alert(windWidth);
|
154 |
+
var animateWidth;
|
155 |
+
var defaultAnimateWidth;';
|
156 |
+
$jscnt.='
|
157 |
+
jQuery(document).ready(function()
|
158 |
+
{
|
159 |
+
animateWidth="55";
|
160 |
+
defaultAnimateWidth= animateWidth-10;
|
161 |
+
animateHeight="49";
|
162 |
+
defaultAnimateHeight= animateHeight-2;';
|
163 |
+
if($pluginOptionsVal['csbwfs_delayTimeBtn']!='0'):
|
164 |
+
$jscnt.='jQuery("#csbwfs-delaydiv").hide();
|
165 |
+
setTimeout(function(){
|
166 |
+
jQuery("#csbwfs-delaydiv").fadeIn();}, '.$pluginOptionsVal['csbwfs_delayTimeBtn'].');';
|
167 |
+
endif;
|
168 |
+
|
169 |
+
if($pluginOptionsVal['csbwfs_position']=='right' || $pluginOptionsVal['csbwfs_position']=='left'){
|
170 |
+
|
171 |
+
$jscnt.='jQuery("div.csbwfsbtns a").hover(function(){
|
172 |
+
jQuery(this).animate({width:animateWidth});
|
173 |
+
},function(){
|
174 |
+
jQuery(this).stop( true, true ).animate({width:defaultAnimateWidth});
|
175 |
+
});';
|
176 |
+
}else
|
177 |
+
{
|
178 |
+
//silent
|
179 |
+
|
180 |
+
}
|
181 |
+
|
182 |
+
if(isset($pluginOptionsVal['csbwfs_auto_hide']) && $pluginOptionsVal['csbwfs_auto_hide']!=''):
|
183 |
+
$jscnt.='csbwfsSetCookie("csbwfs_show_hide_status","in_active","1");';
|
184 |
+
endif;
|
185 |
+
|
186 |
+
$jscnt.='jQuery("div.csbwfs-show").hide();
|
187 |
+
jQuery("div.csbwfs-show a").click(function(){
|
188 |
+
jQuery("div#csbwfs-social-inner").show(500);
|
189 |
+
jQuery("div.csbwfs-show").hide(500);
|
190 |
+
jQuery("div.csbwfs-hide").show(500);
|
191 |
+
csbwfsSetCookie("csbwfs_show_hide_status","active","1");
|
192 |
+
});
|
193 |
+
|
194 |
+
jQuery("div.csbwfs-hide a").click(function(){
|
195 |
+
jQuery("div.csbwfs-show").show(500);
|
196 |
+
jQuery("div.csbwfs-hide").hide(500);
|
197 |
+
jQuery("div#csbwfs-social-inner").hide(500);
|
198 |
+
csbwfsSetCookie("csbwfs_show_hide_status","in_active","1");
|
199 |
+
});';
|
200 |
+
|
201 |
+
$jscnt.='var button_status=csbwfsGetCookie("csbwfs_show_hide_status");
|
202 |
+
if (button_status =="in_active") {
|
203 |
+
jQuery("div.csbwfs-show").show();
|
204 |
+
jQuery("div.csbwfs-hide").hide();
|
205 |
+
jQuery("div#csbwfs-social-inner").hide();
|
206 |
+
} else {
|
207 |
+
jQuery("div#csbwfs-social-inner").show();
|
208 |
+
jQuery("div.csbwfs-show").hide();
|
209 |
+
jQuery("div.csbwfs-hide").show();
|
210 |
+
}';
|
211 |
+
|
212 |
+
|
213 |
+
$jscnt.='});
|
214 |
+
|
215 |
+
</script>';
|
216 |
+
|
217 |
+
echo $jscnt;
|
218 |
+
}
|
219 |
+
|
220 |
+
/********************************************************
|
221 |
+
"Custom Share Buttons with Floating Sidebar" HTML
|
222 |
+
*********************************************************/
|
223 |
+
function get_csbwf_sidebar_content() {
|
224 |
+
global $post;
|
225 |
+
$pluginOptionsVal=get_csbwf_sidebar_options();
|
226 |
+
$shareurl = htmlspecialchars(csbwfs_get_current_page_url($_SERVER), ENT_QUOTES, 'UTF-8');
|
227 |
+
$ShareTitle = (is_front_page() && is_home()) ? get_bloginfo('name'): trim(wp_title('',false));
|
228 |
+
$ShareTitle= htmlspecialchars(rawurlencode($ShareTitle));
|
229 |
+
$ShareTitle = str_replace("%26%23039%3B","",$ShareTitle);// remove single quate
|
230 |
+
/* Get All buttons Image */
|
231 |
+
//get facebook button image
|
232 |
+
if($pluginOptionsVal['csbwfs_fb_image']!=''){ $fImg=$pluginOptionsVal['csbwfs_fb_image'];}
|
233 |
+
else{$fImg='';}
|
234 |
+
//get twitter button image
|
235 |
+
if($pluginOptionsVal['csbwfs_tw_image']!=''){ $tImg=$pluginOptionsVal['csbwfs_tw_image'];}
|
236 |
+
else{$tImg='';}
|
237 |
+
//get Linkedin button image
|
238 |
+
if($pluginOptionsVal['csbwfs_li_image']!=''){ $lImg=$pluginOptionsVal['csbwfs_li_image'];}
|
239 |
+
else{$lImg='';}
|
240 |
+
//get mail button image
|
241 |
+
if($pluginOptionsVal['csbwfs_mail_image']!=''){ $mImg=$pluginOptionsVal['csbwfs_mail_image'];}
|
242 |
+
else{$mImg='';}
|
243 |
+
//get pinterest button image
|
244 |
+
if($pluginOptionsVal['csbwfs_pin_image']!=''){ $pImg=$pluginOptionsVal['csbwfs_pin_image'];}
|
245 |
+
else{$pImg='';}
|
246 |
+
//get youtube button image
|
247 |
+
if(isset($pluginOptionsVal['csbwfs_yt_image']) && $pluginOptionsVal['csbwfs_yt_image']!=''){ $ytImg=$pluginOptionsVal['csbwfs_yt_image'];}
|
248 |
+
else{$ytImg='';}
|
249 |
+
//get reddit plus button image
|
250 |
+
if(isset($pluginOptionsVal['csbwfs_re_image']) && $pluginOptionsVal['csbwfs_re_image']!=''){ $reImg=$pluginOptionsVal['csbwfs_re_image'];}
|
251 |
+
else{$reImg='';}
|
252 |
+
//get stumbleupon button image
|
253 |
+
if(isset($pluginOptionsVal['csbwfs_st_image']) && $pluginOptionsVal['csbwfs_st_image']!=''){ $stImg=$pluginOptionsVal['csbwfs_st_image'];}
|
254 |
+
else{$stImg='';}
|
255 |
+
/* Get All buttons Image Alt/Title */
|
256 |
+
//get facebook button image alt/title
|
257 |
+
if($pluginOptionsVal['csbwfs_fb_title']!=''){ $fImgAlt=$pluginOptionsVal['csbwfs_fb_title'];}
|
258 |
+
else{$fImgAlt='Share On Facebook';}
|
259 |
+
//get twitter button image alt/title
|
260 |
+
if($pluginOptionsVal['csbwfs_tw_title']!=''){ $tImgAlt=$pluginOptionsVal['csbwfs_tw_title'];}
|
261 |
+
else{$tImgAlt='Share On Twitter';}
|
262 |
+
//get Linkedin button image alt/title
|
263 |
+
if($pluginOptionsVal['csbwfs_li_title']!=''){ $lImgAlt=$pluginOptionsVal['csbwfs_li_title'];}
|
264 |
+
else{$lImgAlt='Share On Linkedin';}
|
265 |
+
//get mail button image alt/title
|
266 |
+
if($pluginOptionsVal['csbwfs_mail_title']!=''){ $mImgAlt=$pluginOptionsVal['csbwfs_mail_title'];}
|
267 |
+
else{$mImgAlt='Contact us';}
|
268 |
+
//get pinterest button image alt/title
|
269 |
+
if($pluginOptionsVal['csbwfs_pin_title']!=''){ $pImgAlt=$pluginOptionsVal['csbwfs_pin_title'];}
|
270 |
+
else{$pImgAlt='Share On Pinterest';}
|
271 |
+
//get youtube button image alt/title
|
272 |
+
if(isset($pluginOptionsVal['csbwfs_yt_title']) && $pluginOptionsVal['csbwfs_yt_title']!=''){ $ytImgAlt=$pluginOptionsVal['csbwfs_yt_title'];}
|
273 |
+
else{$ytImgAlt='Share On Youtube';}
|
274 |
+
//get reddit plus button image alt/title
|
275 |
+
if(isset($pluginOptionsVal['csbwfs_re_title']) && $pluginOptionsVal['csbwfs_re_title']!=''){ $reImgAlt=$pluginOptionsVal['csbwfs_re_title'];}
|
276 |
+
else{$reImgAlt='Share On Reddit';}
|
277 |
+
//get stumbleupon button image alt/title
|
278 |
+
if(isset($pluginOptionsVal['csbwfs_st_title']) && $pluginOptionsVal['csbwfs_st_title']!=''){ $stImgAlt=$pluginOptionsVal['csbwfs_st_title'];}
|
279 |
+
else{$stImgAlt='Share On Stumbleupon';}
|
280 |
+
//get email message
|
281 |
+
if(is_page() || is_single() || is_category() || is_archive()){
|
282 |
+
if($pluginOptionsVal['csbwfs_mailMessage']!=''){ $mailMsg=$pluginOptionsVal['csbwfs_mailMessage'];} else{
|
283 |
+
$mailMsg='?subject='.$ShareTitle.'&body='.$shareurl;}
|
284 |
+
}else
|
285 |
+
{
|
286 |
+
$mailMsg='?subject='.get_bloginfo('name').'&body='.home_url('/');
|
287 |
+
}
|
288 |
+
// Top Margin
|
289 |
+
if($pluginOptionsVal['csbwfs_top_margin']!=''){
|
290 |
+
$margin=$pluginOptionsVal['csbwfs_top_margin'];
|
291 |
+
}else
|
292 |
+
{
|
293 |
+
$margin='25%';
|
294 |
+
}
|
295 |
+
|
296 |
+
//Sidebar Position
|
297 |
+
if($pluginOptionsVal['csbwfs_position']=='right'){
|
298 |
+
$style=' style="top:'.$margin.';right:-5px;"'; $idName=' id="csbwfs-right"'; $showImg='hide-r.png'; $hideImg='show.png';
|
299 |
+
}else if($pluginOptionsVal['csbwfs_position']=='bottom'){
|
300 |
+
$style=' style="bottom:0;"'; $idName=' id="csbwfs-bottom"'; $showImg='hide-b.png'; $hideImg='show.png';
|
301 |
+
}
|
302 |
+
else
|
303 |
+
{
|
304 |
+
$idName=' id="csbwfs-left"'; $style=' style="top:'.$margin.';left:0;"'; $showImg='hide-l.png';$hideImg='hide.png';
|
305 |
+
}
|
306 |
+
/* Get All buttons background color */
|
307 |
+
//get facebook button image background color
|
308 |
+
if($pluginOptionsVal['csbwfs_fb_bg']!=''){ $fImgbg=' style="background:'.$pluginOptionsVal['csbwfs_fb_bg'].';"';}
|
309 |
+
else{$fImgbg='';}
|
310 |
+
//get twitter button image background color
|
311 |
+
if($pluginOptionsVal['csbwfs_tw_bg']!=''){ $tImgbg=' style="background:'.$pluginOptionsVal['csbwfs_tw_bg'].';"';}
|
312 |
+
else{$tImgbg='';}
|
313 |
+
//get Linkedin button image background color
|
314 |
+
if($pluginOptionsVal['csbwfs_li_bg']!=''){ $lImgbg=' style="background:'.$pluginOptionsVal['csbwfs_li_bg'].';"';}
|
315 |
+
else{$lImgbg='';}
|
316 |
+
//get mail button image background color
|
317 |
+
if($pluginOptionsVal['csbwfs_mail_bg']!=''){ $mImgbg=' style="background:'.$pluginOptionsVal['csbwfs_mail_bg'].';"';}
|
318 |
+
else{$mImgbg='';}
|
319 |
+
//get pinterest button image background color
|
320 |
+
if($pluginOptionsVal['csbwfs_pin_bg']!=''){ $pImgbg=' style="background:'.$pluginOptionsVal['csbwfs_pin_bg'].';"';}
|
321 |
+
else{$pImgbg='';}
|
322 |
+
|
323 |
+
//get youtube button image background color
|
324 |
+
if(isset($pluginOptionsVal['csbwfs_yt_bg']) && $pluginOptionsVal['csbwfs_yt_bg']!=''){ $ytImgbg=' style="background:'.$pluginOptionsVal['csbwfs_yt_bg'].';"';}else{$ytImgbg='';}
|
325 |
+
//get reddit button image background color
|
326 |
+
if(isset($pluginOptionsVal['csbwfs_re_bg']) && $pluginOptionsVal['csbwfs_re_bg']!=''){ $reImgbg=' style="background:'.$pluginOptionsVal['csbwfs_re_bg'].';"';}else{$reImgbg='';}
|
327 |
+
//get stumbleupon button image background color
|
328 |
+
if(isset($pluginOptionsVal['csbwfs_st_bg']) && $pluginOptionsVal['csbwfs_st_bg']!=''){ $stImgbg=' style="background:'.$pluginOptionsVal['csbwfs_st_bg'].';"';} else{$stImgbg='';}
|
329 |
+
|
330 |
+
/** Message */
|
331 |
+
if($pluginOptionsVal['csbwfs_show_btn']!=''){ $showbtn=$pluginOptionsVal['csbwfs_show_btn'];}
|
332 |
+
else{$showbtn='Show Buttons';}
|
333 |
+
//get show/hide button message
|
334 |
+
if($pluginOptionsVal['csbwfs_hide_btn']!=''){ $hidebtn=$pluginOptionsVal['csbwfs_hide_btn'];}
|
335 |
+
else{$hidebtn='Hide Buttons';}
|
336 |
+
//get mail button message
|
337 |
+
if($pluginOptionsVal['csbwfs_share_msg']!=''){ $sharemsg=$pluginOptionsVal['csbwfs_share_msg'];}
|
338 |
+
else{$sharemsg='Share This With Your Friends';}
|
339 |
+
|
340 |
+
/** Check display Show/Hide button or not*/
|
341 |
+
if(isset($pluginOptionsVal['csbwfs_rmSHBtn']) && $pluginOptionsVal['csbwfs_rmSHBtn']!=''):
|
342 |
+
$isActiveHideShowBtn='yes';
|
343 |
+
else:
|
344 |
+
$isActiveHideShowBtn='no';
|
345 |
+
endif;
|
346 |
+
$floatingSidebarContent='<div id="csbwfs-delaydiv"><div class="csbwfs-social-widget" '.$idName.' title="'.$sharemsg.'" '.$style.'>';
|
347 |
+
|
348 |
+
if($isActiveHideShowBtn!='yes') :
|
349 |
+
$floatingSidebarContent .= '<div class="csbwfs-show"><a href="javascript:" title="'.$showbtn.'" id="csbwfs-show"><img src="'.plugins_url('custom-share-buttons-with-floating-sidebar/images/'.$showImg).'" alt="'.$showbtn.'"></a></div>';
|
350 |
+
endif;
|
351 |
+
|
352 |
+
$floatingSidebarContent .= '<div id="csbwfs-social-inner">';
|
353 |
+
|
354 |
+
/** FB */
|
355 |
+
if($pluginOptionsVal['csbwfs_fpublishBtn']!=''):
|
356 |
+
$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.'>';
|
357 |
+
|
358 |
+
if($fImg!=''){
|
359 |
+
$floatingSidebarContent .='<img src="'.$fImg.'" alt="'.$fImgAlt.'" width="35" height="35" >';
|
360 |
+
}else{
|
361 |
+
$floatingSidebarContent .='<i class="csbwfs_facebook"></i>';
|
362 |
+
}
|
363 |
+
$floatingSidebarContent .='</a></div></div>';
|
364 |
+
endif;
|
365 |
+
|
366 |
+
/** TW */
|
367 |
+
if($pluginOptionsVal['csbwfs_tpublishBtn']!=''):
|
368 |
+
$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.'>';
|
369 |
+
if($tImg!='')
|
370 |
+
{
|
371 |
+
$floatingSidebarContent .='<img src="'.$tImg.'" alt="'.$tImgAlt.'" width="35" height="35" >';
|
372 |
+
}else{
|
373 |
+
$floatingSidebarContent .='<i class="csbwfs_twitter"></i>';
|
374 |
+
}
|
375 |
+
$floatingSidebarContent .='</a></div></div>';
|
376 |
+
|
377 |
+
endif;
|
378 |
+
|
379 |
+
/** LI */
|
380 |
+
if($pluginOptionsVal['csbwfs_lpublishBtn']!=''):
|
381 |
+
$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.'>';
|
382 |
+
if($lImg!='')
|
383 |
+
{
|
384 |
+
$floatingSidebarContent .='<img src="'.$lImg.'" alt="'.$lImgAlt.'" width="35" height="35" >';
|
385 |
+
}else{
|
386 |
+
$floatingSidebarContent .='<i class="csbwfs_linkedin"></i>';
|
387 |
+
}
|
388 |
+
$floatingSidebarContent .='</a></div></div>';
|
389 |
+
endif;
|
390 |
+
|
391 |
+
/** PIN */
|
392 |
+
if($pluginOptionsVal['csbwfs_ppublishBtn']!=''):
|
393 |
+
$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.'">';
|
394 |
+
if($pImg!='')
|
395 |
+
{
|
396 |
+
$floatingSidebarContent .='<img src="'.$pImg.'" alt="'.$pImgAlt.'" width="35" height="35" >';
|
397 |
+
}else{
|
398 |
+
$floatingSidebarContent .='<i class="csbwfs_pinterest"></i>';
|
399 |
+
}
|
400 |
+
$floatingSidebarContent .='</a></div></div>';
|
401 |
+
endif;
|
402 |
+
|
403 |
+
/** Reddit */
|
404 |
+
if(isset($pluginOptionsVal['csbwfs_republishBtn']) && $pluginOptionsVal['csbwfs_republishBtn']!=''):
|
405 |
+
$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.'">';
|
406 |
+
if($reImg!='')
|
407 |
+
{
|
408 |
+
$floatingSidebarContent .='<img src="'.$reImg.'" alt="'.$reImgAlt.'" width="35" height="35" >';
|
409 |
+
}else{
|
410 |
+
$floatingSidebarContent .='<i class="csbwfs_reddit"></i>';
|
411 |
+
}
|
412 |
+
$floatingSidebarContent .='</a></div></div>';
|
413 |
+
endif;
|
414 |
+
|
415 |
+
/** Stumbleupon */
|
416 |
+
if(isset($pluginOptionsVal['csbwfs_stpublishBtn']) && $pluginOptionsVal['csbwfs_stpublishBtn']!=''):
|
417 |
+
$floatingSidebarContent .='<div class="csbwfs-sbutton csbwfsbtns"><div id="csbwfs-st" class="csbwfs-st"><a onclick="window.open(\'//www.stumbleupon.com/submit?url='.$shareurl.'&title='.$ShareTitle.'\',\'Stumbleupon\',\'toolbar=0,status=0,width=1000,height=800\');" href="javascript:void(0);" '.$stImgbg.' title="'.$stImgAlt.'">';
|
418 |
+
if($stImg!='')
|
419 |
+
{
|
420 |
+
$floatingSidebarContent .='<img src="'.$stImg.'" alt="'.$stImgAlt.'" width="35" height="35" >';
|
421 |
+
}else{
|
422 |
+
$floatingSidebarContent .='<i class="csbwfs_stumbleupon"></i>';
|
423 |
+
}
|
424 |
+
$floatingSidebarContent .='</a></div></div>';
|
425 |
+
endif;
|
426 |
+
/** YT */
|
427 |
+
if(isset($pluginOptionsVal['csbwfs_ytpublishBtn']) && $pluginOptionsVal['csbwfs_ytpublishBtn']!=''):
|
428 |
+
$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.'">';
|
429 |
+
if($ytImg!='')
|
430 |
+
{
|
431 |
+
$floatingSidebarContent .='<img src="'.$ytImg.'" alt="'.$ytImgAlt.'" width="35" height="35" >';
|
432 |
+
}else{
|
433 |
+
$floatingSidebarContent .='<i class="csbwfs_youtube"></i>';
|
434 |
+
}
|
435 |
+
$floatingSidebarContent .='</a></div></div>';
|
436 |
+
endif;
|
437 |
+
/** Mail*/
|
438 |
+
if($pluginOptionsVal['csbwfs_mpublishBtn']!=''):
|
439 |
+
$floatingSidebarContent .='<div class="csbwfs-sbutton csbwfsbtns"><div id="csbwfs-ml" class="csbwfs-ml"><a href="mailto:'.$mailMsg.'" title="'.$mImgAlt.'" '.$mImgbg.' >';
|
440 |
+
if($mImg!='')
|
441 |
+
{
|
442 |
+
$floatingSidebarContent .='<img src="'.$mImg.'" alt="'.$mImgAlt.'" width="35" height="35" >';
|
443 |
+
}else{
|
444 |
+
$floatingSidebarContent .='<i class="csbwfs_mail"></i>';
|
445 |
+
}
|
446 |
+
$floatingSidebarContent .='</a></div></div>';
|
447 |
+
endif;
|
448 |
+
|
449 |
+
$floatingSidebarContent .='</div>'; //End social-inner
|
450 |
+
|
451 |
+
if($isActiveHideShowBtn!='yes') :
|
452 |
+
$floatingSidebarContent .='<div class="csbwfs-hide"><a href="javascript:" title="'.$hidebtn.'" id="csbwfs-hide"><img src="'.plugins_url('custom-share-buttons-with-floating-sidebar/images/'.$hideImg).'" alt="'.$hidebtn.'"></a></div>';
|
453 |
+
endif;
|
454 |
+
|
455 |
+
$floatingSidebarContent .='</div></div>'; //End social-inner
|
456 |
+
/** Check conditions */
|
457 |
+
// Returns the content.
|
458 |
+
if(isset($pluginOptionsVal['csbwfs_hide_home'])){$hideOnHome=$pluginOptionsVal['csbwfs_hide_home']; }else{ $hideOnHome='';}
|
459 |
+
|
460 |
+
if((is_home() && is_front_page()) && $hideOnHome=='yes'):
|
461 |
+
$floatingSidebarContent='';
|
462 |
+
endif;
|
463 |
+
if(is_front_page() && $hideOnHome=='yes' ):
|
464 |
+
$floatingSidebarContent='';
|
465 |
+
endif;
|
466 |
+
/** hide on 404 pages */
|
467 |
+
if(is_404()):$floatingSidebarContent='';endif;
|
468 |
+
|
469 |
+
print $floatingSidebarContent;
|
470 |
+
}
|
471 |
+
|
472 |
+
/**
|
473 |
+
* Add social share bottons to the end of every post/page.
|
474 |
+
*
|
475 |
+
* @uses is_home()
|
476 |
+
* @uses is_page()
|
477 |
+
* @uses is_single()
|
478 |
+
*/
|
479 |
+
function csbfs_the_content_filter( $content ) {
|
480 |
+
|
481 |
+
global $post;
|
482 |
+
$pluginOptionsVal=get_csbwf_sidebar_options();
|
483 |
+
if(is_category())
|
484 |
+
{
|
485 |
+
$category_id = get_query_var('cat');
|
486 |
+
$cats = get_the_category();
|
487 |
+
$ShareTitle=$cats[0]->name;
|
488 |
+
}elseif($post && is_singular($post->post_type))
|
489 |
+
{
|
490 |
+
$ShareTitle=$post->post_title;
|
491 |
+
}
|
492 |
+
elseif(is_archive()){
|
493 |
+
global $wp;
|
494 |
+
if ( is_day() ) :
|
495 |
+
$ShareTitle='Daily Archives: '. get_the_date();
|
496 |
+
elseif ( is_month() ) :
|
497 |
+
$ShareTitle='Monthly Archives: '. get_the_date('F Y');
|
498 |
+
elseif ( is_year() ) :
|
499 |
+
$ShareTitle='Yearly Archives: '. get_the_date('Y');
|
500 |
+
elseif ( is_author() ) :
|
501 |
+
$ShareTitle='Author Archives: '. get_the_author();
|
502 |
+
else :
|
503 |
+
$ShareTitle ='Blog Archives';
|
504 |
+
endif;
|
505 |
+
}
|
506 |
+
else
|
507 |
+
{
|
508 |
+
$ShareTitle=get_bloginfo('name');
|
509 |
+
}
|
510 |
+
/* Set title and url for home page */
|
511 |
+
if(is_home() && is_front_page()){
|
512 |
+
$ShareTitle=get_bloginfo('name');
|
513 |
+
}
|
514 |
+
|
515 |
+
$shareurl = htmlspecialchars(csbwfs_get_current_page_url($_SERVER), ENT_QUOTES, 'UTF-8');
|
516 |
+
|
517 |
+
$ShareTitle= htmlspecialchars(rawurlencode($ShareTitle));
|
518 |
+
|
519 |
+
/* Get All buttons Image */
|
520 |
+
|
521 |
+
//get facebook button image
|
522 |
+
if($pluginOptionsVal['csbwfs_page_fb_image']!=''){ $fImg=$pluginOptionsVal['csbwfs_page_fb_image'];}
|
523 |
+
else{$fImg='';}
|
524 |
+
//get twitter button image
|
525 |
+
if($pluginOptionsVal['csbwfs_page_tw_image']!=''){ $tImg=$pluginOptionsVal['csbwfs_page_tw_image'];}
|
526 |
+
else{$tImg='';}
|
527 |
+
//get Linkedin button image
|
528 |
+
if($pluginOptionsVal['csbwfs_page_li_image']!=''){ $lImg=$pluginOptionsVal['csbwfs_page_li_image'];}
|
529 |
+
else{$lImg='';}
|
530 |
+
//get mail button image
|
531 |
+
if($pluginOptionsVal['csbwfs_page_mail_image']!=''){ $mImg=$pluginOptionsVal['csbwfs_page_mail_image'];}
|
532 |
+
else{$mImg='';}
|
533 |
+
//get pinterest button image
|
534 |
+
if($pluginOptionsVal['csbwfs_page_pin_image']!=''){ $pImg=$pluginOptionsVal['csbwfs_page_pin_image'];}
|
535 |
+
else{$pImg='';}
|
536 |
+
|
537 |
+
//get youtube button image
|
538 |
+
if(isset($pluginOptionsVal['csbwfs_page_yt_image']) && $pluginOptionsVal['csbwfs_page_yt_image']!=''){ $ytImg=$pluginOptionsVal['csbwfs_page_yt_image'];}
|
539 |
+
else{$ytImg='';}
|
540 |
+
//get reddit plus button image
|
541 |
+
if(isset($pluginOptionsVal['csbwfs_page_re_image']) && $pluginOptionsVal['csbwfs_page_re_image']!=''){ $reImg=$pluginOptionsVal['csbwfs_page_re_image'];}
|
542 |
+
else{$reImg='';}
|
543 |
+
//get stumbleupon button image
|
544 |
+
if(isset($pluginOptionsVal['csbwfs_page_st_image']) && $pluginOptionsVal['csbwfs_page_st_image']!=''){ $stImg=$pluginOptionsVal['csbwfs_page_st_image'];}
|
545 |
+
else{$stImg='';}
|
546 |
+
|
547 |
+
/* Get All buttons Image Alt/Title */
|
548 |
+
//get facebook button image alt/title
|
549 |
+
if($pluginOptionsVal['csbwfs_page_fb_title']!=''){ $fImgAlt=$pluginOptionsVal['csbwfs_page_fb_title'];}
|
550 |
+
else{$fImgAlt='Share On Facebook';}
|
551 |
+
//get twitter button image alt/title
|
552 |
+
if($pluginOptionsVal['csbwfs_page_tw_title']!=''){ $tImgAlt=$pluginOptionsVal['csbwfs_page_tw_title'];}
|
553 |
+
else{$tImgAlt='Share On Twitter';}
|
554 |
+
//get Linkedin button image alt/title
|
555 |
+
if($pluginOptionsVal['csbwfs_page_li_title']!=''){ $lImgAlt=$pluginOptionsVal['csbwfs_page_li_title'];}
|
556 |
+
else{$lImgAlt='Share On Linkedin';}
|
557 |
+
//get mail button image alt/title
|
558 |
+
if($pluginOptionsVal['csbwfs_page_mail_title']!=''){ $mImgAlt=$pluginOptionsVal['csbwfs_page_mail_title'];}
|
559 |
+
else{$mImgAlt='Contact us';}
|
560 |
+
//get pinterest button image alt/title
|
561 |
+
if($pluginOptionsVal['csbwfs_page_pin_title']!=''){ $pImgAlt=$pluginOptionsVal['csbwfs_page_pin_title'];}
|
562 |
+
else{$pImgAlt='Share On Pinterest';}
|
563 |
+
//get youtube button image alt/title
|
564 |
+
if(isset($pluginOptionsVal['csbwfs_page_yt_title']) && $pluginOptionsVal['csbwfs_page_yt_title']!=''){ $ytImgAlt=$pluginOptionsVal['csbwfs_page_yt_title'];}
|
565 |
+
else{$ytImgAlt='Share On Youtube';}
|
566 |
+
//get reddit plus button image alt/title
|
567 |
+
if(isset($pluginOptionsVal['csbwfs_page_re_title']) && $pluginOptionsVal['csbwfs_page_re_title']!=''){ $reImgAlt=$pluginOptionsVal['csbwfs_page_re_title'];}
|
568 |
+
else{$reImgAlt='Share On Reddit';}
|
569 |
+
//get stumbleupon button image alt/title
|
570 |
+
if(isset($pluginOptionsVal['csbwfs_page_st_title']) && $pluginOptionsVal['csbwfs_page_st_title']!=''){ $stImgAlt=$pluginOptionsVal['csbwfs_page_st_title'];}
|
571 |
+
else{$stImgAlt='Share On Stumbleupon';}
|
572 |
+
|
573 |
+
/* Get All buttons background color */
|
574 |
+
//get facebook button image background color
|
575 |
+
if($pluginOptionsVal['csbwfs_page_fb_bg']!=''){ $fImgbg=' style="background:'.$pluginOptionsVal['csbwfs_page_fb_bg'].';"';}
|
576 |
+
else{$fImgbg='';}
|
577 |
+
//get twitter button image background color
|
578 |
+
if($pluginOptionsVal['csbwfs_page_tw_bg']!=''){ $tImgbg=' style="background:'.$pluginOptionsVal['csbwfs_page_tw_bg'].';"';}
|
579 |
+
else{$tImgbg='';}
|
580 |
+
//get Linkedin button image background color
|
581 |
+
if($pluginOptionsVal['csbwfs_page_li_bg']!=''){ $lImgbg=' style="background:'.$pluginOptionsVal['csbwfs_page_li_bg'].';"';}
|
582 |
+
else{$lImgbg='';}
|
583 |
+
//get mail button image background color
|
584 |
+
if($pluginOptionsVal['csbwfs_page_mail_bg']!=''){ $mImgbg=' style="background:'.$pluginOptionsVal['csbwfs_page_mail_bg'].';"';}
|
585 |
+
else{$mImgbg='';}
|
586 |
+
//get pinterest button image background color
|
587 |
+
if($pluginOptionsVal['csbwfs_page_pin_bg']!=''){ $pImgbg=' style="background:'.$pluginOptionsVal['csbwfs_page_pin_bg'].';"';}
|
588 |
+
else{$pImgbg='';}
|
589 |
+
|
590 |
+
//get youtube button image background color
|
591 |
+
if(isset($pluginOptionsVal['csbwfs_page_yt_bg']) && $pluginOptionsVal['csbwfs_page_yt_bg']!=''){ $ytImgbg=' style="background:'.$pluginOptionsVal['csbwfs_page_yt_bg'].';"';}else{$ytImgbg='';}
|
592 |
+
//get reddit button image background color
|
593 |
+
if(isset($pluginOptionsVal['csbwfs_page_re_bg']) && $pluginOptionsVal['csbwfs_page_re_bg']!=''){ $reImgbg=' style="background:'.$pluginOptionsVal['csbwfs_page_re_bg'].';"';}else{$reImgbg='';}
|
594 |
+
//get stumbleupon button image background color
|
595 |
+
if(isset($pluginOptionsVal['csbwfs_page_st_bg']) && $pluginOptionsVal['csbwfs_page_st_bg']!=''){ $stImgbg=' style="background:'.$pluginOptionsVal['csbwfs_page_st_bg'].';"';} else{$stImgbg='';}
|
596 |
+
//get email message
|
597 |
+
if(is_page() || is_single() || is_category() || is_archive()){
|
598 |
+
|
599 |
+
if($pluginOptionsVal['csbwfs_mailMessage']!=''){ $mailMsg=$pluginOptionsVal['csbwfs_mailMessage'];} else{
|
600 |
+
$mailMsg='?subject='.get_the_title().'&body='.$shareurl;}
|
601 |
+
}else
|
602 |
+
{
|
603 |
+
$mailMsg='?subject='.get_bloginfo('name').'&body='.home_url('/');
|
604 |
+
}
|
605 |
+
if(isset($pluginOptionsVal['csbwfs_btn_position']) && $pluginOptionsVal['csbwfs_btn_position']!=''):
|
606 |
+
$btnPosition=$pluginOptionsVal['csbwfs_btn_position'];
|
607 |
+
else:
|
608 |
+
$btnPosition='left';
|
609 |
+
endif;
|
610 |
+
|
611 |
+
if(isset($pluginOptionsVal['csbwfs_btn_text']) && $pluginOptionsVal['csbwfs_btn_text']!=''):
|
612 |
+
$btnText=$pluginOptionsVal['csbwfs_btn_text'];
|
613 |
+
else:
|
614 |
+
$btnText='';
|
615 |
+
endif;
|
616 |
+
|
617 |
+
$shareButtonContent='<div id="socialButtonOnPage" class="'.$btnPosition.'SocialButtonOnPage">';
|
618 |
+
if($btnText!=''):
|
619 |
+
$shareButtonContent.='<div class="sharethis-arrow" title="'.$btnText.'"><span>'.$btnText.'</span></div>';
|
620 |
+
endif;
|
621 |
+
/* Facebook*/
|
622 |
+
if($pluginOptionsVal['csbwfs_fpublishBtn']!=''):
|
623 |
+
$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;"
|
624 |
+
target="_blank" title="'.$fImgAlt.'" '.$fImgbg.'>';
|
625 |
+
if($fImg!=''){
|
626 |
+
$shareButtonContent .='<img src="'.$fImg.'" alt="'.$fImgAlt.'" width="35" height="35" >';
|
627 |
+
}else{
|
628 |
+
$shareButtonContent .='<i class="csbwfs_facebook"></i>';
|
629 |
+
}
|
630 |
+
$shareButtonContent .='</a></div></div>';
|
631 |
+
endif;
|
632 |
+
|
633 |
+
/* Twitter */
|
634 |
+
if($pluginOptionsVal['csbwfs_tpublishBtn']!=''):
|
635 |
+
$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.'>';
|
636 |
+
if($tImg!='')
|
637 |
+
{
|
638 |
+
$shareButtonContent .='<img src="'.$tImg.'" alt="'.$tImgAlt.'" width="35" height="35" >';
|
639 |
+
}else{
|
640 |
+
$shareButtonContent .='<i class="csbwfs_twitter"></i>';
|
641 |
+
}
|
642 |
+
$shareButtonContent .='</a></div></div>';
|
643 |
+
endif;
|
644 |
+
/* Linkedin */
|
645 |
+
if($pluginOptionsVal['csbwfs_lpublishBtn']!=''):
|
646 |
+
$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.'>';
|
647 |
+
if($lImg!='')
|
648 |
+
{
|
649 |
+
$shareButtonContent .='<img src="'.$lImg.'" alt="'.$lImgAlt.'" width="35" height="35" >';
|
650 |
+
}else{
|
651 |
+
$shareButtonContent .='<i class="csbwfs_linkedin"></i>';
|
652 |
+
}
|
653 |
+
$shareButtonContent .='</a></div></div>';
|
654 |
+
endif;
|
655 |
+
|
656 |
+
/* Pinterest */
|
657 |
+
if($pluginOptionsVal['csbwfs_ppublishBtn']!=''):
|
658 |
+
$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.'>';
|
659 |
+
if($pImg!='')
|
660 |
+
{
|
661 |
+
$shareButtonContent .='<img src="'.$pImg.'" alt="'.$pImgAlt.'" width="35" height="35" >';
|
662 |
+
}else{
|
663 |
+
$shareButtonContent .='<i class="csbwfs_pinterest"></i>';
|
664 |
+
}
|
665 |
+
$shareButtonContent .='</a></div></div>';
|
666 |
+
endif;
|
667 |
+
/* Reddit */
|
668 |
+
if(isset($pluginOptionsVal['csbwfs_republishBtn']) && $pluginOptionsVal['csbwfs_republishBtn']!=''):
|
669 |
+
$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.'>';
|
670 |
+
if($reImg!='')
|
671 |
+
{
|
672 |
+
$shareButtonContent .='<img src="'.$reImg.'" alt="'.$reImgAlt.'" width="35" height="35" >';
|
673 |
+
}else{
|
674 |
+
$shareButtonContent .='<i class="csbwfs_reddit"></i>';
|
675 |
+
}
|
676 |
+
$shareButtonContent .='</a></div></div>';
|
677 |
+
endif;
|
678 |
+
/* Stumbleupon */
|
679 |
+
if(isset($pluginOptionsVal['csbwfs_stpublishBtn']) && $pluginOptionsVal['csbwfs_stpublishBtn']!=''):
|
680 |
+
$shareButtonContent.='<div class="csbwfs-sbutton-post"><div id="st-p" class="csbwfs-st"><a onclick="window.open(\'//www.stumbleupon.com/submit?url='.$shareurl.'&title='.$ShareTitle.'\',\'Stumbleupon\',\'toolbar=0,status=0,width=1000,height=800\');" href="javascript:void(0);" title="'.$stImgAlt.'" '.$stImgbg.'>';
|
681 |
+
if($stImg!='')
|
682 |
+
{
|
683 |
+
$shareButtonContent .='<img src="'.$stImg.'" alt="'.$stImgAlt.'" width="35" height="35" >';
|
684 |
+
}else{
|
685 |
+
$shareButtonContent .='<i class="csbwfs_stumbleupon"></i>';
|
686 |
+
}
|
687 |
+
$shareButtonContent .='</a></div></div>';
|
688 |
+
endif;
|
689 |
+
/* Youtube */
|
690 |
+
if(isset($pluginOptionsVal['csbwfs_ytpublishBtn']) && $pluginOptionsVal['csbwfs_ytpublishBtn']!=''):
|
691 |
+
$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.'>';
|
692 |
+
if($ytImg!='')
|
693 |
+
{
|
694 |
+
$shareButtonContent .='<img src="'.$ytImg.'" alt="'.$ytImgAlt.'" width="35" height="35" >';
|
695 |
+
}else{
|
696 |
+
$shareButtonContent .='<i class="csbwfs_youtube"></i>';
|
697 |
+
}
|
698 |
+
$shareButtonContent .='</a></div></div>';
|
699 |
+
endif;
|
700 |
+
/* Email */
|
701 |
+
if($pluginOptionsVal['csbwfs_mpublishBtn']!=''):
|
702 |
+
$shareButtonContent.='<div class="csbwfs-sbutton-post"><div id="ml-p" class="csbwfs-ml"><a href="mailto:'.$mailMsg.'" title="'.$mImgAlt.'" '.$mImgbg.'>';
|
703 |
+
if($mImg!='')
|
704 |
+
{
|
705 |
+
$shareButtonContent .='<img src="'.$mImg.'" alt="'.$mImgAlt.'" width="35" height="35" >';
|
706 |
+
}else{
|
707 |
+
$shareButtonContent .='<i class="csbwfs_mail"></i>';
|
708 |
+
}
|
709 |
+
$shareButtonContent .='</a></div></div>';
|
710 |
+
endif;
|
711 |
+
$shareButtonContent.='</div>';
|
712 |
+
|
713 |
+
// Returns the content.
|
714 |
+
global $post;
|
715 |
+
$shareButtonContentReturn='';
|
716 |
+
/* DEFAULT HOME */
|
717 |
+
if((is_home() && is_front_page()) && $pluginOptionsVal['csbwfs_page_hide_home']=='yes'):
|
718 |
+
$shareButtonContentReturn=$shareButtonContent;
|
719 |
+
endif;
|
720 |
+
/* STATIC front page */
|
721 |
+
if(is_front_page() && $pluginOptionsVal['csbwfs_page_hide_home']=='yes'):
|
722 |
+
$shareButtonContentReturn=$shareButtonContent;
|
723 |
+
endif;
|
724 |
+
//post
|
725 |
+
if(is_single() && $pluginOptionsVal['csbwfs_page_hide_post']=='yes'):
|
726 |
+
$shareButtonContentReturn=$shareButtonContent;
|
727 |
+
endif;
|
728 |
+
//page
|
729 |
+
if(is_page() && $pluginOptionsVal['csbwfs_page_hide_page']=='yes'):
|
730 |
+
if(!is_front_page()):
|
731 |
+
$shareButtonContentReturn=$shareButtonContent;
|
732 |
+
endif;
|
733 |
+
endif;
|
734 |
+
//archive
|
735 |
+
if(is_archive() && $pluginOptionsVal['csbwfs_page_hide_archive']=='yes'):
|
736 |
+
$shareButtonContentReturn=$shareButtonContent;
|
737 |
+
endif;
|
738 |
+
// 404
|
739 |
+
if(is_404()):
|
740 |
+
$shareButtonContentReturn='';
|
741 |
+
endif;
|
742 |
+
/** Buttons position on content */
|
743 |
+
if(isset($pluginOptionsVal['csbwfs_btn_display']) && $pluginOptionsVal['csbwfs_btn_display']=='above'){
|
744 |
+
$finalContent= $shareButtonContentReturn.$content;
|
745 |
+
}else
|
746 |
+
{
|
747 |
+
$finalContent = $content.$shareButtonContentReturn;
|
748 |
+
}
|
749 |
+
return $finalContent;
|
750 |
+
}
|
751 |
+
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
custom-share-buttons-with-floating-sidebar.php
CHANGED
@@ -1,321 +1,309 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Plugin Name: Custom Share Buttons with Floating Sidebar
|
4 |
-
Plugin URI: http://www.mrwebsolution.in/
|
5 |
-
Description:
|
6 |
-
Author: MR Web Solution
|
7 |
-
Author URI: http://raghunathgurjar.wordpress.com
|
8 |
-
Version: 3.
|
9 |
-
*/
|
10 |
-
|
11 |
-
/* Copyright 2018 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
|
15 |
-
published by the Free Software Foundation.
|
16 |
-
|
17 |
-
This program is distributed in the hope that it will be useful,
|
18 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
19 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
20 |
-
GNU General Public License for more details.
|
21 |
-
|
22 |
-
You should have received a copy of the GNU General Public License
|
23 |
-
along with this program; if not, write to the Free Software
|
24 |
-
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
25 |
-
*/
|
26 |
-
|
27 |
-
//Admin "Custom Share Buttons with Floating Sidebar" Menu Item
|
28 |
-
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
29 |
-
if(!class_exists('Csbwfs_Class'))
|
30 |
-
{
|
31 |
-
class Csbwfs_Class
|
32 |
-
{
|
33 |
-
/**
|
34 |
-
* Construct the plugin object
|
35 |
-
*/
|
36 |
-
public function __construct()
|
37 |
-
{
|
38 |
-
// register actions
|
39 |
-
add_action('admin_init', array(&$this, 'csbwfs_admin_init'));
|
40 |
-
add_action('admin_menu', array(&$this, 'csbwf_sidebar_menu'));
|
41 |
-
add_action( 'admin_bar_menu', array(&$this,'toolbar_link_to_csbwfs'), 999 );
|
42 |
-
} // END public function __construct
|
43 |
-
/**
|
44 |
-
* hook to add link under adminmenu bar
|
45 |
-
*/
|
46 |
-
public function toolbar_link_to_csbwfs( $wp_admin_bar ) {
|
47 |
-
$args = array(
|
48 |
-
'id' => 'csbwfs_menu_bar',
|
49 |
-
'title' => 'Social Share',
|
50 |
-
'href' => admin_url('options-general.php?page=csbwfs-settings'),
|
51 |
-
'meta' => array( 'class' => 'csbwfs-toolbar-page' )
|
52 |
-
);
|
53 |
-
$wp_admin_bar->add_node( $args );
|
54 |
-
//second lavel
|
55 |
-
$wp_admin_bar->add_node( array(
|
56 |
-
'id' => 'csbwfs-second-sub-item',
|
57 |
-
'parent' => 'csbwfs_menu_bar',
|
58 |
-
'title' => 'Settings',
|
59 |
-
'href' => admin_url('options-general.php?page=csbwfs-settings'),
|
60 |
-
'meta' => array(
|
61 |
-
'title' => __('Settings'),
|
62 |
-
'target' => '_self',
|
63 |
-
'class' => 'csbwfs_menu_item_class'
|
64 |
-
),
|
65 |
-
));
|
66 |
-
}
|
67 |
-
/**
|
68 |
-
* hook into WP's admin_init action hook
|
69 |
-
*/
|
70 |
-
public function csbwfs_admin_init()
|
71 |
-
{
|
72 |
-
// Set up the settings for this plugin
|
73 |
-
$this->csbwf_sidebar_init();
|
74 |
-
// Possibly do additional admin_init tasks
|
75 |
-
} // END public static function activate
|
76 |
-
/**
|
77 |
-
* Initialize some custom settings
|
78 |
-
*/
|
79 |
-
public function csbwf_sidebar_init()
|
80 |
-
{
|
81 |
-
// register the settings for this plugin
|
82 |
-
register_setting('csbwf_sidebar_options','csbwfs_active');
|
83 |
-
register_setting('csbwf_sidebar_options','csbwfs_position');
|
84 |
-
register_setting('csbwf_sidebar_options','csbwfs_btn_position');
|
85 |
-
register_setting('csbwf_sidebar_options','csbwfs_btn_text');
|
86 |
-
register_setting('csbwf_sidebar_options','csbwfs_fb_image');
|
87 |
-
register_setting('csbwf_sidebar_options','csbwfs_tw_image');
|
88 |
-
register_setting('csbwf_sidebar_options','csbwfs_li_image');
|
89 |
-
register_setting('csbwf_sidebar_options','csbwfs_re_image');
|
90 |
-
register_setting('csbwf_sidebar_options','csbwfs_st_image');
|
91 |
-
register_setting('csbwf_sidebar_options','csbwfs_mail_image');
|
92 |
-
register_setting('csbwf_sidebar_options','
|
93 |
-
register_setting('csbwf_sidebar_options','
|
94 |
-
register_setting('csbwf_sidebar_options','
|
95 |
-
register_setting('csbwf_sidebar_options','
|
96 |
-
register_setting('csbwf_sidebar_options','
|
97 |
-
register_setting('csbwf_sidebar_options','
|
98 |
-
register_setting('csbwf_sidebar_options','
|
99 |
-
register_setting('csbwf_sidebar_options','
|
100 |
-
register_setting('csbwf_sidebar_options','
|
101 |
-
register_setting('csbwf_sidebar_options','
|
102 |
-
register_setting('csbwf_sidebar_options','
|
103 |
-
register_setting('csbwf_sidebar_options','
|
104 |
-
register_setting('csbwf_sidebar_options','
|
105 |
-
register_setting('csbwf_sidebar_options','
|
106 |
-
register_setting('csbwf_sidebar_options','
|
107 |
-
register_setting('csbwf_sidebar_options','
|
108 |
-
register_setting('csbwf_sidebar_options','
|
109 |
-
register_setting('csbwf_sidebar_options','
|
110 |
-
register_setting('csbwf_sidebar_options','
|
111 |
-
register_setting('csbwf_sidebar_options','
|
112 |
-
register_setting('csbwf_sidebar_options','
|
113 |
-
register_setting('csbwf_sidebar_options','
|
114 |
-
register_setting('csbwf_sidebar_options','
|
115 |
-
register_setting('csbwf_sidebar_options','
|
116 |
-
register_setting('csbwf_sidebar_options','
|
117 |
-
register_setting('csbwf_sidebar_options','
|
118 |
-
register_setting('csbwf_sidebar_options','
|
119 |
-
register_setting('csbwf_sidebar_options','
|
120 |
-
register_setting('csbwf_sidebar_options','
|
121 |
-
register_setting('csbwf_sidebar_options','
|
122 |
-
register_setting('csbwf_sidebar_options','
|
123 |
-
|
124 |
-
register_setting('csbwf_sidebar_options','
|
125 |
-
register_setting('csbwf_sidebar_options','
|
126 |
-
register_setting('csbwf_sidebar_options','
|
127 |
-
|
128 |
-
register_setting('csbwf_sidebar_options','
|
129 |
-
register_setting('csbwf_sidebar_options','
|
130 |
-
register_setting('csbwf_sidebar_options','
|
131 |
-
register_setting('csbwf_sidebar_options','
|
132 |
-
register_setting('csbwf_sidebar_options','
|
133 |
-
register_setting('csbwf_sidebar_options','
|
134 |
-
register_setting('csbwf_sidebar_options','
|
135 |
-
register_setting('csbwf_sidebar_options','
|
136 |
-
register_setting('csbwf_sidebar_options','
|
137 |
-
register_setting('csbwf_sidebar_options','
|
138 |
-
register_setting('csbwf_sidebar_options','
|
139 |
-
register_setting('csbwf_sidebar_options','
|
140 |
-
register_setting('csbwf_sidebar_options','
|
141 |
-
|
142 |
-
register_setting('csbwf_sidebar_options','
|
143 |
-
register_setting('csbwf_sidebar_options','
|
144 |
-
register_setting('csbwf_sidebar_options','
|
145 |
-
register_setting('csbwf_sidebar_options','
|
146 |
-
register_setting('csbwf_sidebar_options','
|
147 |
-
|
148 |
-
register_setting('csbwf_sidebar_options','
|
149 |
-
register_setting('csbwf_sidebar_options','
|
150 |
-
register_setting('csbwf_sidebar_options','
|
151 |
-
register_setting('csbwf_sidebar_options','
|
152 |
-
register_setting('csbwf_sidebar_options','
|
153 |
-
register_setting('csbwf_sidebar_options','
|
154 |
-
register_setting('csbwf_sidebar_options','
|
155 |
-
register_setting('csbwf_sidebar_options','
|
156 |
-
|
157 |
-
register_setting('csbwf_sidebar_options','
|
158 |
-
register_setting('csbwf_sidebar_options','
|
159 |
-
register_setting('csbwf_sidebar_options','
|
160 |
-
register_setting('csbwf_sidebar_options','
|
161 |
-
register_setting('csbwf_sidebar_options','
|
162 |
-
register_setting('csbwf_sidebar_options','
|
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 |
-
* REGISTER
|
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 |
-
delete_option('
|
221 |
-
delete_option('
|
222 |
-
delete_option('
|
223 |
-
delete_option('
|
224 |
-
delete_option('
|
225 |
-
delete_option('
|
226 |
-
delete_option('
|
227 |
-
delete_option('
|
228 |
-
delete_option('
|
229 |
-
delete_option('
|
230 |
-
delete_option('
|
231 |
-
delete_option('
|
232 |
-
delete_option('
|
233 |
-
delete_option('
|
234 |
-
delete_option('
|
235 |
-
delete_option('
|
236 |
-
delete_option('
|
237 |
-
delete_option('
|
238 |
-
delete_option('
|
239 |
-
delete_option('
|
240 |
-
delete_option('
|
241 |
-
delete_option('
|
242 |
-
delete_option('
|
243 |
-
delete_option('
|
244 |
-
delete_option('
|
245 |
-
delete_option('
|
246 |
-
delete_option('
|
247 |
-
delete_option('
|
248 |
-
delete_option('
|
249 |
-
delete_option('
|
250 |
-
delete_option('
|
251 |
-
delete_option('
|
252 |
-
delete_option('
|
253 |
-
delete_option('
|
254 |
-
delete_option('
|
255 |
-
delete_option('
|
256 |
-
delete_option('
|
257 |
-
delete_option('
|
258 |
-
delete_option('
|
259 |
-
delete_option('
|
260 |
-
delete_option('
|
261 |
-
delete_option('
|
262 |
-
delete_option('
|
263 |
-
delete_option('
|
264 |
-
delete_option('
|
265 |
-
delete_option('
|
266 |
-
delete_option('
|
267 |
-
delete_option('
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
if(isset($csbwfs_plugin_template))
|
311 |
-
{
|
312 |
-
$plugin = plugin_basename(__FILE__);
|
313 |
-
add_filter("plugin_action_links_$plugin", array('Csbwfs_Class','csbwfs_add_settings_link'));
|
314 |
-
require dirname(__FILE__).'/csbwfs-class.php';
|
315 |
-
//shortcode
|
316 |
-
require dirname(__FILE__).'/lib/shortcode.php';
|
317 |
-
}
|
318 |
-
|
319 |
-
|
320 |
-
}
|
321 |
-
?>
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: Custom Share Buttons with Floating Sidebar
|
4 |
+
Plugin URI: http://www.mrwebsolution.in/
|
5 |
+
Description: Share buttons with extra features to sharing your website posts/pages on Facebook, Twitter, Instagram, Whatsapp, Pinterest etc.
|
6 |
+
Author: MR Web Solution
|
7 |
+
Author URI: http://raghunathgurjar.wordpress.com
|
8 |
+
Version: 3.7
|
9 |
+
*/
|
10 |
+
|
11 |
+
/* Copyright 2018 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
|
15 |
+
published by the Free Software Foundation.
|
16 |
+
|
17 |
+
This program is distributed in the hope that it will be useful,
|
18 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
19 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
20 |
+
GNU General Public License for more details.
|
21 |
+
|
22 |
+
You should have received a copy of the GNU General Public License
|
23 |
+
along with this program; if not, write to the Free Software
|
24 |
+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
25 |
+
*/
|
26 |
+
|
27 |
+
//Admin "Custom Share Buttons with Floating Sidebar" Menu Item
|
28 |
+
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
29 |
+
if(!class_exists('Csbwfs_Class'))
|
30 |
+
{
|
31 |
+
class Csbwfs_Class
|
32 |
+
{
|
33 |
+
/**
|
34 |
+
* Construct the plugin object
|
35 |
+
*/
|
36 |
+
public function __construct()
|
37 |
+
{
|
38 |
+
// register actions
|
39 |
+
add_action('admin_init', array(&$this, 'csbwfs_admin_init'));
|
40 |
+
add_action('admin_menu', array(&$this, 'csbwf_sidebar_menu'));
|
41 |
+
add_action( 'admin_bar_menu', array(&$this,'toolbar_link_to_csbwfs'), 999 );
|
42 |
+
} // END public function __construct
|
43 |
+
/**
|
44 |
+
* hook to add link under adminmenu bar
|
45 |
+
*/
|
46 |
+
public function toolbar_link_to_csbwfs( $wp_admin_bar ) {
|
47 |
+
$args = array(
|
48 |
+
'id' => 'csbwfs_menu_bar',
|
49 |
+
'title' => 'Social Share',
|
50 |
+
'href' => admin_url('options-general.php?page=csbwfs-settings'),
|
51 |
+
'meta' => array( 'class' => 'csbwfs-toolbar-page' )
|
52 |
+
);
|
53 |
+
$wp_admin_bar->add_node( $args );
|
54 |
+
//second lavel
|
55 |
+
$wp_admin_bar->add_node( array(
|
56 |
+
'id' => 'csbwfs-second-sub-item',
|
57 |
+
'parent' => 'csbwfs_menu_bar',
|
58 |
+
'title' => 'Settings',
|
59 |
+
'href' => admin_url('options-general.php?page=csbwfs-settings'),
|
60 |
+
'meta' => array(
|
61 |
+
'title' => __('Settings'),
|
62 |
+
'target' => '_self',
|
63 |
+
'class' => 'csbwfs_menu_item_class'
|
64 |
+
),
|
65 |
+
));
|
66 |
+
}
|
67 |
+
/**
|
68 |
+
* hook into WP's admin_init action hook
|
69 |
+
*/
|
70 |
+
public function csbwfs_admin_init()
|
71 |
+
{
|
72 |
+
// Set up the settings for this plugin
|
73 |
+
$this->csbwf_sidebar_init();
|
74 |
+
// Possibly do additional admin_init tasks
|
75 |
+
} // END public static function activate
|
76 |
+
/**
|
77 |
+
* Initialize some custom settings
|
78 |
+
*/
|
79 |
+
public function csbwf_sidebar_init()
|
80 |
+
{
|
81 |
+
// register the settings for this plugin
|
82 |
+
register_setting('csbwf_sidebar_options','csbwfs_active');
|
83 |
+
register_setting('csbwf_sidebar_options','csbwfs_position');
|
84 |
+
register_setting('csbwf_sidebar_options','csbwfs_btn_position');
|
85 |
+
register_setting('csbwf_sidebar_options','csbwfs_btn_text');
|
86 |
+
register_setting('csbwf_sidebar_options','csbwfs_fb_image');
|
87 |
+
register_setting('csbwf_sidebar_options','csbwfs_tw_image');
|
88 |
+
register_setting('csbwf_sidebar_options','csbwfs_li_image');
|
89 |
+
register_setting('csbwf_sidebar_options','csbwfs_re_image');
|
90 |
+
register_setting('csbwf_sidebar_options','csbwfs_st_image');
|
91 |
+
register_setting('csbwf_sidebar_options','csbwfs_mail_image');
|
92 |
+
register_setting('csbwf_sidebar_options','csbwfs_pin_image');
|
93 |
+
register_setting('csbwf_sidebar_options','csbwfs_yt_image');
|
94 |
+
register_setting('csbwf_sidebar_options','csbwfs_fb_bg');
|
95 |
+
register_setting('csbwf_sidebar_options','csbwfs_tw_bg');
|
96 |
+
register_setting('csbwf_sidebar_options','csbwfs_li_bg');
|
97 |
+
register_setting('csbwf_sidebar_options','csbwfs_mail_bg');
|
98 |
+
register_setting('csbwf_sidebar_options','csbwfs_pin_bg');
|
99 |
+
register_setting('csbwf_sidebar_options','csbwfs_re_bg');
|
100 |
+
register_setting('csbwf_sidebar_options','csbwfs_st_bg');
|
101 |
+
register_setting('csbwf_sidebar_options','csbwfs_yt_bg');
|
102 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_fb_bg');
|
103 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_tw_bg');
|
104 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_li_bg');
|
105 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_mail_bg');
|
106 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_pin_bg');
|
107 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_re_bg');
|
108 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_st_bg');
|
109 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_yt_bg');
|
110 |
+
register_setting('csbwf_sidebar_options','csbwfs_fpublishBtn');
|
111 |
+
register_setting('csbwf_sidebar_options','csbwfs_tpublishBtn');
|
112 |
+
register_setting('csbwf_sidebar_options','csbwfs_ppublishBtn');
|
113 |
+
register_setting('csbwf_sidebar_options','csbwfs_ytpublishBtn');
|
114 |
+
register_setting('csbwf_sidebar_options','csbwfs_republishBtn');
|
115 |
+
register_setting('csbwf_sidebar_options','csbwfs_stpublishBtn');
|
116 |
+
register_setting('csbwf_sidebar_options','csbwfs_ytPath');
|
117 |
+
register_setting('csbwf_sidebar_options','csbwfs_lpublishBtn');
|
118 |
+
register_setting('csbwf_sidebar_options','csbwfs_mpublishBtn');
|
119 |
+
register_setting('csbwf_sidebar_options','csbwfs_mailMessage');
|
120 |
+
register_setting('csbwf_sidebar_options','csbwfs_top_margin');
|
121 |
+
register_setting('csbwf_sidebar_options','csbwfs_delayTimeBtn');
|
122 |
+
register_setting('csbwf_sidebar_options','csbwfs_btn_display');
|
123 |
+
/** Image Alt */
|
124 |
+
register_setting('csbwf_sidebar_options','csbwfs_fb_title');
|
125 |
+
register_setting('csbwf_sidebar_options','csbwfs_tw_title');
|
126 |
+
register_setting('csbwf_sidebar_options','csbwfs_li_title');
|
127 |
+
register_setting('csbwf_sidebar_options','csbwfs_pin_title');
|
128 |
+
register_setting('csbwf_sidebar_options','csbwfs_mail_title');
|
129 |
+
register_setting('csbwf_sidebar_options','csbwfs_yt_title');
|
130 |
+
register_setting('csbwf_sidebar_options','csbwfs_re_title');
|
131 |
+
register_setting('csbwf_sidebar_options','csbwfs_st_title');
|
132 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_fb_title');
|
133 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_tw_title');
|
134 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_li_title');
|
135 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_pin_title');
|
136 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_mail_title');
|
137 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_yt_title');
|
138 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_re_title');
|
139 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_st_title');
|
140 |
+
register_setting('csbwf_sidebar_options','csbwfs_auto_hide');
|
141 |
+
//Options for post/pages
|
142 |
+
register_setting('csbwf_sidebar_options','csbwfs_buttons_active');
|
143 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_hide_home');
|
144 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_hide_post');
|
145 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_hide_page');
|
146 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_hide_archive');
|
147 |
+
register_setting('csbwf_sidebar_options','csbwfs_hide_home');
|
148 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_fb_image');
|
149 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_tw_image');
|
150 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_li_image');
|
151 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_mail_image');
|
152 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_pin_image');
|
153 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_re_image');
|
154 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_st_image');
|
155 |
+
register_setting('csbwf_sidebar_options','csbwfs_page_yt_image');
|
156 |
+
/** message content */
|
157 |
+
register_setting('csbwf_sidebar_options','csbwfs_show_btn');
|
158 |
+
register_setting('csbwf_sidebar_options','csbwfs_hide_btn');
|
159 |
+
register_setting('csbwf_sidebar_options','csbwfs_share_msg');
|
160 |
+
register_setting('csbwf_sidebar_options','csbwfs_rmSHBtn');
|
161 |
+
//register_setting('csbwf_sidebar_options','csbwfs_featuredshrimg');
|
162 |
+
//register_setting('csbwf_sidebar_options','csbwfs_defaultfeaturedshrimg');
|
163 |
+
register_setting('csbwf_sidebar_options','csbwfs_deactive_for_mob');
|
164 |
+
} // END public function init_custom_settings()
|
165 |
+
/**
|
166 |
+
* add a menu
|
167 |
+
*/
|
168 |
+
public function csbwf_sidebar_menu()
|
169 |
+
{
|
170 |
+
add_options_page('Social Share Buttons(CSBWFS)','Social Share Buttons(CSBWFS)','manage_options','csbwfs-settings',array(&$this,'csbwf_sidebar_admin_option_page'));
|
171 |
+
|
172 |
+
} // END public function add_menu()
|
173 |
+
|
174 |
+
public function csbwf_sidebar_admin_option_page()
|
175 |
+
{
|
176 |
+
if(!current_user_can('manage_options'))
|
177 |
+
{
|
178 |
+
wp_die(__('You do not have sufficient permissions to access this page.'));
|
179 |
+
}
|
180 |
+
|
181 |
+
// Render the settings template
|
182 |
+
include(sprintf("%s/lib/settings.php", dirname(__FILE__)));
|
183 |
+
/**
|
184 |
+
* REGISTER SCRIPT
|
185 |
+
* */
|
186 |
+
wp_enqueue_script('media-upload');
|
187 |
+
wp_enqueue_script('thickbox');
|
188 |
+
wp_register_script('csbwfs-image-upload', plugins_url('/js/csbwfs.js',__FILE__ ), array('jquery','media-upload','thickbox','wp-color-picker'));
|
189 |
+
wp_enqueue_script('csbwfs-image-upload');
|
190 |
+
/**
|
191 |
+
* REGISTER STYLE
|
192 |
+
* */
|
193 |
+
wp_register_style( 'csbwf_admin_style', plugins_url( 'css/admin-csbwfs.css',__FILE__ ) );
|
194 |
+
wp_enqueue_style( 'csbwf_admin_style' );
|
195 |
+
wp_enqueue_style( 'wp-color-picker' );
|
196 |
+
wp_enqueue_style('thickbox');
|
197 |
+
|
198 |
+
}// END public static function csbwf_sidebar_admin_option_page
|
199 |
+
/**
|
200 |
+
* hook into WP's plugin_action_links_ action hook
|
201 |
+
*/
|
202 |
+
public static function csbwfs_add_settings_link( $links ) {
|
203 |
+
$settings_link = '<a href="options-general.php?page=csbwfs-settings">' . __( 'Settings', 'csbwfs' ) . '</a>';
|
204 |
+
$settings_link .= ' | <a href="https://rgaddons.wordpress.com/custom-share-buttons-with-floating-sidebar-pro/" target="_blank">' . __( 'GO PRO', 'csbwfs' ) . '</a>';
|
205 |
+
array_unshift( $links, $settings_link );
|
206 |
+
return $links;
|
207 |
+
}
|
208 |
+
/**
|
209 |
+
* uninstall the plugin
|
210 |
+
*/
|
211 |
+
public function csbwfs_uninstall()
|
212 |
+
{
|
213 |
+
delete_option('csbwfs_active');
|
214 |
+
delete_option('csbbuttons_active');
|
215 |
+
delete_option('csbwfs_position');
|
216 |
+
delete_option('csbwfs_btn_position');
|
217 |
+
delete_option('csbwfs_btn_text');
|
218 |
+
delete_option('csbwfs_fb_image');
|
219 |
+
delete_option('csbwfs_tw_image');
|
220 |
+
delete_option('csbwfs_li_image');
|
221 |
+
delete_option('csbwfs_re_image');
|
222 |
+
delete_option('csbwfs_st_image');
|
223 |
+
delete_option('csbwfs_mail_image');
|
224 |
+
delete_option('csbwfs_pin_image');
|
225 |
+
delete_option('csbwfs_yt_image');
|
226 |
+
delete_option('csbwfs_re_image');
|
227 |
+
delete_option('csbwfs_st_image');
|
228 |
+
delete_option('csbwfs_ytPath');
|
229 |
+
delete_option('csbwfs_fb_bg');
|
230 |
+
delete_option('csbwfs_tw_bg');
|
231 |
+
delete_option('csbwfs_li_bg');
|
232 |
+
delete_option('csbwfs_mail_bg');
|
233 |
+
delete_option('csbwfs_pin_bg');
|
234 |
+
delete_option('csbwfs_yt_bg');
|
235 |
+
delete_option('csbwfs_fpublishBtn');
|
236 |
+
delete_option('csbwfs_tpublishBtn');
|
237 |
+
delete_option('csbwfs_ppublishBtn');
|
238 |
+
delete_option('csbwfs_lpublishBtn');
|
239 |
+
delete_option('csbwfs_mpublishBtn');
|
240 |
+
delete_option('csbwfs_republishBtn');
|
241 |
+
delete_option('csbwfs_stpublishBtn');
|
242 |
+
delete_option('csbwfs_ytpublishBtn');
|
243 |
+
delete_option('csbwfs_mailMessage');
|
244 |
+
delete_option('csbwfs_top_margin');
|
245 |
+
delete_option('csbwfs_page_hide_home');
|
246 |
+
delete_option('csbwfs_page_hide_post');
|
247 |
+
delete_option('csbwfs_page_hide_page');
|
248 |
+
delete_option('csbwfs_fb_title');
|
249 |
+
delete_option('csbwfs_tw_title');
|
250 |
+
delete_option('csbwfs_li_title');
|
251 |
+
delete_option('csbwfs_pin_title');
|
252 |
+
delete_option('csbwfs_mail_title');
|
253 |
+
delete_option('csbwfs_yt_title');
|
254 |
+
delete_option('csbwfs_re_title');
|
255 |
+
delete_option('csbwfs_st_title');
|
256 |
+
delete_option('csbwfs_page_fb_image');
|
257 |
+
delete_option('csbwfs_page_tw_image');
|
258 |
+
delete_option('csbwfs_page_li_image');
|
259 |
+
delete_option('csbwfs_page_re_image');
|
260 |
+
delete_option('csbwfs_page_st_image');
|
261 |
+
delete_option('csbwfs_page_mail_image');
|
262 |
+
delete_option('csbwfs_page_pin_image');
|
263 |
+
delete_option('csbwfs_page_yt_image');
|
264 |
+
delete_option('csbwfs_rmSHBtn');
|
265 |
+
//delete_option('csbwfs_featuredshrimg');
|
266 |
+
//delete_option('csbwfs_defaultfeaturedshrimg');
|
267 |
+
delete_option('csbwfs_deactive_for_mob');
|
268 |
+
// Do nothing
|
269 |
+
} // END public static function uninstall
|
270 |
+
/**
|
271 |
+
* Activate the plugin
|
272 |
+
*/
|
273 |
+
public static function csbwfs_activate()
|
274 |
+
{
|
275 |
+
// Do nothing
|
276 |
+
} // END public static function activate
|
277 |
+
|
278 |
+
/**
|
279 |
+
* Deactivate the plugin
|
280 |
+
*/
|
281 |
+
public static function csbwfs_deactivate()
|
282 |
+
{
|
283 |
+
// Do nothing
|
284 |
+
} // END public static function deactivate
|
285 |
+
|
286 |
+
} // END class Csbwfs_Class
|
287 |
+
} // END if(!class_exists('Csbwfs_Class'))
|
288 |
+
|
289 |
+
if(class_exists('Csbwfs_Class'))
|
290 |
+
{
|
291 |
+
// Installation and uninstallation hooks
|
292 |
+
register_activation_hook(__FILE__, array('Csbwfs_Class', 'csbwfs_activate'));
|
293 |
+
register_deactivation_hook(__FILE__, array('Csbwfs_Class', 'csbwfs_deactivate'));
|
294 |
+
register_uninstall_hook(__FILE__, array('Csbwfs_Class', 'csbwfs_uninstall'));
|
295 |
+
// instantiate the plugin class
|
296 |
+
$csbwfs_plugin_template = new Csbwfs_Class();
|
297 |
+
// Add a link to the settings page onto the plugin page
|
298 |
+
if(isset($csbwfs_plugin_template))
|
299 |
+
{
|
300 |
+
$plugin = plugin_basename(__FILE__);
|
301 |
+
add_filter("plugin_action_links_$plugin", array('Csbwfs_Class','csbwfs_add_settings_link'));
|
302 |
+
require dirname(__FILE__).'/csbwfs-class.php';
|
303 |
+
//shortcode
|
304 |
+
require dirname(__FILE__).'/lib/shortcode.php';
|
305 |
+
}
|
306 |
+
|
307 |
+
|
308 |
+
}
|
309 |
+
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/settings.php
CHANGED
@@ -1,312 +1,301 @@
|
|
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 echo get_submit_button('Save Settings','button-primary extrabtn','submit','','');?></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 _e('Enable Sidebar');?> </b></p>
|
17 |
-
<p><h3><strong><?php _e('Social Share Button Publish Options:','csbwfs');?></strong></h3></p>
|
18 |
-
<p><input type="checkbox" id="publish1" value="yes" name="csbwfs_fpublishBtn" <?php checked(get_option('csbwfs_fpublishBtn'),'yes');?>/><b>Facebook
|
19 |
-
<p><input type="checkbox" id="publish2" name="csbwfs_tpublishBtn" value="yes" <?php checked(get_option('csbwfs_tpublishBtn'),'yes');?>/> <b>Twitter
|
20 |
-
<p><input type="checkbox" id="
|
21 |
-
<p><input type="checkbox" id="
|
22 |
-
<p><input type="checkbox" id="
|
23 |
-
<p><input type="checkbox" id="
|
24 |
-
<p><input type="checkbox" id="
|
25 |
-
|
26 |
-
<?php
|
27 |
-
|
28 |
-
<?php
|
29 |
-
<p><input type="
|
30 |
-
<p
|
31 |
-
<p><label
|
32 |
-
<p><label><?php _e('
|
33 |
-
<p><label><?php _e('
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
<
|
38 |
-
<
|
39 |
-
|
40 |
-
</
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
<
|
45 |
-
<
|
46 |
-
|
47 |
-
|
48 |
-
<
|
49 |
-
<
|
50 |
-
<
|
51 |
-
<option value="
|
52 |
-
<option value="
|
53 |
-
|
54 |
-
</
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
<
|
59 |
-
|
60 |
-
</tr>
|
61 |
-
|
62 |
-
<
|
63 |
-
<
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
</tr>
|
69 |
-
<tr><
|
70 |
-
<tr><td colspan="2"><
|
71 |
-
<tr
|
72 |
-
<
|
73 |
-
<
|
74 |
-
|
75 |
-
|
76 |
-
</
|
77 |
-
|
78 |
-
|
79 |
-
<
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
<
|
85 |
-
<
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
<
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
<tr><th><?php echo '
|
95 |
-
<td class="csbwfsButtonsImg" id="
|
96 |
-
<input type="text" id="
|
97 |
-
</td>
|
98 |
-
</tr>
|
99 |
-
<tr><th><?php echo '
|
100 |
-
<td class="csbwfsButtonsImg" id="
|
101 |
-
<input type="text" id="
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
<
|
107 |
-
|
108 |
-
</td>
|
109 |
-
</tr>
|
110 |
-
<tr><th><?php echo '
|
111 |
-
<td class="csbwfsButtonsImg" id="
|
112 |
-
<input type="text" id="
|
113 |
-
</td>
|
114 |
-
</tr>
|
115 |
-
<tr><
|
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 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
<
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
<tr><
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
<tr
|
170 |
-
<
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
<input type="text" id="
|
178 |
-
<input id="
|
179 |
-
</td>
|
180 |
-
</tr>
|
181 |
-
<tr
|
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 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
<li><a href="https://wordpress.org/plugins/
|
243 |
-
<li><a href="https://wordpress.org/plugins/
|
244 |
-
<li><a href="https://wordpress.org/plugins/
|
245 |
-
<li><a href="https://wordpress.org/plugins/
|
246 |
-
<li><a href="https://wordpress.org/plugins/wp-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
</
|
260 |
-
|
261 |
-
<
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
<li>
|
274 |
-
<li>
|
275 |
-
<li>An option to
|
276 |
-
<li>An option to
|
277 |
-
<li>
|
278 |
-
<li>An
|
279 |
-
<li>An option to
|
280 |
-
<li>An
|
281 |
-
<li>An
|
282 |
-
<li>
|
283 |
-
<li>An option to
|
284 |
-
<li>
|
285 |
-
<li>An
|
286 |
-
<li>An option to
|
287 |
-
<li>An option to
|
288 |
-
<li>
|
289 |
-
<li>An option to
|
290 |
-
<li>
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
</ol>
|
303 |
-
</td>
|
304 |
-
</tr>
|
305 |
-
</table>
|
306 |
-
</div>
|
307 |
-
</div>
|
308 |
-
<span class="submit-btn"><?php echo get_submit_button('Save Settings','button-primary','submit','','');?></span>
|
309 |
-
<?php settings_fields('csbwf_sidebar_options'); ?>
|
310 |
-
</form>
|
311 |
-
<!-- End Options Form -->
|
312 |
-
</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 echo get_submit_button('Save Settings','button-primary extrabtn','submit','','');?></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 _e('Enable Sidebar');?> </b></p>
|
17 |
+
<p><h3><strong><?php _e('Social Share Button Publish Options:','csbwfs');?></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 echo get_option('csbwfs_mailMessage');?>" 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 echo get_option('csbwfs_ytPath');?>" placeholder="http://www.youtube.com" size="40" class="regular-text ltr"><br>add youtube channel url</p>
|
30 |
+
<p><label><h3 ><strong><?php _e('Define your custom message:','csbwfs');?></strong></h3></label></p>
|
31 |
+
<p><label><?php _e('Show:');?></label><input type="text" id="csbwfs_show_btn" name="csbwfs_show_btn" value="<?php echo get_option('csbwfs_show_btn'); ?>" placeholder="Show Buttons" size="40"/></p>
|
32 |
+
<p><label><?php _e('Hide:');?></label><input type="text" id="csbwfs_hide_btn" name="csbwfs_hide_btn" value="<?php echo get_option('csbwfs_hide_btn'); ?>" placeholder="Hide Buttons" size="40"/></p>
|
33 |
+
<p><label><?php _e('Message:');?></label><input type="textbox" id="csbwfs_share_msg" name="csbwfs_share_msg" value="<?php echo get_option('csbwfs_share_msg'); ?>" placeholder="Share This With Your Friends" size="40"/></p>
|
34 |
+
</td>
|
35 |
+
<td valign="top" style="border-left:1px solid #ccc;padding-left:20px;">
|
36 |
+
<p style="font-size:16px;">Watch given below video to view addon features and settings</p>
|
37 |
+
<iframe width="100%" height="500" src="https://www.youtube.com/embed/QUnxtCe95Ww?rel=0&autoplay=1&start=90" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
|
38 |
+
<h2><a href="https://rgaddons.wordpress.com/custom-share-buttons-with-floating-sidebar-pro/" target="_blank" class="contact-author"><strong>Click Here</strong></a> to download addon.</h2>
|
39 |
+
</tr>
|
40 |
+
</table>
|
41 |
+
</div>
|
42 |
+
<!-- Floating Sidebar -->
|
43 |
+
<div class="csbwfs-tab" id="div-csbwfs-sidebar">
|
44 |
+
<h2>Floating Sidebar Settings</h2>
|
45 |
+
<table>
|
46 |
+
<tr>
|
47 |
+
<th nowrap><?php echo 'Siderbar Position:';?></th>
|
48 |
+
<td>
|
49 |
+
<select id="csbwfs_position" name="csbwfs_position" >
|
50 |
+
<option value="left" <?php selected(get_option('csbwfs_position'),'left');?>>Left</option>
|
51 |
+
<option value="right" <?php selected(get_option('csbwfs_position'),'right');?>>Right</option>
|
52 |
+
<option value="bottom" <?php selected(get_option('csbwfs_position'),'bottom');?>>Bottom</option>
|
53 |
+
</select>
|
54 |
+
</td>
|
55 |
+
</tr>
|
56 |
+
<tr>
|
57 |
+
<th> </th>
|
58 |
+
<td><input type="checkbox" id="csbwfs_rmSHBtn" name="csbwfs_rmSHBtn" value="yes" <?php checked(get_option('csbwfs_rmSHBtn'),'yes');?>/> <strong><?php _e('Remove Show/Hide Button:','csbwfs');?></strong></td>
|
59 |
+
</tr>
|
60 |
+
<tr><th nowrap valign="top"><?php echo 'Delay Time: '; ?></th><td><input type="text" name="csbwfs_delayTimeBtn" id="csbwfs_delayTimeBtn" value="<?php echo get_option('csbwfs_delayTimeBtn')?get_option('csbwfs_delayTimeBtn'):0;?>" size="40" class="regular-text ltr"><br><i>Publish share buttons after given time(millisecond)</i></td></tr>
|
61 |
+
<tr>
|
62 |
+
<th> </th>
|
63 |
+
<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 _e('Disable Sidebar For Mobile','csbwfs');?></td>
|
64 |
+
</tr>
|
65 |
+
<tr><th></th>
|
66 |
+
<td><input type="checkbox" id="csbwfs_auto_hide" name="csbwfs_auto_hide" value="yes" <?php checked(get_option('csbwfs_auto_hide'),'yes');?>/><?php _e('Auto Hide Sidebar On Page Load','csbwfs');?></td>
|
67 |
+
</tr>
|
68 |
+
<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>
|
69 |
+
<tr><td colspan="2"><strong><h4>Social Share Button Images 32X32 (Optional) :</h4></strong></td></tr>
|
70 |
+
<tr><td colspan="2" align="right"><input type="button" id="csbwfs_resetpage" value="Reset"></td></tr>
|
71 |
+
<tr>
|
72 |
+
<th><?php echo 'Facebook:';?></th>
|
73 |
+
<td class="csbwfsButtonsImg" id="csbwfsButtonsFbImg">
|
74 |
+
<input type="text" id="csbwfs_fb_image" name="csbwfs_fb_image" value="<?php echo get_option('csbwfs_fb_image'); ?>" 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 echo get_option('csbwfs_fb_bg'); ?>" size="20"/> <input type="text" id="csbwfs_fb_title" name="csbwfs_fb_title" value="<?php echo get_option('csbwfs_fb_title'); ?>" placeholder="Share on facebook" size="20" class="csbwfs_title"/>
|
75 |
+
</td>
|
76 |
+
</tr>
|
77 |
+
<tr><th><?php echo 'Twitter:';?></th>
|
78 |
+
<td class="csbwfsButtonsImg" id="csbwfsButtonsTwImg">
|
79 |
+
<input type="text" id="csbwfs_tw_image" name="csbwfs_tw_image" value="<?php echo get_option('csbwfs_tw_image'); ?>" 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 echo get_option('csbwfs_tw_bg'); ?>" data-default-color="#2ca8d2" class="color-field" size="20"/> <input type="text" id="csbwfs_tw_title" name="csbwfs_tw_title" value="<?php echo get_option('csbwfs_tw_title'); ?>" placeholder="Share on twitter" size="20" class="csbwfs_title"/>
|
80 |
+
</td>
|
81 |
+
</tr>
|
82 |
+
<tr>
|
83 |
+
<th><?php echo 'Linkedin:';?></th>
|
84 |
+
<td class="csbwfsButtonsImg" id="csbwfsButtonsLiImg">
|
85 |
+
<input type="text" id="csbwfs_li_image" name="csbwfs_li_image" value="<?php echo get_option('csbwfs_li_image'); ?>" 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 echo get_option('csbwfs_li_bg'); ?>" data-default-color="#dd4c39" class="color-field" size="20"/> <input type="text" id="csbwfs_li_title" name="csbwfs_li_title" value="<?php echo get_option('csbwfs_li_title'); ?>" placeholder="Share on Linkedin" size="20" class="csbwfs_title"/>
|
86 |
+
</td>
|
87 |
+
</tr>
|
88 |
+
<tr><th><?php echo 'Pintrest:';?></th>
|
89 |
+
<td class="csbwfsButtonsImg" id="csbwfsButtonsPiImg">
|
90 |
+
<input type="text" id="csbwfs_pin_image" name="csbwfs_pin_image" value="<?php echo get_option('csbwfs_pin_image'); ?>" 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 echo get_option('csbwfs_pin_bg'); ?>" data-default-color="#ca2027" class="color-field" size="20"/> <input type="text" id="csbwfs_pin_title" name="csbwfs_pin_title" value="<?php echo get_option('csbwfs_pin_title'); ?>" placeholder="Share on pintrest" size="20" class="csbwfs_title"/>
|
91 |
+
</td>
|
92 |
+
</tr>
|
93 |
+
|
94 |
+
<tr><th><?php echo 'Reddit:';?></th>
|
95 |
+
<td class="csbwfsButtonsImg" id="csbwfsButtonsReImg">
|
96 |
+
<input type="text" id="csbwfs_re_image" name="csbwfs_re_image" value="<?php echo get_option('csbwfs_re_image'); ?>" 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 echo get_option('csbwfs_re_bg'); ?>" data-default-color="#ff1a00" class="color-field" size="20"/> <input type="text" id="csbwfs_re_title" name="csbwfs_re_title" value="<?php echo get_option('csbwfs_re_title'); ?>" placeholder="Share on reddit" size="20" class="csbwfs_title"/>
|
97 |
+
</td>
|
98 |
+
</tr>
|
99 |
+
<tr><th><?php echo 'Stumbleupon:';?></th>
|
100 |
+
<td class="csbwfsButtonsImg" id="csbwfsButtonsStImg">
|
101 |
+
<input type="text" id="csbwfs_st_image" name="csbwfs_st_image" value="<?php echo get_option('csbwfs_st_image'); ?>" 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 echo get_option('csbwfs_st_bg'); ?>" data-default-color="#eb4924" class="color-field" size="20"/>
|
102 |
+
<input type="text" id="csbwfs_st_title" name="csbwfs_st_title" value="<?php echo get_option('csbwfs_st_title'); ?>" placeholder="Share on stumbleupon" size="20" class="csbwfs_title"/>
|
103 |
+
</td>
|
104 |
+
</tr>
|
105 |
+
<tr><th><?php echo 'Mail:';?></th>
|
106 |
+
<td class="csbwfsButtonsImg" id="csbwfsButtonsMaImg">
|
107 |
+
<input type="text" id="csbwfs_mail_image" name="csbwfs_mail_image" value="<?php echo get_option('csbwfs_mail_image'); ?>" 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 echo get_option('csbwfs_mail_bg'); ?>" data-default-color="#738a8d" class="color-field" size="20"/> <input type="text" id="csbwfs_mail_title" name="csbwfs_mail_title" value="<?php echo get_option('csbwfs_mail_title'); ?>" placeholder="Send contact request" size="20" class="csbwfs_title"/>
|
108 |
+
</td>
|
109 |
+
</tr>
|
110 |
+
<tr><th><?php echo 'Youtube:';?></th>
|
111 |
+
<td class="csbwfsButtonsImg" id="csbwfsButtonsYtImg">
|
112 |
+
<input type="text" id="csbwfs_yt_image" name="csbwfs_yt_image" value="<?php echo get_option('csbwfs_yt_image'); ?>" 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 echo get_option('csbwfs_yt_bg'); ?>" data-default-color="#ffffff" class="color-field" size="20"/> <input type="text" id="csbwfs_yt_title" name="csbwfs_yt_title" value="<?php echo get_option('csbwfs_yt_title'); ?>" placeholder="Youtube" size="20" class="csbwfs_title"/>
|
113 |
+
</td>
|
114 |
+
</tr>
|
115 |
+
<tr><td colspan="2"><h3><strong>Style(Optional):</strong></h3></td></tr>
|
116 |
+
|
117 |
+
<tr>
|
118 |
+
<th><?php echo 'Top Margin:';?></th>
|
119 |
+
<td>
|
120 |
+
|
121 |
+
<input type="textbox" id="csbwfs_top_margin" name="csbwfs_top_margin" value="<?php echo get_option('csbwfs_top_margin'); ?>" placeholder="10% OR 10px" size="10"/>
|
122 |
+
</td>
|
123 |
+
</tr>
|
124 |
+
</table>
|
125 |
+
</div>
|
126 |
+
<!-- Share Buttons -->
|
127 |
+
<div class="csbwfs-tab" id="div-csbwfs-share-buttons">
|
128 |
+
<h2>Social Share Buttons Settings</h2>
|
129 |
+
<table>
|
130 |
+
<td><?php _e('Enable:','csbwfs');?></td>
|
131 |
+
<td colspan="2">
|
132 |
+
<input type="checkbox" id="csbwfs_buttons_active" name="csbwfs_buttons_active" value='1' <?php checked(get_option('csbwfs_buttons_active'),1);?>/>
|
133 |
+
</td>
|
134 |
+
</tr>
|
135 |
+
<tr>
|
136 |
+
<th nowrap><?php echo 'Share Button Position:';?></th>
|
137 |
+
<td>
|
138 |
+
<select id="csbwfs_btn_position" name="csbwfs_btn_position" >
|
139 |
+
<option value="left" <?php selected(get_option('csbwfs_btn_position'),'left');?>>Left</option>
|
140 |
+
<option value="right" <?php selected(get_option('csbwfs_btn_position'),'right');?>>Right</option>
|
141 |
+
</select>
|
142 |
+
</td>
|
143 |
+
</tr>
|
144 |
+
<tr>
|
145 |
+
<th nowrap><?php echo 'Display Buttons On ';?></th>
|
146 |
+
<td>
|
147 |
+
<select id="csbwfs_btn_display" name="csbwfs_btn_display" >
|
148 |
+
<option value="below" <?php selected(get_option('csbwfs_btn_display'),'below');?>>Bottom Of The Content</option>
|
149 |
+
<option value="above" <?php selected(get_option('csbwfs_btn_display'),'above');?>>Top Of The Content</option>
|
150 |
+
</select>
|
151 |
+
</td>
|
152 |
+
</tr>
|
153 |
+
<tr>
|
154 |
+
<th nowrap><?php echo 'Share Button Text:';?></th>
|
155 |
+
<td>
|
156 |
+
<input type="textbox" id="csbwfs_btn_text" name="csbwfs_btn_text" value="<?php echo get_option('csbwfs_btn_text'); ?>" placeholder="Share This!" size="20"/>
|
157 |
+
<i>(Leave blank if you want hide button)</i></td>
|
158 |
+
</tr>
|
159 |
+
<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>
|
160 |
+
</td></tr>
|
161 |
+
|
162 |
+
<tr><td colspan="2"><strong><h4>Social Share Button Images 32X32 (Optional) :</h4></strong></td></tr>
|
163 |
+
<tr><td colspan="2" align="right"><input type="button" id="csbwfsresetpage" value="RESET"></td></tr>
|
164 |
+
<tr><th><?php echo 'Facebook:';?></th>
|
165 |
+
<td class="csbwfsButtonsImg" id="csbwfsButtonsFbImg2"><input type="text" id="csbwfs_page_fb_image" name="csbwfs_page_fb_image" value="<?php echo get_option('csbwfs_page_fb_image'); ?>" placeholder="Insert facebook button image path" size="40" class="inputButtonid"/>
|
166 |
+
<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 echo get_option('csbwfs_page_fb_bg'); ?>" size="20"/> <input type="text" id="csbwfs_page_fb_title" name="csbwfs_page_fb_title" value="<?php echo get_option('csbwfs_page_fb_title'); ?>" placeholder="Alt Text" size="20" class="csbwfs_title"/>
|
167 |
+
</td>
|
168 |
+
</tr>
|
169 |
+
<tr>
|
170 |
+
<th><?php echo 'Twitter:';?></th>
|
171 |
+
<td class="csbwfsButtonsImg" id="csbwfsButtonsTwImg2">
|
172 |
+
<input type="text" id="csbwfs_page_tw_image" name="csbwfs_page_tw_image" value="<?php echo get_option('csbwfs_page_tw_image'); ?>" placeholder="Insert twitter button image path" size="40" class="inputButtonid"/>
|
173 |
+
<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 echo get_option('csbwfs_page_tw_bg'); ?>" size="20"/> <input type="text" id="csbwfs_page_tw_title" name="csbwfs_page_tw_title" value="<?php echo get_option('csbwfs_page_tw_title'); ?>" placeholder="Alt Text" size="20" class="csbwfs_title"/>
|
174 |
+
</td>
|
175 |
+
</tr>
|
176 |
+
<tr><th><?php echo 'Linkedin:';?></th>
|
177 |
+
<td class="csbwfsButtonsImg" id="csbwfsButtonsLiImg2"><input type="text" id="csbwfs_page_li_image" name="csbwfs_page_li_image" value="<?php echo get_option('csbwfs_page_li_image'); ?>" placeholder="Insert Linkedin button image path" size="40" class="inputButtonid"/>
|
178 |
+
<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 echo get_option('csbwfs_page_li_bg'); ?>" size="20"/> <input type="text" id="csbwfs_page_li_title" name="csbwfs_page_li_title" value="<?php echo get_option('csbwfs_page_li_title'); ?>" placeholder="Alt Text" size="20" class="csbwfs_title"/>
|
179 |
+
</td>
|
180 |
+
</tr>
|
181 |
+
<tr>
|
182 |
+
<th><?php echo 'Pintrest:';?></th>
|
183 |
+
<td class="csbwfsButtonsImg" id="csbwfsButtonsPiImg2"><input type="text" id="csbwfs_page_pin_image" name="csbwfs_page_pin_image" value="<?php echo get_option('csbwfs_page_pin_image'); ?>" placeholder="Insert pinterest button image path" size="40" class="inputButtonid"/>
|
184 |
+
<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 echo get_option('csbwfs_page_pin_bg'); ?>" size="20"/> <input type="text" id="csbwfs_page_pin_title" name="csbwfs_page_pin_title" value="<?php echo get_option('csbwfs_page_pin_title'); ?>" placeholder="Alt Text" size="20" class="csbwfs_title"/>
|
185 |
+
</td>
|
186 |
+
</tr>
|
187 |
+
|
188 |
+
<tr>
|
189 |
+
<th><?php echo 'Reddit:';?></th>
|
190 |
+
<td class="csbwfsButtonsImg" id="csbwfsButtonsReImg2">
|
191 |
+
<input type="text" id="csbwfs_page_re_image" name="csbwfs_page_re_image" value="<?php echo get_option('csbwfs_page_re_image'); ?>" placeholder="Insert reddit button image path" size="40" class="inputButtonid"/>
|
192 |
+
<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 echo get_option('csbwfs_page_re_bg'); ?>" size="20"/> <input type="text" id="csbwfs_page_re_title" name="csbwfs_page_re_title" value="<?php echo get_option('csbwfs_page_re_title'); ?>" placeholder="Alt Text" size="20" class="csbwfs_title"/>
|
193 |
+
</td>
|
194 |
+
</tr>
|
195 |
+
<tr>
|
196 |
+
<th><?php echo 'Stumbleupon:';?></th>
|
197 |
+
<td class="csbwfsButtonsImg" id="csbwfsButtonsStImg2">
|
198 |
+
<input type="text" id="csbwfs_page_st_image" name="csbwfs_page_st_image" value="<?php echo get_option('csbwfs_page_st_image'); ?>" placeholder="Insert stumbleupon button image path" size="40" class="inputButtonid"/>
|
199 |
+
<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 echo get_option('csbwfs_page_st_bg'); ?>" size="20"/> <input type="text" id="csbwfs_page_st_title" name="csbwfs_page_st_title" value="<?php echo get_option('csbwfs_page_st_title'); ?>" placeholder="Alt Text" size="20" class="csbwfs_title"/>
|
200 |
+
</td>
|
201 |
+
</tr>
|
202 |
+
<tr>
|
203 |
+
<th><?php echo 'Mail:';?></th>
|
204 |
+
<td class="csbwfsButtonsImg" id="csbwfsButtonsMlImg2">
|
205 |
+
<input type="text" id="csbwfs_page_mail_image" name="csbwfs_page_mail_image" value="<?php echo get_option('csbwfs_page_mail_image'); ?>" placeholder="Insert mail button image path" size="40" class="inputButtonid"/>
|
206 |
+
<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 echo get_option('csbwfs_page_mail_bg'); ?>" size="20"/> <input type="text" id="csbwfs_page_mail_title" name="csbwfs_page_mail_title" value="<?php echo get_option('csbwfs_page_mail_title'); ?>" placeholder="Alt Text" size="20" class="csbwfs_title"/>
|
207 |
+
</td>
|
208 |
+
</tr>
|
209 |
+
<tr>
|
210 |
+
<th><?php echo 'Youtube:';?></th>
|
211 |
+
<td class="csbwfsButtonsImg" id="csbwfsButtonsYtImg2">
|
212 |
+
<input type="text" id="csbwfs_page_yt_image" name="csbwfs_page_yt_image" value="<?php echo get_option('csbwfs_page_yt_image'); ?>" placeholder="Insert youtube button image path" size="40" class="inputButtonid"/>
|
213 |
+
<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 echo get_option('csbwfs_page_yt_bg'); ?>" size="20"/> <input type="text" id="csbwfs_page_yt_title" name="csbwfs_page_yt_title" value="<?php echo get_option('csbwfs_page_yt_title'); ?>" placeholder="Alt Text" size="20" class="csbwfs_title"/>
|
214 |
+
</td>
|
215 |
+
</tr>
|
216 |
+
</table>
|
217 |
+
|
218 |
+
</div>
|
219 |
+
<!-- Support -->
|
220 |
+
<div class="last author csbwfs-tab" id="div-csbwfs-support">
|
221 |
+
|
222 |
+
<h2>Plugin Support</h2>
|
223 |
+
|
224 |
+
<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>
|
225 |
+
|
226 |
+
<p><strong>Plugin Author:</strong><br><img src="<?php echo plugins_url( '../images/mrweb.jpg' , __FILE__ );?>" width="75" height="75"><br><a href="http://raghunathgurjar.wordpress.com" target="_blank">MR Web Soluttion</a></p>
|
227 |
+
<p><a href="mailto:raghunath.0087@gmail.com" target="_blank" class="contact-author">Contact Author</a></p>
|
228 |
+
<p><strong>Our Other Plugins:</strong><br>
|
229 |
+
<ol>
|
230 |
+
<li><a href="https://wordpress.org/plugins/custom-share-buttons-with-floating-sidebar" target="_blank">Custom Share Buttons With Floating Sidebar</a></li>
|
231 |
+
<li><a href="https://wordpress.org/plugins/protect-wp-admin/" target="_blank">Protect WP-Admin</a></li>
|
232 |
+
<li><a href="https://wordpress.org/plugins/wp-sales-notifier/" target="_blank">WP Sales Notifier</a></li>
|
233 |
+
<li><a href="https://wordpress.org/plugins/wp-categories-widget/" target="_blank">WP Categories Widget</a></li>
|
234 |
+
<li><a href="https://wordpress.org/plugins/wp-protect-content/" target="_blank">WP Protect Content</a></li>
|
235 |
+
<li><a href="https://wordpress.org/plugins/wp-version-remover/" target="_blank">WP Version Remover</a></li>
|
236 |
+
<li><a href="https://wordpress.org/plugins/wp-posts-widget/" target="_blank">WP Post Widget</a></li>
|
237 |
+
<li><a href="https://wordpress.org/plugins/wp-importer" target="_blank">WP Importer</a></li>
|
238 |
+
<li><a href="https://wordpress.org/plugins/wp-csv-importer/" target="_blank">WP CSV Importer</a></li>
|
239 |
+
<li><a href="https://wordpress.org/plugins/wp-testimonial/" target="_blank">WP Testimonial</a></li>
|
240 |
+
<li><a href="https://wordpress.org/plugins/wc-sales-count-manager/" target="_blank">WooCommerce Sales Count Manager</a></li>
|
241 |
+
<li><a href="https://wordpress.org/plugins/wp-social-buttons/" target="_blank">WP Social Buttons</a></li>
|
242 |
+
<li><a href="https://wordpress.org/plugins/wp-youtube-gallery/" target="_blank">WP Youtube Gallery</a></li>
|
243 |
+
<li><a href="https://wordpress.org/plugins/tweets-slider/" target="_blank">Tweets Slider</a></li>
|
244 |
+
<li><a href="https://wordpress.org/plugins/rg-responsive-gallery/" target="_blank">RG Responsive Slider</a></li>
|
245 |
+
<li><a href="https://wordpress.org/plugins/cf7-advance-security" target="_blank">Contact Form 7 Advance Security WP-Admin</a></li>
|
246 |
+
<li><a href="https://wordpress.org/plugins/wp-easy-recipe/" target="_blank">WP Easy Recipe</a></li>
|
247 |
+
</ol>
|
248 |
+
</div>
|
249 |
+
<!-- GO PRO -->
|
250 |
+
<div class="last author csbwfs-tab" id="div-csbwfs-pro">
|
251 |
+
<h2 style="color:green;text-align:center;"><strong>Pay one time use lifetime!!!!!</strong></h2>
|
252 |
+
<table>
|
253 |
+
<tr>
|
254 |
+
<td valign="top" width="30%">
|
255 |
+
<h2>GO PRO</h2>
|
256 |
+
<p><a href="https://rgaddons.wordpress.com/custom-share-buttons-with-floating-sidebar-pro/" target="_blank" class="contact-author">Click here</a> to download addon.</p>
|
257 |
+
<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>
|
258 |
+
<iframe width="560" height="450" src="https://www.youtube.com/embed/tqnAPG5VfFY" frameborder="0" allowfullscreen></iframe>
|
259 |
+
</td>
|
260 |
+
<td><h2>Key Features</h2><hr>
|
261 |
+
<ol>
|
262 |
+
<li>Responsive Floating Sidebar</li>
|
263 |
+
<li>Shortcode</li>
|
264 |
+
<li>An option to Hide Floating Sidebar On Home/Blog/Search/Category/Author pages</li>
|
265 |
+
<li>An option to Hide Floating Sidebar On any post type (i.e page,post,event,product…etc)</li>
|
266 |
+
<li>An option to Hide Floating Sidebar On any taxonomy type (support all custom taxonomy type)</li>
|
267 |
+
<li>An Option to Show/Hide sidebar on specific page/post and on any custom post type pages as well.</li>
|
268 |
+
<li>An option to Show Social Share Buttons On Home/Blog/Search/Category/Author pages</li>
|
269 |
+
<li>An option to Show Social Share Buttons on any taxonomy type (support all custom taxonomy type)</li>
|
270 |
+
<li>An Option to Show/Hide social share buttons on specific page/post and on any custom post type pages as well.</li>
|
271 |
+
<li>Responsive Light box Contact Form (for Mail Icon)</li>
|
272 |
+
<li>An option to add to any custom shortcode into light box</li>
|
273 |
+
<li>Advance feature for choose to pinterest share image</li>
|
274 |
+
<li>An option to enable to OG tags meta boxes for define to share window content(share title, share description & share image path)</li>
|
275 |
+
<li>An option to set sidebar position (left/right/bottom) for mobile</li>
|
276 |
+
<li>An option to add social site official page URL for all social buttons</li>
|
277 |
+
<li>Extra Buttons (Xing,Instagram,Whatsapp,Digg,Yummly,Vk, Buffer, Line, Skype, RSS, Print, G-Mail, Blogger, Tumbler, Delicious, Weibo, Telegram, Google Translate, Phone & SMS )</li>
|
278 |
+
<li>An option to define to twitter username as hash tag in share window.</li>
|
279 |
+
<li>An option to display share count(Facebook, StumbleUpon, Pinterest, Xing and Reddit)</li>
|
280 |
+
<li>An options to change to buttons image, title, background color and url (You can use any button as your own custom button)</li>
|
281 |
+
<li>An options to define sorting order for all buttons</li>
|
282 |
+
<li>10 extra custom floating sidebar buttons with extra options (i.e you can define your own custom size for these buttons)</li>
|
283 |
+
<li>An option to show sum of total share count for all buttons</li>
|
284 |
+
<li>An option to remove mouse hover animation effect for all social buttons</li>
|
285 |
+
<li>An options to choose different style of sidebar</li>
|
286 |
+
<li>An option to define page specific sidebar position (Left/Right/Bottom) for all page</li>
|
287 |
+
<li>An option to choose custom styles of social share buttons</li>
|
288 |
+
<li>An option to define sidebar position for every page separately</li>
|
289 |
+
<li>An option to show/hide sidebar from any specific page</li>
|
290 |
+
<li>Faster support</li>
|
291 |
+
</ol>
|
292 |
+
</td>
|
293 |
+
</tr>
|
294 |
+
</table>
|
295 |
+
</div>
|
296 |
+
</div>
|
297 |
+
<span class="submit-btn"><?php echo get_submit_button('Save Settings','button-primary','submit','','');?></span>
|
298 |
+
<?php settings_fields('csbwf_sidebar_options'); ?>
|
299 |
+
</form>
|
300 |
+
<!-- End Options Form -->
|
301 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/shortcode.php
CHANGED
@@ -1,87 +1,82 @@
|
|
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 |
-
add_filter( 'widget_text', 'do_shortcode' );
|
20 |
-
} // END public function __construct
|
21 |
-
|
22 |
-
|
23 |
-
public function csbwfs_shortcode_style_func() {
|
24 |
-
echo '<style type="text/css">.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;}i.csbwfs_facebook{background-position:68% 4%}i.csbwfs_twitter{background-position:14% 4%}i.csbwfs_plus{background-position:80% 4%}i.csbwfs_linkedin{background-position:92% 4%}i.csbwfs_pinterest{background-position:14% 19%}i.csbwfs_youtube{background-position:32% 4%}i.csbwfs_reddit{background-position:26% 19%}i.csbwfs_stumbleupon{background-position:2% 4%}i.csbwfs_mail{background-position:8% 19%}</style>';
|
25 |
-
}
|
26 |
-
|
27 |
-
public static function csbwfs_shortcode_func($atts) {
|
28 |
-
//[csbwfs_buttons buttons='fb,tw,gp,li,pi,yt,re,st,ml']
|
29 |
-
$shortcode_html = '';
|
30 |
-
$btnsordaryy = isset($atts['buttons']) ? explode(',',$atts['buttons']) : array();
|
31 |
-
$class = isset($atts['class']) ? $atts['class'] : '';
|
32 |
-
if(is_array($btnsordaryy) && count($btnsordaryy) > 0 ){
|
33 |
-
add_action( 'wp_footer', array(&$this,'csbwfs_shortcode_style_func' ));
|
34 |
-
$shortcode_html .= '<div id="csbwfs-shortcode" class="'.$class.'">';
|
35 |
-
foreach($btnsordaryy as $btnsVal)
|
36 |
-
{
|
37 |
-
/** FB */
|
38 |
-
if($btnsVal=='fb'):
|
39 |
-
$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>';
|
40 |
-
endif;
|
41 |
-
/** TW */
|
42 |
-
if($btnsVal=='tw'):
|
43 |
-
$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>';
|
44 |
-
|
45 |
-
endif;
|
46 |
-
|
47 |
-
/**
|
48 |
-
if($btnsVal=='
|
49 |
-
$shortcode_html .='<div id="csbwfs-
|
50 |
-
endif;
|
51 |
-
|
52 |
-
/**
|
53 |
-
if($btnsVal=='
|
54 |
-
$shortcode_html .='<div id="csbwfs-
|
55 |
-
endif;
|
56 |
-
|
57 |
-
/**
|
58 |
-
if($btnsVal=='
|
59 |
-
$shortcode_html .='<div id="csbwfs-
|
60 |
-
endif;
|
61 |
-
|
62 |
-
/**
|
63 |
-
if($btnsVal=='
|
64 |
-
$shortcode_html .='<div id="csbwfs-
|
65 |
-
endif;
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
}
|
84 |
-
}
|
85 |
-
//init class
|
86 |
-
new CsbwfsShortcodeClass(); //init
|
87 |
-
endif;
|
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 |
+
add_filter( 'widget_text', 'do_shortcode' );
|
20 |
+
} // END public function __construct
|
21 |
+
|
22 |
+
|
23 |
+
public function csbwfs_shortcode_style_func() {
|
24 |
+
echo '<style type="text/css">.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;}i.csbwfs_facebook{background-position:68% 4%}i.csbwfs_twitter{background-position:14% 4%}i.csbwfs_plus{background-position:80% 4%}i.csbwfs_linkedin{background-position:92% 4%}i.csbwfs_pinterest{background-position:14% 19%}i.csbwfs_youtube{background-position:32% 4%}i.csbwfs_reddit{background-position:26% 19%}i.csbwfs_stumbleupon{background-position:2% 4%}i.csbwfs_mail{background-position:8% 19%}</style>';
|
25 |
+
}
|
26 |
+
|
27 |
+
public static function csbwfs_shortcode_func($atts) {
|
28 |
+
//[csbwfs_buttons buttons='fb,tw,gp,li,pi,yt,re,st,ml']
|
29 |
+
$shortcode_html = '';
|
30 |
+
$btnsordaryy = isset($atts['buttons']) ? explode(',',$atts['buttons']) : array();
|
31 |
+
$class = isset($atts['class']) ? $atts['class'] : '';
|
32 |
+
if(is_array($btnsordaryy) && count($btnsordaryy) > 0 ){
|
33 |
+
add_action( 'wp_footer', array(&$this,'csbwfs_shortcode_style_func' ));
|
34 |
+
$shortcode_html .= '<div id="csbwfs-shortcode" class="'.$class.'">';
|
35 |
+
foreach($btnsordaryy as $btnsVal)
|
36 |
+
{
|
37 |
+
/** FB */
|
38 |
+
if($btnsVal=='fb'):
|
39 |
+
$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>';
|
40 |
+
endif;
|
41 |
+
/** TW */
|
42 |
+
if($btnsVal=='tw'):
|
43 |
+
$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>';
|
44 |
+
|
45 |
+
endif;
|
46 |
+
|
47 |
+
/** LI */
|
48 |
+
if($btnsVal=='li'):
|
49 |
+
$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>';
|
50 |
+
endif;
|
51 |
+
|
52 |
+
/** PIN */
|
53 |
+
if($btnsVal=='pi'):
|
54 |
+
$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>';
|
55 |
+
endif;
|
56 |
+
|
57 |
+
/** Reddit */
|
58 |
+
if($btnsVal=='re'):
|
59 |
+
$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>';
|
60 |
+
endif;
|
61 |
+
|
62 |
+
/** Stumbleupon */
|
63 |
+
if($btnsVal=='st'):
|
64 |
+
$shortcode_html .='<div id="csbwfs-st" class="csbwfs-shortcode"><a onclick="window.open(\'//www.stumbleupon.com/submit?url=\'+encodeURIComponent(location.href)+\'&title=\'+encodeURIComponent(document.title)+\'&jump=close\',\'Stumbleupon\',\'toolbar=0,status=0,width=1000,height=800\');" href="javascript:void(0);"><i class="csbwfs_stumbleupon"></i></a></div>';
|
65 |
+
endif;
|
66 |
+
/** YT */
|
67 |
+
if($btnsVal=='yt'):
|
68 |
+
$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>';
|
69 |
+
endif;
|
70 |
+
/** Mail*/
|
71 |
+
if($btnsVal=='ml'):
|
72 |
+
$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>';
|
73 |
+
endif;
|
74 |
+
}
|
75 |
+
$shortcode_html .='</div>'; //End #csbwfs-shortcode
|
76 |
+
}
|
77 |
+
return $shortcode_html;
|
78 |
+
}
|
79 |
+
}
|
80 |
+
//init class
|
81 |
+
new CsbwfsShortcodeClass(); //init
|
82 |
+
endif;
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -1,307 +1,307 @@
|
|
1 |
-
=== Custom Share Buttons with Floating Sidebar ===
|
2 |
-
Contributors: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,
|
5 |
-
Requires at least: 4.0
|
6 |
-
Tested up to:
|
7 |
-
Stable tag: 3.
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
== Description ==
|
12 |
-
|
13 |
-
= “
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
With this plugin, you can give users a tool to share your
|
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 |
-
* An options to
|
48 |
-
* An options to
|
49 |
-
* An
|
50 |
-
* An
|
51 |
-
* An option to
|
52 |
-
*
|
53 |
-
* An option to
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
*
|
66 |
-
*
|
67 |
-
* An option to Hide Floating Sidebar On
|
68 |
-
* An
|
69 |
-
* An option to
|
70 |
-
* An
|
71 |
-
* An
|
72 |
-
*
|
73 |
-
* An
|
74 |
-
*
|
75 |
-
* An option to
|
76 |
-
*
|
77 |
-
*
|
78 |
-
* An option to
|
79 |
-
* An option to
|
80 |
-
*
|
81 |
-
* An
|
82 |
-
*
|
83 |
-
* An
|
84 |
-
* An options to
|
85 |
-
*
|
86 |
-
* An option to
|
87 |
-
* An option to
|
88 |
-
* An
|
89 |
-
*
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
Step
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
*
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
* Yes,
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
* Yes,
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
* Yes,
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
* Yes,
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
*
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
* No,
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
* No
|
141 |
-
|
142 |
-
9.) Is there any
|
143 |
-
|
144 |
-
*
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
= 3.6 =
|
173 |
-
* Tested with latest wordpress version
|
174 |
-
* Optimized code and fixed some minor issues
|
175 |
-
|
176 |
-
= 3.5 =
|
177 |
-
* Tested with latest wordpress version 4.9.7
|
178 |
-
* Fixed blog page share url issues
|
179 |
-
* Optimized code
|
180 |
-
* Released addon new version 3.5 with new features
|
181 |
-
|
182 |
-
= 3.4 =
|
183 |
-
* Tested with latest wordpress version 4.9.1
|
184 |
-
* Optimized CSS of share buttons
|
185 |
-
* Added an extra feature to Pinterest button for share to multi images
|
186 |
-
|
187 |
-
= 3.3 =
|
188 |
-
* Tested with latest wordpress version 4.8.2
|
189 |
-
* Released addon new version 3.2 with new features
|
190 |
-
* Fixed a minor bug
|
191 |
-
* Optimized code
|
192 |
-
= 3.2 =
|
193 |
-
* Tested with latest wordpress version 4.8
|
194 |
-
* Fixed a minor bug
|
195 |
-
= 3.1 =
|
196 |
-
* Tested with latest wordpress version 4.7.3
|
197 |
-
* Added an option for define to button background color of social share buttons
|
198 |
-
* Fixed show/hide buttons related bug
|
199 |
-
* Released new addon verson 3.0
|
200 |
-
|
201 |
-
= 3.0 =
|
202 |
-
* Tested with latest wordpress version 4.7
|
203 |
-
* Optimized plugin code
|
204 |
-
= 2.9 =
|
205 |
-
* Tested with latest wordpress version 4.6
|
206 |
-
* optmized CSS
|
207 |
-
* Released pro addon new verion 2.8
|
208 |
-
= 2.8 =
|
209 |
-
* Tested with latest wordpress version 4.5.3
|
210 |
-
* Minify sidebar share buttons images.
|
211 |
-
* optmized CSS
|
212 |
-
* Released addon new verion 2.7
|
213 |
-
= 2.7 =
|
214 |
-
* Tested with latest wordpress version 4.5.2
|
215 |
-
* Fixed linkdin button spelling error.
|
216 |
-
* Fixed + sign issue for mail button
|
217 |
-
|
218 |
-
= 2.6 =
|
219 |
-
* Tested with latest wordpress version 4.5
|
220 |
-
* Fixed buttons hover animation effect issue.
|
221 |
-
* Optimized image, html and css
|
222 |
-
* Updated home page conditions for show/hide social buttons
|
223 |
-
|
224 |
-
= 2.5 =
|
225 |
-
* Fixed upload image issue.
|
226 |
-
* Added reset button for reset to images/title for sidebar and social buttons.
|
227 |
-
* Optimized js code for floating sidebar
|
228 |
-
* Optimized design and css of social share buttons
|
229 |
-
|
230 |
-
= 2.4 =
|
231 |
-
* Fixed share url issue for custom post type.
|
232 |
-
* Fixed show/hide share buttons issues
|
233 |
-
* Tested with wordpress latest version
|
234 |
-
|
235 |
-
= 2.3 =
|
236 |
-
* update code to display content into footer section
|
237 |
-
* Added an option for define position of share buttons (below/above or content)
|
238 |
-
* Fixed some minor js/css issue
|
239 |
-
|
240 |
-
= 2.2 =
|
241 |
-
* Fixed double time open share url issue
|
242 |
-
* Added an option for auto close sidebar buttons on page load
|
243 |
-
* Added an option for hide "Share This!!" button on page/post
|
244 |
-
|
245 |
-
= 2.1 =
|
246 |
-
* Fixed share buttons css issues
|
247 |
-
* Fixed some minor js conflict issues
|
248 |
-
|
249 |
-
= 2.0 =
|
250 |
-
* Fixed pinterest share image issue
|
251 |
-
* Fixed youtube buttons url issue
|
252 |
-
* modify layout of plugin settings page
|
253 |
-
* Added options for define the buttons image alt text
|
254 |
-
* Released Pro Version 1.6
|
255 |
-
|
256 |
-
= 1.9 =
|
257 |
-
* Released Pro Version 1.3
|
258 |
-
* Fixed all suggested issues by users
|
259 |
-
* Fixed css conflict issues
|
260 |
-
* Added Stumbleupon and Reddit buttons to social share buttons
|
261 |
-
* Minify CSS
|
262 |
-
|
263 |
-
= 1.8 =
|
264 |
-
* Released Pro Version 1.1
|
265 |
-
* Added new bottom position option for floating sidebar
|
266 |
-
* Modify CSS
|
267 |
-
|
268 |
-
= 1.7 =
|
269 |
-
* Released Pro Version
|
270 |
-
* Added an option disable floating sidebar on home page
|
271 |
-
* Fixed share url issue on home page
|
272 |
-
|
273 |
-
= 1.6 =
|
274 |
-
* Added new option for disable floating sidebar for mobile site
|
275 |
-
* Added two new Stumbleupon and Reddit buttons
|
276 |
-
* Added options for define Pinterest Share images
|
277 |
-
* Fixed show/hide button issue
|
278 |
-
|
279 |
-
= 1.5 =
|
280 |
-
* Make plugin settings page more stylish
|
281 |
-
* Added a new option for remove show/hide buttions
|
282 |
-
* Added an option for change position of social share buttons
|
283 |
-
* Make "Share This!" button text editable
|
284 |
-
* Add Youtube button
|
285 |
-
* Change image opacity on hover
|
286 |
-
|
287 |
-
= 1.4 =
|
288 |
-
* Added an options for define the background color of custom social share buttons
|
289 |
-
* Added a new options for show/hide the buttions, so now if you will be click on hide buttons and then go to next page OR reload same page,then buttons will be not publish in front end,so buttons status will be remain until you will not change the their status by click on show/hide buttons
|
290 |
-
* Added an options for manage the general text (like "Show buttons", "Hide buttons"..etc)
|
291 |
-
* Fixed some JS issues
|
292 |
-
|
293 |
-
= 1.3 =
|
294 |
-
* Added an options for add the social share buttons on bottom of the content on every post/pages
|
295 |
-
|
296 |
-
= 1.2 =
|
297 |
-
* Fixed button image gap issue for right position
|
298 |
-
* Added new option for set the delay time to publish the share butttons
|
299 |
-
|
300 |
-
= 1.1 =
|
301 |
-
* Fixed the right float sidebar issue
|
302 |
-
* Added new option for define the margin from TOP
|
303 |
-
* Added the show/hide buttons
|
304 |
-
* On Mail buttons :by default set current page title as a mail subject-line and page link in mail-body
|
305 |
-
|
306 |
-
= 1.0 =
|
307 |
-
* First stable release
|
1 |
+
=== Custom Share Buttons with Floating Sidebar ===
|
2 |
+
Contributors: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 share floating sidebar
|
5 |
+
Requires at least: 4.0
|
6 |
+
Tested up to: 5.1.1
|
7 |
+
Stable tag: 3.7
|
8 |
+
|
9 |
+
Share buttons with extra features to sharing your website posts/pages on Facebook, Twitter, Instagram, Whatsapp, Pinterest etc.
|
10 |
+
|
11 |
+
== Description ==
|
12 |
+
|
13 |
+
= “Most Popular Social Share Plugin” = to share your website among your friends through social sites( Facebook, Twitter, Instagram, Whatsapp, Pinterest etc.) and help you to quickly grow your business.
|
14 |
+
|
15 |
+
https://youtu.be/tqnAPG5VfFY
|
16 |
+
|
17 |
+
More than 22 billion shares are viewed each and every day on the internet, with sharing becoming an increasingly important part of every website owner’s marketing strategies.
|
18 |
+
|
19 |
+
With this plugin, you can give users a tool to share your website (posts/pages/products) via their accounts on popular social networks.
|
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 |
+
|
27 |
+
=Shortcode=
|
28 |
+
|
29 |
+
[csbwfs_buttons buttons='fb,tw,li,pi,yt,re,st,ml']
|
30 |
+
|
31 |
+
fb-facebook,tw-twitter,li-linkedin,pi-pinterest,yt-youtube,re-reddit,st-stumbleupon,ml-mail
|
32 |
+
|
33 |
+
|
34 |
+
**[I want upgrade to Pro Version](https://rgaddons.wordpress.com/custom-share-buttons-with-floating-sidebar-pro/)**
|
35 |
+
|
36 |
+
|
37 |
+
= Features =
|
38 |
+
* Light weight (No extra JS/CSS)
|
39 |
+
* Shortcode
|
40 |
+
* An options to add Custom Image for any social button.
|
41 |
+
* An options to add background color for social button.
|
42 |
+
* Floating Sidebar
|
43 |
+
* Standard Share Buttons to every post/page
|
44 |
+
* Show/Hide options for any button
|
45 |
+
* An options to edit message ("Show Buttons","Hide Buttons"...etc)
|
46 |
+
* An options to set position of floating sidebar (Left/Right/Bottom)
|
47 |
+
* An options to set position of social buttons (Left/Right)
|
48 |
+
* An options to manage style of buttons
|
49 |
+
* An option to disable sidebar on mobile
|
50 |
+
* An advance feature for pinterest share buttons.
|
51 |
+
* An option to auto close sidebar buttons on page load
|
52 |
+
* An option to hide "Share This!!" button on page/post
|
53 |
+
* An option to show share buttons position (above content/below content)
|
54 |
+
|
55 |
+
= Go Pro =
|
56 |
+
|
57 |
+
We have also released an addon of Custom Share Buttons With Floating Sidebar which not only demonstrates the flexibility of free version, but also added some more important features.
|
58 |
+
|
59 |
+
PRO FEATURES :
|
60 |
+
|
61 |
+
https://youtu.be/QUnxtCe95Ww
|
62 |
+
|
63 |
+
* Responsive Floating Sidebar
|
64 |
+
* Shortcode
|
65 |
+
* An option to Hide Floating Sidebar On Home/Blog/Search/Category/Author pages
|
66 |
+
* An option to Hide Floating Sidebar On any post type (i.e page,post,event,product…etc)
|
67 |
+
* An option to Hide Floating Sidebar On any taxonomy type (support all custom taxonomy type)
|
68 |
+
* An Option to Show/Hide sidebar on specific page/post and on any custom post type pages as well.
|
69 |
+
* An option to Show Social Share Buttons On Home/Blog/Search/Category/Author pages
|
70 |
+
* An option to Show Social Share Buttons on any taxonomy type (support all custom taxonomy type)
|
71 |
+
* An Option to Show/Hide social share buttons on specific page/post and on any custom post type pages as well.
|
72 |
+
* Responsive Light box Contact Form (for Mail Icon)
|
73 |
+
* An option to define shortcode into light box popup
|
74 |
+
* An option to enable OG tags meta boxes to define share window content(share title, share description & share image path)
|
75 |
+
* An option to set sidebar position (left/right/bottom) for mobile
|
76 |
+
* An option to add social website official page URL for all social buttons
|
77 |
+
* Extra Buttons (Xing,Instagram,Whatsapp,Digg,Yummly,Vk, Buffer, Line, Skype, RSS, Print, G-Mail, Blogger, Tumbler, Delicious, Weibo, Telegram, Google Translate, Phone & SMS )
|
78 |
+
* An option to define twitter username as hash tag into share window.
|
79 |
+
* An option to display share count(Facebook, StumbleUpon, Pinterest, Xing and Reddit)
|
80 |
+
* An options to change social buttons image, title, background color and url (You can use any button as your own custom button)
|
81 |
+
* An options to define sorting order for all buttons
|
82 |
+
* 10 extra custom floating sidebar buttons with extra options (i.e you can define your own custom size for these buttons)
|
83 |
+
* An option to show sum of total share count for all buttons
|
84 |
+
* An options to choose different style of sidebar
|
85 |
+
* An option to define page specific sidebar position (Left/Right/Bottom) for all page
|
86 |
+
* An option to choose custom styles of social share buttons
|
87 |
+
* An option to define sidebar position for every page separately
|
88 |
+
* An option to show/hide sidebar from any specific page
|
89 |
+
* Faster support
|
90 |
+
|
91 |
+
**[Upgrade to Pro Version](https://rgaddons.wordpress.com/custom-share-buttons-with-floating-sidebar-pro/)**
|
92 |
+
|
93 |
+
|
94 |
+
For any query contact to **[plugin author](mailto:raghunath.0087@gmail.com)**
|
95 |
+
|
96 |
+
|
97 |
+
== Installation ==
|
98 |
+
|
99 |
+
Step 1.Dowanload the plugin and upload "custom-share-buttons-with-floating-sidebar" plugins file to plugin (`/wp-content/plugins/`) directory
|
100 |
+
|
101 |
+
Step 2. Activate the plugin through the Plugins menu in WordPress
|
102 |
+
|
103 |
+
Step 3. Go to Settings/"Social Share Buttons(CSBWFS)" and configure the plugin settings.
|
104 |
+
|
105 |
+
== Frequently Asked Questions ==
|
106 |
+
1.) How add floating share buttons on my website?
|
107 |
+
|
108 |
+
* After active the plugin you have must need to enable this plugin through the plugin settings.
|
109 |
+
|
110 |
+
2.) Can i change the custom share buttons images from admin?
|
111 |
+
|
112 |
+
* 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.
|
113 |
+
|
114 |
+
3.) Can i disable the floating sidebar for mobile?
|
115 |
+
|
116 |
+
* Yes,You can disable the floating sidebar by configure the plugin settings
|
117 |
+
|
118 |
+
4.) Can i define the top margin for share buttons block?
|
119 |
+
|
120 |
+
* Yes, admin can define the top margin from plugin settings page
|
121 |
+
|
122 |
+
5.) Can we add the social share buttons on bottom of every post/pages?
|
123 |
+
|
124 |
+
* Yes,you have only need to enable the "Social Share Button" from admin by plugin settings
|
125 |
+
|
126 |
+
6.) Can we add at a time only the "Floating Sidebar" OR "Social Share Buttons"?
|
127 |
+
|
128 |
+
* Yes,You have need to enable at a time only one from both "Floating Sidebar" and "Social Share Buttons"
|
129 |
+
|
130 |
+
7.) Is this mobile friendly OR is this responsive plugin?
|
131 |
+
|
132 |
+
* No,this is not a responsibe but you can use our csbwfs addon, Our CSBWFS ADDON is responsive with some new extra features.Please visit on this [site](https://rgaddons.wordpress.com/custom-share-buttons-with-floating-sidebar-pro/) for check full details about addon.
|
133 |
+
|
134 |
+
8.) Is there any option for show share count number for share buttons?
|
135 |
+
|
136 |
+
* No, there are not an option for show share count number but you can use our csbwfs addon, In CSBWFS ADDON we have given an option.Please visit on this [site](https://rgaddons.wordpress.com/custom-share-buttons-with-floating-sidebar-pro/) for check full details about addon.
|
137 |
+
|
138 |
+
9.) Is there any option for show/hide share buttons OR floating sidebar on some specific pages?
|
139 |
+
|
140 |
+
* No. this options are available in pro addon.
|
141 |
+
|
142 |
+
9.) Is there any shortcode of social share buttons?
|
143 |
+
|
144 |
+
* Yes, [csbwfs_buttons]
|
145 |
+
|
146 |
+
== Screenshots ==
|
147 |
+
|
148 |
+
1. screenshot-1.png
|
149 |
+
|
150 |
+
2. screenshot-2.png
|
151 |
+
|
152 |
+
3. screenshot-3.png
|
153 |
+
|
154 |
+
4. screenshot-4.png
|
155 |
+
|
156 |
+
5. screenshot-5.png
|
157 |
+
|
158 |
+
6. screenshot-6.png
|
159 |
+
|
160 |
+
7. screenshot-7.png
|
161 |
+
|
162 |
+
8. screenshot-8.png
|
163 |
+
|
164 |
+
9. screenshot-9.png
|
165 |
+
|
166 |
+
== Changelog ==
|
167 |
+
|
168 |
+
= 3.7 =
|
169 |
+
* Tested with latest wordpress version 5.1.1
|
170 |
+
* Removed Google+ button
|
171 |
+
|
172 |
+
= 3.6 =
|
173 |
+
* Tested with latest wordpress version 5.0.2
|
174 |
+
* Optimized code and fixed some minor issues
|
175 |
+
|
176 |
+
= 3.5 =
|
177 |
+
* Tested with latest wordpress version 4.9.7
|
178 |
+
* Fixed blog page share url issues
|
179 |
+
* Optimized code
|
180 |
+
* Released addon new version 3.5 with new features
|
181 |
+
|
182 |
+
= 3.4 =
|
183 |
+
* Tested with latest wordpress version 4.9.1
|
184 |
+
* Optimized CSS of share buttons
|
185 |
+
* Added an extra feature to Pinterest button for share to multi images
|
186 |
+
|
187 |
+
= 3.3 =
|
188 |
+
* Tested with latest wordpress version 4.8.2
|
189 |
+
* Released addon new version 3.2 with new features
|
190 |
+
* Fixed a minor bug
|
191 |
+
* Optimized code
|
192 |
+
= 3.2 =
|
193 |
+
* Tested with latest wordpress version 4.8
|
194 |
+
* Fixed a minor bug
|
195 |
+
= 3.1 =
|
196 |
+
* Tested with latest wordpress version 4.7.3
|
197 |
+
* Added an option for define to button background color of social share buttons
|
198 |
+
* Fixed show/hide buttons related bug
|
199 |
+
* Released new addon verson 3.0
|
200 |
+
|
201 |
+
= 3.0 =
|
202 |
+
* Tested with latest wordpress version 4.7
|
203 |
+
* Optimized plugin code
|
204 |
+
= 2.9 =
|
205 |
+
* Tested with latest wordpress version 4.6
|
206 |
+
* optmized CSS
|
207 |
+
* Released pro addon new verion 2.8
|
208 |
+
= 2.8 =
|
209 |
+
* Tested with latest wordpress version 4.5.3
|
210 |
+
* Minify sidebar share buttons images.
|
211 |
+
* optmized CSS
|
212 |
+
* Released addon new verion 2.7
|
213 |
+
= 2.7 =
|
214 |
+
* Tested with latest wordpress version 4.5.2
|
215 |
+
* Fixed linkdin button spelling error.
|
216 |
+
* Fixed + sign issue for mail button
|
217 |
+
|
218 |
+
= 2.6 =
|
219 |
+
* Tested with latest wordpress version 4.5
|
220 |
+
* Fixed buttons hover animation effect issue.
|
221 |
+
* Optimized image, html and css
|
222 |
+
* Updated home page conditions for show/hide social buttons
|
223 |
+
|
224 |
+
= 2.5 =
|
225 |
+
* Fixed upload image issue.
|
226 |
+
* Added reset button for reset to images/title for sidebar and social buttons.
|
227 |
+
* Optimized js code for floating sidebar
|
228 |
+
* Optimized design and css of social share buttons
|
229 |
+
|
230 |
+
= 2.4 =
|
231 |
+
* Fixed share url issue for custom post type.
|
232 |
+
* Fixed show/hide share buttons issues
|
233 |
+
* Tested with wordpress latest version
|
234 |
+
|
235 |
+
= 2.3 =
|
236 |
+
* update code to display content into footer section
|
237 |
+
* Added an option for define position of share buttons (below/above or content)
|
238 |
+
* Fixed some minor js/css issue
|
239 |
+
|
240 |
+
= 2.2 =
|
241 |
+
* Fixed double time open share url issue
|
242 |
+
* Added an option for auto close sidebar buttons on page load
|
243 |
+
* Added an option for hide "Share This!!" button on page/post
|
244 |
+
|
245 |
+
= 2.1 =
|
246 |
+
* Fixed share buttons css issues
|
247 |
+
* Fixed some minor js conflict issues
|
248 |
+
|
249 |
+
= 2.0 =
|
250 |
+
* Fixed pinterest share image issue
|
251 |
+
* Fixed youtube buttons url issue
|
252 |
+
* modify layout of plugin settings page
|
253 |
+
* Added options for define the buttons image alt text
|
254 |
+
* Released Pro Version 1.6
|
255 |
+
|
256 |
+
= 1.9 =
|
257 |
+
* Released Pro Version 1.3
|
258 |
+
* Fixed all suggested issues by users
|
259 |
+
* Fixed css conflict issues
|
260 |
+
* Added Stumbleupon and Reddit buttons to social share buttons
|
261 |
+
* Minify CSS
|
262 |
+
|
263 |
+
= 1.8 =
|
264 |
+
* Released Pro Version 1.1
|
265 |
+
* Added new bottom position option for floating sidebar
|
266 |
+
* Modify CSS
|
267 |
+
|
268 |
+
= 1.7 =
|
269 |
+
* Released Pro Version
|
270 |
+
* Added an option disable floating sidebar on home page
|
271 |
+
* Fixed share url issue on home page
|
272 |
+
|
273 |
+
= 1.6 =
|
274 |
+
* Added new option for disable floating sidebar for mobile site
|
275 |
+
* Added two new Stumbleupon and Reddit buttons
|
276 |
+
* Added options for define Pinterest Share images
|
277 |
+
* Fixed show/hide button issue
|
278 |
+
|
279 |
+
= 1.5 =
|
280 |
+
* Make plugin settings page more stylish
|
281 |
+
* Added a new option for remove show/hide buttions
|
282 |
+
* Added an option for change position of social share buttons
|
283 |
+
* Make "Share This!" button text editable
|
284 |
+
* Add Youtube button
|
285 |
+
* Change image opacity on hover
|
286 |
+
|
287 |
+
= 1.4 =
|
288 |
+
* Added an options for define the background color of custom social share buttons
|
289 |
+
* Added a new options for show/hide the buttions, so now if you will be click on hide buttons and then go to next page OR reload same page,then buttons will be not publish in front end,so buttons status will be remain until you will not change the their status by click on show/hide buttons
|
290 |
+
* Added an options for manage the general text (like "Show buttons", "Hide buttons"..etc)
|
291 |
+
* Fixed some JS issues
|
292 |
+
|
293 |
+
= 1.3 =
|
294 |
+
* Added an options for add the social share buttons on bottom of the content on every post/pages
|
295 |
+
|
296 |
+
= 1.2 =
|
297 |
+
* Fixed button image gap issue for right position
|
298 |
+
* Added new option for set the delay time to publish the share butttons
|
299 |
+
|
300 |
+
= 1.1 =
|
301 |
+
* Fixed the right float sidebar issue
|
302 |
+
* Added new option for define the margin from TOP
|
303 |
+
* Added the show/hide buttons
|
304 |
+
* On Mail buttons :by default set current page title as a mail subject-line and page link in mail-body
|
305 |
+
|
306 |
+
= 1.0 =
|
307 |
+
* First stable release
|