Simple Share Buttons Adder - Version 7.3.9

Version Description

  • Fixed missing variable error.
  • Remove missing index errors.
Download this release

Release Info

Developer DavidoffNeal
Plugin Icon 128x128 Simple Share Buttons Adder
Version 7.3.9
Comparing to
See all releases

Code changes from version 7.3.8 to 7.3.9

instance.php CHANGED
@@ -9,7 +9,7 @@ namespace SimpleShareButtonsAdder;
9
 
10
  define( 'SSBA_FILE', __FILE__ );
11
  define( 'SSBA_ROOT', dirname( __FILE__ ) );
12
- define( 'SSBA_VERSION', '7.3.8' );
13
 
14
  global $simple_share_buttons_adder_plugin;
15
 
9
 
10
  define( 'SSBA_FILE', __FILE__ );
11
  define( 'SSBA_ROOT', dirname( __FILE__ ) );
12
+ define( 'SSBA_VERSION', '7.3.9' );
13
 
14
  global $simple_share_buttons_adder_plugin;
15
 
php/class-admin-panel.php CHANGED
@@ -72,23 +72,23 @@ class Admin_Panel {
72
  $locs = array(
73
  'Homepage' => array(
74
  'value' => 'ssba_homepage',
75
- 'checked' => 'Y' === $arr_settings['ssba_homepage'] ? true : false,
76
  ),
77
  'Pages' => array(
78
  'value' => 'ssba_pages',
79
- 'checked' => 'Y' === $arr_settings['ssba_pages'] ? true : false,
80
  ),
81
  'Posts' => array(
82
  'value' => 'ssba_posts',
83
- 'checked' => 'Y' === $arr_settings['ssba_posts'] ? true : false,
84
  ),
85
  'Excerpts' => array(
86
  'value' => 'ssba_excerpts',
87
- 'checked' => 'Y' === $arr_settings['ssba_excerpts'] ? true : false,
88
  ),
89
  'Categories/Archives' => array(
90
  'value' => 'ssba_cats_archs',
91
- 'checked' => 'Y' === $arr_settings['ssba_cats_archs'] ? true : false,
92
  ),
93
  );
94
 
@@ -116,23 +116,23 @@ class Admin_Panel {
116
  $locs3 = array(
117
  'Homepage' => array(
118
  'value' => 'ssba_plus_homepage',
119
- 'checked' => 'Y' === $arr_settings['ssba_plus_homepage'] ? true : false,
120
  ),
121
  'Pages' => array(
122
  'value' => 'ssba_plus_pages',
123
- 'checked' => 'Y' === $arr_settings['ssba_plus_pages'] ? true : false,
124
  ),
125
  'Posts' => array(
126
  'value' => 'ssba_plus_posts',
127
- 'checked' => 'Y' === $arr_settings['ssba_plus_posts'] ? true : false,
128
  ),
129
  'Excerpts' => array(
130
  'value' => 'ssba_plus_excerpts',
131
- 'checked' => 'Y' === $arr_settings['ssba_plus_excerpts'] ? true : false,
132
  ),
133
  'Categories/Archives' => array(
134
  'value' => 'ssba_plus_cats_archs',
135
- 'checked' => 'Y' === $arr_settings['ssba_plus_cats_archs'] ? true : false,
136
  ),
137
  );
138
 
@@ -140,11 +140,11 @@ class Admin_Panel {
140
  $display_loc = array(
141
  'Desktop' => array(
142
  'value' => 'ssba_share_desktop',
143
- 'checked' => 'Y' === $arr_settings['ssba_share_desktop'] ? true : false,
144
  ),
145
  'Mobile' => array(
146
  'value' => 'ssba_share_mobile',
147
- 'checked' => 'Y' === $arr_settings['ssba_share_mobile'] ? true : false,
148
  ),
149
  );
150
 
@@ -167,7 +167,7 @@ class Admin_Panel {
167
  'name' => 'ssba_before_or_after',
168
  'label' => 'Placement',
169
  'tooltip' => 'Place share buttons before or after your content',
170
- 'selected' => $arr_settings['ssba_before_or_after'],
171
  'options' => array(
172
  'After' => 'after',
173
  'Before' => 'before',
@@ -183,7 +183,7 @@ class Admin_Panel {
183
  'name' => 'ssba_share_text',
184
  'label' => 'Call To Action',
185
  'tooltip' => 'Add some custom text by your share buttons',
186
- 'value' => $arr_settings['ssba_share_text'],
187
  );
188
 
189
  // Share text for plus.
@@ -194,7 +194,7 @@ class Admin_Panel {
194
  'name' => 'ssba_plus_share_text',
195
  'label' => 'Call To Action',
196
  'tooltip' => 'Add some custom text by your share buttons',
197
- 'value' => $arr_settings['ssba_plus_share_text'],
198
  );
199
 
200
  // Placement.
@@ -204,7 +204,7 @@ class Admin_Panel {
204
  'name' => 'ssba_image_set',
205
  'label' => 'Theme',
206
  'tooltip' => 'Choose your favourite set of buttons, or set to custom to choose your own',
207
- 'selected' => $arr_settings['ssba_image_set'],
208
  'options' => array(
209
  'Arbenta' => 'arbenta',
210
  'Custom' => 'custom',
@@ -227,7 +227,7 @@ class Admin_Panel {
227
  'name' => 'ssba_size',
228
  'label' => 'Button Size',
229
  'tooltip' => 'Set the size of your buttons in pixels',
230
- 'value' => $arr_settings['ssba_size'],
231
  );
232
 
233
  // Alignment.
@@ -237,7 +237,7 @@ class Admin_Panel {
237
  'name' => 'ssba_align',
238
  'label' => 'Alignment',
239
  'tooltip' => 'Align your buttons the way you wish',
240
- 'selected' => $arr_settings['ssba_align'],
241
  'options' => array(
242
  'Left' => 'left',
243
  'Center' => 'center',
@@ -252,7 +252,7 @@ class Admin_Panel {
252
  'name' => 'ssba_plus_align',
253
  'label' => 'Alignment',
254
  'tooltip' => 'Align your plus buttons the way you wish',
255
- 'selected' => $arr_settings['ssba_plus_align'],
256
  'options' => array(
257
  'Left' => 'left',
258
  'Center' => 'center',
@@ -269,7 +269,7 @@ class Admin_Panel {
269
  'name' => 'ssba_padding',
270
  'label' => 'Padding',
271
  'tooltip' => 'Apply some space around your images',
272
- 'value' => $arr_settings['ssba_padding'],
273
  );
274
 
275
  // Font color.
@@ -279,7 +279,7 @@ class Admin_Panel {
279
  'name' => 'ssba_font_color',
280
  'label' => 'Font Color',
281
  'tooltip' => 'Choose the color of your share text',
282
- 'value' => $arr_settings['ssba_font_color'],
283
  );
284
 
285
  // Font color for plus.
@@ -289,7 +289,7 @@ class Admin_Panel {
289
  'name' => 'ssba_plus_font_color',
290
  'label' => 'Font Color',
291
  'tooltip' => 'Choose the color of your share text',
292
- 'value' => $arr_settings['ssba_plus_font_color'],
293
  );
294
 
295
  // Font family.
@@ -299,7 +299,7 @@ class Admin_Panel {
299
  'name' => 'ssba_font_family',
300
  'label' => 'Font Family',
301
  'tooltip' => 'Choose a font available or inherit the font from your website',
302
- 'selected' => $arr_settings['ssba_font_family'],
303
  'options' => array(
304
  'Reenie Beanie' => 'Reenie Beanie',
305
  'Indie Flower' => 'Indie Flower',
@@ -314,7 +314,7 @@ class Admin_Panel {
314
  'name' => 'ssba_plus_font_family',
315
  'label' => 'Font Family',
316
  'tooltip' => 'Choose a font available or inherit the font from your website',
317
- 'selected' => $arr_settings['ssba_plus_font_family'],
318
  'options' => array(
319
  'Reenie Beanie' => 'Reenie Beanie',
320
  'Indie Flower' => 'Indie Flower',
@@ -335,7 +335,7 @@ class Admin_Panel {
335
  'name' => 'ssba_font_size',
336
  'label' => 'Font Size',
337
  'tooltip' => 'Set the size of the share text in pixels',
338
- 'value' => $arr_settings['ssba_font_size'],
339
  );
340
 
341
  // Font size for plus.
@@ -347,7 +347,7 @@ class Admin_Panel {
347
  'name' => 'ssba_plus_font_size',
348
  'label' => 'Font Size',
349
  'tooltip' => 'Set the size of the share text in pixels',
350
- 'value' => $arr_settings['ssba_plus_font_size'],
351
  );
352
 
353
  // Font weight.
@@ -357,7 +357,7 @@ class Admin_Panel {
357
  'name' => 'ssba_font_weight',
358
  'label' => 'Font Weight',
359
  'tooltip' => 'Set the weight of the share text',
360
- 'selected' => $arr_settings['ssba_font_weight'],
361
  'options' => array(
362
  'Normal' => 'normal',
363
  'Bold' => 'bold',
@@ -372,7 +372,7 @@ class Admin_Panel {
372
  'name' => 'ssba_plus_font_weight',
373
  'label' => 'Font Weight',
374
  'tooltip' => 'Set the weight of the share text',
375
- 'selected' => $arr_settings['ssba_plus_font_weight'],
376
  'options' => array(
377
  'Normal' => 'normal',
378
  'Bold' => 'bold',
@@ -387,7 +387,7 @@ class Admin_Panel {
387
  'name' => 'ssba_text_placement',
388
  'label' => 'Text placement',
389
  'tooltip' => 'Choose where you want your text to be displayed, in relation to the buttons',
390
- 'selected' => $arr_settings['ssba_text_placement'],
391
  'options' => array(
392
  'Above' => 'above',
393
  'Left' => 'left',
@@ -403,7 +403,7 @@ class Admin_Panel {
403
  'name' => 'ssba_plus_text_placement',
404
  'label' => 'Text placement',
405
  'tooltip' => 'Choose where you want your text to be displayed, in relation to the buttons',
406
- 'selected' => $arr_settings['ssba_plus_text_placement'],
407
  'options' => array(
408
  'Above' => 'above',
409
  'Left' => 'left',
@@ -421,7 +421,7 @@ class Admin_Panel {
421
  'name' => 'ssba_div_padding',
422
  'label' => 'Container Padding',
423
  'tooltip' => 'Add some padding to your share container',
424
- 'value' => $arr_settings['ssba_div_padding'],
425
  );
426
 
427
  // Div background color.
@@ -431,7 +431,7 @@ class Admin_Panel {
431
  'name' => 'ssba_div_background',
432
  'label' => 'Container Background Color',
433
  'tooltip' => 'Choose the color of your share container',
434
- 'value' => $arr_settings['ssba_div_background'],
435
  );
436
 
437
  // Div border color.
@@ -441,7 +441,7 @@ class Admin_Panel {
441
  'name' => 'ssba_div_border',
442
  'label' => 'Container Border Color',
443
  'tooltip' => 'Choose the color of your share container border',
444
- 'value' => $arr_settings['ssba_div_border'],
445
  );
446
 
447
  // Container border width.
@@ -453,7 +453,7 @@ class Admin_Panel {
453
  'name' => 'ssba_border_width',
454
  'label' => 'Container Border Width',
455
  'tooltip' => 'Set the width of the share container border',
456
- 'value' => $arr_settings['ssba_border_width'],
457
  );
458
 
459
  // Rounded container corners.
@@ -464,7 +464,7 @@ class Admin_Panel {
464
  'label' => 'Rounded Container Corners',
465
  'tooltip' => 'Switch on to enable rounded corners for your share container',
466
  'value' => 'Y',
467
- 'checked' => 'Y' === $arr_settings['ssba_div_rounded_corners'] ? esc_attr( 'checked' ) : '',
468
  );
469
 
470
  // Share count.
@@ -475,7 +475,7 @@ class Admin_Panel {
475
  'label' => 'Share Count',
476
  'tooltip' => 'Check the box if you wish to enable share counts. Enabling this option will slow down the loading of any pages that use share buttons',
477
  'value' => 'Y',
478
- 'checked' => 'Y' === $arr_settings['ssba_show_share_count'] ? esc_attr( 'checked' ) : null,
479
  );
480
 
481
  // Share count for plus.
@@ -486,7 +486,7 @@ class Admin_Panel {
486
  'label' => 'Share Count',
487
  'tooltip' => 'Check the box if you wish to enable share counts. Enabling this option will slow down the loading of any pages that use share buttons',
488
  'value' => 'Y',
489
- 'checked' => 'Y' === $arr_settings['ssba_plus_show_share_count'] ? esc_attr( 'checked' ) : null,
490
  );
491
 
492
  // Share count for share bar.
@@ -497,7 +497,7 @@ class Admin_Panel {
497
  'label' => 'Share Count',
498
  'tooltip' => 'Check the box if you wish to enable share counts. Enabling this option will slow down the loading of any pages that use share buttons',
499
  'value' => 'Y',
500
- 'checked' => 'Y' === $arr_settings['ssba_share_show_share_count'] ? esc_attr( 'checked' ) : null,
501
  );
502
 
503
  // Show count once.
@@ -508,7 +508,7 @@ class Admin_Panel {
508
  'label' => 'Show Once',
509
  'tooltip' => 'This option is recommended, it deactivates share counts for categories and archives allowing them to load more quickly',
510
  'value' => 'Y',
511
- 'checked' => 'Y' === $arr_settings['ssba_share_count_once'] ? esc_attr( 'checked' ) : null,
512
  );
513
 
514
  // Show count once for plus.
@@ -519,7 +519,7 @@ class Admin_Panel {
519
  'label' => 'Show Once',
520
  'tooltip' => 'This option is recommended, it deactivates share counts for categories and archives allowing them to load more quickly',
521
  'value' => 'Y',
522
- 'checked' => 'Y' === $arr_settings['ssba_plus_share_count_once'] ? esc_attr( 'checked' ) : null,
523
  );
524
 
525
  // Show count once for share bar.
@@ -530,7 +530,7 @@ class Admin_Panel {
530
  'label' => 'Show Once',
531
  'tooltip' => 'This option is recommended, it deactivates share counts for categories and archives allowing them to load more quickly',
532
  'value' => 'Y',
533
- 'checked' => 'Y' === $arr_settings['ssba_share_share_count_once'] ? esc_attr( 'checked' ) : null,
534
  );
535
 
536
  // Share counters style.
@@ -540,7 +540,7 @@ class Admin_Panel {
540
  'name' => 'ssba_share_count_style',
541
  'label' => 'Counters Style',
542
  'tooltip' => 'Pick a setting to style the share counters',
543
- 'selected' => $arr_settings['ssba_share_count_style'],
544
  'options' => array(
545
  'Default' => 'default',
546
  'White' => 'white',
@@ -556,7 +556,7 @@ class Admin_Panel {
556
  'label' => '',
557
  'tooltip' => 'Switch on to enable the use of the newsharecounts.com API for Twitter share counts',
558
  'value' => 'Y',
559
- 'checked' => 'Y' === $arr_settings['twitter_newsharecounts'] ? esc_attr( 'checked' ) : null,
560
  );
561
 
562
  // Sharedcount enable.
@@ -567,7 +567,7 @@ class Admin_Panel {
567
  'label' => 'Enable sharedcount.com API',
568
  'tooltip' => 'Enable if you wish to enable the use of the sharedcount.com API',
569
  'value' => 'Y',
570
- 'checked' => 'Y' === $arr_settings['sharedcount_enabled'] ? esc_attr( 'checked' ) : null,
571
  );
572
 
573
  // Sharedcount plan.
@@ -577,7 +577,7 @@ class Admin_Panel {
577
  'name' => 'sharedcount_plan',
578
  'label' => 'sharedcount.com plan',
579
  'tooltip' => 'Select your sharedcount.com plan',
580
- 'selected' => $arr_settings['sharedcount_plan'],
581
  'options' => array(
582
  'Free' => 'free',
583
  'Plus' => 'plus',
@@ -593,7 +593,7 @@ class Admin_Panel {
593
  'name' => 'sharedcount_api_key',
594
  'label' => 'sharedcount.com API Key',
595
  'tooltip' => 'Add some text included in an email when people share that way',
596
- 'value' => $arr_settings['sharedcount_api_key'],
597
  );
598
 
599
  // Link to ssb.
@@ -604,7 +604,7 @@ class Admin_Panel {
604
  'label' => 'Share Text Link',
605
  'tooltip' => 'Enabling this will set your share text as a link to simplesharebuttons.com to help others learn of the plugin',
606
  'value' => 'Y',
607
- 'checked' => 'Y' === $arr_settings['ssba_link_to_ssb'] ? esc_attr( 'checked' ) : null,
608
  );
609
 
610
  // Link to ssb for plus.
@@ -615,7 +615,7 @@ class Admin_Panel {
615
  'label' => 'Share Text Link',
616
  'tooltip' => 'Enabling this will set your share text as a link to simplesharebuttons.com to help others learn of the plugin',
617
  'value' => 'Y',
618
- 'checked' => 'Y' === $arr_settings['ssba_plus_link_to_ssb'] ? esc_attr( 'checked' ) : null,
619
  );
620
 
621
  // Link to ssb for plus.
@@ -626,7 +626,7 @@ class Admin_Panel {
626
  'label' => 'Share Text Link',
627
  'tooltip' => 'Enabling this will set your share text as a link to simplesharebuttons.com to help others learn of the plugin',
628
  'value' => 'Y',
629
- 'checked' => 'Y' === $arr_settings['ssba_share_link_to_ssb'] ? esc_attr( 'checked' ) : null,
630
  );
631
 
632
  // Content priority.
@@ -637,7 +637,7 @@ class Admin_Panel {
637
  'name' => 'ssba_content_priority',
638
  'label' => 'Content Priority',
639
  'tooltip' => 'Set the priority for your share buttons within your content. 1-10, default is 10',
640
- 'value' => $arr_settings['ssba_content_priority'],
641
  );
642
 
643
  // Share in new window.
@@ -648,7 +648,7 @@ class Admin_Panel {
648
  'label' => 'Open links in a new window',
649
  'tooltip' => 'Disabling this will make links open in the same window',
650
  'value' => 'Y',
651
- 'checked' => 'Y' === $arr_settings['ssba_share_new_window'] ? esc_attr( 'checked' ) : null,
652
  );
653
 
654
  // Share in new window for plus.
@@ -659,7 +659,7 @@ class Admin_Panel {
659
  'label' => 'Open links in a new window',
660
  'tooltip' => 'Disabling this will make links open in the same window',
661
  'value' => 'Y',
662
- 'checked' => 'Y' === $arr_settings['ssba_plus_share_new_window'] ? esc_attr( 'checked' ) : null,
663
  );
664
 
665
  // Share in new window for share bar.
@@ -670,7 +670,7 @@ class Admin_Panel {
670
  'label' => 'Open links in a new window',
671
  'tooltip' => 'Disabling this will make links open in the same window',
672
  'value' => 'Y',
673
- 'checked' => 'Y' === $arr_settings['ssba_share_share_new_window'] ? esc_attr( 'checked' ) : null,
674
  );
675
 
676
  // Nofollow.
@@ -681,7 +681,7 @@ class Admin_Panel {
681
  'label' => 'Add rel="nofollow"',
682
  'tooltip' => 'Enable this to add nofollow to all share links',
683
  'value' => 'Y',
684
- 'checked' => 'Y' === $arr_settings['ssba_rel_nofollow'] ? esc_attr( 'checked' ) : null,
685
  );
686
 
687
  // Nofollow for plus.
@@ -692,7 +692,7 @@ class Admin_Panel {
692
  'label' => 'Add rel="nofollow"',
693
  'tooltip' => 'Enable this to add nofollow to all share links',
694
  'value' => 'Y',
695
- 'checked' => 'Y' === $arr_settings['ssba_plus_rel_nofollow'] ? esc_attr( 'checked' ) : null,
696
  );
697
 
698
  // Nofollow for share bar.
@@ -703,7 +703,7 @@ class Admin_Panel {
703
  'label' => 'Add rel="nofollow"',
704
  'tooltip' => 'Enable this to add nofollow to all share links',
705
  'value' => 'Y',
706
- 'checked' => 'Y' === $arr_settings['ssba_share_rel_nofollow'] ? esc_attr( 'checked' ) : null,
707
  );
708
 
709
  // Widget share text.
@@ -714,7 +714,7 @@ class Admin_Panel {
714
  'name' => 'ssba_widget_text',
715
  'label' => 'Widget Share Text',
716
  'tooltip' => 'Add custom share text when used as a widget',
717
- 'value' => $arr_settings['ssba_widget_text'],
718
  );
719
 
720
  // Widget share text for plus.
@@ -725,7 +725,7 @@ class Admin_Panel {
725
  'name' => 'ssba_plus_widget_text',
726
  'label' => 'Widget Share Text',
727
  'tooltip' => 'Add custom share text when used as a widget',
728
- 'value' => $arr_settings['ssba_plus_widget_text'],
729
  );
730
 
731
  // Widget share text for share bar.
@@ -736,7 +736,7 @@ class Admin_Panel {
736
  'name' => 'ssba_share_widget_text',
737
  'label' => 'Widget Share Text',
738
  'tooltip' => 'Add custom share text when used as a widget',
739
- 'value' => $arr_settings['ssba_share_widget_text'],
740
  );
741
 
742
  // Email share text.
@@ -747,7 +747,7 @@ class Admin_Panel {
747
  'name' => 'ssba_email_message',
748
  'label' => 'Email Text',
749
  'tooltip' => 'Add some text included in an email when people share that way',
750
- 'value' => $arr_settings['ssba_email_message'],
751
  );
752
 
753
  // Email share text for plus.
@@ -758,7 +758,7 @@ class Admin_Panel {
758
  'name' => 'ssba_plus_email_message',
759
  'label' => 'Email Text',
760
  'tooltip' => 'Add some text included in an email when people share that way',
761
- 'value' => $arr_settings['ssba_plus_email_message'],
762
  );
763
 
764
  // Email share text for share bar.
@@ -769,7 +769,7 @@ class Admin_Panel {
769
  'name' => 'ssba_share_email_message',
770
  'label' => 'Email Text',
771
  'tooltip' => 'Add some text included in an email when people share that way',
772
- 'value' => $arr_settings['ssba_share_email_message'],
773
  );
774
 
775
  // Facebook app id.
@@ -780,7 +780,7 @@ class Admin_Panel {
780
  'name' => 'facebook_app_id',
781
  'label' => 'Facebook App ID',
782
  'tooltip' => 'Enter your Facebook App ID, e.g. 123456789123',
783
- 'value' => $arr_settings['facebook_app_id'],
784
  'disabled' => 'Y' !== $arr_settings['accepted_sharethis_terms'] ? esc_attr( 'disabled' ) : null,
785
  );
786
 
@@ -792,7 +792,7 @@ class Admin_Panel {
792
  'name' => 'plus_facebook_app_id',
793
  'label' => 'Facebook App ID',
794
  'tooltip' => 'Enter your Facebook App ID, e.g. 123456789123',
795
- 'value' => $arr_settings['plus_facebook_app_id'],
796
  'disabled' => 'Y' !== $arr_settings['accepted_sharethis_terms'] ? esc_attr( 'disabled' ) : null,
797
  );
798
 
@@ -804,7 +804,7 @@ class Admin_Panel {
804
  'name' => 'share_facebook_app_id',
805
  'label' => 'Facebook App ID',
806
  'tooltip' => 'Enter your Facebook App ID, e.g. 123456789123',
807
- 'value' => $arr_settings['share_facebook_app_id'],
808
  'disabled' => 'Y' !== $arr_settings['accepted_sharethis_terms'] ? esc_attr( 'disabled' ) : null,
809
  );
810
 
@@ -816,7 +816,7 @@ class Admin_Panel {
816
  'label' => 'Facebook Insights',
817
  'tooltip' => 'Enable this feature to enable Facebook Insights',
818
  'value' => 'Y',
819
- 'checked' => 'Y' === $arr_settings['facebook_insights'] ? 'checked' : null,
820
  'disabled' => 'Y' !== $arr_settings['accepted_sharethis_terms'] ? 'disabled' : null,
821
  );
822
 
@@ -828,7 +828,7 @@ class Admin_Panel {
828
  'label' => 'Facebook Insights',
829
  'tooltip' => 'Enable this feature to enable Facebook Insights',
830
  'value' => 'Y',
831
- 'checked' => 'Y' === $arr_settings['plus_facebook_insights'] ? 'checked' : null,
832
  'disabled' => 'Y' !== $arr_settings['accepted_sharethis_terms'] ? 'disabled' : null,
833
  );
834
 
@@ -840,7 +840,7 @@ class Admin_Panel {
840
  'label' => 'Facebook Insights',
841
  'tooltip' => 'Enable this feature to enable Facebook Insights',
842
  'value' => 'Y',
843
- 'checked' => 'Y' === $arr_settings['share_facebook_insights'] ? 'checked' : null,
844
  'disabled' => 'Y' !== $arr_settings['accepted_sharethis_terms'] ? 'disabled' : null,
845
  );
846
 
@@ -852,7 +852,7 @@ class Admin_Panel {
852
  'name' => 'ssba_twitter_text',
853
  'label' => 'Twitter Text',
854
  'tooltip' => 'Add some custom text for when people share via Twitter',
855
- 'value' => $arr_settings['ssba_twitter_text'],
856
  );
857
 
858
  // Twitter share text for plus.
@@ -863,7 +863,7 @@ class Admin_Panel {
863
  'name' => 'ssba_plus_twitter_text',
864
  'label' => 'Twitter Text',
865
  'tooltip' => 'Add some custom text for when people share via Twitter',
866
- 'value' => $arr_settings['ssba_plus_twitter_text'],
867
  );
868
 
869
  // Twitter share text for share bar.
@@ -874,7 +874,7 @@ class Admin_Panel {
874
  'name' => 'ssba_share_twitter_text',
875
  'label' => 'Twitter Text',
876
  'tooltip' => 'Add some custom text for when people share via Twitter',
877
- 'value' => $arr_settings['ssba_share_twitter_text'],
878
  );
879
 
880
  // Flattr user id.
@@ -885,7 +885,7 @@ class Admin_Panel {
885
  'name' => 'ssba_flattr_user_id',
886
  'label' => 'Flattr User ID',
887
  'tooltip' => 'Enter your Flattr ID, e.g. davidsneal',
888
- 'value' => $arr_settings['ssba_flattr_user_id'],
889
  );
890
 
891
  // Flattr user id for plus.
@@ -896,7 +896,7 @@ class Admin_Panel {
896
  'name' => 'ssba_plus_flattr_user_id',
897
  'label' => 'Flattr User ID',
898
  'tooltip' => 'Enter your Flattr ID, e.g. davidsneal',
899
- 'value' => $arr_settings['ssba_plus_flattr_user_id'],
900
  );
901
 
902
  // Flattr user id for share bar.
@@ -907,7 +907,7 @@ class Admin_Panel {
907
  'name' => 'ssba_share_flattr_user_id',
908
  'label' => 'Flattr User ID',
909
  'tooltip' => 'Enter your Flattr ID, e.g. davidsneal',
910
- 'value' => $arr_settings['ssba_share_flattr_user_id'],
911
  );
912
 
913
  // Flattr url.
@@ -918,7 +918,7 @@ class Admin_Panel {
918
  'name' => 'ssba_flattr_url',
919
  'label' => 'Flattr URL',
920
  'tooltip' => 'This option is perfect for dedicated sites, e.g. https://simplesharebuttons.com',
921
- 'value' => $arr_settings['ssba_flattr_url'],
922
  );
923
 
924
  // Flattr url for plus.
@@ -929,7 +929,7 @@ class Admin_Panel {
929
  'name' => 'ssba_plus_flattr_url',
930
  'label' => 'Flattr URL',
931
  'tooltip' => 'This option is perfect for dedicated sites, e.g. https://simplesharebuttons.com',
932
- 'value' => $arr_settings['ssba_plus_flattr_url'],
933
  );
934
 
935
  // Flattr url for share bar.
@@ -940,7 +940,7 @@ class Admin_Panel {
940
  'name' => 'ssba_share_flattr_url',
941
  'label' => 'Flattr URL',
942
  'tooltip' => 'This option is perfect for dedicated sites, e.g. https://simplesharebuttons.com',
943
- 'value' => $arr_settings['ssba_share_flattr_url'],
944
  );
945
 
946
  // Buffer text.
@@ -951,7 +951,7 @@ class Admin_Panel {
951
  'name' => 'ssba_buffer_text',
952
  'label' => 'Custom Buffer Text',
953
  'tooltip' => 'Add some custom text for when people share via Buffer',
954
- 'value' => $arr_settings['ssba_buffer_text'],
955
  );
956
 
957
  // Buffer text for plus.
@@ -962,7 +962,7 @@ class Admin_Panel {
962
  'name' => 'ssba_plus_buffer_text',
963
  'label' => 'Custom Buffer Text',
964
  'tooltip' => 'Add some custom text for when people share via Buffer',
965
- 'value' => $arr_settings['ssba_plus_buffer_text'],
966
  );
967
 
968
  // Buffer text for share bar.
@@ -973,7 +973,7 @@ class Admin_Panel {
973
  'name' => 'ssba_share_buffer_text',
974
  'label' => 'Custom Buffer Text',
975
  'tooltip' => 'Add some custom text for when people share via Buffer',
976
- 'value' => $arr_settings['ssba_share_buffer_text'],
977
  );
978
 
979
  // Pin featured images.
@@ -984,7 +984,7 @@ class Admin_Panel {
984
  'label' => 'Pin Featured Images',
985
  'tooltip' => 'Force the use of featured images for posts/pages when pinning',
986
  'value' => 'Y',
987
- 'checked' => 'Y' === $arr_settings['ssba_pinterest_featured'] ? 'checked' : null,
988
  );
989
 
990
  // Pin featured images for plus.
@@ -995,7 +995,7 @@ class Admin_Panel {
995
  'label' => 'Pin Featured Images',
996
  'tooltip' => 'Force the use of featured images for posts/pages when pinning',
997
  'value' => 'Y',
998
- 'checked' => 'Y' === $arr_settings['ssba_plus_pinterest_featured'] ? 'checked' : null,
999
  );
1000
 
1001
  // Pin featured images for share bar.
@@ -1006,7 +1006,7 @@ class Admin_Panel {
1006
  'label' => 'Pin Featured Images',
1007
  'tooltip' => 'Force the use of featured images for posts/pages when pinning',
1008
  'value' => 'Y',
1009
- 'checked' => 'Y' === $arr_settings['ssba_share_pinterest_featured'] ? 'checked' : null,
1010
  );
1011
 
1012
  // Default pinterest image.
@@ -1016,7 +1016,7 @@ class Admin_Panel {
1016
  'name' => 'ssba_default_pinterest',
1017
  'label' => 'Default Pinterest Image',
1018
  'tooltip' => 'Upload a default Pinterest image',
1019
- 'value' => $arr_settings['ssba_default_pinterest'],
1020
  );
1021
 
1022
  // Default pinterest image for plus.
@@ -1026,7 +1026,7 @@ class Admin_Panel {
1026
  'name' => 'ssba_plus_default_pinterest',
1027
  'label' => 'Default Pinterest Image',
1028
  'tooltip' => 'Upload a default Pinterest image',
1029
- 'value' => $arr_settings['ssba_plus_default_pinterest'],
1030
  );
1031
 
1032
  // Default pinterest image for share bar.
@@ -1036,7 +1036,7 @@ class Admin_Panel {
1036
  'name' => 'ssba_share_default_pinterest',
1037
  'label' => 'Default Pinterest Image',
1038
  'tooltip' => 'Upload a default Pinterest image',
1039
- 'value' => $arr_settings['ssba_share_default_pinterest'],
1040
  );
1041
 
1042
  // Additional css.
@@ -1048,7 +1048,7 @@ class Admin_Panel {
1048
  'name' => 'ssba_additional_css',
1049
  'label' => 'Additional CSS',
1050
  'tooltip' => 'Add your own additional CSS if you wish',
1051
- 'value' => $arr_settings['ssba_additional_css'],
1052
  );
1053
 
1054
  // Additional css for plus.
@@ -1060,7 +1060,7 @@ class Admin_Panel {
1060
  'name' => 'ssba_plus_additional_css',
1061
  'label' => 'Additional CSS',
1062
  'tooltip' => 'Add your own additional CSS if you wish',
1063
- 'value' => $arr_settings['ssba_plus_additional_css'],
1064
  );
1065
 
1066
  // Additional css for share.
@@ -1072,7 +1072,7 @@ class Admin_Panel {
1072
  'name' => 'ssba_share_additional_css',
1073
  'label' => 'Additional CSS',
1074
  'tooltip' => 'Add your own additional CSS if you wish',
1075
- 'value' => $arr_settings['ssba_share_additional_css'],
1076
  );
1077
 
1078
  // Enable custom css.
@@ -1083,7 +1083,7 @@ class Admin_Panel {
1083
  'label' => 'Enable Custom CSS',
1084
  'tooltip' => 'Switch on to disable all SSBA styles and use your own custom CSS',
1085
  'value' => 'Y',
1086
- 'checked' => 'Y' === $arr_settings['ssba_custom_styles_enabled'] ? 'checked' : null,
1087
  );
1088
 
1089
  // Enable custom css for plus.
@@ -1094,7 +1094,7 @@ class Admin_Panel {
1094
  'label' => 'Enable Custom CSS',
1095
  'tooltip' => 'Switch on to disable all SSBA styles and use your own custom CSS',
1096
  'value' => 'Y',
1097
- 'checked' => 'Y' === $arr_settings['ssba_plus_custom_styles_enabled'] ? 'checked' : null,
1098
  );
1099
 
1100
  // Enable custom css for share bar.
@@ -1105,7 +1105,7 @@ class Admin_Panel {
1105
  'label' => 'Enable Custom CSS',
1106
  'tooltip' => 'Switch on to disable all SSBA styles and use your own custom CSS',
1107
  'value' => 'Y',
1108
- 'checked' => 'Y' === $arr_settings['ssba_share_custom_styles_enabled'] ? 'checked' : null,
1109
  );
1110
 
1111
  // Custom css.
@@ -1117,7 +1117,7 @@ class Admin_Panel {
1117
  'name' => 'ssba_custom_styles',
1118
  'label' => 'Custom CSS',
1119
  'tooltip' => 'Enter in your own custom CSS for your share buttons',
1120
- 'value' => $arr_settings['ssba_custom_styles'],
1121
  );
1122
 
1123
  // Custom css for plus.
@@ -1129,7 +1129,7 @@ class Admin_Panel {
1129
  'name' => 'ssba_plus_custom_styles',
1130
  'label' => 'Custom CSS',
1131
  'tooltip' => 'Enter in your own custom CSS for your share buttons',
1132
- 'value' => $arr_settings['ssba_plus_custom_styles'],
1133
  );
1134
 
1135
  // Custom css for share bar.
@@ -1141,7 +1141,7 @@ class Admin_Panel {
1141
  'name' => 'ssba_share_custom_styles',
1142
  'label' => 'Custom CSS',
1143
  'tooltip' => 'Enter in your own custom CSS for your share buttons',
1144
- 'value' => $arr_settings['ssba_share_custom_styles'],
1145
  );
1146
 
1147
  // Switch to new buttons.
@@ -1152,7 +1152,7 @@ class Admin_Panel {
1152
  'label' => 'Plus Share Buttons',
1153
  'tooltip' => 'If "On" new buttons replace the old on your site.',
1154
  'value' => 'Y',
1155
- 'checked' => 'Y' === $arr_settings['ssba_new_buttons'] ? 'checked' : null,
1156
  );
1157
 
1158
  // Select style of new buttons.
@@ -1162,7 +1162,7 @@ class Admin_Panel {
1162
  'name' => 'ssba_share_button_style',
1163
  'label' => 'Theme',
1164
  'tooltip' => 'Choose the style of the new buttons',
1165
- 'selected' => $arr_settings['ssba_share_button_style'],
1166
  'options' => array(
1167
  'Round' => 1,
1168
  'Square' => 2,
@@ -1194,7 +1194,7 @@ class Admin_Panel {
1194
  'name' => 'ssba_before_or_after_plus',
1195
  'label' => 'Placement',
1196
  'tooltip' => 'Place share buttons before or after your content',
1197
- 'selected' => $arr_settings['ssba_before_or_after_plus'],
1198
  'options' => array(
1199
  'After' => 'after',
1200
  'Before' => 'before',
@@ -1218,7 +1218,7 @@ class Admin_Panel {
1218
  'name' => 'ssba_share_bar_style',
1219
  'label' => 'Style',
1220
  'tooltip' => 'Choose the style of the share bar buttons',
1221
- 'selected' => $arr_settings['ssba_share_bar_style'],
1222
  'options' => array(
1223
  'Round' => 1,
1224
  'Square' => 2,
@@ -1240,7 +1240,7 @@ class Admin_Panel {
1240
  'name' => 'ssba_share_bar_position',
1241
  'label' => 'Alignment',
1242
  'tooltip' => 'Choose the share bar position',
1243
- 'selected' => $arr_settings['ssba_share_bar_position'],
1244
  'options' => array(
1245
  'Sticky Left' => 'left',
1246
  'Sticky Right' => 'right',
@@ -1256,7 +1256,7 @@ class Admin_Panel {
1256
  'name' => 'ssba_plus_height',
1257
  'label' => 'Height',
1258
  'tooltip' => 'Set the height of the plus buttons',
1259
- 'value' => $arr_settings['ssba_plus_height'],
1260
  );
1261
 
1262
  // Plus buttons width.
@@ -1268,7 +1268,7 @@ class Admin_Panel {
1268
  'name' => 'ssba_plus_width',
1269
  'label' => 'Width',
1270
  'tooltip' => 'Set the width of the plus buttons',
1271
- 'value' => $arr_settings['ssba_plus_width'],
1272
  );
1273
 
1274
  // Plus icon size.
@@ -1280,7 +1280,7 @@ class Admin_Panel {
1280
  'name' => 'ssba_plus_icon_size',
1281
  'label' => 'Icon Size',
1282
  'tooltip' => 'Set the icon size of the plus buttons',
1283
- 'value' => $arr_settings['ssba_plus_icon_size'],
1284
  );
1285
 
1286
  // Plus button margin.
@@ -1292,7 +1292,7 @@ class Admin_Panel {
1292
  'name' => 'ssba_plus_margin',
1293
  'label' => 'Margin',
1294
  'tooltip' => 'Set the margin of the plus buttons',
1295
- 'value' => $arr_settings['ssba_plus_margin'],
1296
  );
1297
 
1298
  // Plus button color override.
@@ -1302,7 +1302,7 @@ class Admin_Panel {
1302
  'name' => 'ssba_plus_button_color',
1303
  'label' => 'Button Color',
1304
  'tooltip' => 'Choose the color for all plus buttons',
1305
- 'value' => $arr_settings['ssba_plus_button_color'],
1306
  );
1307
 
1308
  // Plus button hover color override.
@@ -1312,7 +1312,7 @@ class Admin_Panel {
1312
  'name' => 'ssba_plus_button_hover_color',
1313
  'label' => 'Hover Color',
1314
  'tooltip' => 'Choose the color for all plus buttons hover',
1315
- 'value' => $arr_settings['ssba_plus_button_hover_color'],
1316
  );
1317
 
1318
  // Plus icon color override.
@@ -1322,7 +1322,7 @@ class Admin_Panel {
1322
  'name' => 'ssba_plus_icon_color',
1323
  'label' => 'Icon Color',
1324
  'tooltip' => 'Choose the color for all plus button icons',
1325
- 'value' => $arr_settings['ssba_plus_icon_color'],
1326
  );
1327
 
1328
  // Plus button color override.
@@ -1332,7 +1332,7 @@ class Admin_Panel {
1332
  'name' => 'ssba_plus_icon_hover_color',
1333
  'label' => 'Icon Hover Color',
1334
  'tooltip' => 'Choose the color for all plus button icons hover',
1335
- 'value' => $arr_settings['ssba_plus_icon_hover_color'],
1336
  );
1337
 
1338
  // share buttons height.
@@ -1344,7 +1344,7 @@ class Admin_Panel {
1344
  'name' => 'ssba_share_height',
1345
  'label' => 'Height',
1346
  'tooltip' => 'Set the height of the share bar buttons',
1347
- 'value' => $arr_settings['ssba_share_height'],
1348
  );
1349
 
1350
  // share buttons width.
@@ -1356,7 +1356,7 @@ class Admin_Panel {
1356
  'name' => 'ssba_share_width',
1357
  'label' => 'Width',
1358
  'tooltip' => 'Set the width of the share bar buttons',
1359
- 'value' => $arr_settings['ssba_share_width'],
1360
  );
1361
 
1362
  // share icon size.
@@ -1368,7 +1368,7 @@ class Admin_Panel {
1368
  'name' => 'ssba_share_icon_size',
1369
  'label' => 'Icon Size',
1370
  'tooltip' => 'Set the icon size of the share bar buttons',
1371
- 'value' => $arr_settings['ssba_share_icon_size'],
1372
  );
1373
 
1374
  // share button margin.
@@ -1380,7 +1380,7 @@ class Admin_Panel {
1380
  'name' => 'ssba_share_margin',
1381
  'label' => 'Margin',
1382
  'tooltip' => 'Set the margin of the share bar buttons',
1383
- 'value' => $arr_settings['ssba_share_margin'],
1384
  );
1385
 
1386
  // share button color override.
@@ -1390,7 +1390,7 @@ class Admin_Panel {
1390
  'name' => 'ssba_share_button_color',
1391
  'label' => 'Button Color',
1392
  'tooltip' => 'Choose the color for all share bar buttons',
1393
- 'value' => $arr_settings['ssba_share_button_color'],
1394
  );
1395
 
1396
  // share button hover color override.
@@ -1400,7 +1400,7 @@ class Admin_Panel {
1400
  'name' => 'ssba_share_button_hover_color',
1401
  'label' => 'Hover Color',
1402
  'tooltip' => 'Choose the color for all share bar buttons hover',
1403
- 'value' => $arr_settings['ssba_share_button_hover_color'],
1404
  );
1405
 
1406
  // share icon color override.
@@ -1410,7 +1410,7 @@ class Admin_Panel {
1410
  'name' => 'ssba_share_icon_color',
1411
  'label' => 'Icon Color',
1412
  'tooltip' => 'Choose the color for all share bar button icons',
1413
- 'value' => $arr_settings['ssba_share_icon_color'],
1414
  );
1415
 
1416
  // share button color override.
@@ -1420,7 +1420,7 @@ class Admin_Panel {
1420
  'name' => 'ssba_share_icon_hover_color',
1421
  'label' => 'Icon Hover Color',
1422
  'tooltip' => 'Choose the color for all share bar button icons hover',
1423
- 'value' => $arr_settings['ssba_share_icon_hover_color'],
1424
  );
1425
 
1426
  // Enable share bar.
@@ -1431,7 +1431,7 @@ class Admin_Panel {
1431
  'label' => 'Share Bar',
1432
  'tooltip' => 'If "On" share bar will appear on your site.',
1433
  'value' => 'Y',
1434
- 'checked' => 'Y' === $arr_settings['ssba_share_bar'] ? 'checked' : null,
1435
  );
1436
 
1437
  // Share bar display.
@@ -1452,7 +1452,7 @@ class Admin_Panel {
1452
  'name' => 'ssba_mobile_breakpoint',
1453
  'label' => 'Mobile Breakpoint',
1454
  'tooltip' => 'Set the share bar mobile breakpoint when it centers on screen',
1455
- 'value' => $arr_settings['ssba_mobile_breakpoint'],
1456
  );
1457
 
1458
  // Notices.
72
  $locs = array(
73
  'Homepage' => array(
74
  'value' => 'ssba_homepage',
75
+ 'checked' => isset( $arr_settings['ssba_homepage'] ) && 'Y' === $arr_settings['ssba_homepage'] ? true : false,
76
  ),
77
  'Pages' => array(
78
  'value' => 'ssba_pages',
79
+ 'checked' => isset( $arr_settings['ssba_pages'] ) && 'Y' === $arr_settings['ssba_pages'] ? true : false,
80
  ),
81
  'Posts' => array(
82
  'value' => 'ssba_posts',
83
+ 'checked' => isset( $arr_settings['ssba_posts'] ) && 'Y' === $arr_settings['ssba_posts'] ? true : false,
84
  ),
85
  'Excerpts' => array(
86
  'value' => 'ssba_excerpts',
87
+ 'checked' => isset( $arr_settings['ssba_excerpts'] ) && 'Y' === $arr_settings['ssba_excerpts'] ? true : false,
88
  ),
89
  'Categories/Archives' => array(
90
  'value' => 'ssba_cats_archs',
91
+ 'checked' => isset( $arr_settings['ssba_cats_archs'] ) && 'Y' === $arr_settings['ssba_cats_archs'] ? true : false,
92
  ),
93
  );
94
 
116
  $locs3 = array(
117
  'Homepage' => array(
118
  'value' => 'ssba_plus_homepage',
119
+ 'checked' => isset( $arr_settings['ssba_plus_homepage'] ) && 'Y' === $arr_settings['ssba_plus_homepage'] ? true : false,
120
  ),
121
  'Pages' => array(
122
  'value' => 'ssba_plus_pages',
123
+ 'checked' => isset( $arr_settings['ssba_plus_pages'] ) && 'Y' === $arr_settings['ssba_plus_pages'] ? true : false,
124
  ),
125
  'Posts' => array(
126
  'value' => 'ssba_plus_posts',
127
+ 'checked' => isset( $arr_settings['ssba_plus_posts'] ) && 'Y' === $arr_settings['ssba_plus_posts'] ? true : false,
128
  ),
129
  'Excerpts' => array(
130
  'value' => 'ssba_plus_excerpts',
131
+ 'checked' => isset( $arr_settings['ssba_plus_excerpts'] ) && 'Y' === $arr_settings['ssba_plus_excerpts'] ? true : false,
132
  ),
133
  'Categories/Archives' => array(
134
  'value' => 'ssba_plus_cats_archs',
135
+ 'checked' => isset( $arr_settings['ssba_plus_cats_archs'] ) && 'Y' === $arr_settings['ssba_plus_cats_archs'] ? true : false,
136
  ),
137
  );
138
 
140
  $display_loc = array(
141
  'Desktop' => array(
142
  'value' => 'ssba_share_desktop',
143
+ 'checked' => isset( $arr_settings['ssba_share_desktop'] ) && 'Y' === $arr_settings['ssba_share_desktop'] ? true : false,
144
  ),
145
  'Mobile' => array(
146
  'value' => 'ssba_share_mobile',
147
+ 'checked' => isset( $arr_settings['ssba_share_mobile'] ) && 'Y' === $arr_settings['ssba_share_mobile'] ? true : false,
148
  ),
149
  );
150
 
167
  'name' => 'ssba_before_or_after',
168
  'label' => 'Placement',
169
  'tooltip' => 'Place share buttons before or after your content',
170
+ 'selected' => isset( $arr_settings['ssba_before_or_after'] ) ? $arr_settings['ssba_before_or_after'] : '',
171
  'options' => array(
172
  'After' => 'after',
173
  'Before' => 'before',
183
  'name' => 'ssba_share_text',
184
  'label' => 'Call To Action',
185
  'tooltip' => 'Add some custom text by your share buttons',
186
+ 'value' => isset( $arr_settings['ssba_share_text'] ) ? $arr_settings['ssba_share_text'] : '',
187
  );
188
 
189
  // Share text for plus.
194
  'name' => 'ssba_plus_share_text',
195
  'label' => 'Call To Action',
196
  'tooltip' => 'Add some custom text by your share buttons',
197
+ 'value' => isset( $arr_settings['ssba_plus_share_text'] ) ? $arr_settings['ssba_plus_share_text'] : '',
198
  );
199
 
200
  // Placement.
204
  'name' => 'ssba_image_set',
205
  'label' => 'Theme',
206
  'tooltip' => 'Choose your favourite set of buttons, or set to custom to choose your own',
207
+ 'selected' => isset( $arr_settings['ssba_image_set'] ) ? $arr_settings['ssba_image_set'] : '',
208
  'options' => array(
209
  'Arbenta' => 'arbenta',
210
  'Custom' => 'custom',
227
  'name' => 'ssba_size',
228
  'label' => 'Button Size',
229
  'tooltip' => 'Set the size of your buttons in pixels',
230
+ 'value' => isset( $arr_settings['ssba_size'] ) ? $arr_settings['ssba_size'] : '',
231
  );
232
 
233
  // Alignment.
237
  'name' => 'ssba_align',
238
  'label' => 'Alignment',
239
  'tooltip' => 'Align your buttons the way you wish',
240
+ 'selected' => isset( $arr_settings['ssba_align'] ) ? $arr_settings['ssba_align'] : '',
241
  'options' => array(
242
  'Left' => 'left',
243
  'Center' => 'center',
252
  'name' => 'ssba_plus_align',
253
  'label' => 'Alignment',
254
  'tooltip' => 'Align your plus buttons the way you wish',
255
+ 'selected' => isset( $arr_settings['ssba_plus_align'] ) ? $arr_settings['ssba_plus_align'] : '',
256
  'options' => array(
257
  'Left' => 'left',
258
  'Center' => 'center',
269
  'name' => 'ssba_padding',
270
  'label' => 'Padding',
271
  'tooltip' => 'Apply some space around your images',
272
+ 'value' => isset( $arr_settings['ssba_padding'] ) ? $arr_settings['ssba_padding'] : '',
273
  );
274
 
275
  // Font color.
279
  'name' => 'ssba_font_color',
280
  'label' => 'Font Color',
281
  'tooltip' => 'Choose the color of your share text',
282
+ 'value' => isset( $arr_settings['ssba_font_color'] ) ? $arr_settings['ssba_font_color'] : '',
283
  );
284
 
285
  // Font color for plus.
289
  'name' => 'ssba_plus_font_color',
290
  'label' => 'Font Color',
291
  'tooltip' => 'Choose the color of your share text',
292
+ 'value' => isset( $arr_settings['ssba_plus_font_color'] ) ? $arr_settings['ssba_plus_font_color'] : '',
293
  );
294
 
295
  // Font family.
299
  'name' => 'ssba_font_family',
300
  'label' => 'Font Family',
301
  'tooltip' => 'Choose a font available or inherit the font from your website',
302
+ 'selected' => isset( $arr_settings['ssba_font_family'] ) ? $arr_settings['ssba_font_family'] : '',
303
  'options' => array(
304
  'Reenie Beanie' => 'Reenie Beanie',
305
  'Indie Flower' => 'Indie Flower',
314
  'name' => 'ssba_plus_font_family',
315
  'label' => 'Font Family',
316
  'tooltip' => 'Choose a font available or inherit the font from your website',
317
+ 'selected' => isset( $arr_settings['ssba_plus_font_family'] ) ? $arr_settings['ssba_plus_font_family'] : '',
318
  'options' => array(
319
  'Reenie Beanie' => 'Reenie Beanie',
320
  'Indie Flower' => 'Indie Flower',
335
  'name' => 'ssba_font_size',
336
  'label' => 'Font Size',
337
  'tooltip' => 'Set the size of the share text in pixels',
338
+ 'value' => isset( $arr_settings['ssba_font_size'] ) ? $arr_settings['ssba_font_size'] : '',
339
  );
340
 
341
  // Font size for plus.
347
  'name' => 'ssba_plus_font_size',
348
  'label' => 'Font Size',
349
  'tooltip' => 'Set the size of the share text in pixels',
350
+ 'value' => isset( $arr_settings['ssba_plus_font_size'] ) ? $arr_settings['ssba_plus_font_size'] : '',
351
  );
352
 
353
  // Font weight.
357
  'name' => 'ssba_font_weight',
358
  'label' => 'Font Weight',
359
  'tooltip' => 'Set the weight of the share text',
360
+ 'selected' => isset( $arr_settings['ssba_font_weight'] ) ? $arr_settings['ssba_font_weight'] : '',
361
  'options' => array(
362
  'Normal' => 'normal',
363
  'Bold' => 'bold',
372
  'name' => 'ssba_plus_font_weight',
373
  'label' => 'Font Weight',
374
  'tooltip' => 'Set the weight of the share text',
375
+ 'selected' => isset( $arr_settings['ssba_plus_font_weight'] ) ? $arr_settings['ssba_plus_font_weight'] : '',
376
  'options' => array(
377
  'Normal' => 'normal',
378
  'Bold' => 'bold',
387
  'name' => 'ssba_text_placement',
388
  'label' => 'Text placement',
389
  'tooltip' => 'Choose where you want your text to be displayed, in relation to the buttons',
390
+ 'selected' => isset( $arr_settings['ssba_text_placement'] ) ? $arr_settings['ssba_text_placement'] : '',
391
  'options' => array(
392
  'Above' => 'above',
393
  'Left' => 'left',
403
  'name' => 'ssba_plus_text_placement',
404
  'label' => 'Text placement',
405
  'tooltip' => 'Choose where you want your text to be displayed, in relation to the buttons',
406
+ 'selected' => isset( $arr_settings['ssba_plus_text_placement'] ) ? $arr_settings['ssba_plus_text_placement'] : '',
407
  'options' => array(
408
  'Above' => 'above',
409
  'Left' => 'left',
421
  'name' => 'ssba_div_padding',
422
  'label' => 'Container Padding',
423
  'tooltip' => 'Add some padding to your share container',
424
+ 'value' => isset( $arr_settings['ssba_div_padding'] ) ? $arr_settings['ssba_div_padding'] : '',
425
  );
426
 
427
  // Div background color.
431
  'name' => 'ssba_div_background',
432
  'label' => 'Container Background Color',
433
  'tooltip' => 'Choose the color of your share container',
434
+ 'value' => isset( $arr_settings['ssba_div_background'] ) ? $arr_settings['ssba_div_background'] : '',
435
  );
436
 
437
  // Div border color.
441
  'name' => 'ssba_div_border',
442
  'label' => 'Container Border Color',
443
  'tooltip' => 'Choose the color of your share container border',
444
+ 'value' => isset( $arr_settings['ssba_div_border'] ) ? $arr_settings['ssba_div_border'] : '',
445
  );
446
 
447
  // Container border width.
453
  'name' => 'ssba_border_width',
454
  'label' => 'Container Border Width',
455
  'tooltip' => 'Set the width of the share container border',
456
+ 'value' => isset( $arr_settings['ssba_border_width'] ) ? $arr_settings['ssba_border_width'] : '',
457
  );
458
 
459
  // Rounded container corners.
464
  'label' => 'Rounded Container Corners',
465
  'tooltip' => 'Switch on to enable rounded corners for your share container',
466
  'value' => 'Y',
467
+ 'checked' => isset( $arr_settings['ssba_div_rounded_corners'] ) && 'Y' === $arr_settings['ssba_div_rounded_corners'] ? esc_attr( 'checked' ) : '',
468
  );
469
 
470
  // Share count.
475
  'label' => 'Share Count',
476
  'tooltip' => 'Check the box if you wish to enable share counts. Enabling this option will slow down the loading of any pages that use share buttons',
477
  'value' => 'Y',
478
+ 'checked' => isset( $arr_settings['ssba_show_share_count'] ) && 'Y' === $arr_settings['ssba_show_share_count'] ? esc_attr( 'checked' ) : null,
479
  );
480
 
481
  // Share count for plus.
486
  'label' => 'Share Count',
487
  'tooltip' => 'Check the box if you wish to enable share counts. Enabling this option will slow down the loading of any pages that use share buttons',
488
  'value' => 'Y',
489
+ 'checked' => isset( $arr_settings['ssba_plus_show_share_count'] ) && 'Y' === $arr_settings['ssba_plus_show_share_count'] ? esc_attr( 'checked' ) : null,
490
  );
491
 
492
  // Share count for share bar.
497
  'label' => 'Share Count',
498
  'tooltip' => 'Check the box if you wish to enable share counts. Enabling this option will slow down the loading of any pages that use share buttons',
499
  'value' => 'Y',
500
+ 'checked' => isset( $arr_settings['ssba_share_show_share_count'] ) && 'Y' === $arr_settings['ssba_share_show_share_count'] ? esc_attr( 'checked' ) : null,
501
  );
502
 
503
  // Show count once.
508
  'label' => 'Show Once',
509
  'tooltip' => 'This option is recommended, it deactivates share counts for categories and archives allowing them to load more quickly',
510
  'value' => 'Y',
511
+ 'checked' => isset( $arr_settings['ssba_share_count_once'] ) && 'Y' === $arr_settings['ssba_share_count_once'] ? esc_attr( 'checked' ) : null,
512
  );
513
 
514
  // Show count once for plus.
519
  'label' => 'Show Once',
520
  'tooltip' => 'This option is recommended, it deactivates share counts for categories and archives allowing them to load more quickly',
521
  'value' => 'Y',
522
+ 'checked' => isset( $arr_settings['ssba_plus_share_count_once'] ) && 'Y' === $arr_settings['ssba_plus_share_count_once'] ? esc_attr( 'checked' ) : null,
523
  );
524
 
525
  // Show count once for share bar.
530
  'label' => 'Show Once',
531
  'tooltip' => 'This option is recommended, it deactivates share counts for categories and archives allowing them to load more quickly',
532
  'value' => 'Y',
533
+ 'checked' => isset( $arr_settings['ssba_share_share_count_once'] ) && 'Y' === $arr_settings['ssba_share_share_count_once'] ? esc_attr( 'checked' ) : null,
534
  );
535
 
536
  // Share counters style.
540
  'name' => 'ssba_share_count_style',
541
  'label' => 'Counters Style',
542
  'tooltip' => 'Pick a setting to style the share counters',
543
+ 'selected' => isset( $arr_settings['ssba_share_count_style'] ) ? $arr_settings['ssba_share_count_style'] : '',
544
  'options' => array(
545
  'Default' => 'default',
546
  'White' => 'white',
556
  'label' => '',
557
  'tooltip' => 'Switch on to enable the use of the newsharecounts.com API for Twitter share counts',
558
  'value' => 'Y',
559
+ 'checked' => isset( $arr_settings['twitter_newsharecounts'] ) && 'Y' === $arr_settings['twitter_newsharecounts'] ? esc_attr( 'checked' ) : null,
560
  );
561
 
562
  // Sharedcount enable.
567
  'label' => 'Enable sharedcount.com API',
568
  'tooltip' => 'Enable if you wish to enable the use of the sharedcount.com API',
569
  'value' => 'Y',
570
+ 'checked' => isset( $arr_settings['sharedcount_enabled'] ) && 'Y' === $arr_settings['sharedcount_enabled'] ? esc_attr( 'checked' ) : null,
571
  );
572
 
573
  // Sharedcount plan.
577
  'name' => 'sharedcount_plan',
578
  'label' => 'sharedcount.com plan',
579
  'tooltip' => 'Select your sharedcount.com plan',
580
+ 'selected' => isset( $arr_settings['sharedcount_plan'] ) ? $arr_settings['sharedcount_plan'] : '',
581
  'options' => array(
582
  'Free' => 'free',
583
  'Plus' => 'plus',
593
  'name' => 'sharedcount_api_key',
594
  'label' => 'sharedcount.com API Key',
595
  'tooltip' => 'Add some text included in an email when people share that way',
596
+ 'value' => isset( $arr_settings['sharedcount_api_key'] ) ? $arr_settings['sharedcount_api_key'] : '',
597
  );
598
 
599
  // Link to ssb.
604
  'label' => 'Share Text Link',
605
  'tooltip' => 'Enabling this will set your share text as a link to simplesharebuttons.com to help others learn of the plugin',
606
  'value' => 'Y',
607
+ 'checked' => isset( $arr_settings['ssba_link_to_ssb'] ) && 'Y' === $arr_settings['ssba_link_to_ssb'] ? esc_attr( 'checked' ) : null,
608
  );
609
 
610
  // Link to ssb for plus.
615
  'label' => 'Share Text Link',
616
  'tooltip' => 'Enabling this will set your share text as a link to simplesharebuttons.com to help others learn of the plugin',
617
  'value' => 'Y',
618
+ 'checked' => isset( $arr_settings['ssba_plus_link_to_ssb'] ) && 'Y' === $arr_settings['ssba_plus_link_to_ssb'] ? esc_attr( 'checked' ) : null,
619
  );
620
 
621
  // Link to ssb for plus.
626
  'label' => 'Share Text Link',
627
  'tooltip' => 'Enabling this will set your share text as a link to simplesharebuttons.com to help others learn of the plugin',
628
  'value' => 'Y',
629
+ 'checked' => isset( $arr_settings['ssba_share_link_to_ssb'] ) && 'Y' === $arr_settings['ssba_share_link_to_ssb'] ? esc_attr( 'checked' ) : null,
630
  );
631
 
632
  // Content priority.
637
  'name' => 'ssba_content_priority',
638
  'label' => 'Content Priority',
639
  'tooltip' => 'Set the priority for your share buttons within your content. 1-10, default is 10',
640
+ 'value' => isset( $arr_settings['ssba_content_priority'] ) ? $arr_settings['ssba_content_priority'] : '',
641
  );
642
 
643
  // Share in new window.
648
  'label' => 'Open links in a new window',
649
  'tooltip' => 'Disabling this will make links open in the same window',
650
  'value' => 'Y',
651
+ 'checked' => isset( $arr_settings['ssba_share_new_window'] ) && 'Y' === $arr_settings['ssba_share_new_window'] ? esc_attr( 'checked' ) : null,
652
  );
653
 
654
  // Share in new window for plus.
659
  'label' => 'Open links in a new window',
660
  'tooltip' => 'Disabling this will make links open in the same window',
661
  'value' => 'Y',
662
+ 'checked' => isset( $arr_settings['ssba_plus_share_new_window'] ) && 'Y' === $arr_settings['ssba_plus_share_new_window'] ? esc_attr( 'checked' ) : null,
663
  );
664
 
665
  // Share in new window for share bar.
670
  'label' => 'Open links in a new window',
671
  'tooltip' => 'Disabling this will make links open in the same window',
672
  'value' => 'Y',
673
+ 'checked' => isset( $arr_settings['ssba_share_share_new_window'] ) && 'Y' === $arr_settings['ssba_share_share_new_window'] ? esc_attr( 'checked' ) : null,
674
  );
675
 
676
  // Nofollow.
681
  'label' => 'Add rel="nofollow"',
682
  'tooltip' => 'Enable this to add nofollow to all share links',
683
  'value' => 'Y',
684
+ 'checked' => isset( $arr_settings['ssba_rel_nofollow'] ) && 'Y' === $arr_settings['ssba_rel_nofollow'] ? esc_attr( 'checked' ) : null,
685
  );
686
 
687
  // Nofollow for plus.
692
  'label' => 'Add rel="nofollow"',
693
  'tooltip' => 'Enable this to add nofollow to all share links',
694
  'value' => 'Y',
695
+ 'checked' => isset( $arr_settings['ssba_plus_rel_nofollow'] ) && 'Y' === $arr_settings['ssba_plus_rel_nofollow'] ? esc_attr( 'checked' ) : null,
696
  );
697
 
698
  // Nofollow for share bar.
703
  'label' => 'Add rel="nofollow"',
704
  'tooltip' => 'Enable this to add nofollow to all share links',
705
  'value' => 'Y',
706
+ 'checked' => isset( $arr_settings['ssba_share_rel_nofollow'] ) && 'Y' === $arr_settings['ssba_share_rel_nofollow'] ? esc_attr( 'checked' ) : null,
707
  );
708
 
709
  // Widget share text.
714
  'name' => 'ssba_widget_text',
715
  'label' => 'Widget Share Text',
716
  'tooltip' => 'Add custom share text when used as a widget',
717
+ 'value' => isset( $arr_settings['ssba_widget_text'] ) ? $arr_settings['ssba_widget_text'] : '',
718
  );
719
 
720
  // Widget share text for plus.
725
  'name' => 'ssba_plus_widget_text',
726
  'label' => 'Widget Share Text',
727
  'tooltip' => 'Add custom share text when used as a widget',
728
+ 'value' => isset( $arr_settings['ssba_plus_widget_text'] ) ? $arr_settings['ssba_plus_widget_text'] : '',
729
  );
730
 
731
  // Widget share text for share bar.
736
  'name' => 'ssba_share_widget_text',
737
  'label' => 'Widget Share Text',
738
  'tooltip' => 'Add custom share text when used as a widget',
739
+ 'value' => isset( $arr_settings['ssba_share_widget_text'] ) ? $arr_settings['ssba_share_widget_text'] : '',
740
  );
741
 
742
  // Email share text.
747
  'name' => 'ssba_email_message',
748
  'label' => 'Email Text',
749
  'tooltip' => 'Add some text included in an email when people share that way',
750
+ 'value' => isset( $arr_settings['ssba_email_message'] ) ? $arr_settings['ssba_email_message'] : '',
751
  );
752
 
753
  // Email share text for plus.
758
  'name' => 'ssba_plus_email_message',
759
  'label' => 'Email Text',
760
  'tooltip' => 'Add some text included in an email when people share that way',
761
+ 'value' => isset( $arr_settings['ssba_plus_email_message'] ) ? $arr_settings['ssba_plus_email_message'] : '',
762
  );
763
 
764
  // Email share text for share bar.
769
  'name' => 'ssba_share_email_message',
770
  'label' => 'Email Text',
771
  'tooltip' => 'Add some text included in an email when people share that way',
772
+ 'value' => isset( $arr_settings['ssba_share_email_message'] ) ? $arr_settings['ssba_share_email_message'] : '',
773
  );
774
 
775
  // Facebook app id.
780
  'name' => 'facebook_app_id',
781
  'label' => 'Facebook App ID',
782
  'tooltip' => 'Enter your Facebook App ID, e.g. 123456789123',
783
+ 'value' => isset( $arr_settings['facebook_app_id'] ) ? $arr_settings['facebook_app_id'] : '',
784
  'disabled' => 'Y' !== $arr_settings['accepted_sharethis_terms'] ? esc_attr( 'disabled' ) : null,
785
  );
786
 
792
  'name' => 'plus_facebook_app_id',
793
  'label' => 'Facebook App ID',
794
  'tooltip' => 'Enter your Facebook App ID, e.g. 123456789123',
795
+ 'value' => isset( $arr_settings['plus_facebook_app_id'] ) ? $arr_settings['plus_facebook_app_id'] : '',
796
  'disabled' => 'Y' !== $arr_settings['accepted_sharethis_terms'] ? esc_attr( 'disabled' ) : null,
797
  );
798
 
804
  'name' => 'share_facebook_app_id',
805
  'label' => 'Facebook App ID',
806
  'tooltip' => 'Enter your Facebook App ID, e.g. 123456789123',
807
+ 'value' => isset( $arr_settings['share_facebook_app_id'] ) ? $arr_settings['share_facebook_app_id'] : '',
808
  'disabled' => 'Y' !== $arr_settings['accepted_sharethis_terms'] ? esc_attr( 'disabled' ) : null,
809
  );
810
 
816
  'label' => 'Facebook Insights',
817
  'tooltip' => 'Enable this feature to enable Facebook Insights',
818
  'value' => 'Y',
819
+ 'checked' => isset( $arr_settings['facebook_insights'] ) && 'Y' === $arr_settings['facebook_insights'] ? 'checked' : null,
820
  'disabled' => 'Y' !== $arr_settings['accepted_sharethis_terms'] ? 'disabled' : null,
821
  );
822
 
828
  'label' => 'Facebook Insights',
829
  'tooltip' => 'Enable this feature to enable Facebook Insights',
830
  'value' => 'Y',
831
+ 'checked' => isset( $arr_settings['plus_facebook_insights'] ) && 'Y' === $arr_settings['plus_facebook_insights'] ? 'checked' : null,
832
  'disabled' => 'Y' !== $arr_settings['accepted_sharethis_terms'] ? 'disabled' : null,
833
  );
834
 
840
  'label' => 'Facebook Insights',
841
  'tooltip' => 'Enable this feature to enable Facebook Insights',
842
  'value' => 'Y',
843
+ 'checked' => isset( $arr_settings['share_facebook_insights'] ) && 'Y' === $arr_settings['share_facebook_insights'] ? 'checked' : null,
844
  'disabled' => 'Y' !== $arr_settings['accepted_sharethis_terms'] ? 'disabled' : null,
845
  );
846
 
852
  'name' => 'ssba_twitter_text',
853
  'label' => 'Twitter Text',
854
  'tooltip' => 'Add some custom text for when people share via Twitter',
855
+ 'value' => isset( $arr_settings['ssba_twitter_text'] ) ? $arr_settings['ssba_twitter_text'] : '',
856
  );
857
 
858
  // Twitter share text for plus.
863
  'name' => 'ssba_plus_twitter_text',
864
  'label' => 'Twitter Text',
865
  'tooltip' => 'Add some custom text for when people share via Twitter',
866
+ 'value' => isset( $arr_settings['ssba_plus_twitter_text'] ) ? $arr_settings['ssba_plus_twitter_text'] : '',
867
  );
868
 
869
  // Twitter share text for share bar.
874
  'name' => 'ssba_share_twitter_text',
875
  'label' => 'Twitter Text',
876
  'tooltip' => 'Add some custom text for when people share via Twitter',
877
+ 'value' => isset( $arr_settings['ssba_share_twitter_text'] ) ? $arr_settings['ssba_share_twitter_text'] : '',
878
  );
879
 
880
  // Flattr user id.
885
  'name' => 'ssba_flattr_user_id',
886
  'label' => 'Flattr User ID',
887
  'tooltip' => 'Enter your Flattr ID, e.g. davidsneal',
888
+ 'value' => isset( $arr_settings['ssba_flattr_user_id'] ) ? $arr_settings['ssba_flattr_user_id'] : '',
889
  );
890
 
891
  // Flattr user id for plus.
896
  'name' => 'ssba_plus_flattr_user_id',
897
  'label' => 'Flattr User ID',
898
  'tooltip' => 'Enter your Flattr ID, e.g. davidsneal',
899
+ 'value' => isset( $arr_settings['ssba_plus_flattr_user_id'] ) ? $arr_settings['ssba_plus_flattr_user_id'] : '',
900
  );
901
 
902
  // Flattr user id for share bar.
907
  'name' => 'ssba_share_flattr_user_id',
908
  'label' => 'Flattr User ID',
909
  'tooltip' => 'Enter your Flattr ID, e.g. davidsneal',
910
+ 'value' => isset( $arr_settings['ssba_share_flattr_user_id'] ) ? $arr_settings['ssba_share_flattr_user_id'] : '',
911
  );
912
 
913
  // Flattr url.
918
  'name' => 'ssba_flattr_url',
919
  'label' => 'Flattr URL',
920
  'tooltip' => 'This option is perfect for dedicated sites, e.g. https://simplesharebuttons.com',
921
+ 'value' => isset( $arr_settings['ssba_flattr_url'] ) ? $arr_settings['ssba_flattr_url'] : '',
922
  );
923
 
924
  // Flattr url for plus.
929
  'name' => 'ssba_plus_flattr_url',
930
  'label' => 'Flattr URL',
931
  'tooltip' => 'This option is perfect for dedicated sites, e.g. https://simplesharebuttons.com',
932
+ 'value' => isset( $arr_settings['ssba_plus_flattr_url'] ) ? $arr_settings['ssba_plus_flattr_url'] : '',
933
  );
934
 
935
  // Flattr url for share bar.
940
  'name' => 'ssba_share_flattr_url',
941
  'label' => 'Flattr URL',
942
  'tooltip' => 'This option is perfect for dedicated sites, e.g. https://simplesharebuttons.com',
943
+ 'value' => isset( $arr_settings['ssba_share_flattr_url'] ) ? $arr_settings['ssba_share_flattr_url'] : '',
944
  );
945
 
946
  // Buffer text.
951
  'name' => 'ssba_buffer_text',
952
  'label' => 'Custom Buffer Text',
953
  'tooltip' => 'Add some custom text for when people share via Buffer',
954
+ 'value' => isset( $arr_settings['ssba_buffer_text'] ) ? $arr_settings['ssba_buffer_text'] : '',
955
  );
956
 
957
  // Buffer text for plus.
962
  'name' => 'ssba_plus_buffer_text',
963
  'label' => 'Custom Buffer Text',
964
  'tooltip' => 'Add some custom text for when people share via Buffer',
965
+ 'value' => isset( $arr_settings['ssba_plus_buffer_text'] ) ? $arr_settings['ssba_plus_buffer_text'] : '',
966
  );
967
 
968
  // Buffer text for share bar.
973
  'name' => 'ssba_share_buffer_text',
974
  'label' => 'Custom Buffer Text',
975
  'tooltip' => 'Add some custom text for when people share via Buffer',
976
+ 'value' => isset( $arr_settings['ssba_share_buffer_text'] ) ? $arr_settings['ssba_share_buffer_text'] : '',
977
  );
978
 
979
  // Pin featured images.
984
  'label' => 'Pin Featured Images',
985
  'tooltip' => 'Force the use of featured images for posts/pages when pinning',
986
  'value' => 'Y',
987
+ 'checked' => isset( $arr_settings['ssba_pinterest_featured'] ) && 'Y' === $arr_settings['ssba_pinterest_featured'] ? 'checked' : null,
988
  );
989
 
990
  // Pin featured images for plus.
995
  'label' => 'Pin Featured Images',
996
  'tooltip' => 'Force the use of featured images for posts/pages when pinning',
997
  'value' => 'Y',
998
+ 'checked' => isset( $arr_settings['ssba_plus_pinterest_featured'] ) && 'Y' === $arr_settings['ssba_plus_pinterest_featured'] ? 'checked' : null,
999
  );
1000
 
1001
  // Pin featured images for share bar.
1006
  'label' => 'Pin Featured Images',
1007
  'tooltip' => 'Force the use of featured images for posts/pages when pinning',
1008
  'value' => 'Y',
1009
+ 'checked' => isset( $arr_settings['ssba_share_pinterest_featured'] ) && 'Y' === $arr_settings['ssba_share_pinterest_featured'] ? 'checked' : null,
1010
  );
1011
 
1012
  // Default pinterest image.
1016
  'name' => 'ssba_default_pinterest',
1017
  'label' => 'Default Pinterest Image',
1018
  'tooltip' => 'Upload a default Pinterest image',
1019
+ 'value' => isset( $arr_settings['ssba_default_pinterest'] ) ? $arr_settings['ssba_default_pinterest'] : '',
1020
  );
1021
 
1022
  // Default pinterest image for plus.
1026
  'name' => 'ssba_plus_default_pinterest',
1027
  'label' => 'Default Pinterest Image',
1028
  'tooltip' => 'Upload a default Pinterest image',
1029
+ 'value' => isset( $arr_settings['ssba_plus_default_pinterest'] ) ? $arr_settings['ssba_plus_default_pinterest'] : '',
1030
  );
1031
 
1032
  // Default pinterest image for share bar.
1036
  'name' => 'ssba_share_default_pinterest',
1037
  'label' => 'Default Pinterest Image',
1038
  'tooltip' => 'Upload a default Pinterest image',
1039
+ 'value' => isset( $arr_settings['ssba_share_default_pinterest'] ) ? $arr_settings['ssba_share_default_pinterest'] : '',
1040
  );
1041
 
1042
  // Additional css.
1048
  'name' => 'ssba_additional_css',
1049
  'label' => 'Additional CSS',
1050
  'tooltip' => 'Add your own additional CSS if you wish',
1051
+ 'value' => isset( $arr_settings['ssba_additional_css'] ) ? $arr_settings['ssba_additional_css'] : '',
1052
  );
1053
 
1054
  // Additional css for plus.
1060
  'name' => 'ssba_plus_additional_css',
1061
  'label' => 'Additional CSS',
1062
  'tooltip' => 'Add your own additional CSS if you wish',
1063
+ 'value' => isset( $arr_settings['ssba_plus_additional_css'] ) ? $arr_settings['ssba_plus_additional_css'] : '',
1064
  );
1065
 
1066
  // Additional css for share.
1072
  'name' => 'ssba_share_additional_css',
1073
  'label' => 'Additional CSS',
1074
  'tooltip' => 'Add your own additional CSS if you wish',
1075
+ 'value' => isset( $arr_settings['ssba_share_additional_css'] ) ? $arr_settings['ssba_share_additional_css'] : '',
1076
  );
1077
 
1078
  // Enable custom css.
1083
  'label' => 'Enable Custom CSS',
1084
  'tooltip' => 'Switch on to disable all SSBA styles and use your own custom CSS',
1085
  'value' => 'Y',
1086
+ 'checked' => isset( $arr_settings['ssba_custom_styles_enabled'] ) && 'Y' === $arr_settings['ssba_custom_styles_enabled'] ? 'checked' : null,
1087
  );
1088
 
1089
  // Enable custom css for plus.
1094
  'label' => 'Enable Custom CSS',
1095
  'tooltip' => 'Switch on to disable all SSBA styles and use your own custom CSS',
1096
  'value' => 'Y',
1097
+ 'checked' => isset( $arr_settings['ssba_plus_custom_styles_enabled'] ) && 'Y' === $arr_settings['ssba_plus_custom_styles_enabled'] ? 'checked' : null,
1098
  );
1099
 
1100
  // Enable custom css for share bar.
1105
  'label' => 'Enable Custom CSS',
1106
  'tooltip' => 'Switch on to disable all SSBA styles and use your own custom CSS',
1107
  'value' => 'Y',
1108
+ 'checked' => isset( $arr_settings['ssba_share_custom_styles_enabled'] ) && 'Y' === $arr_settings['ssba_share_custom_styles_enabled'] ? 'checked' : null,
1109
  );
1110
 
1111
  // Custom css.
1117
  'name' => 'ssba_custom_styles',
1118
  'label' => 'Custom CSS',
1119
  'tooltip' => 'Enter in your own custom CSS for your share buttons',
1120
+ 'value' => isset( $arr_settings['ssba_custom_styles'] ) ? $arr_settings['ssba_custom_styles'] : '',
1121
  );
1122
 
1123
  // Custom css for plus.
1129
  'name' => 'ssba_plus_custom_styles',
1130
  'label' => 'Custom CSS',
1131
  'tooltip' => 'Enter in your own custom CSS for your share buttons',
1132
+ 'value' => isset( $arr_settings['ssba_plus_custom_styles'] ) ? $arr_settings['ssba_plus_custom_styles'] : '',
1133
  );
1134
 
1135
  // Custom css for share bar.
1141
  'name' => 'ssba_share_custom_styles',
1142
  'label' => 'Custom CSS',
1143
  'tooltip' => 'Enter in your own custom CSS for your share buttons',
1144
+ 'value' => isset( $arr_settings['ssba_share_custom_styles'] ) ? $arr_settings['ssba_share_custom_styles'] : '',
1145
  );
1146
 
1147
  // Switch to new buttons.
1152
  'label' => 'Plus Share Buttons',
1153
  'tooltip' => 'If "On" new buttons replace the old on your site.',
1154
  'value' => 'Y',
1155
+ 'checked' => isset( $arr_settings['ssba_new_buttons'] ) && 'Y' === $arr_settings['ssba_new_buttons'] ? 'checked' : null,
1156
  );
1157
 
1158
  // Select style of new buttons.
1162
  'name' => 'ssba_share_button_style',
1163
  'label' => 'Theme',
1164
  'tooltip' => 'Choose the style of the new buttons',
1165
+ 'selected' => isset( $arr_settings['ssba_share_button_style'] ) ? $arr_settings['ssba_share_button_style'] : '',
1166
  'options' => array(
1167
  'Round' => 1,
1168
  'Square' => 2,
1194
  'name' => 'ssba_before_or_after_plus',
1195
  'label' => 'Placement',
1196
  'tooltip' => 'Place share buttons before or after your content',
1197
+ 'selected' => isset( $arr_settings['ssba_before_or_after_plus'] ) ? $arr_settings['ssba_before_or_after_plus'] : '',
1198
  'options' => array(
1199
  'After' => 'after',
1200
  'Before' => 'before',
1218
  'name' => 'ssba_share_bar_style',
1219
  'label' => 'Style',
1220
  'tooltip' => 'Choose the style of the share bar buttons',
1221
+ 'selected' => isset( $arr_settings['ssba_share_bar_style'] ) ? $arr_settings['ssba_share_bar_style'] : '',
1222
  'options' => array(
1223
  'Round' => 1,
1224
  'Square' => 2,
1240
  'name' => 'ssba_share_bar_position',
1241
  'label' => 'Alignment',
1242
  'tooltip' => 'Choose the share bar position',
1243
+ 'selected' => isset( $arr_settings['ssba_share_bar_position'] ) ? $arr_settings['ssba_share_bar_position'] : '',
1244
  'options' => array(
1245
  'Sticky Left' => 'left',
1246
  'Sticky Right' => 'right',
1256
  'name' => 'ssba_plus_height',
1257
  'label' => 'Height',
1258
  'tooltip' => 'Set the height of the plus buttons',
1259
+ 'value' => isset( $arr_settings['ssba_plus_height'] ) ? $arr_settings['ssba_plus_height'] : '',
1260
  );
1261
 
1262
  // Plus buttons width.
1268
  'name' => 'ssba_plus_width',
1269
  'label' => 'Width',
1270
  'tooltip' => 'Set the width of the plus buttons',
1271
+ 'value' => isset( $arr_settings['ssba_plus_width'] ) ? $arr_settings['ssba_plus_width'] : '',
1272
  );
1273
 
1274
  // Plus icon size.
1280
  'name' => 'ssba_plus_icon_size',
1281
  'label' => 'Icon Size',
1282
  'tooltip' => 'Set the icon size of the plus buttons',
1283
+ 'value' => isset( $arr_settings['ssba_plus_icon_size'] ) ? $arr_settings['ssba_plus_icon_size'] : '',
1284
  );
1285
 
1286
  // Plus button margin.
1292
  'name' => 'ssba_plus_margin',
1293
  'label' => 'Margin',
1294
  'tooltip' => 'Set the margin of the plus buttons',
1295
+ 'value' => isset( $arr_settings['ssba_plus_margin'] ) ? $arr_settings['ssba_plus_margin'] : '',
1296
  );
1297
 
1298
  // Plus button color override.
1302
  'name' => 'ssba_plus_button_color',
1303
  'label' => 'Button Color',
1304
  'tooltip' => 'Choose the color for all plus buttons',
1305
+ 'value' => isset( $arr_settings['ssba_plus_button_color'] ) ? $arr_settings['ssba_plus_button_color'] : '',
1306
  );
1307
 
1308
  // Plus button hover color override.
1312
  'name' => 'ssba_plus_button_hover_color',
1313
  'label' => 'Hover Color',
1314
  'tooltip' => 'Choose the color for all plus buttons hover',
1315
+ 'value' => isset( $arr_settings['ssba_plus_button_hover_color'] ) ? $arr_settings['ssba_plus_button_hover_color'] : '',
1316
  );
1317
 
1318
  // Plus icon color override.
1322
  'name' => 'ssba_plus_icon_color',
1323
  'label' => 'Icon Color',
1324
  'tooltip' => 'Choose the color for all plus button icons',
1325
+ 'value' => isset( $arr_settings['ssba_plus_icon_color'] ) ? $arr_settings['ssba_plus_icon_color'] : '',
1326
  );
1327
 
1328
  // Plus button color override.
1332
  'name' => 'ssba_plus_icon_hover_color',
1333
  'label' => 'Icon Hover Color',
1334
  'tooltip' => 'Choose the color for all plus button icons hover',
1335
+ 'value' => isset( $arr_settings['ssba_plus_icon_hover_color'] ) ? $arr_settings['ssba_plus_icon_hover_color'] : '',
1336
  );
1337
 
1338
  // share buttons height.
1344
  'name' => 'ssba_share_height',
1345
  'label' => 'Height',
1346
  'tooltip' => 'Set the height of the share bar buttons',
1347
+ 'value' => isset( $arr_settings['ssba_share_height'] ) ? $arr_settings['ssba_share_height'] : '',
1348
  );
1349
 
1350
  // share buttons width.
1356
  'name' => 'ssba_share_width',
1357
  'label' => 'Width',
1358
  'tooltip' => 'Set the width of the share bar buttons',
1359
+ 'value' => isset( $arr_settings['ssba_share_width'] ) ? $arr_settings['ssba_share_width'] : '',
1360
  );
1361
 
1362
  // share icon size.
1368
  'name' => 'ssba_share_icon_size',
1369
  'label' => 'Icon Size',
1370
  'tooltip' => 'Set the icon size of the share bar buttons',
1371
+ 'value' => isset( $arr_settings['ssba_share_icon_size'] ) ? $arr_settings['ssba_share_icon_size'] : '',
1372
  );
1373
 
1374
  // share button margin.
1380
  'name' => 'ssba_share_margin',
1381
  'label' => 'Margin',
1382
  'tooltip' => 'Set the margin of the share bar buttons',
1383
+ 'value' => isset( $arr_settings['ssba_share_margin'] ) ? $arr_settings['ssba_share_margin'] : '',
1384
  );
1385
 
1386
  // share button color override.
1390
  'name' => 'ssba_share_button_color',
1391
  'label' => 'Button Color',
1392
  'tooltip' => 'Choose the color for all share bar buttons',
1393
+ 'value' => isset( $arr_settings['ssba_share_button_color'] ) ? $arr_settings['ssba_share_button_color'] : '',
1394
  );
1395
 
1396
  // share button hover color override.
1400
  'name' => 'ssba_share_button_hover_color',
1401
  'label' => 'Hover Color',
1402
  'tooltip' => 'Choose the color for all share bar buttons hover',
1403
+ 'value' => isset( $arr_settings['ssba_share_button_hover_color'] ) ? $arr_settings['ssba_share_button_hover_color'] : '',
1404
  );
1405
 
1406
  // share icon color override.
1410
  'name' => 'ssba_share_icon_color',
1411
  'label' => 'Icon Color',
1412
  'tooltip' => 'Choose the color for all share bar button icons',
1413
+ 'value' => isset( $arr_settings['ssba_share_icon_color'] ) ? $arr_settings['ssba_share_icon_color'] : '',
1414
  );
1415
 
1416
  // share button color override.
1420
  'name' => 'ssba_share_icon_hover_color',
1421
  'label' => 'Icon Hover Color',
1422
  'tooltip' => 'Choose the color for all share bar button icons hover',
1423
+ 'value' => isset( $arr_settings['ssba_share_icon_hover_color'] ) ? $arr_settings['ssba_share_icon_hover_color'] : '',
1424
  );
1425
 
1426
  // Enable share bar.
1431
  'label' => 'Share Bar',
1432
  'tooltip' => 'If "On" share bar will appear on your site.',
1433
  'value' => 'Y',
1434
+ 'checked' => isset( $arr_settings['ssba_share_bar'] ) && 'Y' === $arr_settings['ssba_share_bar'] ? 'checked' : null,
1435
  );
1436
 
1437
  // Share bar display.
1452
  'name' => 'ssba_mobile_breakpoint',
1453
  'label' => 'Mobile Breakpoint',
1454
  'tooltip' => 'Set the share bar mobile breakpoint when it centers on screen',
1455
+ 'value' => isset( $arr_settings['ssba_mobile_breakpoint'] ) ? $arr_settings['ssba_mobile_breakpoint'] : '',
1456
  );
1457
 
1458
  // Notices.
php/class-styles.php CHANGED
@@ -269,7 +269,7 @@ class Styles {
269
  wp_add_inline_style( "{$this->plugin->assets_prefix}-ssba", $html_ssba_style ); // WPCS: XSS ok.
270
  } else { // Else use set options.
271
  // Use custom styles.
272
- $html_ssba_style .= $arr_settings['ssba_custom_styles'];
273
 
274
  wp_add_inline_style( "{$this->plugin->assets_prefix}-ssba", $html_ssba_style ); // WPCS: XSS ok.
275
  } // End if().
269
  wp_add_inline_style( "{$this->plugin->assets_prefix}-ssba", $html_ssba_style ); // WPCS: XSS ok.
270
  } else { // Else use set options.
271
  // Use custom styles.
272
+ $html_ssba_style = $arr_settings['ssba_custom_styles'];
273
 
274
  wp_add_inline_style( "{$this->plugin->assets_prefix}-ssba", $html_ssba_style ); // WPCS: XSS ok.
275
  } // End if().
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: sharethis, scottstorebloom, surlyrightclick, DavidoffNeal
3
  Tags: share buttons, social buttons, facebook, twitter, google+, share, share links, stumble upon, linkedin, pinterest, yummly, vk
4
  Requires at least: 4.5
5
  Tested up to: 4.8.2
6
- Stable tag: 7.3.8
7
  License: GPLv2 or later
8
 
9
  A simple plugin that enables you to add share buttons to all of your posts and/or pages.
@@ -64,8 +64,11 @@ Please visit the <a href="https://wordpress.org/support/plugin/simple-share-butt
64
 
65
  == Changelog ==
66
 
67
- = 7.3.8 =
68
  * Fixed missing variable error.
 
 
 
69
  * Add mobile specific message for whatsapp network.
70
  * Fix plugin confliction due to non specific function name.
71
 
3
  Tags: share buttons, social buttons, facebook, twitter, google+, share, share links, stumble upon, linkedin, pinterest, yummly, vk
4
  Requires at least: 4.5
5
  Tested up to: 4.8.2
6
+ Stable tag: 7.3.9
7
  License: GPLv2 or later
8
 
9
  A simple plugin that enables you to add share buttons to all of your posts and/or pages.
64
 
65
  == Changelog ==
66
 
67
+ = 7.3.9 =
68
  * Fixed missing variable error.
69
+ * Remove missing index errors.
70
+
71
+ = 7.3.8 =
72
  * Add mobile specific message for whatsapp network.
73
  * Fix plugin confliction due to non specific function name.
74
 
simple-share-buttons-adder.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Simple Share Buttons Adder
4
  * Plugin URI: https://simplesharebuttons.com
5
  * Description: A simple plugin that enables you to add share buttons to all of your posts and/or pages.
6
- * Version: 7.3.8
7
  * Author: Simple Share Buttons
8
  * Author URI: https://simplesharebuttons.com
9
  * License: GPLv2
@@ -55,4 +55,4 @@ function _simple_share_buttons_adder_add_action_links( $links ) {
55
  '<a href="' . admin_url( 'options-general.php?page=simple-share-buttons-adder' ) . '">Settings</a>',
56
  );
57
  return array_merge( $links, $mylinks );
58
- }
3
  * Plugin Name: Simple Share Buttons Adder
4
  * Plugin URI: https://simplesharebuttons.com
5
  * Description: A simple plugin that enables you to add share buttons to all of your posts and/or pages.
6
+ * Version: 7.3.9
7
  * Author: Simple Share Buttons
8
  * Author URI: https://simplesharebuttons.com
9
  * License: GPLv2
55
  '<a href="' . admin_url( 'options-general.php?page=simple-share-buttons-adder' ) . '">Settings</a>',
56
  );
57
  return array_merge( $links, $mylinks );
58
+ }