Fuse Social Floating Sidebar - Version 4.0

Version Description

Download this release

Release Info

Developer daniyalahmedk
Plugin Icon 128x128 Fuse Social Floating Sidebar
Version 4.0
Comparing to
See all releases

Code changes from version 3.2 to 4.0

freemius/assets/img/fuse-social-floating-sidebar.png ADDED
Binary file
fuse_social_sidebar.php CHANGED
@@ -1,9 +1,10 @@
1
  <?php
 
2
  /*
3
  Plugin Name: Fuse Social Floating Sidebar
4
  Plugin URI: http://photontechs.com/fuse-social-sidebar
5
  Description: This Fuse Social Floating Sidebar plugin allow you to put social icons which can be link with your social media profiles.
6
- Version: 3.2
7
  Author: Daniyal Ahmed
8
  Author URI: http://www.photontechs.com
9
  License: GNU General Public License v3.0
@@ -12,59 +13,72 @@ NOTE: This plugin is released under the GPLv2 license. The icons used in this pl
12
  of their respective owners, and do not, necessarily, inherit the GPLv2 license.
13
  */
14
  // Create a helper function for easy SDK access.
15
- function fs_fs() {
16
- global $fs_fs;
17
-
18
- if ( ! isset( $fs_fs ) ) {
19
- // Include Freemius SDK.
20
- require_once dirname(__FILE__) . '/freemius/start.php';
21
 
22
- $fs_fs = fs_dynamic_init( array(
23
- 'id' => '2701',
24
- 'slug' => 'fuse-social-floating-sidebar',
25
- 'type' => 'plugin',
26
- 'public_key' => 'pk_70ed0c631ac1720148be7f62dca7e',
27
- 'is_premium' => false,
28
- 'has_addons' => false,
29
- 'has_paid_plans' => false,
30
- 'menu' => array(
31
- 'account' => false,
32
- ),
33
- ) );
 
 
 
 
 
 
 
 
 
 
 
 
34
  }
35
-
36
- return $fs_fs;
 
 
 
37
  }
38
 
39
- // Init Freemius.
40
- fs_fs();
41
- // Signal that SDK was initiated.
42
- do_action( 'fs_fs_loaded' );
 
 
 
 
 
43
 
 
44
  // Adding Admin Menu
45
- require_once('inc/fuse_social_sidebar_admin.php');
46
  // Getting Values from options
47
- $options = get_option('fuse_social_options');
48
  // Creating Icons
49
- require_once('inc/fuse_social_sidebar_func.php');
50
  // Getting Style for awesome icons
51
- require_once('inc/fuse_social_sidebar_scripts.php');
52
  // Add settings link on plugin page
53
- function fuse_social_settings_link($links) {
54
- $settings_link = '<a href="options-general.php?page=fuse-social">Settings</a>';
55
- array_unshift($links, $settings_link);
56
- return $links;
 
57
  }
58
- $plugin = plugin_basename(__FILE__);
59
- add_filter("plugin_action_links_$plugin", 'fuse_social_settings_link' );
60
- add_action('wp_footer','fuse_social_sidebar',100);
61
-
62
 
63
- function fuse_social_sidebar()
64
- {
65
- $makeawesome_icons = new Making_Fuse_Icons;
66
- // Getting Icons for Shortcode
67
- $makeawesome_icons->Create_Awesome_Icons();
68
- }
69
-
70
- ?>
 
1
  <?php
2
+
3
  /*
4
  Plugin Name: Fuse Social Floating Sidebar
5
  Plugin URI: http://photontechs.com/fuse-social-sidebar
6
  Description: This Fuse Social Floating Sidebar plugin allow you to put social icons which can be link with your social media profiles.
7
+ Version: 4.0
8
  Author: Daniyal Ahmed
9
  Author URI: http://www.photontechs.com
10
  License: GNU General Public License v3.0
13
  of their respective owners, and do not, necessarily, inherit the GPLv2 license.
14
  */
15
  // Create a helper function for easy SDK access.
 
 
 
 
 
 
16
 
17
+ if ( !function_exists( 'fs_fs' ) ) {
18
+ // Create a helper function for easy SDK access.
19
+ function fs_fs()
20
+ {
21
+ global $fs_fs ;
22
+
23
+ if ( !isset( $fs_fs ) ) {
24
+ // Include Freemius SDK.
25
+ require_once dirname( __FILE__ ) . '/freemius/start.php';
26
+ $fs_fs = fs_dynamic_init( array(
27
+ 'id' => '2701',
28
+ 'slug' => 'fuse-social-floating-sidebar',
29
+ 'type' => 'plugin',
30
+ 'public_key' => 'pk_70ed0c631ac1720148be7f62dca7e',
31
+ 'is_premium' => false,
32
+ 'premium_suffix' => 'FUSE PRO',
33
+ 'has_addons' => false,
34
+ 'has_paid_plans' => true,
35
+ 'menu' => array(),
36
+ 'is_live' => true,
37
+ ) );
38
+ }
39
+
40
+ return $fs_fs;
41
  }
42
+
43
+ // Init Freemius.
44
+ fs_fs();
45
+ // Signal that SDK was initiated.
46
+ do_action( 'fs_fs_loaded' );
47
  }
48
 
49
+ function fuse_general_admin_notice()
50
+ {
51
+ global $pagenow ;
52
+ if ( $_GET['page'] == "fuse-social" ) {
53
+ echo '<div class="update_ssc notice notice-warning is-dismissible">
54
+ <p>Upgrade Fuse Social to add unlimited icons <a href="' . fs_fs()->get_upgrade_url() . '" class="upraf_d">Upgrade Now</a></p>
55
+ </div>' ;
56
+ }
57
+ }
58
 
59
+ add_action( 'admin_notices', 'fuse_general_admin_notice' );
60
  // Adding Admin Menu
61
+ require_once 'inc/fuse_social_sidebar_admin.php';
62
  // Getting Values from options
63
+ $options = get_option( 'fuse_social_options' );
64
  // Creating Icons
65
+ require_once 'inc/fuse_social_sidebar_func.php';
66
  // Getting Style for awesome icons
67
+ require_once 'inc/fuse_social_sidebar_scripts.php';
68
  // Add settings link on plugin page
69
+ function fuse_social_settings_link( $links )
70
+ {
71
+ $settings_link = '<a href="options-general.php?page=fuse-social">Settings</a>';
72
+ array_unshift( $links, $settings_link );
73
+ return $links;
74
  }
 
 
 
 
75
 
76
+ $plugin = plugin_basename( __FILE__ );
77
+ add_filter( "plugin_action_links_{$plugin}", 'fuse_social_settings_link' );
78
+ add_action( 'wp_footer', 'fuse_social_sidebar', 100 );
79
+ function fuse_social_sidebar()
80
+ {
81
+ $makeawesome_icons = new Making_Fuse_Icons();
82
+ // Getting Icons for Shortcode
83
+ $makeawesome_icons->Create_Awesome_Icons();
84
+ }
inc/css/admin_style.css CHANGED
@@ -143,3 +143,14 @@ img#fuse_social_load {
143
  display: block;
144
  margin: 80px auto;
145
  }
 
 
 
 
 
 
 
 
 
 
 
143
  display: block;
144
  margin: 80px auto;
145
  }
146
+ .update_ssc.notice.notice-warning.is-dismissible {
147
+ background: #F44336;
148
+ color: #fff;
149
+ padding: 8px;
150
+ }
151
+
152
+ .update_ssc.notice.notice-warning.is-dismissible a {background: #fff;color: #f7412d;padding: 10px 10px;text-decoration: none;border-radius: 6px;}
153
+
154
+ .update_ssc.notice.notice-warning.is-dismissible p {
155
+ font-size: 14px;
156
+ }
inc/css/font-awesome.min.css CHANGED
File without changes
inc/fonts/FontAwesome.otf CHANGED
File without changes
inc/fonts/fontawesome-webfont.eot CHANGED
File without changes
inc/fonts/fontawesome-webfont.svg CHANGED
File without changes
inc/fonts/fontawesome-webfont.ttf CHANGED
File without changes
inc/fonts/fontawesome-webfont.woff CHANGED
File without changes
inc/fonts/fontawesome-webfont.woff2 CHANGED
File without changes
inc/fuse_social_sidebar_admin.php CHANGED
@@ -1,81 +1,89 @@
1
  <?php
 
2
  /*---------------------------------------------------
3
  add settings page to menu
4
  ----------------------------------------------------*/
5
  function register_fuse_social_sidebar_submenu_page()
6
- {
7
- add_submenu_page('options-general.php', 'Fuse Social Sidebar', 'Fuse Social Sidebar', 'manage_options', 'fuse-social', 'fuse_social_callback');
8
- }
9
-
10
- add_action('admin_menu', 'register_fuse_social_sidebar_submenu_page');
 
 
 
 
 
11
 
 
12
  // Getting square icons image for Admin Settings
13
-
14
- $awesome_sq_icon = "Square Icons <img src='" . plugin_dir_url(__FILE__) . "img/square_logo.png' /> &nbsp; &nbsp; &nbsp; ";
15
-
16
  // Getting round icons image for Admin Settings
17
-
18
- $awesome_ro_icon = "Round Icons <img src='" . plugin_dir_url(__FILE__) . "img/round_logo.png' />";
19
  $style_options = array(
20
- 'square' => array(
21
- 'value' => 'square',
22
- 'label' => __($awesome_sq_icon, 'fuse_social')
23
- ) ,
24
- 'round' => array(
25
- 'value' => 'round',
26
- 'label' => __($awesome_ro_icon, 'fuse_social')
27
- )
28
  );
29
  $size_options = array(
30
- '48' => array(
31
- 'value' => '48',
32
- 'label' => __('Large', 'fuse_social')
33
- ) ,
34
- '32' => array(
35
- 'value' => '32',
36
- 'label' => __('Medium', 'fuse_social')
37
- ) ,
38
- '24' => array(
39
- 'value' => '24',
40
- 'label' => __('Small', 'fuse_social')
41
- )
42
  );
43
  $pos_options = array(
44
- 'left' => array(
45
- 'value' => 'left',
46
- 'label' => __('Left', 'fuse_social')
47
- ) ,
48
- 'right' => array(
49
- 'value' => 'right',
50
- 'label' => __('Right', 'fuse_social')
51
- )
52
  );
53
-
54
  // Awesome Social call back for Admin Settings
55
-
56
  function fuse_social_callback()
57
- {
58
- wp_enqueue_script('jquery');
59
- wp_enqueue_script('jquery-form');
60
- wp_enqueue_style('wp-color-picker');
61
- wp_enqueue_script('wp-color-picker');
62
- wp_enqueue_script('wp-color-picker-script-handle', plugins_url('wp-color-picker-script.js', __FILE__) , array(
63
- 'wp-color-picker'
64
- ) , false, true);
65
- ?>
66
-
67
- <link href="<?php
68
- echo plugin_dir_url(__FILE__); ?>css/admin_style.css" rel="stylesheet">
69
-
70
- <link href="<?php
71
- echo plugin_dir_url(__FILE__); ?>css/font-awesome.min.css" rel="stylesheet">
72
-
73
- <?php
74
- settings_fields('fuse_social');
75
- $options = get_option('fuse_social_options');
76
- _e('<div class="wrap"><div id="icon-tools" class="icon32"></div>', "fuse_social");
77
- _e('<div class="version_fuse_top_head"><h2 class="top_header_fuse">Fuse Social Sidebar</h2><div class="ver-numb">Version 3.1</div></div>', "fuse_social");
78
- ?>
 
 
 
 
 
 
79
 
80
 
81
 
@@ -217,13 +225,10 @@ function fuse_social_callback()
217
 
218
 
219
 
220
- <?php
221
-
222
- // If animation checked, then show corresponding text box for seconds
223
-
224
- if ($options['animations'] == 1)
225
- {
226
- ?>
227
 
228
 
229
 
@@ -235,10 +240,9 @@ function fuse_social_callback()
235
 
236
 
237
 
238
- <?php
239
- }
240
-
241
- ?>
242
 
243
 
244
 
@@ -282,10 +286,10 @@ function fuse_social_callback()
282
 
283
 
284
 
285
- <?php
286
- settings_fields('fuse_social');
287
- $options = get_option('fuse_social_options');
288
- ?>
289
 
290
 
291
 
@@ -293,47 +297,42 @@ function fuse_social_callback()
293
 
294
 
295
 
296
- <?php
297
-
298
- // Getting social icons style type i.e Round or Sqaure for Admin Settings
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
299
 
300
- global $style_options, $size_options, $pos_options;
301
- $fuse_social_style = "";
302
- if (!isset($checked)) $checked = '';
303
- foreach($style_options as $option)
304
- {
305
- $radio_setting = $options['style_input'];
306
- if ('' != $radio_setting)
307
- {
308
- if ($options['style_input'] == $option['value'])
309
- {
310
- $fuse_social_style = $options['style_input'];
311
- $checked = "checked=\"checked\"";
312
- }
313
- else
314
- {
315
- $checked = '';
316
- }
317
- }
318
 
319
- ?>
320
 
 
 
 
 
 
 
 
321
 
322
 
323
- <label class="awesome_description"><input type="radio" name="fuse_social_options[style_input]" value="<?php
324
- esc_attr_e($option['value']);
325
- ?>" <?php
326
- echo $checked;
327
- ?> /> <?php
328
- echo $option['label'];
329
- ?></label>
330
 
331
-
332
-
333
- <?php
334
- }
335
-
336
- ?>
337
 
338
 
339
 
@@ -341,8 +340,9 @@ function fuse_social_callback()
341
 
342
  <div id="other_settings">
343
 
344
- <h3><?php
345
- _e("Other Settings", "fuse_social"); ?></h3>
 
346
 
347
 
348
 
@@ -362,14 +362,15 @@ function fuse_social_callback()
362
 
363
 
364
 
365
- <?php // Open Links in new tab setting
366
- ?>
 
367
 
368
 
369
 
370
- <input id="fuse_social_options[linksnewtab]" name="fuse_social_options[linksnewtab]" type="checkbox" value="1" <?php
371
- checked('1', $options['linksnewtab']);
372
- ?> />
373
 
374
 
375
 
@@ -377,8 +378,9 @@ function fuse_social_callback()
377
 
378
 
379
 
380
- <label class="awesome_description" for="fuse_social_options[linksnewtab]"><strong><?php
381
- _e("Open links new tab.", "fuse_social"); ?></strong></label>
 
382
 
383
 
384
 
@@ -386,8 +388,9 @@ function fuse_social_callback()
386
 
387
 
388
 
389
- <?php // Animation Settings
390
- ?>
 
391
 
392
 
393
 
@@ -395,9 +398,9 @@ function fuse_social_callback()
395
 
396
 
397
 
398
- <input id="fuse_social_animate" name="fuse_social_options[animations]" type="checkbox" value="1" <?php
399
- checked('1', $options['animations']);
400
- ?> />
401
 
402
 
403
 
@@ -405,24 +408,27 @@ function fuse_social_callback()
405
 
406
 
407
 
408
- <label class="awesome_description" for="fuse_social_animate"><strong><?php
409
- _e("Animation on hover", "fuse_social"); ?> </strong></label>
 
410
 
411
 
412
 
413
- <?php // Animation time settings
414
- ?>
 
415
 
416
 
417
 
418
- <input id="fuse_social_options_anim_sec" value="<?php
419
- esc_attr_e($options['animate_sec']);
420
- ?>" name="fuse_social_options[animate_sec]" type="text" placeholder="Delay in Seconds" style="width:250px;" />
421
 
422
 
423
 
424
- <span id="fuse_social_options_anim_s"><em><?php
425
- _e("Animation delay in seconds. For-example 0.5", "fuse_social") ?></em></span>
 
426
 
427
 
428
 
@@ -446,23 +452,24 @@ function fuse_social_callback()
446
 
447
 
448
 
449
- <?php
450
-
451
- // Setting size of Social icons.
452
-
453
- $selected = $options['position'];
454
- $p = '';
455
- $r = '';
456
- foreach($pos_options as $option)
457
- {
458
- $label = $option['label'];
459
- if ($selected == $option['value']) // Make default first in list
460
- $p = "\n\t<option style=\"padding-right: 10px;\" selected='selected' value='" . esc_attr($option['value']) . "'>$label</option>";
461
- else $r.= "\n\t<option style=\"padding-right: 10px;\" value='" . esc_attr($option['value']) . "'>$label</option>";
462
- }
463
-
464
- echo $p . $r;
465
- ?>
 
466
 
467
 
468
 
@@ -470,8 +477,9 @@ function fuse_social_callback()
470
 
471
 
472
 
473
- <label class="description" for="fuse_social_options[position]"><?php
474
- _e('<strong>Position</strong>', 'fuse_social'); ?></label>
 
475
 
476
 
477
 
@@ -495,14 +503,15 @@ function fuse_social_callback()
495
 
496
 
497
 
498
- <?php // Font Shadow settings
499
- ?>
 
500
 
501
 
502
 
503
- <input id="fuse_social_options[shadow]" name="fuse_social_options[shadow]" type="checkbox" value="1" <?php
504
- checked('1', $options['shadow']);
505
- ?> />
506
 
507
 
508
 
@@ -514,8 +523,9 @@ function fuse_social_callback()
514
 
515
 
516
 
517
- <label class="awesome_description" for="fuse_social_options[shadow]"><strong><?php
518
- _e("Don't use shadow in icons.", "fuse_social"); ?></strong></label>
 
519
 
520
 
521
 
@@ -529,14 +539,15 @@ function fuse_social_callback()
529
 
530
 
531
 
532
- <?php // Mobile settings
533
- ?>
 
534
 
535
 
536
 
537
- <input id="fuse_social_options[mobile]" name="fuse_social_options[mobile]" type="checkbox" value="1" <?php
538
- checked('1', $options['mobile']);
539
- ?> />
540
 
541
 
542
 
@@ -548,8 +559,9 @@ function fuse_social_callback()
548
 
549
 
550
 
551
- <label class="awesome_description" for="fuse_social_options[mobile]"><strong><?php
552
- _e("Don't show in Mobile Version", "fuse_social"); ?></strong></label>
 
553
 
554
 
555
 
@@ -567,23 +579,24 @@ function fuse_social_callback()
567
 
568
 
569
 
570
- <?php
571
-
572
- // Setting size of Social icons.
573
-
574
- $selected = $options['size'];
575
- $p = '';
576
- $r = '';
577
- foreach($size_options as $option)
578
- {
579
- $label = $option['label'];
580
- if ($selected == $option['value']) // Make default first in list
581
- $p = "\n\t<option style=\"padding-right: 10px;\" selected='selected' value='" . esc_attr($option['value']) . "'>$label</option>";
582
- else $r.= "\n\t<option style=\"padding-right: 10px;\" value='" . esc_attr($option['value']) . "'>$label</option>";
583
- }
584
-
585
- echo $p . $r;
586
- ?>
 
587
 
588
 
589
 
@@ -591,8 +604,9 @@ function fuse_social_callback()
591
 
592
 
593
 
594
- <label class="description" for="fuse_social_options[size]"><?php
595
- _e('<strong>Size</strong>', 'fuse_social'); ?></label>
 
596
 
597
 
598
 
@@ -608,37 +622,39 @@ function fuse_social_callback()
608
 
609
  <hr />
610
 
611
- <?php
612
- add_action('admin_enqueue_scripts', 'awesome_color_picker');
613
- function awesome_color_picker($hook)
614
- {
615
- if (is_admin())
616
- {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
617
 
618
- // Add the color picker css file
619
 
620
- wp_enqueue_style('wp-color-picker');
621
 
622
- // Include our custom jQuery file with WordPress Color Picker dependency
623
-
624
- wp_enqueue_script('custom-script-handle', plugins_url('custom-script.js', __FILE__) , array(
625
- 'wp-color-picker'
626
- ) , false, true);
627
- }
628
- }
629
 
630
- ?>
631
 
 
 
 
632
 
633
-
634
-
635
-
636
- <label class="samecolor" for="fuse_social_options[colorpicker]"><strong><?php
637
- _e("Use custom background color for all icons.", "fuse_social"); ?></strong></label>
638
-
639
- <input class="cpa-color-picker" id="fuse_social_options[colorpicker]" value="<?php
640
- esc_attr_e($options['colorpicker']);
641
- ?>" name="fuse_social_options[colorpicker]" type="text" />
642
 
643
  </td>
644
 
@@ -648,14 +664,15 @@ function fuse_social_callback()
648
 
649
 
650
 
651
- <?php // on hover color settings
652
- ?>
 
653
 
654
 
655
 
656
- <input id="fuse_social_options[hover]" name="fuse_social_options[hover]" type="checkbox" value="1" <?php
657
- checked('1', $options['hover']);
658
- ?> />
659
 
660
 
661
 
@@ -667,8 +684,9 @@ function fuse_social_callback()
667
 
668
 
669
 
670
- <label class="awesome_description" for="fuse_social_options[hover]"><strong><?php
671
- _e("Change icon color on hover - For Custom Background", "fuse_social"); ?></strong></label>
 
672
 
673
 
674
 
@@ -704,13 +722,15 @@ function fuse_social_callback()
704
 
705
 
706
 
707
- <?php // Setting links for social icons from Admin Settings
708
- ?>
 
709
 
710
 
711
 
712
- <strong><?php
713
- _e("Enter the URL(s) for your various social profiles below. If you leave a profile URL field blank, it will not be used.", "fuse_social") ?> </strong>
 
714
 
715
 
716
 
@@ -732,9 +752,9 @@ function fuse_social_callback()
732
 
733
 
734
 
735
- <i class="fa fa-facebook"></i><label for="fuse_social_options[facebook]" > Facebook</label><br /><input id="fuse_social_options[facebook]" value="<?php
736
- esc_attr_e($options['facebook']);
737
- ?>" name="fuse_social_options[facebook]" type="text" placeholder="Facebook URL" />
738
 
739
 
740
 
@@ -746,9 +766,9 @@ function fuse_social_callback()
746
 
747
 
748
 
749
- <i class="fa fa-twitter"></i><label for="fuse_social_options[twitter]" > Twitter</label><br /><input id="fuse_social_options[twitter]" value="<?php
750
- esc_attr_e($options['twitter']);
751
- ?>" name="fuse_social_options[twitter]" type="text" placeholder="Twitter URL" />
752
 
753
 
754
 
@@ -768,9 +788,9 @@ function fuse_social_callback()
768
 
769
 
770
 
771
- <i class="fa fa-rss"></i><label for="fuse_social_options[rss]" > Rss</label><br /><input id="fuse_social_options[rss]" value="<?php
772
- esc_attr_e($options['rss']);
773
- ?>" name="fuse_social_options[rss]" type="text" placeholder="Rss URL" />
774
 
775
 
776
 
@@ -806,9 +826,9 @@ function fuse_social_callback()
806
 
807
 
808
 
809
- <i class="fa fa-linkedin"></i><label for="fuse_social_options[linkedin]" > Linkedin</label><br /><input id="fuse_social_options[linkedin]" value="<?php
810
- esc_attr_e($options['linkedin']);
811
- ?>" name="fuse_social_options[linkedin]" type="text" placeholder="Linkedin URL" />
812
 
813
 
814
 
@@ -832,9 +852,9 @@ function fuse_social_callback()
832
 
833
 
834
 
835
- <i class="fa fa-youtube"></i><label for="fuse_social_options[youtube]" > Youtube</label><br /><input id="fuse_social_options[youtube]" value="<?php
836
- esc_attr_e($options['youtube']);
837
- ?>" name="fuse_social_options[youtube]" type="text" placeholder="Youtube URL" />
838
 
839
 
840
 
@@ -850,9 +870,9 @@ function fuse_social_callback()
850
 
851
 
852
 
853
- <i class="fa fa-flickr"></i><label for="fuse_social_options[flickr]" > Flickr</label><br /><input id="fuse_social_options[flickr]" value="<?php
854
- esc_attr_e($options['flickr']);
855
- ?>" name="fuse_social_options[flickr]" type="text" placeholder="Flickr URL" />
856
 
857
 
858
 
@@ -888,9 +908,9 @@ function fuse_social_callback()
888
 
889
 
890
 
891
- <i class="fa fa-pinterest"></i><label for="fuse_social_options[pinterest]" > Pinterest</label><br /><input id="fuse_social_options[pinterest]" value="<?php
892
- esc_attr_e($options['pinterest']);
893
- ?>" name="fuse_social_options[pinterest]" type="text" placeholder="Pinterest URL" />
894
 
895
 
896
 
@@ -910,9 +930,9 @@ function fuse_social_callback()
910
 
911
 
912
 
913
- <i class="fa fa-stumbleupon"></i><label for="fuse_social_options[stumbleupon]" > Stumbleupon</label><br /><input id="fuse_social_options[stumbleupon]" value="<?php
914
- esc_attr_e($options['stumbleupon']);
915
- ?>" name="fuse_social_options[stumbleupon]" type="text" placeholder="Stumbleupon URL" />
916
 
917
 
918
 
@@ -940,9 +960,9 @@ function fuse_social_callback()
940
 
941
 
942
 
943
- <i class="fa fa-google-plus"></i><label for="fuse_social_options[google-plus]" > Google Plus</label><br /><input id="fuse_social_options[google-plus]" value="<?php
944
- esc_attr_e($options['google-plus']);
945
- ?>" name="fuse_social_options[google-plus]" type="text" placeholder="Google Plus URL" />
946
 
947
 
948
 
@@ -982,9 +1002,9 @@ function fuse_social_callback()
982
 
983
 
984
 
985
- <i class="fa fa-instagram"></i><label for="fuse_social_options[instagram]" > Instagram</label><br /><input id="fuse_social_options[instagram]" value="<?php
986
- esc_attr_e($options['instagram']);
987
- ?>" name="fuse_social_options[instagram]" type="text" placeholder="Instagram URL" />
988
 
989
 
990
 
@@ -1008,9 +1028,9 @@ function fuse_social_callback()
1008
 
1009
 
1010
 
1011
- <i class="fa fa-tumblr"></i><label for="fuse_social_options[tumblr]" > Tumblr</label><br /><input id="fuse_social_options[tumblr]" value="<?php
1012
- esc_attr_e($options['tumblr']);
1013
- ?>" name="fuse_social_options[tumblr]" type="text" placeholder="Tumblr URL" />
1014
 
1015
 
1016
 
@@ -1038,9 +1058,9 @@ function fuse_social_callback()
1038
 
1039
 
1040
 
1041
- <i class="fa fa-vine"></i><label for="fuse_social_options[vine]" > Vine</label><br /><input id="fuse_social_options[vine]" value="<?php
1042
- esc_attr_e($options['vine']);
1043
- ?>" name="fuse_social_options[vine]" type="text" placeholder="Vine URL" />
1044
 
1045
 
1046
 
@@ -1074,9 +1094,9 @@ function fuse_social_callback()
1074
 
1075
 
1076
 
1077
- <i class="fa fa-vk"></i><label for="fuse_social_options[vk]" > VK</label><br /><input id="fuse_social_options[vk]" value="<?php
1078
- esc_attr_e($options['vk']);
1079
- ?>" name="fuse_social_options[vk]" type="text" placeholder="VK URL" />
1080
 
1081
 
1082
 
@@ -1100,9 +1120,9 @@ function fuse_social_callback()
1100
 
1101
 
1102
 
1103
- <i class="fa fa-soundcloud"></i><label for="fuse_social_options[soundcloud]" > Sound Cloud</label><br /><input id="fuse_social_options[soundcloud]" value="<?php
1104
- esc_attr_e($options['soundcloud']);
1105
- ?>" name="fuse_social_options[soundcloud]" type="text" placeholder="Sound Cloud URL" />
1106
 
1107
 
1108
 
@@ -1130,9 +1150,9 @@ function fuse_social_callback()
1130
 
1131
 
1132
 
1133
- <i class="fa fa-reddit"></i><label for="fuse_social_options[reddit]" > Reddit</label><br /><input id="fuse_social_options[reddit]" value="<?php
1134
- esc_attr_e($options['reddit']);
1135
- ?>" name="fuse_social_options[reddit]" type="text" placeholder="Reddit URL" />
1136
 
1137
 
1138
 
@@ -1168,9 +1188,9 @@ function fuse_social_callback()
1168
 
1169
 
1170
 
1171
- <i class="fa fa-stack-overflow"></i><label for="fuse_social_options[stack]" > Stack OverFLow</label><br /><input id="fuse_social_options[stack]" value="<?php
1172
- esc_attr_e($options['stack']);
1173
- ?>" name="fuse_social_options[stack]" type="text" placeholder="Stack OverFlow URL" />
1174
 
1175
 
1176
 
@@ -1194,9 +1214,9 @@ function fuse_social_callback()
1194
 
1195
 
1196
 
1197
- <i class="fa fa-behance"></i><label for="fuse_social_options[behance]" > Behance</label><br /><input id="fuse_social_options[behance]" value="<?php
1198
- esc_attr_e($options['behance']);
1199
- ?>" name="fuse_social_options[behance]" type="text" placeholder="Behance URL" />
1200
 
1201
 
1202
 
@@ -1224,9 +1244,9 @@ function fuse_social_callback()
1224
 
1225
 
1226
 
1227
- <i class="fa fa-github"></i><label for="fuse_social_options[github]" > Github</label><br /><input id="fuse_social_options[github]" value="<?php
1228
- esc_attr_e($options['github']);
1229
- ?>" name="fuse_social_options[github]" type="text" placeholder="Github URL" />
1230
 
1231
 
1232
 
@@ -1256,9 +1276,9 @@ function fuse_social_callback()
1256
 
1257
 
1258
 
1259
- <i class="fa fa-envelope-o"></i><label for="fuse_social_options[envelope]" > Email</label><br /><input id="fuse_social_options[envelope]" value="<?php
1260
- esc_attr_e($options['envelope']);
1261
- ?>" name="fuse_social_options[envelope]" type="text" placeholder="mailto:someone@example.com" />
1262
 
1263
 
1264
 
@@ -1273,77 +1293,44 @@ function fuse_social_callback()
1273
 
1274
 
1275
  </table>
1276
- <div class="custom_fileds">
1277
- <table class="tab-cus">
1278
- <tr class="single-table-head">
1279
- <th>Icon</th>
1280
- <th>URL</th>
1281
- <th>Background</th>
1282
- <th></th>
1283
- </tr>
1284
- <?php
1285
- $countiner = 20;
1286
- $pass = 0;
1287
- for ($i = 1; $i < 20; $i++)
1288
- {
1289
- $temps = 'icon_sec_' . $i;
1290
- if (!empty($options[$temps]))
1291
- {
1292
- $pass++;
1293
- ?>
1294
- <tr class="single-row">
1295
-
1296
- <td>
1297
- <input type="text" value="<?php
1298
- echo $options['icon_sec_' . $i]; ?>" name="fuse_social_options[icon_sec_<?php
1299
- echo $i; ?>]" class="icon_image" />
1300
- </td>
1301
- <td>
1302
- <input type="text" value="<?php
1303
- echo $options['url_sec_' . $i]; ?>" name="fuse_social_options[url_sec_<?php
1304
- echo $i; ?>]" class="url_ico_img" />
1305
- </td>
1306
- <td>
1307
- <input type="text" value="<?php
1308
- echo $options['bg_color_ico_' . $i]; ?>" name="fuse_social_options[bg_color_ico_<?php
1309
- echo $i; ?>]" class="url_ico_img" />
1310
- </td>
1311
- <td class="add_an">
1312
- <a href="javascript:void(0);" class="add_anoth_link">+</a>
1313
- <a href="javascript:void(0);" class="minus_anoth_link">-</a>
1314
- </td>
1315
- </tr>
1316
- <?php
1317
- }
1318
- }
1319
 
1320
- if ($pass == 0)
1321
- {
1322
- ?>
1323
- <tr class="single-row">
1324
-
1325
- <td>
1326
- <input type="text" value="" name="fuse_social_options[icon_sec_1]" class="icon_image" />
1327
- </td>
1328
- <td>
1329
- <input type="text" value="" name="fuse_social_options[url_sec_1]" class="url_ico_img" />
1330
- </td>
1331
- <td>
1332
- <input type="text" value="" name="fuse_social_options[bg_color_ico_1]" class="url_ico_img" />
1333
- </td>
1334
- <td class="add_an">
1335
- <a href="javascript:void(0);" class="add_anoth_link">+</a>
1336
- <a href="javascript:void(0);" class="minus_anoth_link">-</a>
1337
- </td>
1338
- </tr>
1339
- <?php
1340
- }
1341
 
1342
- ?>
1343
-
1344
- </table>
1345
- </div>
 
 
 
 
 
 
1346
  <style type="text/css">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1347
  table.tab-cus {
1348
  width: 100%;
1349
  text-align: center;
@@ -1386,7 +1373,7 @@ a.add_anoth_link, .minus_anoth_link {
1386
 
1387
  <div class="facebook_prof">
1388
  <div class="fb_icon_link">
1389
- Show your love to this plugin by sending me this message <br />"<3 FUSE LOVE <3" on facebook
1390
  <a href="https://www.facebook.com/messages/t/mewoooooo" target="_blank"><img src="https://png.icons8.com/color/100/000000/facebook-messenger.png"></a>
1391
 
1392
  </div>
@@ -1412,15 +1399,15 @@ a.add_anoth_link, .minus_anoth_link {
1412
 
1413
 
1414
 
1415
- <input type="submit" class="button-primary fuse-social-submit" value="<?php
1416
- _e('Save Options', 'awesomesocial');
1417
- ?>" />
1418
 
1419
 
1420
 
1421
- <?php
1422
- echo "<div class='loading-cover-pi'><img src='" . plugin_dir_url(__FILE__) . "img/loader.gif' id='fuse_social_load'/></div>";
1423
- ?>
1424
 
1425
 
1426
 
@@ -1513,9 +1500,9 @@ a.add_anoth_link, .minus_anoth_link {
1513
 
1514
 
1515
 
1516
- jQuery('#saveMessage').append("<p><?php
1517
- echo htmlentities(__('Settings Saved Successfully', 'wp') , ENT_QUOTES);
1518
- ?></p>").show();
1519
 
1520
  jQuery(".loading-cover-pi").hide();
1521
 
@@ -1535,9 +1522,9 @@ a.add_anoth_link, .minus_anoth_link {
1535
 
1536
 
1537
 
1538
- jQuery('#saveMessage').append("<p><?php
1539
- echo htmlentities(__('Settings Saved Successfully', 'wp') , ENT_QUOTES);
1540
- ?></p>").show();
1541
 
1542
  }
1543
 
@@ -1565,69 +1552,66 @@ a.add_anoth_link, .minus_anoth_link {
1565
 
1566
 
1567
 
1568
- <?php
1569
- echo '</div>';
1570
- }
1571
 
1572
- add_action('admin_init', 'fuse_social_options_init');
1573
  /**
1574
  * Init plugin options to white list our options
1575
  */
1576
-
1577
  function fuse_social_options_init()
1578
- {
1579
- register_setting('fuse_social', 'fuse_social_options', 'fuse_social_icon_validate');
1580
- }
1581
-
1582
- function fuse_social_icon_validate($input)
1583
- {
1584
- global $size_options, $style_options, $pos_options;
1585
-
1586
- // Link new tab checkbox value is either 0 or 1
1587
-
1588
- if (!isset($input['linksnewtab'])) $input['linksnewtab'] = null;
1589
- $input['linksnewtab'] = ($input['linksnewtab'] == 1 ? 1 : 0);
1590
- if (!isset($input['animations']))
1591
-
1592
- // Animation checkbox value is either 0 or 1
1593
-
1594
- $input['animations'] = null;
1595
- $input['animations'] = ($input['animations'] == 1 ? 1 : 0);
1596
-
1597
- // Shadow checkbox value is either 0 or 1
1598
-
1599
- if (!isset($input['shadow'])) $input['shadow'] = null;
1600
- $input['shadow'] = ($input['shadow'] == 1 ? 1 : 0);
1601
-
1602
- // Our style option must actually be in our array of style options
1603
-
1604
- if (!isset($input['style_input'])) $input['style_input'] = null;
1605
- if (!array_key_exists($input['style_input'], $style_options)) $input['style_input'] = null;
1606
-
1607
- // Social profiles links must be safe links with no HTML tags
1608
-
1609
- $input['facebook'] = wp_filter_nohtml_kses($input['facebook']);
1610
- $input['twitter'] = wp_filter_nohtml_kses($input['twitter']);
1611
- $input['rss'] = wp_filter_nohtml_kses($input['rss']);
1612
- $input['linkedin'] = wp_filter_nohtml_kses($input['linkedin']);
1613
- $input['youtube'] = wp_filter_nohtml_kses($input['youtube']);
1614
- $input['flickr'] = wp_filter_nohtml_kses($input['flickr']);
1615
- $input['pinterest'] = wp_filter_nohtml_kses($input['pinterest']);
1616
- $input['stumbleupon'] = wp_filter_nohtml_kses($input['stumbleupon']);
1617
- $input['google-plus'] = wp_filter_nohtml_kses($input['google-plus']);
1618
- $input['instagram'] = wp_filter_nohtml_kses($input['instagram']);
1619
- $input['tumblr'] = wp_filter_nohtml_kses($input['tumblr']);
1620
- $input['vine'] = wp_filter_nohtml_kses($input['vine']);
1621
- $input['url_sec'] = wp_filter_nohtml_kses($input['url_sec']);
1622
- $input['icon_sec'] = wp_filter_nohtml_kses($input['icon_sec']);
1623
-
1624
- // Our size option must actually be in our array of size options
1625
-
1626
- if (!array_key_exists($input['size'], $size_options)) $input['size'] = null;
1627
-
1628
- // Our size option must actually be in our array of size options
1629
 
1630
- if (!array_key_exists($input['position'], $pos_options)) $input['position'] = null;
1631
- return $input;
1632
- }
1633
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <?php
2
+
3
  /*---------------------------------------------------
4
  add settings page to menu
5
  ----------------------------------------------------*/
6
  function register_fuse_social_sidebar_submenu_page()
7
+ {
8
+ add_submenu_page(
9
+ 'options-general.php',
10
+ 'Fuse Social Sidebar',
11
+ 'Fuse Social Sidebar',
12
+ 'manage_options',
13
+ 'fuse-social',
14
+ 'fuse_social_callback'
15
+ );
16
+ }
17
 
18
+ add_action( 'admin_menu', 'register_fuse_social_sidebar_submenu_page' );
19
  // Getting square icons image for Admin Settings
20
+ $awesome_sq_icon = "Square Icons <img src='" . plugin_dir_url( __FILE__ ) . "img/square_logo.png' /> &nbsp; &nbsp; &nbsp; ";
 
 
21
  // Getting round icons image for Admin Settings
22
+ $awesome_ro_icon = "Round Icons <img src='" . plugin_dir_url( __FILE__ ) . "img/round_logo.png' />";
 
23
  $style_options = array(
24
+ 'square' => array(
25
+ 'value' => 'square',
26
+ 'label' => __( $awesome_sq_icon, 'fuse_social' ),
27
+ ),
28
+ 'round' => array(
29
+ 'value' => 'round',
30
+ 'label' => __( $awesome_ro_icon, 'fuse_social' ),
31
+ ),
32
  );
33
  $size_options = array(
34
+ '48' => array(
35
+ 'value' => '48',
36
+ 'label' => __( 'Large', 'fuse_social' ),
37
+ ),
38
+ '32' => array(
39
+ 'value' => '32',
40
+ 'label' => __( 'Medium', 'fuse_social' ),
41
+ ),
42
+ '24' => array(
43
+ 'value' => '24',
44
+ 'label' => __( 'Small', 'fuse_social' ),
45
+ ),
46
  );
47
  $pos_options = array(
48
+ 'left' => array(
49
+ 'value' => 'left',
50
+ 'label' => __( 'Left', 'fuse_social' ),
51
+ ),
52
+ 'right' => array(
53
+ 'value' => 'right',
54
+ 'label' => __( 'Right', 'fuse_social' ),
55
+ ),
56
  );
 
57
  // Awesome Social call back for Admin Settings
 
58
  function fuse_social_callback()
59
+ {
60
+ wp_enqueue_script( 'jquery' );
61
+ wp_enqueue_script( 'jquery-form' );
62
+ wp_enqueue_style( 'wp-color-picker' );
63
+ wp_enqueue_script( 'wp-color-picker' );
64
+ wp_enqueue_script(
65
+ 'wp-color-picker-script-handle',
66
+ plugins_url( 'wp-color-picker-script.js', __FILE__ ),
67
+ array( 'wp-color-picker' ),
68
+ false,
69
+ true
70
+ );
71
+ ?>
72
+
73
+ <link href="<?php
74
+ echo plugin_dir_url( __FILE__ ) ;
75
+ ?>css/admin_style.css" rel="stylesheet">
76
+
77
+ <link href="<?php
78
+ echo plugin_dir_url( __FILE__ ) ;
79
+ ?>css/font-awesome.min.css" rel="stylesheet">
80
+
81
+ <?php
82
+ settings_fields( 'fuse_social' );
83
+ $options = get_option( 'fuse_social_options' );
84
+ _e( '<div class="wrap"><div id="icon-tools" class="icon32"></div>', "fuse_social" );
85
+ _e( '<div class="version_fuse_top_head"><h2 class="top_header_fuse">Fuse Social Sidebar</h2><div class="ver-numb">Version 4.0</div></div>', "fuse_social" );
86
+ ?>
87
 
88
 
89
 
225
 
226
 
227
 
228
+ <?php
229
+ // If animation checked, then show corresponding text box for seconds
230
+ if ( $options['animations'] == 1 ) {
231
+ ?>
 
 
 
232
 
233
 
234
 
240
 
241
 
242
 
243
+ <?php
244
+ }
245
+ ?>
 
246
 
247
 
248
 
286
 
287
 
288
 
289
+ <?php
290
+ settings_fields( 'fuse_social' );
291
+ $options = get_option( 'fuse_social_options' );
292
+ ?>
293
 
294
 
295
 
297
 
298
 
299
 
300
+ <?php
301
+ // Getting social icons style type i.e Round or Sqaure for Admin Settings
302
+ global $style_options, $size_options, $pos_options ;
303
+ $fuse_social_style = "";
304
+ if ( !isset( $checked ) ) {
305
+ $checked = '';
306
+ }
307
+ foreach ( $style_options as $option ) {
308
+ $radio_setting = $options['style_input'];
309
+ if ( '' != $radio_setting ) {
310
+
311
+ if ( $options['style_input'] == $option['value'] ) {
312
+ $fuse_social_style = $options['style_input'];
313
+ $checked = "checked=\"checked\"";
314
+ } else {
315
+ $checked = '';
316
+ }
317
+
318
+ }
319
+ ?>
320
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
321
 
 
322
 
323
+ <label class="awesome_description"><input type="radio" name="fuse_social_options[style_input]" value="<?php
324
+ esc_attr_e( $option['value'] );
325
+ ?>" <?php
326
+ echo $checked ;
327
+ ?> /> <?php
328
+ echo $option['label'] ;
329
+ ?></label>
330
 
331
 
 
 
 
 
 
 
 
332
 
333
+ <?php
334
+ }
335
+ ?>
 
 
 
336
 
337
 
338
 
340
 
341
  <div id="other_settings">
342
 
343
+ <h3><?php
344
+ _e( "Other Settings", "fuse_social" );
345
+ ?></h3>
346
 
347
 
348
 
362
 
363
 
364
 
365
+ <?php
366
+ // Open Links in new tab setting
367
+ ?>
368
 
369
 
370
 
371
+ <input id="fuse_social_options[linksnewtab]" name="fuse_social_options[linksnewtab]" type="checkbox" value="1" <?php
372
+ checked( '1', $options['linksnewtab'] );
373
+ ?> />
374
 
375
 
376
 
378
 
379
 
380
 
381
+ <label class="awesome_description" for="fuse_social_options[linksnewtab]"><strong><?php
382
+ _e( "Open links new tab.", "fuse_social" );
383
+ ?></strong></label>
384
 
385
 
386
 
388
 
389
 
390
 
391
+ <?php
392
+ // Animation Settings
393
+ ?>
394
 
395
 
396
 
398
 
399
 
400
 
401
+ <input id="fuse_social_animate" name="fuse_social_options[animations]" type="checkbox" value="1" <?php
402
+ checked( '1', $options['animations'] );
403
+ ?> />
404
 
405
 
406
 
408
 
409
 
410
 
411
+ <label class="awesome_description" for="fuse_social_animate"><strong><?php
412
+ _e( "Animation on hover", "fuse_social" );
413
+ ?> </strong></label>
414
 
415
 
416
 
417
+ <?php
418
+ // Animation time settings
419
+ ?>
420
 
421
 
422
 
423
+ <input id="fuse_social_options_anim_sec" value="<?php
424
+ esc_attr_e( $options['animate_sec'] );
425
+ ?>" name="fuse_social_options[animate_sec]" type="text" placeholder="Delay in Seconds" style="width:250px;" />
426
 
427
 
428
 
429
+ <span id="fuse_social_options_anim_s"><em><?php
430
+ _e( "Animation delay in seconds. For-example 0.5", "fuse_social" );
431
+ ?></em></span>
432
 
433
 
434
 
452
 
453
 
454
 
455
+ <?php
456
+ // Setting size of Social icons.
457
+ $selected = $options['position'];
458
+ $p = '';
459
+ $r = '';
460
+ foreach ( $pos_options as $option ) {
461
+ $label = $option['label'];
462
+
463
+ if ( $selected == $option['value'] ) {
464
+ // Make default first in list
465
+ $p = "\n\t<option style=\"padding-right: 10px;\" selected='selected' value='" . esc_attr( $option['value'] ) . "'>{$label}</option>";
466
+ } else {
467
+ $r .= "\n\t<option style=\"padding-right: 10px;\" value='" . esc_attr( $option['value'] ) . "'>{$label}</option>";
468
+ }
469
+
470
+ }
471
+ echo $p . $r ;
472
+ ?>
473
 
474
 
475
 
477
 
478
 
479
 
480
+ <label class="description" for="fuse_social_options[position]"><?php
481
+ _e( '<strong>Position</strong>', 'fuse_social' );
482
+ ?></label>
483
 
484
 
485
 
503
 
504
 
505
 
506
+ <?php
507
+ // Font Shadow settings
508
+ ?>
509
 
510
 
511
 
512
+ <input id="fuse_social_options[shadow]" name="fuse_social_options[shadow]" type="checkbox" value="1" <?php
513
+ checked( '1', $options['shadow'] );
514
+ ?> />
515
 
516
 
517
 
523
 
524
 
525
 
526
+ <label class="awesome_description" for="fuse_social_options[shadow]"><strong><?php
527
+ _e( "Don't use shadow in icons.", "fuse_social" );
528
+ ?></strong></label>
529
 
530
 
531
 
539
 
540
 
541
 
542
+ <?php
543
+ // Mobile settings
544
+ ?>
545
 
546
 
547
 
548
+ <input id="fuse_social_options[mobile]" name="fuse_social_options[mobile]" type="checkbox" value="1" <?php
549
+ checked( '1', $options['mobile'] );
550
+ ?> />
551
 
552
 
553
 
559
 
560
 
561
 
562
+ <label class="awesome_description" for="fuse_social_options[mobile]"><strong><?php
563
+ _e( "Don't show in Mobile Version", "fuse_social" );
564
+ ?></strong></label>
565
 
566
 
567
 
579
 
580
 
581
 
582
+ <?php
583
+ // Setting size of Social icons.
584
+ $selected = $options['size'];
585
+ $p = '';
586
+ $r = '';
587
+ foreach ( $size_options as $option ) {
588
+ $label = $option['label'];
589
+
590
+ if ( $selected == $option['value'] ) {
591
+ // Make default first in list
592
+ $p = "\n\t<option style=\"padding-right: 10px;\" selected='selected' value='" . esc_attr( $option['value'] ) . "'>{$label}</option>";
593
+ } else {
594
+ $r .= "\n\t<option style=\"padding-right: 10px;\" value='" . esc_attr( $option['value'] ) . "'>{$label}</option>";
595
+ }
596
+
597
+ }
598
+ echo $p . $r ;
599
+ ?>
600
 
601
 
602
 
604
 
605
 
606
 
607
+ <label class="description" for="fuse_social_options[size]"><?php
608
+ _e( '<strong>Size</strong>', 'fuse_social' );
609
+ ?></label>
610
 
611
 
612
 
622
 
623
  <hr />
624
 
625
+ <?php
626
+ add_action( 'admin_enqueue_scripts', 'awesome_color_picker' );
627
+ function awesome_color_picker( $hook )
628
+ {
629
+
630
+ if ( is_admin() ) {
631
+ // Add the color picker css file
632
+ wp_enqueue_style( 'wp-color-picker' );
633
+ // Include our custom jQuery file with WordPress Color Picker dependency
634
+ wp_enqueue_script(
635
+ 'custom-script-handle',
636
+ plugins_url( 'custom-script.js', __FILE__ ),
637
+ array( 'wp-color-picker' ),
638
+ false,
639
+ true
640
+ );
641
+ }
642
+
643
+ }
644
+
645
+ ?>
646
 
 
647
 
 
648
 
 
 
 
 
 
 
 
649
 
 
650
 
651
+ <label class="samecolor" for="fuse_social_options[colorpicker]"><strong><?php
652
+ _e( "Use custom background color for all icons.", "fuse_social" );
653
+ ?></strong></label>
654
 
655
+ <input class="cpa-color-picker" id="fuse_social_options[colorpicker]" value="<?php
656
+ esc_attr_e( $options['colorpicker'] );
657
+ ?>" name="fuse_social_options[colorpicker]" type="text" />
 
 
 
 
 
 
658
 
659
  </td>
660
 
664
 
665
 
666
 
667
+ <?php
668
+ // on hover color settings
669
+ ?>
670
 
671
 
672
 
673
+ <input id="fuse_social_options[hover]" name="fuse_social_options[hover]" type="checkbox" value="1" <?php
674
+ checked( '1', $options['hover'] );
675
+ ?> />
676
 
677
 
678
 
684
 
685
 
686
 
687
+ <label class="awesome_description" for="fuse_social_options[hover]"><strong><?php
688
+ _e( "Change icon color on hover - For Custom Background", "fuse_social" );
689
+ ?></strong></label>
690
 
691
 
692
 
722
 
723
 
724
 
725
+ <?php
726
+ // Setting links for social icons from Admin Settings
727
+ ?>
728
 
729
 
730
 
731
+ <strong><?php
732
+ _e( "Enter the URL(s) for your various social profiles below. If you leave a profile URL field blank, it will not be used.", "fuse_social" );
733
+ ?> </strong>
734
 
735
 
736
 
752
 
753
 
754
 
755
+ <i class="fa fa-facebook"></i><label for="fuse_social_options[facebook]" > Facebook</label><br /><input id="fuse_social_options[facebook]" value="<?php
756
+ esc_attr_e( $options['facebook'] );
757
+ ?>" name="fuse_social_options[facebook]" type="text" placeholder="Facebook URL" />
758
 
759
 
760
 
766
 
767
 
768
 
769
+ <i class="fa fa-twitter"></i><label for="fuse_social_options[twitter]" > Twitter</label><br /><input id="fuse_social_options[twitter]" value="<?php
770
+ esc_attr_e( $options['twitter'] );
771
+ ?>" name="fuse_social_options[twitter]" type="text" placeholder="Twitter URL" />
772
 
773
 
774
 
788
 
789
 
790
 
791
+ <i class="fa fa-rss"></i><label for="fuse_social_options[rss]" > Rss</label><br /><input id="fuse_social_options[rss]" value="<?php
792
+ esc_attr_e( $options['rss'] );
793
+ ?>" name="fuse_social_options[rss]" type="text" placeholder="Rss URL" />
794
 
795
 
796
 
826
 
827
 
828
 
829
+ <i class="fa fa-linkedin"></i><label for="fuse_social_options[linkedin]" > Linkedin</label><br /><input id="fuse_social_options[linkedin]" value="<?php
830
+ esc_attr_e( $options['linkedin'] );
831
+ ?>" name="fuse_social_options[linkedin]" type="text" placeholder="Linkedin URL" />
832
 
833
 
834
 
852
 
853
 
854
 
855
+ <i class="fa fa-youtube"></i><label for="fuse_social_options[youtube]" > Youtube</label><br /><input id="fuse_social_options[youtube]" value="<?php
856
+ esc_attr_e( $options['youtube'] );
857
+ ?>" name="fuse_social_options[youtube]" type="text" placeholder="Youtube URL" />
858
 
859
 
860
 
870
 
871
 
872
 
873
+ <i class="fa fa-flickr"></i><label for="fuse_social_options[flickr]" > Flickr</label><br /><input id="fuse_social_options[flickr]" value="<?php
874
+ esc_attr_e( $options['flickr'] );
875
+ ?>" name="fuse_social_options[flickr]" type="text" placeholder="Flickr URL" />
876
 
877
 
878
 
908
 
909
 
910
 
911
+ <i class="fa fa-pinterest"></i><label for="fuse_social_options[pinterest]" > Pinterest</label><br /><input id="fuse_social_options[pinterest]" value="<?php
912
+ esc_attr_e( $options['pinterest'] );
913
+ ?>" name="fuse_social_options[pinterest]" type="text" placeholder="Pinterest URL" />
914
 
915
 
916
 
930
 
931
 
932
 
933
+ <i class="fa fa-stumbleupon"></i><label for="fuse_social_options[stumbleupon]" > Stumbleupon</label><br /><input id="fuse_social_options[stumbleupon]" value="<?php
934
+ esc_attr_e( $options['stumbleupon'] );
935
+ ?>" name="fuse_social_options[stumbleupon]" type="text" placeholder="Stumbleupon URL" />
936
 
937
 
938
 
960
 
961
 
962
 
963
+ <i class="fa fa-google-plus"></i><label for="fuse_social_options[google-plus]" > Google Plus</label><br /><input id="fuse_social_options[google-plus]" value="<?php
964
+ esc_attr_e( $options['google-plus'] );
965
+ ?>" name="fuse_social_options[google-plus]" type="text" placeholder="Google Plus URL" />
966
 
967
 
968
 
1002
 
1003
 
1004
 
1005
+ <i class="fa fa-instagram"></i><label for="fuse_social_options[instagram]" > Instagram</label><br /><input id="fuse_social_options[instagram]" value="<?php
1006
+ esc_attr_e( $options['instagram'] );
1007
+ ?>" name="fuse_social_options[instagram]" type="text" placeholder="Instagram URL" />
1008
 
1009
 
1010
 
1028
 
1029
 
1030
 
1031
+ <i class="fa fa-tumblr"></i><label for="fuse_social_options[tumblr]" > Tumblr</label><br /><input id="fuse_social_options[tumblr]" value="<?php
1032
+ esc_attr_e( $options['tumblr'] );
1033
+ ?>" name="fuse_social_options[tumblr]" type="text" placeholder="Tumblr URL" />
1034
 
1035
 
1036
 
1058
 
1059
 
1060
 
1061
+ <i class="fa fa-vine"></i><label for="fuse_social_options[vine]" > Vine</label><br /><input id="fuse_social_options[vine]" value="<?php
1062
+ esc_attr_e( $options['vine'] );
1063
+ ?>" name="fuse_social_options[vine]" type="text" placeholder="Vine URL" />
1064
 
1065
 
1066
 
1094
 
1095
 
1096
 
1097
+ <i class="fa fa-vk"></i><label for="fuse_social_options[vk]" > VK</label><br /><input id="fuse_social_options[vk]" value="<?php
1098
+ esc_attr_e( $options['vk'] );
1099
+ ?>" name="fuse_social_options[vk]" type="text" placeholder="VK URL" />
1100
 
1101
 
1102
 
1120
 
1121
 
1122
 
1123
+ <i class="fa fa-soundcloud"></i><label for="fuse_social_options[soundcloud]" > Sound Cloud</label><br /><input id="fuse_social_options[soundcloud]" value="<?php
1124
+ esc_attr_e( $options['soundcloud'] );
1125
+ ?>" name="fuse_social_options[soundcloud]" type="text" placeholder="Sound Cloud URL" />
1126
 
1127
 
1128
 
1150
 
1151
 
1152
 
1153
+ <i class="fa fa-reddit"></i><label for="fuse_social_options[reddit]" > Reddit</label><br /><input id="fuse_social_options[reddit]" value="<?php
1154
+ esc_attr_e( $options['reddit'] );
1155
+ ?>" name="fuse_social_options[reddit]" type="text" placeholder="Reddit URL" />
1156
 
1157
 
1158
 
1188
 
1189
 
1190
 
1191
+ <i class="fa fa-stack-overflow"></i><label for="fuse_social_options[stack]" > Stack OverFLow</label><br /><input id="fuse_social_options[stack]" value="<?php
1192
+ esc_attr_e( $options['stack'] );
1193
+ ?>" name="fuse_social_options[stack]" type="text" placeholder="Stack OverFlow URL" />
1194
 
1195
 
1196
 
1214
 
1215
 
1216
 
1217
+ <i class="fa fa-behance"></i><label for="fuse_social_options[behance]" > Behance</label><br /><input id="fuse_social_options[behance]" value="<?php
1218
+ esc_attr_e( $options['behance'] );
1219
+ ?>" name="fuse_social_options[behance]" type="text" placeholder="Behance URL" />
1220
 
1221
 
1222
 
1244
 
1245
 
1246
 
1247
+ <i class="fa fa-github"></i><label for="fuse_social_options[github]" > Github</label><br /><input id="fuse_social_options[github]" value="<?php
1248
+ esc_attr_e( $options['github'] );
1249
+ ?>" name="fuse_social_options[github]" type="text" placeholder="Github URL" />
1250
 
1251
 
1252
 
1276
 
1277
 
1278
 
1279
+ <i class="fa fa-envelope-o"></i><label for="fuse_social_options[envelope]" > Email</label><br /><input id="fuse_social_options[envelope]" value="<?php
1280
+ esc_attr_e( $options['envelope'] );
1281
+ ?>" name="fuse_social_options[envelope]" type="text" placeholder="mailto:someone@example.com" />
1282
 
1283
 
1284
 
1293
 
1294
 
1295
  </table>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1296
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1297
 
1298
+ <?php
1299
+ ?>
1300
+ <div class='add_custom_icon' >Can't find the icon that you want to add? or want add more customized icons? <a href="<?php
1301
+ echo fs_fs()->get_upgrade_url() ;
1302
+ ?>">Upgrade Now</a></div>
1303
+ <?php
1304
+ ?>
1305
+
1306
+
1307
+
1308
  <style type="text/css">
1309
+ .add_custom_icon {
1310
+ background: #F44336;
1311
+ color: #fff;
1312
+ text-align: center;
1313
+ padding: 18px;
1314
+ font-size: 16px;
1315
+ margin-top: 15px;
1316
+ }
1317
+
1318
+ .add_custom_icon a {
1319
+ background: #fff;
1320
+ padding: 11px 20px;
1321
+ color: #f7412d;
1322
+ border-radius: 5px;
1323
+ text-decoration: none;
1324
+ }
1325
+
1326
+ .add_custom_icon::after {
1327
+ content: "";
1328
+ display: block;
1329
+ clear: both;
1330
+ }
1331
+
1332
+ .add_custom_icon {
1333
+ }
1334
  table.tab-cus {
1335
  width: 100%;
1336
  text-align: center;
1373
 
1374
  <div class="facebook_prof">
1375
  <div class="fb_icon_link">
1376
+ Need help in something? Inbox us here <br />
1377
  <a href="https://www.facebook.com/messages/t/mewoooooo" target="_blank"><img src="https://png.icons8.com/color/100/000000/facebook-messenger.png"></a>
1378
 
1379
  </div>
1399
 
1400
 
1401
 
1402
+ <input type="submit" class="button-primary fuse-social-submit" value="<?php
1403
+ _e( 'Save Options', 'awesomesocial' );
1404
+ ?>" />
1405
 
1406
 
1407
 
1408
+ <?php
1409
+ echo "<div class='loading-cover-pi'><img src='" . plugin_dir_url( __FILE__ ) . "img/loader.gif' id='fuse_social_load'/></div>" ;
1410
+ ?>
1411
 
1412
 
1413
 
1500
 
1501
 
1502
 
1503
+ jQuery('#saveMessage').append("<p><?php
1504
+ echo htmlentities( __( 'Settings Saved Successfully', 'wp' ), ENT_QUOTES ) ;
1505
+ ?></p>").show();
1506
 
1507
  jQuery(".loading-cover-pi").hide();
1508
 
1522
 
1523
 
1524
 
1525
+ jQuery('#saveMessage').append("<p><?php
1526
+ echo htmlentities( __( 'Settings Saved Successfully', 'wp' ), ENT_QUOTES ) ;
1527
+ ?></p>").show();
1528
 
1529
  }
1530
 
1552
 
1553
 
1554
 
1555
+ <?php
1556
+ echo '</div>' ;
1557
+ }
1558
 
1559
+ add_action( 'admin_init', 'fuse_social_options_init' );
1560
  /**
1561
  * Init plugin options to white list our options
1562
  */
 
1563
  function fuse_social_options_init()
1564
+ {
1565
+ register_setting( 'fuse_social', 'fuse_social_options', 'fuse_social_icon_validate' );
1566
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1567
 
1568
+ function fuse_social_icon_validate( $input )
1569
+ {
1570
+ global $size_options, $style_options, $pos_options ;
1571
+ // Link new tab checkbox value is either 0 or 1
1572
+ if ( !isset( $input['linksnewtab'] ) ) {
1573
+ $input['linksnewtab'] = null;
1574
+ }
1575
+ $input['linksnewtab'] = ( $input['linksnewtab'] == 1 ? 1 : 0 );
1576
+ if ( !isset( $input['animations'] ) ) {
1577
+ // Animation checkbox value is either 0 or 1
1578
+ $input['animations'] = null;
1579
+ }
1580
+ $input['animations'] = ( $input['animations'] == 1 ? 1 : 0 );
1581
+ // Shadow checkbox value is either 0 or 1
1582
+ if ( !isset( $input['shadow'] ) ) {
1583
+ $input['shadow'] = null;
1584
+ }
1585
+ $input['shadow'] = ( $input['shadow'] == 1 ? 1 : 0 );
1586
+ // Our style option must actually be in our array of style options
1587
+ if ( !isset( $input['style_input'] ) ) {
1588
+ $input['style_input'] = null;
1589
+ }
1590
+ if ( !array_key_exists( $input['style_input'], $style_options ) ) {
1591
+ $input['style_input'] = null;
1592
+ }
1593
+ // Social profiles links must be safe links with no HTML tags
1594
+ $input['facebook'] = wp_filter_nohtml_kses( $input['facebook'] );
1595
+ $input['twitter'] = wp_filter_nohtml_kses( $input['twitter'] );
1596
+ $input['rss'] = wp_filter_nohtml_kses( $input['rss'] );
1597
+ $input['linkedin'] = wp_filter_nohtml_kses( $input['linkedin'] );
1598
+ $input['youtube'] = wp_filter_nohtml_kses( $input['youtube'] );
1599
+ $input['flickr'] = wp_filter_nohtml_kses( $input['flickr'] );
1600
+ $input['pinterest'] = wp_filter_nohtml_kses( $input['pinterest'] );
1601
+ $input['stumbleupon'] = wp_filter_nohtml_kses( $input['stumbleupon'] );
1602
+ $input['google-plus'] = wp_filter_nohtml_kses( $input['google-plus'] );
1603
+ $input['instagram'] = wp_filter_nohtml_kses( $input['instagram'] );
1604
+ $input['tumblr'] = wp_filter_nohtml_kses( $input['tumblr'] );
1605
+ $input['vine'] = wp_filter_nohtml_kses( $input['vine'] );
1606
+ $input['url_sec'] = wp_filter_nohtml_kses( $input['url_sec'] );
1607
+ $input['icon_sec'] = wp_filter_nohtml_kses( $input['icon_sec'] );
1608
+ // Our size option must actually be in our array of size options
1609
+ if ( !array_key_exists( $input['size'], $size_options ) ) {
1610
+ $input['size'] = null;
1611
+ }
1612
+ // Our size option must actually be in our array of size options
1613
+ if ( !array_key_exists( $input['position'], $pos_options ) ) {
1614
+ $input['position'] = null;
1615
+ }
1616
+ return $input;
1617
+ }
inc/fuse_social_sidebar_func.php CHANGED
@@ -1,326 +1,167 @@
1
  <?php
 
2
  /*---------------------------------------------------
3
  Social Icons generator for front-end
4
  ----------------------------------------------------*/
5
  //Checking is style is square or round.
6
  $fuse_social_opt_front = array(
7
-
8
- 'square' => array(
9
-
10
- 'value' => 'square',
11
-
12
- 'label' => __('', 'awesome-social')
13
-
14
- ),
15
-
16
- 'round' => array(
17
-
18
- 'value' => 'round',
19
-
20
- 'label' => __('', 'awesome-social')
21
-
22
- )
23
-
24
  );
25
-
26
- global $fuse_social_style;
27
-
28
- if (!isset($checked))
29
-
30
- $checked = '';
31
-
32
- foreach ($fuse_social_opt_front as $option)
33
-
34
- {
35
-
36
- $radio_setting = $options['style_input'];
37
-
38
- if ('' != $radio_setting)
39
-
40
- {
41
-
42
- if ($options['style_input'] == $option['value'])
43
-
44
- {
45
-
46
- $fuse_social_style = $options['style_input'];
47
-
48
- $checked = "checked=\"checked\"";
49
-
50
- }
51
-
52
- else
53
-
54
- {
55
-
56
- $checked = '';
57
-
58
- }
59
-
60
- }
61
-
62
- }
63
-
64
  class Making_Fuse_Icons
65
-
66
- {
67
-
68
- // Generating Icons with respective links
69
-
70
- function Create_Awesome_Icons()
71
-
72
- {
73
-
74
-
75
-
76
- $options = get_option('fuse_social_options');
77
-
78
- echo "<div id='icon_wrapper'>";
79
-
80
- // Checking if target is _self or _blank
81
-
82
- if ($options['linksnewtab'] == 1)
83
-
84
- {
85
-
86
- $target = 'target="_blank"';
87
-
88
- }
89
-
90
- else
91
-
92
- {
93
-
94
- $target = 'target="_self"';
95
-
96
- }
97
-
98
- // Checking if social icon value is set from admin settings then display that icon, other wise not.
99
-
100
- if ($options['facebook'])
101
-
102
- {
103
-
104
- $facebook = $options['facebook'];
105
-
106
- echo "<a $target class='fuse_social_icons_links' href='$facebook'> <i class='fa fa-facebook fb-awesome-social awesome-social'></i></a><br />";
107
-
108
- }
109
-
110
- if ($options['twitter'])
111
-
112
- {
113
-
114
- $twitter = $options['twitter'];
115
-
116
- echo "<a $target class='fuse_social_icons_links' href='$twitter'> <i class='fa fa-twitter tw-awesome-social awesome-social'></i></a><br />";
117
-
118
- }
119
-
120
- if ($options['rss'])
121
-
122
- {
123
-
124
- $rss = $options['rss'];
125
-
126
- echo "<a $target class='fuse_social_icons_links' href='$rss'> <i class='fa fa-rss rss-awesome-social awesome-social'></i></a><br />";
127
-
128
- }
129
-
130
- if ($options['linkedin'])
131
-
132
- {
133
-
134
- $linkedin = $options['linkedin'];
135
-
136
- echo "<a $target class='fuse_social_icons_links' href='$linkedin'> <i class='fa fa-linkedin linkedin-awesome-social awesome-social'></i></a><br />";
137
-
138
- }
139
-
140
- if ($options['youtube'])
141
-
142
- {
143
-
144
- $youtube = $options['youtube'];
145
-
146
- echo "<a $target class='fuse_social_icons_links' href='$youtube'> <i class='fa fa-youtube youtube-awesome-social awesome-social'></i></a><br />";
147
-
148
- }
149
-
150
- if ($options['flickr'])
151
-
152
- {
153
-
154
- $flickr = $options['flickr'];
155
-
156
- echo "<a $target class='fuse_social_icons_links' href='$flickr'> <i class='fa fa-flickr flickr-awesome-social awesome-social'></i></a><br />";
157
-
158
- }
159
-
160
- if ($options['pinterest'])
161
-
162
- {
163
-
164
- $pinterest = $options['pinterest'];
165
-
166
- echo "<a $target class='fuse_social_icons_links' href='$pinterest'> <i class='fa fa-pinterest pinterest-awesome-social awesome-social'></i></a><br />";
167
-
168
- }
169
-
170
- if ($options['stumbleupon'])
171
-
172
- {
173
-
174
- $stumbleupon = $options['stumbleupon'];
175
-
176
- echo "<a $target class='fuse_social_icons_links' href='$stumbleupon'> <i class='fa fa-stumbleupon stumbleupon-awesome-social awesome-social'></i></a><br />";
177
-
178
- }
179
-
180
- if ($options['google-plus'])
181
-
182
- {
183
-
184
- $google = $options['google-plus'];
185
-
186
- echo "<a $target class='fuse_social_icons_links' href='$google'> <i class='fa fa-google-plus google-plus-awesome-social awesome-social'></i></a><br />";
187
-
188
- }
189
-
190
- if ($options['instagram'])
191
-
192
- {
193
-
194
- $instagram = $options['instagram'];
195
-
196
- echo "<a $target class='fuse_social_icons_links' href='$instagram'> <i class='fa fa-instagram instagram-awesome-social awesome-social'></i></a><br />";
197
-
198
- }
199
-
200
- if ($options['tumblr'])
201
-
202
- {
203
-
204
- $tumblr = $options['tumblr'];
205
-
206
- echo "<a $target class='fuse_social_icons_links' href='$tumblr'> <i class='fa fa-tumblr tumblr-awesome-social awesome-social'></i></a><br />";
207
-
208
- }
209
-
210
- if ($options['vine'])
211
-
212
- {
213
-
214
- $vine = $options['vine'];
215
-
216
- echo "<a $target class='fuse_social_icons_links' href='$vine'> <i class='fa fa-vine vine-awesome-social awesome-social'></i></a><br />";
217
-
218
- }
219
-
220
-
221
-
222
- if ($options['vk'])
223
-
224
- {
225
-
226
- $vk = $options['vk'];
227
-
228
- echo "<a $target class='fuse_social_icons_links' href='$vk'> <i class='fa fa-vk vk-awesome-social awesome-social'></i></a><br />";
229
-
230
- }
231
-
232
-
233
-
234
- if ($options['soundcloud'])
235
-
236
- {
237
-
238
- $soundcloud = $options['soundcloud'];
239
-
240
- echo "<a $target class='fuse_social_icons_links' href='$soundcloud'> <i class='fa fa-soundcloud soundcloud-awesome-social awesome-social'></i></a><br />";
241
-
242
- }
243
-
244
-
245
-
246
- if ($options['reddit'])
247
-
248
- {
249
-
250
- $reddit = $options['reddit'];
251
-
252
- echo "<a $target class='fuse_social_icons_links' href='$reddit'> <i class='fa fa-reddit reddit-awesome-social awesome-social'></i></a><br />";
253
-
254
- }
255
-
256
-
257
-
258
- if ($options['stack'])
259
-
260
- {
261
-
262
- $stack = $options['stack'];
263
-
264
- echo "<a $target class='fuse_social_icons_links' href='$stack'> <i class='fa fa-stack-overflow stack-awesome-social awesome-social'></i></a><br />";
265
-
266
- }
267
-
268
-
269
-
270
- if ($options['behance'])
271
-
272
- {
273
-
274
- $behance = $options['behance'];
275
-
276
- echo "<a $target class='fuse_social_icons_links' href='$behance'> <i class='fa fa-behance behance-awesome-social awesome-social'></i></a><br />";
277
-
278
- }
279
-
280
-
281
-
282
- if ($options['github'])
283
-
284
- {
285
-
286
- $github = $options['github'];
287
-
288
- echo "<a $target class='fuse_social_icons_links' href='$github'> <i class='fa fa-github github-awesome-social awesome-social'></i></a><br />";
289
-
290
- }
291
-
292
- if ($options['envelope'])
293
-
294
- {
295
-
296
- $envelope = $options['envelope'];
297
-
298
- echo "<a $target class='fuse_social_icons_links' href='$envelope'> <i class='fa fa-envelope envelope-awesome-social awesome-social'></i></a><br />";
299
-
300
- }
301
-
302
- $countiner = 20;
303
-
304
- for ($i=1; $i < 20; $i++) {
305
- $temps = 'icon_sec_'.$i;
306
-
307
- if(!empty($options[$temps])){
308
- if(filter_var($options[$temps], FILTER_VALIDATE_URL))
309
- {
310
- echo "<a $target class='fuse_social_icons_links' href='".$options['url_sec_'.$i]."'><img src='".$options[$temps]."' class='image_link' /></a><br />";
311
- }
312
- else {
313
- echo "<a $target class='fuse_social_icons_links' href='".$options['url_sec_'.$i]."'> <i style='background:".$options['bg_color_ico_'.$i].";' class='fa ".$options[$temps]." ".$options[$temps]."-awesome-social awesome-social'></i></a><br />";
314
- }
315
- }
316
- }
317
- echo "<style>a.fuse_social_icons_links img { width: 48px; }</style></div>";
318
-
319
-
320
-
321
-
322
-
323
- }
324
-
325
- }
326
- ?>
1
  <?php
2
+
3
  /*---------------------------------------------------
4
  Social Icons generator for front-end
5
  ----------------------------------------------------*/
6
  //Checking is style is square or round.
7
  $fuse_social_opt_front = array(
8
+ 'square' => array(
9
+ 'value' => 'square',
10
+ 'label' => __( '', 'awesome-social' ),
11
+ ),
12
+ 'round' => array(
13
+ 'value' => 'round',
14
+ 'label' => __( '', 'awesome-social' ),
15
+ ),
 
 
 
 
 
 
 
 
 
16
  );
17
+ global $fuse_social_style ;
18
+ if ( !isset( $checked ) ) {
19
+ $checked = '';
20
+ }
21
+ foreach ( $fuse_social_opt_front as $option ) {
22
+ $radio_setting = $options['style_input'];
23
+ if ( '' != $radio_setting ) {
24
+
25
+ if ( $options['style_input'] == $option['value'] ) {
26
+ $fuse_social_style = $options['style_input'];
27
+ $checked = "checked=\"checked\"";
28
+ } else {
29
+ $checked = '';
30
+ }
31
+
32
+ }
33
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  class Making_Fuse_Icons
35
+ {
36
+ // Generating Icons with respective links
37
+ function Create_Awesome_Icons()
38
+ {
39
+ $options = get_option( 'fuse_social_options' );
40
+ echo "<div id='icon_wrapper'>" ;
41
+ // Checking if target is _self or _blank
42
+
43
+ if ( $options['linksnewtab'] == 1 ) {
44
+ $target = 'target="_blank"';
45
+ } else {
46
+ $target = 'target="_self"';
47
+ }
48
+
49
+ // Checking if social icon value is set from admin settings then display that icon, other wise not.
50
+
51
+ if ( $options['facebook'] ) {
52
+ $facebook = $options['facebook'];
53
+ echo "<a {$target} class='fuse_social_icons_links' href='{$facebook}'>\t<i class='fa fa-facebook fb-awesome-social awesome-social'></i></a><br />" ;
54
+ }
55
+
56
+
57
+ if ( $options['twitter'] ) {
58
+ $twitter = $options['twitter'];
59
+ echo "<a {$target} class='fuse_social_icons_links' href='{$twitter}'>\t<i class='fa fa-twitter tw-awesome-social awesome-social'></i></a><br />" ;
60
+ }
61
+
62
+
63
+ if ( $options['rss'] ) {
64
+ $rss = $options['rss'];
65
+ echo "<a {$target} class='fuse_social_icons_links' href='{$rss}'>\t<i class='fa fa-rss rss-awesome-social awesome-social'></i></a><br />" ;
66
+ }
67
+
68
+
69
+ if ( $options['linkedin'] ) {
70
+ $linkedin = $options['linkedin'];
71
+ echo "<a {$target} class='fuse_social_icons_links' href='{$linkedin}'>\t<i class='fa fa-linkedin linkedin-awesome-social awesome-social'></i></a><br />" ;
72
+ }
73
+
74
+
75
+ if ( $options['youtube'] ) {
76
+ $youtube = $options['youtube'];
77
+ echo "<a {$target} class='fuse_social_icons_links' href='{$youtube}'>\t<i class='fa fa-youtube youtube-awesome-social awesome-social'></i></a><br />" ;
78
+ }
79
+
80
+
81
+ if ( $options['flickr'] ) {
82
+ $flickr = $options['flickr'];
83
+ echo "<a {$target} class='fuse_social_icons_links' href='{$flickr}'>\t<i class='fa fa-flickr flickr-awesome-social awesome-social'></i></a><br />" ;
84
+ }
85
+
86
+
87
+ if ( $options['pinterest'] ) {
88
+ $pinterest = $options['pinterest'];
89
+ echo "<a {$target} class='fuse_social_icons_links' href='{$pinterest}'>\t<i class='fa fa-pinterest pinterest-awesome-social awesome-social'></i></a><br />" ;
90
+ }
91
+
92
+
93
+ if ( $options['stumbleupon'] ) {
94
+ $stumbleupon = $options['stumbleupon'];
95
+ echo "<a {$target} class='fuse_social_icons_links' href='{$stumbleupon}'>\t<i class='fa fa-stumbleupon stumbleupon-awesome-social awesome-social'></i></a><br />" ;
96
+ }
97
+
98
+
99
+ if ( $options['google-plus'] ) {
100
+ $google = $options['google-plus'];
101
+ echo "<a {$target} class='fuse_social_icons_links' href='{$google}'>\t<i class='fa fa-google-plus google-plus-awesome-social awesome-social'></i></a><br />" ;
102
+ }
103
+
104
+
105
+ if ( $options['instagram'] ) {
106
+ $instagram = $options['instagram'];
107
+ echo "<a {$target} class='fuse_social_icons_links' href='{$instagram}'>\t<i class='fa fa-instagram instagram-awesome-social awesome-social'></i></a><br />" ;
108
+ }
109
+
110
+
111
+ if ( $options['tumblr'] ) {
112
+ $tumblr = $options['tumblr'];
113
+ echo "<a {$target} class='fuse_social_icons_links' href='{$tumblr}'>\t<i class='fa fa-tumblr tumblr-awesome-social awesome-social'></i></a><br />" ;
114
+ }
115
+
116
+
117
+ if ( $options['vine'] ) {
118
+ $vine = $options['vine'];
119
+ echo "<a {$target} class='fuse_social_icons_links' href='{$vine}'>\t<i class='fa fa-vine vine-awesome-social awesome-social'></i></a><br />" ;
120
+ }
121
+
122
+
123
+ if ( $options['vk'] ) {
124
+ $vk = $options['vk'];
125
+ echo "<a {$target} class='fuse_social_icons_links' href='{$vk}'>\t<i class='fa fa-vk vk-awesome-social awesome-social'></i></a><br />" ;
126
+ }
127
+
128
+
129
+ if ( $options['soundcloud'] ) {
130
+ $soundcloud = $options['soundcloud'];
131
+ echo "<a {$target} class='fuse_social_icons_links' href='{$soundcloud}'>\t<i class='fa fa-soundcloud soundcloud-awesome-social awesome-social'></i></a><br />" ;
132
+ }
133
+
134
+
135
+ if ( $options['reddit'] ) {
136
+ $reddit = $options['reddit'];
137
+ echo "<a {$target} class='fuse_social_icons_links' href='{$reddit}'>\t<i class='fa fa-reddit reddit-awesome-social awesome-social'></i></a><br />" ;
138
+ }
139
+
140
+
141
+ if ( $options['stack'] ) {
142
+ $stack = $options['stack'];
143
+ echo "<a {$target} class='fuse_social_icons_links' href='{$stack}'>\t<i class='fa fa-stack-overflow stack-awesome-social awesome-social'></i></a><br />" ;
144
+ }
145
+
146
+
147
+ if ( $options['behance'] ) {
148
+ $behance = $options['behance'];
149
+ echo "<a {$target} class='fuse_social_icons_links' href='{$behance}'>\t<i class='fa fa-behance behance-awesome-social awesome-social'></i></a><br />" ;
150
+ }
151
+
152
+
153
+ if ( $options['github'] ) {
154
+ $github = $options['github'];
155
+ echo "<a {$target} class='fuse_social_icons_links' href='{$github}'>\t<i class='fa fa-github github-awesome-social awesome-social'></i></a><br />" ;
156
+ }
157
+
158
+
159
+ if ( $options['envelope'] ) {
160
+ $envelope = $options['envelope'];
161
+ echo "<a {$target} class='fuse_social_icons_links' href='{$envelope}'>\t<i class='fa fa-envelope envelope-awesome-social awesome-social'></i></a><br />" ;
162
+ }
163
+
164
+ $countiner = 20;
165
+ }
166
+
167
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/fuse_social_sidebar_scripts.php CHANGED
File without changes
inc/img/loader.gif CHANGED
File without changes
inc/img/round_logo.png CHANGED
File without changes
inc/img/square_logo.png CHANGED
File without changes
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Plugin Name ===
2
- Contributors: daniyalahmedk
3
  Donate link: http://photontechs.com/donate
4
  Tags: social media, floating sidebar, social widget, social icons,animated social icons
5
  Requires at least: 3.0
6
- Tested up to: 4.9
7
- Stable tag: 3.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
1
  === Plugin Name ===
2
+ Contributors: daniyalahmedk, freemius
3
  Donate link: http://photontechs.com/donate
4
  Tags: social media, floating sidebar, social widget, social icons,animated social icons
5
  Requires at least: 3.0
6
+ Tested up to: 5.1
7
+ Stable tag: 4.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10