Custom Share Buttons with Floating Sidebar - Version 2.8

Version Description

  • Tested with latest wordpress version 4.5.3
    • Minify sidebar share buttons images.
    • optmized CSS
    • Released addon new verion 2.7
Download this release

Release Info

Developer india-web-developer
Plugin Icon 128x128 Custom Share Buttons with Floating Sidebar
Version 2.8
Comparing to
See all releases

Code changes from version 2.7 to 2.8

csbwfs-class.php CHANGED
@@ -282,7 +282,7 @@ if(is_category())
282
  // $shareurl =home_url('/');
283
  $ShareTitle=get_bloginfo('name');
284
  }
285
- $shareurl = csbwfs_get_current_page_url($_SERVER);
286
  /* Set title and url for home page */
287
  if(is_home() || is_front_page())
288
  {
@@ -298,35 +298,35 @@ $ShareTitle= htmlspecialchars(rawurlencode($ShareTitle));
298
 
299
  //get facebook button image
300
  if($pluginOptionsVal['csbwfs_fb_image']!=''){ $fImg=$pluginOptionsVal['csbwfs_fb_image'];}
301
- else{$fImg=plugins_url('images/fb.png',__FILE__);}
302
  //get twitter button image
303
  if($pluginOptionsVal['csbwfs_tw_image']!=''){ $tImg=$pluginOptionsVal['csbwfs_tw_image'];}
304
- else{$tImg=plugins_url('images/tw.png',__FILE__);}
305
  //get Linkedin button image
306
  if($pluginOptionsVal['csbwfs_li_image']!=''){ $lImg=$pluginOptionsVal['csbwfs_li_image'];}
307
- else{$lImg=plugins_url('images/in.png',__FILE__);}
308
  //get mail button image
309
  if($pluginOptionsVal['csbwfs_mail_image']!=''){ $mImg=$pluginOptionsVal['csbwfs_mail_image'];}
310
- else{$mImg=plugins_url('images/ml.png',__FILE__);}
311
  //get google plus button image
312
  if($pluginOptionsVal['csbwfs_gp_image']!=''){ $gImg=$pluginOptionsVal['csbwfs_gp_image'];}
313
- else{$gImg=plugins_url('images/gp.png',__FILE__);}
314
  //get pinterest button image
315
 
316
  if($pluginOptionsVal['csbwfs_pin_image']!=''){ $pImg=$pluginOptionsVal['csbwfs_pin_image'];}
317
- else{$pImg=plugins_url('images/pinit.png',__FILE__);}
318
 
319
  //get youtube button image
320
  if(isset($pluginOptionsVal['csbwfs_yt_image']) && $pluginOptionsVal['csbwfs_yt_image']!=''){ $ytImg=$pluginOptionsVal['csbwfs_yt_image'];}
321
- else{$ytImg=plugins_url('images/youtube.png',__FILE__);}
322
 
323
  //get reddit plus button image
324
  if(isset($pluginOptionsVal['csbwfs_re_image']) && $pluginOptionsVal['csbwfs_re_image']!=''){ $reImg=$pluginOptionsVal['csbwfs_re_image'];}
325
- else{$reImg=plugins_url('images/reddit.png',__FILE__);}
326
 
327
  //get stumbleupon button image
328
  if(isset($pluginOptionsVal['csbwfs_st_image']) && $pluginOptionsVal['csbwfs_st_image']!=''){ $stImg=$pluginOptionsVal['csbwfs_st_image'];}
329
- else{$stImg=plugins_url('images/stumbleupon.png',__FILE__);}
330
 
331
 
332
  /* Get All buttons Image Alt/Title */
@@ -430,66 +430,128 @@ $isActiveHideShowBtn='yes';
430
  else:
431
  $isActiveHideShowBtn='no';
432
  endif;
433
- $flitingSidebarContent='<div id="csbwfs-delaydiv"><div class="csbwfs-social-widget" '.$idName.' title="'.$sharemsg.'" '.$style.'>';
434
 
435
  if($isActiveHideShowBtn!='yes') :
436
- $flitingSidebarContent .= '<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>';
437
  endif;
438
 
439
- $flitingSidebarContent .= '<div id="csbwfs-social-inner">';
440
 
441
  /** FB */
442
  if($pluginOptionsVal['csbwfs_fpublishBtn']!=''):
443
- $flitingSidebarContent .='<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.'><img src="'.$fImg.'" alt="'.$fImgAlt.'" width="35" height="35" ></a></div></div>';
 
 
 
 
 
 
 
444
  endif;
445
 
446
  /** TW */
447
  if($pluginOptionsVal['csbwfs_tpublishBtn']!=''):
448
- $flitingSidebarContent .='<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.'><img src="'.$tImg.'" alt="'.$tImgAlt.'" width="35" height="35" ></a></div></div>';
 
 
 
 
 
 
 
 
449
  endif;
450
 
451
  /** GP */
452
  if($pluginOptionsVal['csbwfs_gpublishBtn']!=''):
453
- $flitingSidebarContent .='<div class="csbwfs-sbutton csbwfsbtns"><div id="csbwfs-gp" class="csbwfs-gp"><a href="javascript:" onclick="javascript:window.open(\'//plus.google.com/share?url='.$shareurl.'\',\'\',\'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=800\');return false;" title="'.$gImgAlt.'" '.$gImgbg.'><img src="'.$gImg.'" alt="'.$gImgAlt.'" width="35" height="35" ></a></div></div>';
 
 
 
 
 
 
 
454
  endif;
455
 
456
  /** LI */
457
  if($pluginOptionsVal['csbwfs_lpublishBtn']!=''):
458
- $flitingSidebarContent .='<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.'><img src="'.$lImg.'" alt="'.$lImgAlt.'" width="35" height="35" ></a></div></div>';
 
 
 
 
 
 
 
459
  endif;
460
 
461
  /** PIN */
462
  if($pluginOptionsVal['csbwfs_ppublishBtn']!=''):
463
- $flitingSidebarContent .='<div class="csbwfs-sbutton csbwfsbtns"><div id="csbwfs-pin" class="csbwfs-pin"><a onclick="window.open(\'//pinterest.com/pin/create/button/?url='.$shareurl.'&amp;media='.$pinShareImg.'&amp;description='.$ShareTitle.' :'.$shareurl.'\',\'pinIt\',\'toolbar=0,status=0,width=800,height=500\');" href="javascript:void(0);" '.$pImgbg.' title="'.$pImgAlt.'"><img src="'.$pImg.'" alt="'.$pImgAlt.'" width="35" height="35" ></a></div></div>';
464
- endif;
465
-
466
- /** YT */
467
- if(isset($pluginOptionsVal['csbwfs_ytpublishBtn']) && $pluginOptionsVal['csbwfs_ytpublishBtn']!=''):
468
- $flitingSidebarContent .='<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.'"><img src="'.$ytImg.'" alt="'.$ytImgAlt.'" width="35" height="35" ></a></div></div>';
 
 
469
  endif;
470
 
471
  /** Reddit */
472
  if(isset($pluginOptionsVal['csbwfs_republishBtn']) && $pluginOptionsVal['csbwfs_republishBtn']!=''):
473
- $flitingSidebarContent .='<div class="csbwfs-sbutton csbwfsbtns"><div id="csbwfs-re" class="csbwfs-re"><a onclick="window.open(\'//reddit.com/submit?url='.$shareurl.'&amp;title='.$ShareTitle.'\',\'Reddit\',\'toolbar=0,status=0,width=1000,height=800\');" href="javascript:void(0);" '.$reImgbg.' title="'.$reImgAlt.'"><img src="'.$reImg.'" alt="'.$reImgAlt.'" width="35" height="35" ></a></div></div>';
 
 
 
 
 
 
 
474
  endif;
475
 
476
  /** Stumbleupon */
477
  if(isset($pluginOptionsVal['csbwfs_stpublishBtn']) && $pluginOptionsVal['csbwfs_stpublishBtn']!=''):
478
- $flitingSidebarContent .='<div class="csbwfs-sbutton csbwfsbtns"><div id="csbwfs-st" class="csbwfs-st"><a onclick="window.open(\'//www.stumbleupon.com/submit?url='.$shareurl.'&amp;title='.$ShareTitle.'\',\'Stumbleupon\',\'toolbar=0,status=0,width=1000,height=800\');" href="javascript:void(0);" '.$stImgbg.' title="'.$stImgAlt.'"><img src="'. $stImg.'" alt="'.$stImgAlt.'" width="35" height="35" ></a></div></div>';
 
 
 
 
 
 
 
479
  endif;
480
-
 
 
 
 
 
 
 
 
 
 
481
  /** Mail*/
482
  if($pluginOptionsVal['csbwfs_mpublishBtn']!=''):
483
- $flitingSidebarContent .='<div class="csbwfs-sbutton csbwfsbtns"><div id="csbwfs-ml" class="csbwfs-ml"><a href="mailto:'.$mailMsg.'" title="'.$mImgAlt.'" '.$mImgbg.' ><img src="'.$mImg.'" alt="'.$mImgAlt.'" width="35" height="35" ></a></div></div>';
 
 
 
 
 
 
 
484
  endif;
485
 
486
- $flitingSidebarContent .='</div>'; //End social-inner
487
 
488
  if($isActiveHideShowBtn!='yes') :
489
- $flitingSidebarContent .='<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>';
490
  endif;
491
 
492
- $flitingSidebarContent .='</div></div>'; //End social-inner
493
 
494
 
495
  /** Check conditions */
@@ -498,16 +560,16 @@ $flitingSidebarContent .='</div></div>'; //End social-inner
498
  if(isset($pluginOptionsVal['csbwfs_hide_home'])){$hideOnHome=$pluginOptionsVal['csbwfs_hide_home']; }else{ $hideOnHome='';}
499
 
500
  if((is_home() && is_front_page()) && $hideOnHome=='yes'):
501
- $flitingSidebarContent='';
502
  endif;
503
  if(is_front_page() && $hideOnHome=='yes' ):
504
- $flitingSidebarContent='';
505
  endif;
506
  /** hide on 404 pages */
507
- if(is_404()):$flitingSidebarContent='';endif;
508
 
509
 
510
- print $flitingSidebarContent;
511
 
512
 
513
  }
@@ -534,7 +596,7 @@ if(isset($pluginOptionsVal['csbwfs_defaultfeaturedshrimg']) && $pluginOptionsVal
534
  if(is_category())
535
  {
536
  $category_id = get_query_var('cat');
537
- //$shareurl =get_category_link( $category_id );
538
  $cats = get_the_category();
539
  $ShareTitle=$cats[0]->name;
540
  }elseif(is_page() || is_single())
@@ -545,23 +607,23 @@ if(is_category())
545
 
546
  $pinShareImg= $large_image_url[0] ;
547
  }
548
- //$shareurl=get_permalink($post->ID);
549
  $ShareTitle=$post->post_title;
550
  }
551
  else
552
  {
553
- //$shareurl =home_url('/');
554
  $ShareTitle=get_bloginfo('name');
555
  }
556
 
557
  /* Set title and url for home page */
558
  if(is_home() || is_front_page())
559
  {
560
- // $shareurl =home_url('/');
561
  $ShareTitle=get_bloginfo('name');
562
  }
563
 
564
- $shareurl = csbwfs_get_current_page_url($_SERVER);
565
 
566
  $ShareTitle= htmlspecialchars(rawurlencode($ShareTitle));
567
 
@@ -653,79 +715,144 @@ endif;
653
  /* Facebook*/
654
  if($pluginOptionsVal['csbwfs_fpublishBtn']!=''):
655
  $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;"
656
- target="_blank" title="'.$fImgAlt.'"> <img src="'.$fImg.'" alt="'.$fImgAlt.'" width="35" height="35" ></a></div></div>';
 
 
 
 
 
 
657
  endif;
658
 
659
  /* Twitter */
660
  if($pluginOptionsVal['csbwfs_tpublishBtn']!=''):
661
- $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.'&nbsp;&nbsp;\', \'_blank\', \'width=800,height=300\')" title="'.$tImgAlt.'"><img src="'.$tImg.'" alt="'.$tImgAlt.'" width="35" height="35" ></a></div></div>';
 
 
 
 
 
 
 
662
  endif;
663
 
664
  /* Google Plus */
665
  if($pluginOptionsVal['csbwfs_gpublishBtn']!=''):
666
- $shareButtonContent.='<div class="csbwfs-sbutton-post"><div id="gp-p" class="csbwfs-gp"><a href="javascript:" onclick="javascript:window.open(\'//plus.google.com/share?url='.$shareurl.'\',\'\',\'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=800\');return false;" title="'.$gImgAlt.'"> <img src="'.$gImg.'" alt="'.$gImgAlt.'" width="35" height="35" ></a></div>
667
- </div>';
 
 
 
 
 
 
668
  endif;
669
 
670
  /* Linkedin */
671
  if($pluginOptionsVal['csbwfs_lpublishBtn']!=''):
672
- $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.'"><img src="'.$lImg.'" alt="'.$lImgAlt.'" width="35" height="35" ></a></div></div>';
 
 
 
 
 
 
 
673
  endif;
674
 
675
  /* Pinterest */
676
  if($pluginOptionsVal['csbwfs_ppublishBtn']!=''):
677
- $shareButtonContent.='<div class="csbwfs-sbutton-post"><div id="pin-p" class="csbwfs-pin"><a onclick="window.open(\'//www.pinterest.com/pin/create/button/?url='.$shareurl.'&amp;media='.$pinShareImg.'&amp;description='.$ShareTitle.':'.$shareurl.'\',\'pinIt\',\'toolbar=0,status=0,width=620,height=500\');" href="javascript:void(0);" title="'.$pImgAlt.'"><img src="'.$pImg.'" alt="'.$pImgAlt.'" width="35" height="35" ></a></div></div>';
 
 
 
 
 
 
 
678
  endif;
679
-
680
- /* Youtube */
681
- if(isset($pluginOptionsVal['csbwfs_ytpublishBtn']) && $pluginOptionsVal['csbwfs_ytpublishBtn']!=''):
682
- $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.'"><img src="'.$ytImg.'" alt="'.$ytImgAlt.'" width="35" height="35" ></a></div></div>';
 
 
 
 
 
 
683
  endif;
684
- /* Stumbleen */
685
  if(isset($pluginOptionsVal['csbwfs_stpublishBtn']) && $pluginOptionsVal['csbwfs_stpublishBtn']!=''):
686
- $shareButtonContent.='<div class="csbwfs-sbutton-post"><div id="st-p" class="csbwfs-st"><a onclick="window.open(\'//www.stumbleupon.com/submit?url='.$shareurl.'&amp;title='.$ShareTitle.'\',\'Stumbleupon\',\'toolbar=0,status=0,width=1000,height=800\');" href="javascript:void(0);" title="'.$stImgAlt.'"><img src="'.$stImg.'" alt="'.$stImgAlt.'" width="35" height="35" ></a></div></div>';
 
 
 
 
 
 
 
687
  endif;
688
- /* Reddit */
689
- if(isset($pluginOptionsVal['csbwfs_republishBtn']) && $pluginOptionsVal['csbwfs_republishBtn']!=''):
690
- $shareButtonContent.='<div class="csbwfs-sbutton-post"><div id="re-p" class="csbwfs-re"><a onclick="window.open(\'//reddit.com/submit?url='.$shareurl.'&amp;title='.$ShareTitle.'\',\'Reddit\',\'toolbar=0,status=0,width=1000,height=800\');" href="javascript:void(0);" title="'.$reImgAlt.'"><img src="'.$reImg.'" alt="'.$reImgAlt.'" width="35" height="35" ></a></div></div>';
 
 
 
 
 
 
 
691
  endif;
692
  /* Email */
693
  if($pluginOptionsVal['csbwfs_mpublishBtn']!=''):
694
- $shareButtonContent.='<div class="csbwfs-sbutton-post"><div id="ml-p" class="csbwfs-ml"><a href="mailto:'.$mailMsg.'" title="'.$mImgAlt.'"><img src="'.$mImg.'" alt="'.$mImgAlt.'" width="35" height="35"></a></div></div>';
 
 
 
 
 
 
 
695
  endif;
696
  $shareButtonContent.='</div>';
 
697
  // Returns the content.
698
- if((is_home() && is_front_page()) && $pluginOptionsVal['csbwfs_page_hide_home']!='yes'):
699
- $shareButtonContent='';
 
 
 
700
  endif;
701
-
702
- if(is_front_page() && $pluginOptionsVal['csbwfs_page_hide_home']!='yes'):
703
- $shareButtonContent='';
704
  endif;
705
-
706
- if(is_single() && $pluginOptionsVal['csbwfs_page_hide_post']!='yes'):
707
- $shareButtonContent='';
 
708
  endif;
709
-
710
- if(is_page() && $pluginOptionsVal['csbwfs_page_hide_page']!='yes'):
711
- $shareButtonContent='';
 
712
  endif;
713
- if(is_archive() && $pluginOptionsVal['csbwfs_page_hide_archive']!='yes'):
714
- $shareButtonContent='';
 
715
  endif;
716
-
717
  if(is_404()):
718
- $shareButtonContent='';
 
719
  endif;
720
  /** Buttons position on content */
721
  if(isset($pluginOptionsVal['csbwfs_btn_display']) && $pluginOptionsVal['csbwfs_btn_display']=='above')
722
- {$displyPos='above';}else {$displyPos='default';}
723
- if($shareButtonContent!='' && $displyPos=='above'):
724
- return $shareButtonContent.$content;
725
- elseif($shareButtonContent!='' && $displyPos=='default'):
726
- return $content.$shareButtonContent;
727
- else:
728
- return $content;
729
- endif;
730
  }
731
  ?>
282
  // $shareurl =home_url('/');
283
  $ShareTitle=get_bloginfo('name');
284
  }
285
+ $shareurl = htmlspecialchars(csbwfs_get_current_page_url($_SERVER), ENT_QUOTES, 'UTF-8');
286
  /* Set title and url for home page */
287
  if(is_home() || is_front_page())
288
  {
298
 
299
  //get facebook button image
300
  if($pluginOptionsVal['csbwfs_fb_image']!=''){ $fImg=$pluginOptionsVal['csbwfs_fb_image'];}
301
+ else{$fImg='';}
302
  //get twitter button image
303
  if($pluginOptionsVal['csbwfs_tw_image']!=''){ $tImg=$pluginOptionsVal['csbwfs_tw_image'];}
304
+ else{$tImg='';}
305
  //get Linkedin button image
306
  if($pluginOptionsVal['csbwfs_li_image']!=''){ $lImg=$pluginOptionsVal['csbwfs_li_image'];}
307
+ else{$lImg='';}
308
  //get mail button image
309
  if($pluginOptionsVal['csbwfs_mail_image']!=''){ $mImg=$pluginOptionsVal['csbwfs_mail_image'];}
310
+ else{$mImg='';}
311
  //get google plus button image
312
  if($pluginOptionsVal['csbwfs_gp_image']!=''){ $gImg=$pluginOptionsVal['csbwfs_gp_image'];}
313
+ else{$gImg='';}
314
  //get pinterest button image
315
 
316
  if($pluginOptionsVal['csbwfs_pin_image']!=''){ $pImg=$pluginOptionsVal['csbwfs_pin_image'];}
317
+ else{$pImg='';}
318
 
319
  //get youtube button image
320
  if(isset($pluginOptionsVal['csbwfs_yt_image']) && $pluginOptionsVal['csbwfs_yt_image']!=''){ $ytImg=$pluginOptionsVal['csbwfs_yt_image'];}
321
+ else{$ytImg='';}
322
 
323
  //get reddit plus button image
324
  if(isset($pluginOptionsVal['csbwfs_re_image']) && $pluginOptionsVal['csbwfs_re_image']!=''){ $reImg=$pluginOptionsVal['csbwfs_re_image'];}
325
+ else{$reImg='';}
326
 
327
  //get stumbleupon button image
328
  if(isset($pluginOptionsVal['csbwfs_st_image']) && $pluginOptionsVal['csbwfs_st_image']!=''){ $stImg=$pluginOptionsVal['csbwfs_st_image'];}
329
+ else{$stImg='';}
330
 
331
 
332
  /* Get All buttons Image Alt/Title */
430
  else:
431
  $isActiveHideShowBtn='no';
432
  endif;
433
+ $floatingSidebarContent='<div id="csbwfs-delaydiv"><div class="csbwfs-social-widget" '.$idName.' title="'.$sharemsg.'" '.$style.'>';
434
 
435
  if($isActiveHideShowBtn!='yes') :
436
+ $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>';
437
  endif;
438
 
439
+ $floatingSidebarContent .= '<div id="csbwfs-social-inner">';
440
 
441
  /** FB */
442
  if($pluginOptionsVal['csbwfs_fpublishBtn']!=''):
443
+ $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.'>';
444
+
445
+ if($fImg!=''){
446
+ $floatingSidebarContent .='<img src="'.$fImg.'" alt="'.$fImgAlt.'" width="35" height="35" >';
447
+ }else{
448
+ $floatingSidebarContent .='<i class="csbwfs_facebook"></i>';
449
+ }
450
+ $floatingSidebarContent .='</a></div></div>';
451
  endif;
452
 
453
  /** TW */
454
  if($pluginOptionsVal['csbwfs_tpublishBtn']!=''):
455
+ $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.'>';
456
+ if($tImg!='')
457
+ {
458
+ $floatingSidebarContent .='<img src="'.$tImg.'" alt="'.$tImgAlt.'" width="35" height="35" >';
459
+ }else{
460
+ $floatingSidebarContent .='<i class="csbwfs_twitter"></i>';
461
+ }
462
+ $floatingSidebarContent .='</a></div></div>';
463
+
464
  endif;
465
 
466
  /** GP */
467
  if($pluginOptionsVal['csbwfs_gpublishBtn']!=''):
468
+ $floatingSidebarContent .='<div class="csbwfs-sbutton csbwfsbtns"><div id="csbwfs-gp" class="csbwfs-gp"><a href="javascript:" onclick="javascript:window.open(\'//plus.google.com/share?url='.$shareurl.'\',\'\',\'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=800\');return false;" title="'.$gImgAlt.'" '.$gImgbg.'>';
469
+ if($gImg!='')
470
+ {
471
+ $floatingSidebarContent .='<img src="'.$gImg.'" alt="'.$gImgAlt.'" width="35" height="35" >';
472
+ }else{
473
+ $floatingSidebarContent .='<i class="csbwfs_plus"></i>';
474
+ }
475
+ $floatingSidebarContent .='</a></div></div>';
476
  endif;
477
 
478
  /** LI */
479
  if($pluginOptionsVal['csbwfs_lpublishBtn']!=''):
480
+ $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.'>';
481
+ if($lImg!='')
482
+ {
483
+ $floatingSidebarContent .='<img src="'.$lImg.'" alt="'.$lImgAlt.'" width="35" height="35" >';
484
+ }else{
485
+ $floatingSidebarContent .='<i class="csbwfs_linkedin"></i>';
486
+ }
487
+ $floatingSidebarContent .='</a></div></div>';
488
  endif;
489
 
490
  /** PIN */
491
  if($pluginOptionsVal['csbwfs_ppublishBtn']!=''):
492
+ $floatingSidebarContent .='<div class="csbwfs-sbutton csbwfsbtns"><div id="csbwfs-pin" class="csbwfs-pin"><a onclick="window.open(\'//pinterest.com/pin/create/button/?url='.$shareurl.'&amp;media='.$pinShareImg.'&amp;description='.$ShareTitle.' :'.$shareurl.'\',\'pinIt\',\'toolbar=0,status=0,width=800,height=500\');" href="javascript:void(0);" '.$pImgbg.' title="'.$pImgAlt.'">';
493
+ if($pImg!='')
494
+ {
495
+ $floatingSidebarContent .='<img src="'.$pImg.'" alt="'.$pImgAlt.'" width="35" height="35" >';
496
+ }else{
497
+ $floatingSidebarContent .='<i class="csbwfs_pinterest"></i>';
498
+ }
499
+ $floatingSidebarContent .='</a></div></div>';
500
  endif;
501
 
502
  /** Reddit */
503
  if(isset($pluginOptionsVal['csbwfs_republishBtn']) && $pluginOptionsVal['csbwfs_republishBtn']!=''):
504
+ $floatingSidebarContent .='<div class="csbwfs-sbutton csbwfsbtns"><div id="csbwfs-re" class="csbwfs-re"><a onclick="window.open(\'//reddit.com/submit?url='.$shareurl.'&amp;title='.$ShareTitle.'\',\'Reddit\',\'toolbar=0,status=0,width=1000,height=800\');" href="javascript:void(0);" '.$reImgbg.' title="'.$reImgAlt.'">';
505
+ if($reImg!='')
506
+ {
507
+ $floatingSidebarContent .='<img src="'.$reImg.'" alt="'.$reImgAlt.'" width="35" height="35" >';
508
+ }else{
509
+ $floatingSidebarContent .='<i class="csbwfs_reddit"></i>';
510
+ }
511
+ $floatingSidebarContent .='</a></div></div>';
512
  endif;
513
 
514
  /** Stumbleupon */
515
  if(isset($pluginOptionsVal['csbwfs_stpublishBtn']) && $pluginOptionsVal['csbwfs_stpublishBtn']!=''):
516
+ $floatingSidebarContent .='<div class="csbwfs-sbutton csbwfsbtns"><div id="csbwfs-st" class="csbwfs-st"><a onclick="window.open(\'//www.stumbleupon.com/submit?url='.$shareurl.'&amp;title='.$ShareTitle.'\',\'Stumbleupon\',\'toolbar=0,status=0,width=1000,height=800\');" href="javascript:void(0);" '.$stImgbg.' title="'.$stImgAlt.'">';
517
+ if($stImg!='')
518
+ {
519
+ $floatingSidebarContent .='<img src="'.$stImg.'" alt="'.$stImgAlt.'" width="35" height="35" >';
520
+ }else{
521
+ $floatingSidebarContent .='<i class="csbwfs_stumbleupon"></i>';
522
+ }
523
+ $floatingSidebarContent .='</a></div></div>';
524
  endif;
525
+ /** YT */
526
+ if(isset($pluginOptionsVal['csbwfs_ytpublishBtn']) && $pluginOptionsVal['csbwfs_ytpublishBtn']!=''):
527
+ $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.'">';
528
+ if($ytImg!='')
529
+ {
530
+ $floatingSidebarContent .='<img src="'.$ytImg.'" alt="'.$ytImgAlt.'" width="35" height="35" >';
531
+ }else{
532
+ $floatingSidebarContent .='<i class="csbwfs_youtube"></i>';
533
+ }
534
+ $floatingSidebarContent .='</a></div></div>';
535
+ endif;
536
  /** Mail*/
537
  if($pluginOptionsVal['csbwfs_mpublishBtn']!=''):
538
+ $floatingSidebarContent .='<div class="csbwfs-sbutton csbwfsbtns"><div id="csbwfs-ml" class="csbwfs-ml"><a href="mailto:'.$mailMsg.'" title="'.$mImgAlt.'" '.$mImgbg.' >';
539
+ if($mImg!='')
540
+ {
541
+ $floatingSidebarContent .='<img src="'.$mImg.'" alt="'.$mImgAlt.'" width="35" height="35" >';
542
+ }else{
543
+ $floatingSidebarContent .='<i class="csbwfs_mail"></i>';
544
+ }
545
+ $floatingSidebarContent .='</a></div></div>';
546
  endif;
547
 
548
+ $floatingSidebarContent .='</div>'; //End social-inner
549
 
550
  if($isActiveHideShowBtn!='yes') :
551
+ $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>';
552
  endif;
553
 
554
+ $floatingSidebarContent .='</div></div>'; //End social-inner
555
 
556
 
557
  /** Check conditions */
560
  if(isset($pluginOptionsVal['csbwfs_hide_home'])){$hideOnHome=$pluginOptionsVal['csbwfs_hide_home']; }else{ $hideOnHome='';}
561
 
562
  if((is_home() && is_front_page()) && $hideOnHome=='yes'):
563
+ $floatingSidebarContent='';
564
  endif;
565
  if(is_front_page() && $hideOnHome=='yes' ):
566
+ $floatingSidebarContent='';
567
  endif;
568
  /** hide on 404 pages */
569
+ if(is_404()):$floatingSidebarContent='';endif;
570
 
571
 
572
+ print $floatingSidebarContent;
573
 
574
 
575
  }
596
  if(is_category())
597
  {
598
  $category_id = get_query_var('cat');
599
+ $shareurl =get_category_link( $category_id );
600
  $cats = get_the_category();
601
  $ShareTitle=$cats[0]->name;
602
  }elseif(is_page() || is_single())
607
 
608
  $pinShareImg= $large_image_url[0] ;
609
  }
610
+ $shareurl=get_permalink($post->ID);
611
  $ShareTitle=$post->post_title;
612
  }
613
  else
614
  {
615
+ $shareurl =home_url('/');
616
  $ShareTitle=get_bloginfo('name');
617
  }
618
 
619
  /* Set title and url for home page */
620
  if(is_home() || is_front_page())
621
  {
622
+ $shareurl =home_url('/');
623
  $ShareTitle=get_bloginfo('name');
624
  }
625
 
626
+ $shareurl = htmlspecialchars($shareurl, ENT_QUOTES, 'UTF-8');
627
 
628
  $ShareTitle= htmlspecialchars(rawurlencode($ShareTitle));
629
 
715
  /* Facebook*/
716
  if($pluginOptionsVal['csbwfs_fpublishBtn']!=''):
717
  $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;"
718
+ target="_blank" title="'.$fImgAlt.'">';
719
+ if($fImg!=''){
720
+ $shareButtonContent .='<img src="'.$fImg.'" alt="'.$fImgAlt.'" width="35" height="35" >';
721
+ }else{
722
+ $shareButtonContent .='<i class="csbwfs_facebook"></i>';
723
+ }
724
+ $shareButtonContent .='</a></div></div>';
725
  endif;
726
 
727
  /* Twitter */
728
  if($pluginOptionsVal['csbwfs_tpublishBtn']!=''):
729
+ $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.'&nbsp;&nbsp;\', \'_blank\', \'width=800,height=300\')" title="'.$tImgAlt.'">';
730
+ if($tImg!='')
731
+ {
732
+ $shareButtonContent .='<img src="'.$tImg.'" alt="'.$tImgAlt.'" width="35" height="35" >';
733
+ }else{
734
+ $shareButtonContent .='<i class="csbwfs_twitter"></i>';
735
+ }
736
+ $shareButtonContent .='</a></div></div>';
737
  endif;
738
 
739
  /* Google Plus */
740
  if($pluginOptionsVal['csbwfs_gpublishBtn']!=''):
741
+ $shareButtonContent.='<div class="csbwfs-sbutton-post"><div id="gp-p" class="csbwfs-gp"><a href="javascript:" onclick="javascript:window.open(\'//plus.google.com/share?url='.$shareurl.'\',\'\',\'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=800\');return false;" title="'.$gImgAlt.'">';
742
+ if($gImg!='')
743
+ {
744
+ $shareButtonContent .='<img src="'.$gImg.'" alt="'.$gImgAlt.'" width="35" height="35" >';
745
+ }else{
746
+ $shareButtonContent .='<i class="csbwfs_plus"></i>';
747
+ }
748
+ $shareButtonContent .='</a></div></div>';
749
  endif;
750
 
751
  /* Linkedin */
752
  if($pluginOptionsVal['csbwfs_lpublishBtn']!=''):
753
+ $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.'">';
754
+ if($lImg!='')
755
+ {
756
+ $shareButtonContent .='<img src="'.$lImg.'" alt="'.$lImgAlt.'" width="35" height="35" >';
757
+ }else{
758
+ $shareButtonContent .='<i class="csbwfs_linkedin"></i>';
759
+ }
760
+ $shareButtonContent .='</a></div></div>';
761
  endif;
762
 
763
  /* Pinterest */
764
  if($pluginOptionsVal['csbwfs_ppublishBtn']!=''):
765
+ $shareButtonContent.='<div class="csbwfs-sbutton-post"><div id="pin-p" class="csbwfs-pin"><a onclick="window.open(\'//www.pinterest.com/pin/create/button/?url='.$shareurl.'&amp;media='.$pinShareImg.'&amp;description='.$ShareTitle.':'.$shareurl.'\',\'pinIt\',\'toolbar=0,status=0,width=620,height=500\');" href="javascript:void(0);" title="'.$pImgAlt.'">';
766
+ if($pImg!='')
767
+ {
768
+ $shareButtonContent .='<img src="'.$pImg.'" alt="'.$pImgAlt.'" width="35" height="35" >';
769
+ }else{
770
+ $shareButtonContent .='<i class="csbwfs_pinterest"></i>';
771
+ }
772
+ $shareButtonContent .='</a></div></div>';
773
  endif;
774
+ /* Reddit */
775
+ if(isset($pluginOptionsVal['csbwfs_republishBtn']) && $pluginOptionsVal['csbwfs_republishBtn']!=''):
776
+ $shareButtonContent.='<div class="csbwfs-sbutton-post"><div id="re-p" class="csbwfs-re"><a onclick="window.open(\'//reddit.com/submit?url='.$shareurl.'&amp;title='.$ShareTitle.'\',\'Reddit\',\'toolbar=0,status=0,width=1000,height=800\');" href="javascript:void(0);" title="'.$reImgAlt.'">';
777
+ if($reImg!='')
778
+ {
779
+ $shareButtonContent .='<img src="'.$reImg.'" alt="'.$reImgAlt.'" width="35" height="35" >';
780
+ }else{
781
+ $shareButtonContent .='<i class="csbwfs_reddit"></i>';
782
+ }
783
+ $shareButtonContent .='</a></div></div>';
784
  endif;
785
+ /* Stumbleupon */
786
  if(isset($pluginOptionsVal['csbwfs_stpublishBtn']) && $pluginOptionsVal['csbwfs_stpublishBtn']!=''):
787
+ $shareButtonContent.='<div class="csbwfs-sbutton-post"><div id="st-p" class="csbwfs-st"><a onclick="window.open(\'//www.stumbleupon.com/submit?url='.$shareurl.'&amp;title='.$ShareTitle.'\',\'Stumbleupon\',\'toolbar=0,status=0,width=1000,height=800\');" href="javascript:void(0);" title="'.$stImgAlt.'">';
788
+ if($stImg!='')
789
+ {
790
+ $shareButtonContent .='<img src="'.$stImg.'" alt="'.$stImgAlt.'" width="35" height="35" >';
791
+ }else{
792
+ $shareButtonContent .='<i class="csbwfs_stumbleupon"></i>';
793
+ }
794
+ $shareButtonContent .='</a></div></div>';
795
  endif;
796
+ /* Youtube */
797
+ if(isset($pluginOptionsVal['csbwfs_ytpublishBtn']) && $pluginOptionsVal['csbwfs_ytpublishBtn']!=''):
798
+ $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.'">';
799
+ if($ytImg!='')
800
+ {
801
+ $shareButtonContent .='<img src="'.$ytImg.'" alt="'.$ytImgAlt.'" width="35" height="35" >';
802
+ }else{
803
+ $shareButtonContent .='<i class="csbwfs_youtube"></i>';
804
+ }
805
+ $shareButtonContent .='</a></div></div>';
806
  endif;
807
  /* Email */
808
  if($pluginOptionsVal['csbwfs_mpublishBtn']!=''):
809
+ $shareButtonContent.='<div class="csbwfs-sbutton-post"><div id="ml-p" class="csbwfs-ml"><a href="mailto:'.$mailMsg.'" title="'.$mImgAlt.'">';
810
+ if($mImg!='')
811
+ {
812
+ $shareButtonContent .='<img src="'.$mImg.'" alt="'.$mImgAlt.'" width="35" height="35" >';
813
+ }else{
814
+ $shareButtonContent .='<i class="csbwfs_mail"></i>';
815
+ }
816
+ $shareButtonContent .='</a></div></div>';
817
  endif;
818
  $shareButtonContent.='</div>';
819
+
820
  // Returns the content.
821
+ global $post;
822
+ $shareButtonContentReturn='';
823
+ /* DEFAULT HOME */
824
+ if((is_home() && is_front_page()) && $pluginOptionsVal['csbwfs_page_hide_home']=='yes'):
825
+ $shareButtonContentReturn=$shareButtonContent;
826
  endif;
827
+ /* STATIC front page */
828
+ if(is_front_page() && $pluginOptionsVal['csbwfs_page_hide_home']=='yes'):
829
+ $shareButtonContentReturn=$shareButtonContent;
830
  endif;
831
+
832
+ if(is_single() && $pluginOptionsVal['csbwfs_page_hide_post']=='yes'):
833
+ $shareButtonContentReturn=$shareButtonContent;
834
+ // echo 'dfff case 6';
835
  endif;
836
+ if(is_page() && $pluginOptionsVal['csbwfs_page_hide_page']=='yes'):
837
+ if(!is_front_page()):
838
+ $shareButtonContentReturn=$shareButtonContent;
839
+ endif;
840
  endif;
841
+ if(is_archive() && $pluginOptionsVal['csbwfs_page_hide_archive']=='yes'):
842
+ $shareButtonContentReturn=$shareButtonContent;
843
+ //echo 'dfff case 14';
844
  endif;
845
+
846
  if(is_404()):
847
+ $shareButtonContentReturn='';
848
+ //echo 'dfff case 17';
849
  endif;
850
  /** Buttons position on content */
851
  if(isset($pluginOptionsVal['csbwfs_btn_display']) && $pluginOptionsVal['csbwfs_btn_display']=='above')
852
+ {return $shareButtonContentReturn.$content;
853
+ }
854
+ else {
855
+ return $content.$shareButtonContentReturn;
856
+ }
 
 
 
857
  }
858
  ?>
css/csbwfs.css CHANGED
@@ -13,8 +13,8 @@
13
  .csbwfs-gp a{background:none repeat scroll 0 0 #DD4C39; }
14
  .csbwfs-li a{background:none repeat scroll 0 0 #007BB6;}
15
  .csbwfs-pin a{background:none repeat scroll 0 0 #ca2027;}
16
- .csbwfs-yt a{background:none repeat scroll 0 0 #ffffff;}
17
- .csbwfs-re a{background:none repeat scroll 0 0 #FF1A00;}
18
  .csbwfs-st a{background:none repeat scroll 0 0 #EB4924;}
19
  /* Right Position */
20
  #csbwfs-right #csbwfs-re,#csbwfs-right #csbwfs-st,#csbwfs-right #csbwfs-yt,#csbwfs-right #csbwfs-ml,#csbwfs-right #csbwfs-pin,#csbwfs-right #csbwfs-gp,#csbwfs-right #csbwfs-tw,#csbwfs-right #csbwfs-fb,#csbwfs-right #csbwfs-li a {position: absolute; right: 0;}
@@ -45,3 +45,22 @@ bottom: 0; height: 45px;
45
  .rightSocialButtonOnPage .sharethis-arrow span{padding-left: 12px;}
46
  #socialButtonOnPage .csbwfs-sbutton-post a{display:block;width:50px; height:auto;text-align: center;border:none !important;}
47
  #socialButtonOnPage .csbwfs-sbutton-post a:hover{display:block;width:50px; height:auto;text-align: center;border:none !important;}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  .csbwfs-gp a{background:none repeat scroll 0 0 #DD4C39; }
14
  .csbwfs-li a{background:none repeat scroll 0 0 #007BB6;}
15
  .csbwfs-pin a{background:none repeat scroll 0 0 #ca2027;}
16
+ .csbwfs-yt a{background:none repeat scroll 0 0 #d42026;}
17
+ .csbwfs-re a{background:none repeat scroll 0 0 #93c3e6;}
18
  .csbwfs-st a{background:none repeat scroll 0 0 #EB4924;}
19
  /* Right Position */
20
  #csbwfs-right #csbwfs-re,#csbwfs-right #csbwfs-st,#csbwfs-right #csbwfs-yt,#csbwfs-right #csbwfs-ml,#csbwfs-right #csbwfs-pin,#csbwfs-right #csbwfs-gp,#csbwfs-right #csbwfs-tw,#csbwfs-right #csbwfs-fb,#csbwfs-right #csbwfs-li a {position: absolute; right: 0;}
45
  .rightSocialButtonOnPage .sharethis-arrow span{padding-left: 12px;}
46
  #socialButtonOnPage .csbwfs-sbutton-post a{display:block;width:50px; height:auto;text-align: center;border:none !important;}
47
  #socialButtonOnPage .csbwfs-sbutton-post a:hover{display:block;width:50px; height:auto;text-align: center;border:none !important;}
48
+
49
+ /** Minify Image CSS */
50
+ .csbwfs-sbutton a i ,.csbwfs-sbutton-post a i {
51
+ display: inline-block;
52
+ height: inherit;
53
+ position: relative;
54
+ width: 32px;
55
+ background-image: url("../images/minify-social.png");
56
+
57
+ }
58
+ i.csbwfs_facebook {background-position: 68% 4%;}
59
+ i.csbwfs_twitter {background-position: 14% 4%;}
60
+ i.csbwfs_plus {background-position: 80% 4%;}
61
+ i.csbwfs_linkedin {background-position: 92% 4%;}
62
+ i.csbwfs_pinterest{background-position: 14% 20%;}
63
+ i.csbwfs_youtube {background-position: 32% 4%;}
64
+ i.csbwfs_reddit {background-position: 26% 20%;}
65
+ i.csbwfs_stumbleupon {background-position: 2% 4%;}
66
+ i.csbwfs_mail {background-position: 8% 20%;}
custom-share-buttons-with-floating-sidebar.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://www.mrwebsolution.in/
5
  Description: It's a very simple plugin for add to social share buttons on your site and you can publish buttons floating sidebar. Even you can edit share buttons if you wish
6
  Author: MR Web Solution
7
  Author URI: http://raghunathgurjar.wordpress.com
8
- Version: 2.7
9
  */
10
 
11
  /* Copyright 2015 custom-share-buttons-with-floating-sidebar (email : raghunath.0087@gmail.com)
@@ -127,16 +127,16 @@ function csbwf_sidebar_init(){
127
 
128
  endif;
129
 
130
- if(!function_exists('csbwfs_add_settings_link')):
131
  // Add settings link to plugin list page in admin
132
- function csbwfs_add_settings_link( $links ) {
133
  $settings_link = '<a href="options-general.php?page=csbwfs-settings">' . __( 'Settings', 'csbwfs' ) . '</a>';
134
  array_unshift( $links, $settings_link );
135
  return $links;
136
  }
137
  endif;
138
  $plugin = plugin_basename( __FILE__ );
139
- add_filter( "plugin_action_links_$plugin", 'csbwfs_add_settings_link' );
140
 
141
 
142
  if (isset($_GET['page']) && $_GET['page'] == 'csbwfs-settings') {
@@ -177,7 +177,7 @@ function csbwf_sidebar_admin_option_page(){ ?>
177
  <form action="options.php" method="post" id="csbwf-sidebar-admin-form">
178
 
179
  <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-support" class="csbwf-tab-links">Support</a> <a id="csbwfs-pro" class="csbwf-tab-links">GO PRO</a> </div>
180
-
181
  <div class="csbwfs-setting">
182
  <!-- General Setting -->
183
  <div class="first csbwfs-tab" id="div-csbwfs-general">
@@ -437,7 +437,7 @@ function csbwf_sidebar_admin_option_page(){ ?>
437
  <li>An option for add to any custom shortcode into lightbox</li>
438
  <li>Advance feature for choose to pinterest share image</li>
439
  <li>An option for add to OG tags content(title,image,description)</li>
440
- <li>An option for set automatically horizontal sidebar position for mobile</li>
441
  <li>An option for add to social site official page URL for all social buttons</li>
442
  <li>Extra Buttons (Google Translate,Instagram,Whatsapp,Digg,Yummly,Vk, Buffer, Line, Skype, RSS, Print, G-Mail, Blogger, Tumbler,Delicious,Weibo, Telegram &amp; SMS )</li>
443
  <li>An option for define to twitter username in thier share window.</li>
5
  Description: It's a very simple plugin for add to social share buttons on your site and you can publish buttons floating sidebar. Even you can edit share buttons if you wish
6
  Author: MR Web Solution
7
  Author URI: http://raghunathgurjar.wordpress.com
8
+ Version: 2.8
9
  */
10
 
11
  /* Copyright 2015 custom-share-buttons-with-floating-sidebar (email : raghunath.0087@gmail.com)
127
 
128
  endif;
129
 
130
+ if(!function_exists('csbwfs_pro_add_settings_link')):
131
  // Add settings link to plugin list page in admin
132
+ function csbwfs_pro_add_settings_link( $links ) {
133
  $settings_link = '<a href="options-general.php?page=csbwfs-settings">' . __( 'Settings', 'csbwfs' ) . '</a>';
134
  array_unshift( $links, $settings_link );
135
  return $links;
136
  }
137
  endif;
138
  $plugin = plugin_basename( __FILE__ );
139
+ add_filter( "plugin_action_links_$plugin", 'csbwfs_pro_add_settings_link' );
140
 
141
 
142
  if (isset($_GET['page']) && $_GET['page'] == 'csbwfs-settings') {
177
  <form action="options.php" method="post" id="csbwf-sidebar-admin-form">
178
 
179
  <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-support" class="csbwf-tab-links">Support</a> <a id="csbwfs-pro" class="csbwf-tab-links">GO PRO</a> </div>
180
+ <p align="right"><span class="submit-btn"><?php echo get_submit_button('Save Settings','button-primary','submit','','');?></span></p>
181
  <div class="csbwfs-setting">
182
  <!-- General Setting -->
183
  <div class="first csbwfs-tab" id="div-csbwfs-general">
437
  <li>An option for add to any custom shortcode into lightbox</li>
438
  <li>Advance feature for choose to pinterest share image</li>
439
  <li>An option for add to OG tags content(title,image,description)</li>
440
+ <li>An option for set sidebar position (left/right/bottom) for mobile</li>
441
  <li>An option for add to social site official page URL for all social buttons</li>
442
  <li>Extra Buttons (Google Translate,Instagram,Whatsapp,Digg,Yummly,Vk, Buffer, Line, Skype, RSS, Print, G-Mail, Blogger, Tumbler,Delicious,Weibo, Telegram &amp; SMS )</li>
443
  <li>An option for define to twitter username in thier share window.</li>
images/minify-social.png ADDED
Binary file
images/reddit.png CHANGED
Binary file
images/youtube.png CHANGED
Binary file
readme.txt CHANGED
@@ -3,8 +3,8 @@ 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, google+, share, share links,linkedin,Stumbleupon,Reddit,pinterest,floating sidebar,float,floating share buttons,float share buttons
5
  Requires at least: 3.8
6
- Tested up to: 4.5.2
7
- Stable tag: 2.7
8
 
9
  Social Share Buttons (Facebook,Twitter,Linkedin,Google+,Pinterest,Youtube,Mail,Stumbleupon,Reddit) & Share Floating Sidebar.
10
 
@@ -148,6 +148,11 @@ Step 3. Go to Settings/"Custom Share Buttons with Floating Sidebar" and configur
148
  9. screenshot-9.png
149
 
150
  == Changelog ==
 
 
 
 
 
151
  = 2.7 =
152
  * Tested with latest wordpress version 4.5.2
153
  * Fixed linkdin button spelling error.
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, google+, share, share links,linkedin,Stumbleupon,Reddit,pinterest,floating sidebar,float,floating share buttons,float share buttons
5
  Requires at least: 3.8
6
+ Tested up to: 4.5.3
7
+ Stable tag: 2.8
8
 
9
  Social Share Buttons (Facebook,Twitter,Linkedin,Google+,Pinterest,Youtube,Mail,Stumbleupon,Reddit) & Share Floating Sidebar.
10
 
148
  9. screenshot-9.png
149
 
150
  == Changelog ==
151
+ = 2.8 =
152
+ * Tested with latest wordpress version 4.5.3
153
+ * Minify sidebar share buttons images.
154
+ * optmized CSS
155
+ * Released addon new verion 2.7
156
  = 2.7 =
157
  * Tested with latest wordpress version 4.5.2
158
  * Fixed linkdin button spelling error.