Simple Author Box - Version 2.2.0

Version Description

  • Added option to show all authors with our shortcode
  • Added option to disable the author box on archieve pages.
  • Found a solution for "incompatibility with Content Blocks"
  • Found a solution to translate the author description with WPML and Polylang
Download this release

Release Info

Developer machothemes
Plugin Icon 128x128 Simple Author Box
Version 2.2.0
Comparing to
See all releases

Code changes from version 2.1.5 to 2.2.0

assets/css/sabox.css CHANGED
@@ -7,4 +7,5 @@
7
  }
8
  img.sab-custom-avatar {
9
  height: auto;
 
10
  }
7
  }
8
  img.sab-custom-avatar {
9
  height: auto;
10
+ max-width:75px;
11
  }
assets/css/sabox.min.css CHANGED
@@ -1 +1 @@
1
- #adminmenu #toplevel_page_simple-author-box-options .wp-menu-image img{height:18px;padding-top:8px}#adminmenu #toplevel_page_simple-author-box-options.current .wp-menu-image img{opacity:1}img.sab-custom-avatar{height: auto;}
1
+ #adminmenu #toplevel_page_simple-author-box-options .wp-menu-image img{height:18px;padding-top:8px}#adminmenu #toplevel_page_simple-author-box-options.current .wp-menu-image img{opacity:1}img.sab-custom-avatar{max-width:96px;max-height:96px}
inc/class-sab-review.php ADDED
@@ -0,0 +1,183 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class SAB_Review {
4
+
5
+ private static $instance;
6
+ private $when = array( 5, 15, 30 );
7
+ private $value;
8
+ private $messages;
9
+ private $link = 'https://wordpress.org/support/plugin/%s/reviews/#new-post';
10
+ private $slug = '';
11
+ private $option_name = '';
12
+
13
+ function __construct( $args ) {
14
+
15
+ if ( isset( $args['slug'] ) ) {
16
+ $this->slug = $args['slug'];
17
+ }
18
+
19
+ $this->value = $this->value();
20
+
21
+ $this->messages = array(
22
+ 'notice' => __( "Hey, I noticed you have installed our plugin for %s day - that's awesome! Could you please do me a BIG favor and give it a 5-star rating on WordPress? Just to help us spread the word and boost our motivation.", 'saboxplugin' ),
23
+ 'rate' => __( 'Ok, you deserve it', 'saboxplugin' ),
24
+ 'rated' => __( 'I already did', 'saboxplugin' ),
25
+ 'no_rate' => __( 'No, not good enough', 'saboxplugin' ),
26
+ );
27
+
28
+ if ( isset( $args['messages'] ) ) {
29
+ $this->messages = wp_parse_args( $args['messages'], $this->messages );
30
+ }
31
+
32
+ $this->init();
33
+
34
+ }
35
+
36
+ public static function get_instance( $args ) {
37
+ if ( null === static::$instance ) {
38
+ static::$instance = new static( $args );
39
+ }
40
+
41
+ return static::$instance;
42
+ }
43
+
44
+ private function init() {
45
+ if ( ! is_admin() ) {
46
+ return;
47
+ }
48
+
49
+ add_action( 'wp_ajax_epsilon_review', array( $this, 'ajax' ) );
50
+
51
+ if ( $this->check() ) {
52
+ add_action( 'admin_notices', array( $this, 'five_star_wp_rate_notice' ) );
53
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueue' ) );
54
+ add_action( 'admin_print_footer_scripts', array( $this, 'ajax_script' ) );
55
+ }
56
+
57
+ }
58
+
59
+ private function check() {
60
+
61
+ $options = get_option( 'saboxplugin_options' );
62
+ $option = isset( $options['givemereview'] ) ? $options['givemereview'] : '';
63
+ $currDate = date( 'Y-m-d' );
64
+ if ( 'already-rated' == $option ) {
65
+ return false;
66
+ }
67
+
68
+ if ( $this->value == $option ) {
69
+ return false;
70
+ }
71
+
72
+ if ( is_array( $this->when ) ) {
73
+ foreach ( $this->when as $et ) {
74
+ if ( date( 'Y-m-d', strtotime( $currDate . ' +' . $et . ' days' ) ) == $this->value ) {
75
+ return true;
76
+ }
77
+
78
+ }
79
+ }
80
+
81
+ }
82
+
83
+ private function value() {
84
+
85
+ $value = get_transient( 'saboxplugin_review' );
86
+
87
+ if ( $value ) {
88
+ $current_time = time(); // or your date as well
89
+ $trans_date = strtotime($value);
90
+ $date_diff = $current_time - $trans_date;
91
+
92
+ return round($date_diff / (60 * 60 * 24));
93
+ }
94
+
95
+ $date = date( 'Y-m-d' );
96
+ set_transient( 'saboxplugin_review', $date, 24 * 30 * HOUR_IN_SECONDS );
97
+
98
+ }
99
+
100
+ public function five_star_wp_rate_notice() {
101
+
102
+ $url = sprintf( $this->link, $this->slug );
103
+
104
+ ?>
105
+ <div id="<?php echo $this->slug ?>-epsilon-review-notice" class="notice notice-success is-dismissible">
106
+ <p><?php echo sprintf( wp_kses_post( $this->messages['notice'] ), $this->value ); ?></p>
107
+ <p class="actions">
108
+ <a id="epsilon-rate" href="<?php echo esc_url( $url ) ?>"
109
+ class="button button-primary epsilon-review-button"><?php echo esc_html( $this->messages['rate'] ); ?></a>
110
+ <a id="epsilon-rated" href="#"
111
+ class="button button-secondary epsilon-review-button"><?php echo esc_html( $this->messages['rated'] ); ?></a>
112
+ <a id="epsilon-no-rate" href="#"
113
+ class="button button-secondary epsilon-review-button"><?php echo esc_html( $this->messages['no_rate'] ); ?></a>
114
+ </p>
115
+ </div>
116
+ <?php
117
+ }
118
+
119
+ public function ajax() {
120
+
121
+ check_ajax_referer( 'epsilon-review', 'security' );
122
+
123
+ $options = get_option( 'saboxplugin_options', array() );
124
+
125
+ if ( isset( $_POST['epsilon-review'] ) ) {
126
+ $options['givemereview'] = 'already-rated';
127
+ } else {
128
+ $options['givemereview'] = $this->value;
129
+ }
130
+
131
+ update_option( 'saboxplugin_options', $options );
132
+
133
+ wp_die( 'ok' );
134
+
135
+ }
136
+
137
+ public function enqueue() {
138
+ wp_enqueue_script( 'jquery' );
139
+ }
140
+
141
+ public function ajax_script() {
142
+
143
+ $ajax_nonce = wp_create_nonce( "epsilon-review" );
144
+
145
+ ?>
146
+
147
+ <script type="text/javascript">
148
+ jQuery(document).ready(function ($) {
149
+
150
+ $('.epsilon-review-button').click(function (evt) {
151
+ var href = $(this).attr('href'),
152
+ id = $(this).attr('id');
153
+
154
+ evt.preventDefault();
155
+
156
+ var data = {
157
+ action: 'epsilon_review',
158
+ security: '<?php echo $ajax_nonce; ?>',
159
+ };
160
+
161
+ if ('epsilon-rated' === id) {
162
+ data['epsilon-review'] = 1;
163
+ }
164
+
165
+ $.post('<?php echo admin_url( 'admin-ajax.php' ) ?>', data, function (response) {
166
+ $('#<?php echo $this->slug ?>-epsilon-review-notice').slideUp('fast', function () {
167
+ $(this).remove();
168
+ });
169
+
170
+ if ('epsilon-rate' === id) {
171
+ window.location.href = href;
172
+ }
173
+
174
+ });
175
+
176
+ });
177
+
178
+ });
179
+ </script>
180
+
181
+ <?php
182
+ }
183
+ }
inc/class-simple-author-box-admin-page.php CHANGED
@@ -78,6 +78,12 @@ class Simple_Author_Box_Admin_Page {
78
  'type' => 'toggle',
79
  'group' => 'saboxplugin_options',
80
  ),
 
 
 
 
 
 
81
  ),
82
  'appearance-options' => array(
83
  'sab_box_margin_top' => array(
@@ -220,7 +226,7 @@ class Simple_Author_Box_Admin_Page {
220
  ),
221
  'sab_box_long_shadow' => array(
222
  'label' => __( 'Use flat long shadow effect', 'saboxplugin' ),
223
- 'description' => __( 'Check this if you want a flat shodow for social icons', 'saboxplugin' ),
224
  'type' => 'toggle',
225
  'condition' => 'sab_colored',
226
  'group' => 'saboxplugin_options',
@@ -469,41 +475,47 @@ class Simple_Author_Box_Admin_Page {
469
  public function setting_page() {
470
  ?>
471
 
472
- <div class="masthead">
473
- <div class="wrap sabox-wrap">
474
- <div class="sabox-masthead-left">
475
- <h1 class="wp-heading-inline">
476
  <?php
477
  /* Translators: Welcome Screen Title. */
478
  echo esc_html( apply_filters( 'sabox_show_pro_title', __( 'Simple Author Box', 'saboxplugin' ) ) );
479
  ?>
480
- </h1>
481
-
482
- </div>
483
-
484
- <div class="sabox-masthead-right">
485
- <a target="_blank"
486
- href="https://www.machothemes.com/support/?utm_source=sab&utm_medium=about-page&utm_campaign=support-button"><?php _e( 'Support', 'saboxplugin' ); ?>
487
- &nbsp; &nbsp;<i class="dashicons dashicons-sos"></i>
488
- </a>
489
- </div>
490
- <div class="wp-clearfix"></div>
491
- </div>
492
- </div><!--/.masthead-->
493
-
494
- <div class="sabox-wrap">
495
- <div class="sabox-preview">
496
- <div class="sabox-preview-topbar">
497
- <a href="<?php echo get_edit_user_link(); ?>#your-profile" class="button button-secondary" target="_blank"><i class="dashicons dashicons-edit"></i><?php echo esc_html__( 'Edit Author Profile', 'saboxplugin' ); ?>
498
- </a>
499
- <a href="<?php echo get_edit_user_link(); ?>#sabox-custom-profile-image" class="button button-secondary" target="_blank"><i class="dashicons dashicons-admin-users"></i><?php echo esc_html__( 'Change Author Avatar', 'saboxplugin' ); ?>
500
- </a>
501
- <a href="<?php echo get_edit_user_link(); ?>#sabox-social-table" class="button button-secondary" target="_blank"><i class="dashicons dashicons-networking"></i><?php echo esc_html__( 'Add/Edit Social Media Icons', 'saboxplugin' ); ?>
502
- </a>
503
- </div><!--/.sabox-preview-topbar-->
 
 
 
 
 
 
504
  <?php do_action( 'sab_admin_preview' ) ?>
505
- </div>
506
- <h2 class="epfw-tab-wrapper nav-tab-wrapper wp-clearfix">
507
  <?php foreach ( $this->sections as $id => $section ) { ?>
508
  <?php
509
  $class = 'epfw-tab nav-tab';
@@ -520,12 +532,12 @@ class Simple_Author_Box_Admin_Page {
520
  }
521
 
522
  ?>
523
- <a class="<?php echo esc_attr( $class ); ?>"
524
- href="<?php echo esc_url( $url ); ?>"><?php echo wp_kses_post( $section['label'] ); ?></a>
525
  <?php } ?>
526
- </h2>
527
 
528
- <form method="post" id="sabox-container">
529
  <?php
530
 
531
  wp_nonce_field( 'sabox-plugin-settings', 'sabox_plugin_settings_page' );
@@ -545,11 +557,11 @@ class Simple_Author_Box_Admin_Page {
545
  echo '</div>';
546
 
547
  ?>
548
- </form>
549
 
550
- </div>
551
 
552
- <span class="sabox-version">
553
  <?php echo _e( 'Version: ', 'saboxplugin' ) . esc_html( apply_filters( 'sabox_show_pro_version', SIMPLE_AUTHOR_BOX_VERSION ) ); ?>
554
 
555
  <?php
@@ -691,6 +703,10 @@ class Simple_Author_Box_Admin_Page {
691
  }
692
  echo '</select>';
693
  break;
 
 
 
 
694
  case 'readonly':
695
  echo '<textarea clas="regular-text" rows="3" cols="50" onclick="this.focus();this.select();" readonly="readonly">' . esc_attr( $field['value'] ) . '</textarea>';
696
  break;
@@ -722,9 +738,16 @@ class Simple_Author_Box_Admin_Page {
722
  }
723
 
724
  $values = isset( $this->options[ $field_name ] ) ? $this->options[ $field_name ] : $field['default'];
 
 
 
 
 
 
 
725
  foreach ( $field['choices'] as $key => $choice ) {
726
  echo '<div>';
727
- echo '<input id="' . $key . '-' . $field_name . '" type="checkbox" value="' . $key . '" ' . checked( 1, in_array( $key, $values ), false ) . ' name="' . esc_attr( $name ) . '[]"><label for="' . $key . '-' . $field_name . '" class="checkbox-label">' . $choice . '</label>';
728
  echo '</div>';
729
  }
730
  echo '</div>';
@@ -837,53 +860,53 @@ class Simple_Author_Box_Admin_Page {
837
 
838
  ?>
839
 
840
- <div class="wrap about-wrap simple-author-box-wrap">
841
- <h1><?php echo esc_html__( 'Why you should be upgrading', 'saboxplugin' ); ?></h1>
842
- <p class="about-text"><?php echo esc_html__( 'Introducing one of the best author box systems ever made for WordPress. Simple Author Box is an exquisite WordPress Author Box plugin perfectly fit for any needs. We\'ve outlined the PRO features below.', 'saboxplugin' ); ?></p>
843
- <div class="wp-badge"></div>
844
- <h2 class="nav-tab-wrapper wp-clearfix">
845
- <a href="<?php echo admin_url( 'admin.php?page=sab-upgrade' ); ?>"
846
- class="nav-tab nav-tab-active"><?php echo esc_html__( 'Comparison Table: Lite vs PRO', 'saboxplugin' ); ?></a>
847
- </h2>
848
- <div class="featured-section features">
849
- <table class="free-pro-table">
850
- <thead>
851
- <tr>
852
- <th></th>
853
- <th><?php _e( 'Free', 'saboxplugin' ); ?></th>
854
- <th><?php _e( 'PRO', 'saboxplugin' ); ?></th>
855
- </tr>
856
- </thead>
857
- <tbody>
858
  <?php foreach ( $features as $feature ) : ?>
859
- <tr>
860
- <td class="feature">
861
- <h3><?php echo $feature['label']; ?></h3>
862
  <?php if ( isset( $feature['sub'] ) ) : ?>
863
- <p><?php echo $feature['sub']; ?></p>
864
  <?php endif ?>
865
- </td>
866
- <td class="sab-feature">
867
  <?php echo $feature['sab']; ?>
868
- </td>
869
- <td class="sab-pro-feature">
870
  <?php echo $feature['sab-pro']; ?>
871
- </td>
872
- </tr>
873
  <?php endforeach; ?>
874
- <tr>
875
- <td></td>
876
- <td colspan="2" class="text-right">
877
- <a href="//www.machothemes.com/plugin/simple-author-box-pro?utm_source=sab&utm_medium=about-page&utm_campaign=upsell"
878
- target="_blank" class="button button-primary button-hero">
879
- <span class="dashicons dashicons-cart"></span>
880
  <?php _e( 'Get The Pro Version Now!', 'saboxplugin' ); ?>
881
- </a></td>
882
- </tr>
883
- </tbody>
884
- </table>
885
- </div>
886
- </div>
887
  <?php
888
  }
889
  }
78
  'type' => 'toggle',
79
  'group' => 'saboxplugin_options',
80
  ),
81
+ 'sab_hide_on_archive' => array(
82
+ 'label' => __( 'Hide the author box on archives', 'saboxplugin' ),
83
+ 'description' => __( 'When turned ON, the author box will be removed on archives.', 'saboxplugin' ),
84
+ 'type' => 'toggle',
85
+ 'group' => 'saboxplugin_options',
86
+ ),
87
  ),
88
  'appearance-options' => array(
89
  'sab_box_margin_top' => array(
226
  ),
227
  'sab_box_long_shadow' => array(
228
  'label' => __( 'Use flat long shadow effect', 'saboxplugin' ),
229
+ 'description' => __( 'Check this if you want a flat shadow for social icons', 'saboxplugin' ),
230
  'type' => 'toggle',
231
  'condition' => 'sab_colored',
232
  'group' => 'saboxplugin_options',
475
  public function setting_page() {
476
  ?>
477
 
478
+ <div class="masthead">
479
+ <div class="wrap sabox-wrap">
480
+ <div class="sabox-masthead-left">
481
+ <h1 class="wp-heading-inline">
482
  <?php
483
  /* Translators: Welcome Screen Title. */
484
  echo esc_html( apply_filters( 'sabox_show_pro_title', __( 'Simple Author Box', 'saboxplugin' ) ) );
485
  ?>
486
+ </h1>
487
+
488
+ </div>
489
+
490
+ <div class="sabox-masthead-right">
491
+ <a target="_blank"
492
+ href="https://www.machothemes.com/support/?utm_source=sab&utm_medium=about-page&utm_campaign=support-button"><?php _e( 'Support', 'saboxplugin' ); ?>
493
+ &nbsp; &nbsp;<i class="dashicons dashicons-sos"></i>
494
+ </a>
495
+ </div>
496
+ <div class="wp-clearfix"></div>
497
+ </div>
498
+ </div><!--/.masthead-->
499
+
500
+ <div class="sabox-wrap">
501
+ <div class="sabox-preview">
502
+ <div class="sabox-preview-topbar">
503
+ <a href="<?php echo get_edit_user_link(); ?>#your-profile" class="button button-secondary"
504
+ target="_blank"><i
505
+ class="dashicons dashicons-edit"></i><?php echo esc_html__( 'Edit Author Profile', 'saboxplugin' ); ?>
506
+ </a>
507
+ <a href="<?php echo get_edit_user_link(); ?>#sabox-custom-profile-image"
508
+ class="button button-secondary" target="_blank"><i
509
+ class="dashicons dashicons-admin-users"></i><?php echo esc_html__( 'Change Author Avatar', 'saboxplugin' ); ?>
510
+ </a>
511
+ <a href="<?php echo get_edit_user_link(); ?>#sabox-social-table" class="button button-secondary"
512
+ target="_blank"><i
513
+ class="dashicons dashicons-networking"></i><?php echo esc_html__( 'Add/Edit Social Media Icons', 'saboxplugin' ); ?>
514
+ </a>
515
+ </div><!--/.sabox-preview-topbar-->
516
  <?php do_action( 'sab_admin_preview' ) ?>
517
+ </div>
518
+ <h2 class="epfw-tab-wrapper nav-tab-wrapper wp-clearfix">
519
  <?php foreach ( $this->sections as $id => $section ) { ?>
520
  <?php
521
  $class = 'epfw-tab nav-tab';
532
  }
533
 
534
  ?>
535
+ <a class="<?php echo esc_attr( $class ); ?>"
536
+ href="<?php echo esc_url( $url ); ?>"><?php echo wp_kses_post( $section['label'] ); ?></a>
537
  <?php } ?>
538
+ </h2>
539
 
540
+ <form method="post" id="sabox-container">
541
  <?php
542
 
543
  wp_nonce_field( 'sabox-plugin-settings', 'sabox_plugin_settings_page' );
557
  echo '</div>';
558
 
559
  ?>
560
+ </form>
561
 
562
+ </div>
563
 
564
+ <span class="sabox-version">
565
  <?php echo _e( 'Version: ', 'saboxplugin' ) . esc_html( apply_filters( 'sabox_show_pro_version', SIMPLE_AUTHOR_BOX_VERSION ) ); ?>
566
 
567
  <?php
703
  }
704
  echo '</select>';
705
  break;
706
+ case 'textarea':
707
+ $value = isset( $this->options[ $field_name ] ) ? $this->options[ $field_name ] : $field['default'];
708
+ echo '<textarea rows="3" cols="50" id="' . esc_attr( $field_name ) . '" value="' . esc_attr( $value ) . '" name="' . esc_attr( $name ) . '" class="saboxfield">' . $value . '</textarea>';
709
+ break;
710
  case 'readonly':
711
  echo '<textarea clas="regular-text" rows="3" cols="50" onclick="this.focus();this.select();" readonly="readonly">' . esc_attr( $field['value'] ) . '</textarea>';
712
  break;
738
  }
739
 
740
  $values = isset( $this->options[ $field_name ] ) ? $this->options[ $field_name ] : $field['default'];
741
+
742
+ if ( is_array( $values ) ) {
743
+ $checked = $values;
744
+ } else {
745
+ $checked = array();
746
+ }
747
+
748
  foreach ( $field['choices'] as $key => $choice ) {
749
  echo '<div>';
750
+ echo '<input id="' . $key . '-' . $field_name . '" type="checkbox" value="' . $key . '" ' . checked( 1, in_array( $key, $checked ), false ) . ' name="' . esc_attr( $name ) . '[]"><label for="' . $key . '-' . $field_name . '" class="checkbox-label">' . $choice . '</label>';
751
  echo '</div>';
752
  }
753
  echo '</div>';
860
 
861
  ?>
862
 
863
+ <div class="wrap about-wrap simple-author-box-wrap">
864
+ <h1><?php echo esc_html__( 'Why you should be upgrading', 'saboxplugin' ); ?></h1>
865
+ <p class="about-text"><?php echo esc_html__( 'Introducing one of the best author box systems ever made for WordPress. Simple Author Box is an exquisite WordPress Author Box plugin perfectly fit for any needs. We\'ve outlined the PRO features below.', 'saboxplugin' ); ?></p>
866
+ <div class="wp-badge"></div>
867
+ <h2 class="nav-tab-wrapper wp-clearfix">
868
+ <a href="<?php echo admin_url( 'admin.php?page=sab-upgrade' ); ?>"
869
+ class="nav-tab nav-tab-active"><?php echo esc_html__( 'Comparison Table: Lite vs PRO', 'saboxplugin' ); ?></a>
870
+ </h2>
871
+ <div class="featured-section features">
872
+ <table class="free-pro-table">
873
+ <thead>
874
+ <tr>
875
+ <th></th>
876
+ <th><?php _e( 'Free', 'saboxplugin' ); ?></th>
877
+ <th><?php _e( 'PRO', 'saboxplugin' ); ?></th>
878
+ </tr>
879
+ </thead>
880
+ <tbody>
881
  <?php foreach ( $features as $feature ) : ?>
882
+ <tr>
883
+ <td class="feature">
884
+ <h3><?php echo $feature['label']; ?></h3>
885
  <?php if ( isset( $feature['sub'] ) ) : ?>
886
+ <p><?php echo $feature['sub']; ?></p>
887
  <?php endif ?>
888
+ </td>
889
+ <td class="sab-feature">
890
  <?php echo $feature['sab']; ?>
891
+ </td>
892
+ <td class="sab-pro-feature">
893
  <?php echo $feature['sab-pro']; ?>
894
+ </td>
895
+ </tr>
896
  <?php endforeach; ?>
897
+ <tr>
898
+ <td></td>
899
+ <td colspan="2" class="text-right">
900
+ <a href="//www.machothemes.com/plugin/simple-author-box-pro?utm_source=sab&utm_medium=about-page&utm_campaign=upsell"
901
+ target="_blank" class="button button-primary button-hero">
902
+ <span class="dashicons dashicons-cart"></span>
903
  <?php _e( 'Get The Pro Version Now!', 'saboxplugin' ); ?>
904
+ </a></td>
905
+ </tr>
906
+ </tbody>
907
+ </table>
908
+ </div>
909
+ </div>
910
  <?php
911
  }
912
  }
inc/class-simple-author-box-helper.php CHANGED
@@ -16,6 +16,7 @@ class Simple_Author_Box_Helper {
16
  'digg' => 'Digg',
17
  'dribbble' => 'Dribbble',
18
  'facebook' => 'Facebook',
 
19
  'flickr' => 'Flickr',
20
  'github' => 'Github',
21
  'google' => 'Google',
@@ -52,7 +53,6 @@ class Simple_Author_Box_Helper {
52
  'snapchat' => 'Snapchat',
53
  '500px' => '500px',
54
  'mastodont' => 'Mastodon',
55
- 'whatsapp' => 'WhatsApp',
56
  );
57
 
58
  public static function get_sabox_social_icon( $url, $icon_name ) {
@@ -873,6 +873,7 @@ class Simple_Author_Box_Helper {
873
  'sab_box_author_a_color' => '0',
874
  'sab_box_icons_color' => '0',
875
  'sab_box_border_width' => '1',
 
876
  ),
877
  'sab_box_margin_top' => '0',
878
  'sab_box_margin_bottom' => '0',
@@ -934,7 +935,7 @@ class Simple_Author_Box_Helper {
934
  $sabox_options = self::get_option( 'saboxplugin_options' );
935
  $sabox_web_size = self::get_option( 'sab_box_web_size' );
936
 
937
- $style = '.saboxplugin-wrap{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;border:1px solid #eee;width:100%;clear:both;display:block;overflow:hidden;word-wrap:break-word;position:relative}.saboxplugin-wrap .saboxplugin-gravatar{float:left;padding:20px}.saboxplugin-wrap .saboxplugin-gravatar img{max-width:100px;height:auto}.saboxplugin-wrap .saboxplugin-authorname{font-size:18px;line-height:1;margin:20px 0 0 20px;display:block}.saboxplugin-wrap .saboxplugin-authorname a{text-decoration:none}.saboxplugin-wrap .saboxplugin-authorname a:focus{outline:0}.saboxplugin-wrap .saboxplugin-desc{display:block;margin:5px 20px}.saboxplugin-wrap .saboxplugin-desc a{text-decoration:underline}.saboxplugin-wrap .saboxplugin-desc p{margin:5px 0 12px}.saboxplugin-wrap .saboxplugin-web{margin:0 20px 15px;text-align:left}.saboxplugin-wrap .sab-web-position{text-align:right}.saboxplugin-wrap .saboxplugin-web a{color:#ccc;text-decoration:none}.saboxplugin-wrap .saboxplugin-socials{position:relative;display:block;background:#fcfcfc;padding:5px;border-top:1px solid #eee}.saboxplugin-wrap .saboxplugin-socials a svg{width:20px;height:20px}.saboxplugin-wrap .saboxplugin-socials a svg .st2{fill:#fff}.saboxplugin-wrap .saboxplugin-socials a svg .st1{fill:rgba(0,0,0,.3)}.saboxplugin-wrap .saboxplugin-socials a:hover{opacity:.8;-webkit-transition:opacity .4s;-moz-transition:opacity .4s;-o-transition:opacity .4s;transition:opacity .4s;box-shadow:none!important;-webkit-box-shadow:none!important}.saboxplugin-wrap .saboxplugin-socials .saboxplugin-icon-color{box-shadow:none;padding:0;border:0;-webkit-transition:opacity .4s;-moz-transition:opacity .4s;-o-transition:opacity .4s;transition:opacity .4s;display:inline-block;color:#fff;font-size:0;text-decoration:inherit;margin:5px;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;overflow:hidden}.saboxplugin-wrap .saboxplugin-socials .saboxplugin-icon-grey{text-decoration:inherit;box-shadow:none;position:relative;display:-moz-inline-stack;display:inline-block;vertical-align:middle;zoom:1;margin:10px 5px;color:#444}.clearfix:after,.clearfix:before{content:\' \';display:table;line-height:0;clear:both}.ie7 .clearfix{zoom:1}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-twitch{border-color:#38245c}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-addthis{border-color:#e91c00}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-behance{border-color:#003eb0}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-delicious{border-color:#06c}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-deviantart{border-color:#036824}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-digg{border-color:#00327c}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-dribbble{border-color:#ba1655}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-facebook{border-color:#1e2e4f}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-flickr{border-color:#003576}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-github{border-color:#264874}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-google{border-color:#0b51c5}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-googleplus{border-color:#96271a}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-html5{border-color:#902e13}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-instagram{border-color:#1630aa}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-linkedin{border-color:#00344f}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-pinterest{border-color:#5b040e}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-reddit{border-color:#992900}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-rss{border-color:#a43b0a}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-sharethis{border-color:#5d8420}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-skype{border-color:#00658a}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-soundcloud{border-color:#995200}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-spotify{border-color:#0f612c}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-stackoverflow{border-color:#a95009}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-steam{border-color:#006388}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-user_email{border-color:#b84e05}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-stumbleUpon{border-color:#9b280e}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-tumblr{border-color:#10151b}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-twitter{border-color:#0967a0}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-vimeo{border-color:#0d7091}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-windows{border-color:#003f71}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-wordpress{border-color:#0f3647}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-yahoo{border-color:#14002d}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-youtube{border-color:#900}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-xing{border-color:#000202}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-mixcloud{border-color:#2475a0}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-vk{border-color:#243549}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-medium{border-color:#00452c}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-quora{border-color:#420e00}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-meetup{border-color:#9b181c}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-goodreads{border-color:#000}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-snapchat{border-color:#999700}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-500px{border-color:#00557f}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-whatsapp{border-color:#1e2e4f}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-mastodont{border-color:#185886}.sabox-plus-item{margin-bottom:20px}@media screen and (max-width:480px){.saboxplugin-wrap{text-align:center}.saboxplugin-wrap .saboxplugin-gravatar{float:none;padding:20px 0;text-align:center;margin:0 auto;display:block}.saboxplugin-wrap .saboxplugin-gravatar img{float:none;display:inline-block;display:-moz-inline-stack;vertical-align:middle;zoom:1}.saboxplugin-wrap .saboxplugin-desc{margin:0 10px 20px;text-align:center}.saboxplugin-wrap .saboxplugin-authorname{text-align:center;margin:10px 0 20px}}body .saboxplugin-authorname a,body .saboxplugin-authorname a:hover{box-shadow:none;-webkit-box-shadow:none}a.sab-profile-edit{font-size:16px!important;line-height:1!important}.sab-edit-settings a,a.sab-profile-edit{color:#0073aa!important;box-shadow:none!important;-webkit-box-shadow:none!important}.sab-edit-settings{margin-right:15px;position:absolute;right:0;z-index:2;bottom:10px;line-height:20px}.sab-edit-settings i{margin-left:5px}.saboxplugin-socials{line-height:1!important}.rtl .saboxplugin-wrap .saboxplugin-gravatar{float:right}.rtl .saboxplugin-wrap .saboxplugin-authorname{display:flex;align-items:center}.rtl .saboxplugin-wrap .saboxplugin-authorname .sab-profile-edit{margin-right:10px}.rtl .sab-edit-settings{right:auto;left:0}';
938
 
939
  // Border color of Simple Author Box
940
  if ( '' != $sabox_options['sab_box_border'] ) {
16
  'digg' => 'Digg',
17
  'dribbble' => 'Dribbble',
18
  'facebook' => 'Facebook',
19
+ 'whatsapp' => 'WhatsApp',
20
  'flickr' => 'Flickr',
21
  'github' => 'Github',
22
  'google' => 'Google',
53
  'snapchat' => 'Snapchat',
54
  '500px' => '500px',
55
  'mastodont' => 'Mastodon',
 
56
  );
57
 
58
  public static function get_sabox_social_icon( $url, $icon_name ) {
873
  'sab_box_author_a_color' => '0',
874
  'sab_box_icons_color' => '0',
875
  'sab_box_border_width' => '1',
876
+ 'sab_hide_on_archive' => '0',
877
  ),
878
  'sab_box_margin_top' => '0',
879
  'sab_box_margin_bottom' => '0',
935
  $sabox_options = self::get_option( 'saboxplugin_options' );
936
  $sabox_web_size = self::get_option( 'sab_box_web_size' );
937
 
938
+ $style = '.saboxplugin-wrap{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;border:1px solid #eee;width:100%;clear:both;display:block;overflow:hidden;word-wrap:break-word;position:relative}.saboxplugin-wrap .saboxplugin-gravatar{float:left;padding:20px}.saboxplugin-wrap .saboxplugin-gravatar img{max-width:100px;height:auto}.saboxplugin-wrap .saboxplugin-authorname{font-size:18px;line-height:1;margin:20px 0 0 20px;display:block}.saboxplugin-wrap .saboxplugin-authorname a{text-decoration:none}.saboxplugin-wrap .saboxplugin-authorname a:focus{outline:0}.saboxplugin-wrap .saboxplugin-desc{display:block;margin:5px 20px}.saboxplugin-wrap .saboxplugin-desc a{text-decoration:underline}.saboxplugin-wrap .saboxplugin-desc p{margin:5px 0 12px}.saboxplugin-wrap .saboxplugin-web{margin:0 20px 15px;text-align:left}.saboxplugin-wrap .sab-web-position{text-align:right}.saboxplugin-wrap .saboxplugin-web a{color:#ccc;text-decoration:none}.saboxplugin-wrap .saboxplugin-socials{position:relative;display:block;background:#fcfcfc;padding:5px;border-top:1px solid #eee}.saboxplugin-wrap .saboxplugin-socials a svg{width:20px;height:20px}.saboxplugin-wrap .saboxplugin-socials a svg .st2{fill:#fff}.saboxplugin-wrap .saboxplugin-socials a svg .st1{fill:rgba(0,0,0,.3)}.saboxplugin-wrap .saboxplugin-socials a:hover{opacity:.8;-webkit-transition:opacity .4s;-moz-transition:opacity .4s;-o-transition:opacity .4s;transition:opacity .4s;box-shadow:none!important;-webkit-box-shadow:none!important}.saboxplugin-wrap .saboxplugin-socials .saboxplugin-icon-color{box-shadow:none;padding:0;border:0;-webkit-transition:opacity .4s;-moz-transition:opacity .4s;-o-transition:opacity .4s;transition:opacity .4s;display:inline-block;color:#fff;font-size:0;text-decoration:inherit;margin:5px;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;overflow:hidden}.saboxplugin-wrap .saboxplugin-socials .saboxplugin-icon-grey{text-decoration:inherit;box-shadow:none;position:relative;display:-moz-inline-stack;display:inline-block;vertical-align:middle;zoom:1;margin:10px 5px;color:#444}.clearfix:after,.clearfix:before{content:\' \';display:table;line-height:0;clear:both}.ie7 .clearfix{zoom:1}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-twitch{border-color:#38245c}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-addthis{border-color:#e91c00}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-behance{border-color:#003eb0}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-delicious{border-color:#06c}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-deviantart{border-color:#036824}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-digg{border-color:#00327c}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-dribbble{border-color:#ba1655}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-facebook{border-color:#1e2e4f}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-flickr{border-color:#003576}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-github{border-color:#264874}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-google{border-color:#0b51c5}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-googleplus{border-color:#96271a}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-html5{border-color:#902e13}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-instagram{border-color:#1630aa}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-linkedin{border-color:#00344f}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-pinterest{border-color:#5b040e}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-reddit{border-color:#992900}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-rss{border-color:#a43b0a}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-sharethis{border-color:#5d8420}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-skype{border-color:#00658a}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-soundcloud{border-color:#995200}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-spotify{border-color:#0f612c}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-stackoverflow{border-color:#a95009}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-steam{border-color:#006388}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-user_email{border-color:#b84e05}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-stumbleUpon{border-color:#9b280e}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-tumblr{border-color:#10151b}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-twitter{border-color:#0967a0}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-vimeo{border-color:#0d7091}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-windows{border-color:#003f71}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-wordpress{border-color:#0f3647}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-yahoo{border-color:#14002d}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-youtube{border-color:#900}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-xing{border-color:#000202}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-mixcloud{border-color:#2475a0}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-vk{border-color:#243549}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-medium{border-color:#00452c}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-quora{border-color:#420e00}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-meetup{border-color:#9b181c}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-goodreads{border-color:#000}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-snapchat{border-color:#999700}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-500px{border-color:#00557f}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-mastodont{border-color:#185886}.sabox-plus-item{margin-bottom:20px}@media screen and (max-width:480px){.saboxplugin-wrap{text-align:center}.saboxplugin-wrap .saboxplugin-gravatar{float:none;padding:20px 0;text-align:center;margin:0 auto;display:block}.saboxplugin-wrap .saboxplugin-gravatar img{float:none;display:inline-block;display:-moz-inline-stack;vertical-align:middle;zoom:1}.saboxplugin-wrap .saboxplugin-desc{margin:0 10px 20px;text-align:center}.saboxplugin-wrap .saboxplugin-authorname{text-align:center;margin:10px 0 20px}}body .saboxplugin-authorname a,body .saboxplugin-authorname a:hover{box-shadow:none;-webkit-box-shadow:none}a.sab-profile-edit{font-size:16px!important;line-height:1!important}.sab-edit-settings a,a.sab-profile-edit{color:#0073aa!important;box-shadow:none!important;-webkit-box-shadow:none!important}.sab-edit-settings{margin-right:15px;position:absolute;right:0;z-index:2;bottom:10px;line-height:20px}.sab-edit-settings i{margin-left:5px}.saboxplugin-socials{line-height:1!important}.rtl .saboxplugin-wrap .saboxplugin-gravatar{float:right}.rtl .saboxplugin-wrap .saboxplugin-authorname{display:flex;align-items:center}.rtl .saboxplugin-wrap .saboxplugin-authorname .sab-profile-edit{margin-right:10px}.rtl .sab-edit-settings{right:auto;left:0}img.sab-custom-avatar{max-width:75px;}';
939
 
940
  // Border color of Simple Author Box
941
  if ( '' != $sabox_options['sab_box_border'] ) {
inc/class-simple-author-box-previewer.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
 
3
  /**
4
- *
5
  */
6
  class Simple_Author_Box_Previewer {
7
 
@@ -40,7 +40,7 @@ class Simple_Author_Box_Previewer {
40
  );
41
 
42
  private $options;
43
-
44
  function __construct() {
45
 
46
  // Output Author Box
@@ -51,13 +51,17 @@ class Simple_Author_Box_Previewer {
51
 
52
  }
53
 
54
- public function admin_style_and_scripts( $hook ){
55
 
56
  // loaded only on plugin page
57
  if ( 'toplevel_page_simple-author-box-options' == $hook ) {
58
 
59
  wp_enqueue_script( 'sabox-webfont', 'https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js', array(), false, true );
60
- wp_enqueue_script( 'sabox-previewer', SIMPLE_AUTHOR_BOX_ASSETS . 'js/sab-preview.js', array( 'jquery', 'backbone', 'sabox-webfont' ), false, true );
 
 
 
 
61
  }
62
 
63
  }
@@ -106,14 +110,14 @@ class Simple_Author_Box_Previewer {
106
  // author box clearfix
107
  echo '<div class="clearfix"></div>';
108
 
109
- $social_links = Simple_Author_Box_Helper::$social_icons;
110
  $social_links['user_email'] = '#';
111
 
112
  $extra_class = ' sab-show-simple';
113
  if ( '1' == $this->options['sab_colored'] ) {
114
  if ( '1' == $this->options['sab_icons_style'] ) {
115
  $extra_class = ' sab-show-circle';
116
- }else{
117
  $extra_class = ' sab-show-square';
118
  }
119
  }
@@ -134,8 +138,8 @@ class Simple_Author_Box_Previewer {
134
  $simple_icons_html = '';
135
  $circle_icons_html = '';
136
  $square_icons_html = '';
137
- $link = '<a href="#" class="%s">%s</a>';
138
-
139
  foreach ( $social_links as $social_platform => $social_link ) {
140
 
141
  $simple_icons_html .= sprintf( $link, 'saboxplugin-icon-grey', Simple_Author_Box_Social::icon_to_svg( $social_platform, 'simple' ) );
@@ -154,17 +158,17 @@ class Simple_Author_Box_Previewer {
154
  echo '<div class="note"><strong>Note:</strong> By default our Author Box will take the current font family and color from your theme. Basically if you don\'t select a font or a color from the plugin\'s settings the font and color of the Author Box will be different on the front-end than in the previewer.</div>';
155
  }
156
 
157
- private function generate_inline_css(){
158
 
159
- $padding_top_bottom = Simple_Author_Box_Helper::get_option( 'sab_box_padding_top_bottom' );
160
- $padding_left_right = Simple_Author_Box_Helper::get_option( 'sab_box_padding_left_right' );
161
- $sabox_name_size = Simple_Author_Box_Helper::get_option( 'sab_box_name_size' );
162
- $sabox_desc_size = Simple_Author_Box_Helper::get_option( 'sab_box_desc_size' );
163
- $sabox_icon_size = Simple_Author_Box_Helper::get_option( 'sab_box_icon_size' );
164
- $sabox_options = Simple_Author_Box_Helper::get_option( 'saboxplugin_options' );
165
- $sabox_web_size = Simple_Author_Box_Helper::get_option( 'sab_box_web_size' );
166
 
167
- $style = '.saboxplugin-wrap{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;border:1px solid #eee;width:100%;clear:both;display:block;overflow:hidden;word-wrap:break-word;position:relative}.saboxplugin-wrap .saboxplugin-gravatar{float:left;padding:20px}.saboxplugin-wrap .saboxplugin-gravatar img{max-width:100px;height:auto}.saboxplugin-wrap .saboxplugin-authorname{font-size:18px;line-height:1;margin:20px 0 0 20px;display:block}.saboxplugin-wrap .saboxplugin-authorname a{text-decoration:none}.saboxplugin-wrap .saboxplugin-authorname a:focus{outline:0}.saboxplugin-wrap .saboxplugin-desc{display:block;margin:5px 20px}.saboxplugin-wrap .saboxplugin-desc a{text-decoration:underline}.saboxplugin-wrap .saboxplugin-desc p{margin:5px 0 12px}.saboxplugin-wrap .saboxplugin-web{margin:0 20px 15px;text-align:left}.saboxplugin-wrap .sab-web-position{text-align:right}.saboxplugin-wrap .saboxplugin-web a{color:#ccc;text-decoration:none}.saboxplugin-wrap .saboxplugin-socials{position:relative;display:block;background:#fcfcfc;padding:5px;border-top:1px solid #eee}.saboxplugin-wrap .saboxplugin-socials a svg{width:20px;height:20px}.saboxplugin-wrap .saboxplugin-socials a svg .st2{fill:#fff}.saboxplugin-wrap .saboxplugin-socials a svg .st1{fill:rgba(0,0,0,.3)}.saboxplugin-wrap .saboxplugin-socials a:hover{opacity:.8;-webkit-transition:opacity .4s;-moz-transition:opacity .4s;-o-transition:opacity .4s;transition:opacity .4s;box-shadow:none!important;-webkit-box-shadow:none!important}.saboxplugin-wrap .saboxplugin-socials .saboxplugin-icon-color{box-shadow:none;padding:0;border:0;-webkit-transition:opacity .4s;-moz-transition:opacity .4s;-o-transition:opacity .4s;transition:opacity .4s;display:inline-block;color:#fff;font-size:0;text-decoration:inherit;margin:5px;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;overflow:hidden}.saboxplugin-wrap .saboxplugin-socials .saboxplugin-icon-grey{text-decoration:inherit;box-shadow:none;position:relative;display:-moz-inline-stack;display:inline-block;vertical-align:middle;zoom:1;margin:10px 5px;color:#444}.clearfix:after,.clearfix:before{content:\' \';display:table;line-height:0;clear:both}.ie7 .clearfix{zoom:1}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-twitch{border-color:#38245c}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-addthis{border-color:#e91c00}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-behance{border-color:#003eb0}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-delicious{border-color:#06c}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-deviantart{border-color:#036824}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-digg{border-color:#00327c}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-dribbble{border-color:#ba1655}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-facebook{border-color:#1e2e4f}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-flickr{border-color:#003576}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-github{border-color:#264874}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-google{border-color:#0b51c5}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-googleplus{border-color:#96271a}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-html5{border-color:#902e13}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-instagram{border-color:#1630aa}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-linkedin{border-color:#00344f}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-pinterest{border-color:#5b040e}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-reddit{border-color:#992900}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-rss{border-color:#a43b0a}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-sharethis{border-color:#5d8420}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-skype{border-color:#00658a}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-soundcloud{border-color:#995200}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-spotify{border-color:#0f612c}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-stackoverflow{border-color:#a95009}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-steam{border-color:#006388}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-user_email{border-color:#b84e05}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-stumbleUpon{border-color:#9b280e}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-tumblr{border-color:#10151b}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-twitter{border-color:#0967a0}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-vimeo{border-color:#0d7091}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-windows{border-color:#003f71}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-wordpress{border-color:#0f3647}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-yahoo{border-color:#14002d}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-youtube{border-color:#900}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-xing{border-color:#000202}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-mixcloud{border-color:#2475a0}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-vk{border-color:#243549}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-medium{border-color:#00452c}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-quora{border-color:#420e00}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-meetup{border-color:#9b181c}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-goodreads{border-color:#000}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-snapchat{border-color:#999700}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-500px{border-color:#00557f}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-mastodont{border-color:#185886}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-whatsapp{border-color:#1e2e4f}.sabox-plus-item{margin-bottom:20px}@media screen and (max-width:480px){.saboxplugin-wrap{text-align:center}.saboxplugin-wrap .saboxplugin-gravatar{float:none;padding:20px 0;text-align:center;margin:0 auto;display:block}.saboxplugin-wrap .saboxplugin-gravatar img{float:none;display:inline-block;display:-moz-inline-stack;vertical-align:middle;zoom:1}.saboxplugin-wrap .saboxplugin-desc{margin:0 10px 20px;text-align:center}.saboxplugin-wrap .saboxplugin-authorname{text-align:center;margin:10px 0 20px}}body .saboxplugin-authorname a,body .saboxplugin-authorname a:hover{box-shadow:none;-webkit-box-shadow:none}a.sab-profile-edit{font-size:16px!important;line-height:1!important}.sab-edit-settings a,a.sab-profile-edit{color:#0073aa!important;box-shadow:none!important;-webkit-box-shadow:none!important}.sab-edit-settings{margin-right:15px;position:absolute;right:0;z-index:2;bottom:10px;line-height:20px}.sab-edit-settings i{margin-left:5px}.saboxplugin-socials{line-height:1!important}.rtl .saboxplugin-wrap .saboxplugin-gravatar{float:right}.rtl .saboxplugin-wrap .saboxplugin-authorname{display:flex;align-items:center}.rtl .saboxplugin-wrap .saboxplugin-authorname .sab-profile-edit{margin-right:10px}.rtl .sab-edit-settings{right:auto;left:0}';
168
 
169
  // Border color of Simple Author Box
170
  if ( '' != $sabox_options['sab_box_border'] ) {
@@ -181,7 +185,7 @@ class Simple_Author_Box_Previewer {
181
  // Avatar hover effect
182
  $style .= '.saboxplugin-wrap .saboxplugin-gravatar.sab-round-image.sab-rotate-img img {-webkit-transition:all .5s ease;-moz-transition:all .5s ease;-o-transition:all .5s ease;transition:all .5s ease;}';
183
  $style .= '.saboxplugin-wrap .saboxplugin-gravatar.sab-round-image.sab-rotate-img img:hover {-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-o-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);}';
184
-
185
  // Background color of social icons bar
186
  if ( '' != $sabox_options['sab_box_icons_back'] ) {
187
  $style .= '.saboxplugin-wrap .saboxplugin-socials{background-color:' . esc_html( $sabox_options['sab_box_icons_back'] ) . ';}';
@@ -198,7 +202,7 @@ class Simple_Author_Box_Previewer {
198
  if ( '' != $sabox_options['sab_box_author_a_color'] ) {
199
  $style .= '.saboxplugin-wrap .saboxplugin-desc a, .saboxplugin-wrap .saboxplugin-desc {color:' . esc_html( $sabox_options['sab_box_author_a_color'] ) . ';}';
200
  }
201
-
202
  // Author name color
203
  if ( '' != $sabox_options['sab_box_author_color'] ) {
204
  $style .= '.saboxplugin-wrap .saboxplugin-authorname a {color:' . esc_html( $sabox_options['sab_box_author_color'] ) . ';}';
@@ -212,23 +216,23 @@ class Simple_Author_Box_Previewer {
212
  // Author name font family
213
  $sab_box_name_font = Simple_Author_Box_Helper::get_option( 'sab_box_name_font' );
214
  if ( 'None' != $sab_box_name_font ) {
215
- $style .= '.saboxplugin-wrap .saboxplugin-authorname {font-family:"' . esc_html( $sab_box_name_font ) . '";}';
216
  }
217
 
218
  // Author description font family
219
  $sab_box_desc_font = Simple_Author_Box_Helper::get_option( 'sab_box_desc_font' );
220
  if ( 'None' != $sab_box_name_font ) {
221
- $style .= '.saboxplugin-wrap .saboxplugin-desc {font-family:' . esc_html( $sab_box_desc_font ) . ';}';
222
  }
223
 
224
  // Author web font family
225
  $sab_box_web_font = Simple_Author_Box_Helper::get_option( 'sab_box_web_font' );
226
  if ( '1' == $sabox_options['sab_web'] && 'None' != $sab_box_web_font ) {
227
- $style .= '.saboxplugin-wrap .saboxplugin-web {font-family:"' . esc_html( $sab_box_web_font ) . '";}';
228
  }
229
 
230
  // Author description font style
231
- if ( '1' == $sabox_options['sab_desc_style'] ) {
232
  $style .= '.saboxplugin-wrap .saboxplugin-desc {font-style:italic;}';
233
  }
234
  // Margin top & bottom, Padding
@@ -259,7 +263,7 @@ class Simple_Author_Box_Previewer {
259
 
260
  // Icons size
261
  $icon_size = absint( $sabox_icon_size );
262
- $icon_size_2x = absint( $sabox_icon_size )* 2;
263
 
264
  $style .= '.saboxplugin-wrap .saboxplugin-socials a.saboxplugin-icon-grey svg {width:' . absint( $icon_size ) . 'px;height:' . absint( $icon_size ) . 'px;}';
265
  $style .= '.saboxplugin-wrap .saboxplugin-socials a.saboxplugin-icon-color svg {width:' . absint( $icon_size_2x ) . 'px;height:' . absint( $icon_size_2x ) . 'px;}';
@@ -267,6 +271,7 @@ class Simple_Author_Box_Previewer {
267
  $style .= '.saboxplugin-wrap a{cursor:not-allowed;}';
268
 
269
  $style = apply_filters( 'sabox-previewer-css', $style, $sabox_options );
 
270
  return $style;
271
 
272
  }
1
  <?php
2
 
3
  /**
4
+ *
5
  */
6
  class Simple_Author_Box_Previewer {
7
 
40
  );
41
 
42
  private $options;
43
+
44
  function __construct() {
45
 
46
  // Output Author Box
51
 
52
  }
53
 
54
+ public function admin_style_and_scripts( $hook ) {
55
 
56
  // loaded only on plugin page
57
  if ( 'toplevel_page_simple-author-box-options' == $hook ) {
58
 
59
  wp_enqueue_script( 'sabox-webfont', 'https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js', array(), false, true );
60
+ wp_enqueue_script( 'sabox-previewer', SIMPLE_AUTHOR_BOX_ASSETS . 'js/sab-preview.js', array(
61
+ 'jquery',
62
+ 'backbone',
63
+ 'sabox-webfont'
64
+ ), false, true );
65
  }
66
 
67
  }
110
  // author box clearfix
111
  echo '<div class="clearfix"></div>';
112
 
113
+ $social_links = Simple_Author_Box_Helper::$social_icons;
114
  $social_links['user_email'] = '#';
115
 
116
  $extra_class = ' sab-show-simple';
117
  if ( '1' == $this->options['sab_colored'] ) {
118
  if ( '1' == $this->options['sab_icons_style'] ) {
119
  $extra_class = ' sab-show-circle';
120
+ } else {
121
  $extra_class = ' sab-show-square';
122
  }
123
  }
138
  $simple_icons_html = '';
139
  $circle_icons_html = '';
140
  $square_icons_html = '';
141
+ $link = '<a href="#" class="%s">%s</a>';
142
+
143
  foreach ( $social_links as $social_platform => $social_link ) {
144
 
145
  $simple_icons_html .= sprintf( $link, 'saboxplugin-icon-grey', Simple_Author_Box_Social::icon_to_svg( $social_platform, 'simple' ) );
158
  echo '<div class="note"><strong>Note:</strong> By default our Author Box will take the current font family and color from your theme. Basically if you don\'t select a font or a color from the plugin\'s settings the font and color of the Author Box will be different on the front-end than in the previewer.</div>';
159
  }
160
 
161
+ private function generate_inline_css() {
162
 
163
+ $padding_top_bottom = Simple_Author_Box_Helper::get_option( 'sab_box_padding_top_bottom' );
164
+ $padding_left_right = Simple_Author_Box_Helper::get_option( 'sab_box_padding_left_right' );
165
+ $sabox_name_size = Simple_Author_Box_Helper::get_option( 'sab_box_name_size' );
166
+ $sabox_desc_size = Simple_Author_Box_Helper::get_option( 'sab_box_desc_size' );
167
+ $sabox_icon_size = Simple_Author_Box_Helper::get_option( 'sab_box_icon_size' );
168
+ $sabox_options = Simple_Author_Box_Helper::get_option( 'saboxplugin_options' );
169
+ $sabox_web_size = Simple_Author_Box_Helper::get_option( 'sab_box_web_size' );
170
 
171
+ $style = '.saboxplugin-wrap{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;border:1px solid #eee;width:100%;clear:both;display:block;overflow:hidden;word-wrap:break-word;position:relative}.saboxplugin-wrap .saboxplugin-gravatar{float:left;padding:20px}.saboxplugin-wrap .saboxplugin-gravatar img{max-width:100px;height:auto}.saboxplugin-wrap .saboxplugin-authorname{font-size:18px;line-height:1;margin:20px 0 0 20px;display:block}.saboxplugin-wrap .saboxplugin-authorname a{text-decoration:none}.saboxplugin-wrap .saboxplugin-authorname a:focus{outline:0}.saboxplugin-wrap .saboxplugin-desc{display:block;margin:5px 20px}.saboxplugin-wrap .saboxplugin-desc a{text-decoration:underline}.saboxplugin-wrap .saboxplugin-desc p{margin:5px 0 12px}.saboxplugin-wrap .saboxplugin-web{margin:0 20px 15px;text-align:left}.saboxplugin-wrap .sab-web-position{text-align:right}.saboxplugin-wrap .saboxplugin-web a{color:#ccc;text-decoration:none}.saboxplugin-wrap .saboxplugin-socials{position:relative;display:block;background:#fcfcfc;padding:5px;border-top:1px solid #eee}.saboxplugin-wrap .saboxplugin-socials a svg{width:20px;height:20px}.saboxplugin-wrap .saboxplugin-socials a svg .st2{fill:#fff}.saboxplugin-wrap .saboxplugin-socials a svg .st1{fill:rgba(0,0,0,.3)}.saboxplugin-wrap .saboxplugin-socials a:hover{opacity:.8;-webkit-transition:opacity .4s;-moz-transition:opacity .4s;-o-transition:opacity .4s;transition:opacity .4s;box-shadow:none!important;-webkit-box-shadow:none!important}.saboxplugin-wrap .saboxplugin-socials .saboxplugin-icon-color{box-shadow:none;padding:0;border:0;-webkit-transition:opacity .4s;-moz-transition:opacity .4s;-o-transition:opacity .4s;transition:opacity .4s;display:inline-block;color:#fff;font-size:0;text-decoration:inherit;margin:5px;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;overflow:hidden}.saboxplugin-wrap .saboxplugin-socials .saboxplugin-icon-grey{text-decoration:inherit;box-shadow:none;position:relative;display:-moz-inline-stack;display:inline-block;vertical-align:middle;zoom:1;margin:10px 5px;color:#444}.clearfix:after,.clearfix:before{content:\' \';display:table;line-height:0;clear:both}.ie7 .clearfix{zoom:1}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-twitch{border-color:#38245c}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-addthis{border-color:#e91c00}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-behance{border-color:#003eb0}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-delicious{border-color:#06c}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-deviantart{border-color:#036824}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-digg{border-color:#00327c}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-dribbble{border-color:#ba1655}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-facebook{border-color:#1e2e4f}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-flickr{border-color:#003576}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-github{border-color:#264874}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-google{border-color:#0b51c5}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-googleplus{border-color:#96271a}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-html5{border-color:#902e13}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-instagram{border-color:#1630aa}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-linkedin{border-color:#00344f}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-pinterest{border-color:#5b040e}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-reddit{border-color:#992900}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-rss{border-color:#a43b0a}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-sharethis{border-color:#5d8420}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-skype{border-color:#00658a}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-soundcloud{border-color:#995200}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-spotify{border-color:#0f612c}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-stackoverflow{border-color:#a95009}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-steam{border-color:#006388}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-user_email{border-color:#b84e05}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-stumbleUpon{border-color:#9b280e}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-tumblr{border-color:#10151b}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-twitter{border-color:#0967a0}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-vimeo{border-color:#0d7091}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-windows{border-color:#003f71}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-wordpress{border-color:#0f3647}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-yahoo{border-color:#14002d}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-youtube{border-color:#900}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-xing{border-color:#000202}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-mixcloud{border-color:#2475a0}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-vk{border-color:#243549}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-medium{border-color:#00452c}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-quora{border-color:#420e00}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-meetup{border-color:#9b181c}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-goodreads{border-color:#000}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-snapchat{border-color:#999700}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-500px{border-color:#00557f}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-mastodont{border-color:#185886}.sabox-plus-item{margin-bottom:20px}@media screen and (max-width:480px){.saboxplugin-wrap{text-align:center}.saboxplugin-wrap .saboxplugin-gravatar{float:none;padding:20px 0;text-align:center;margin:0 auto;display:block}.saboxplugin-wrap .saboxplugin-gravatar img{float:none;display:inline-block;display:-moz-inline-stack;vertical-align:middle;zoom:1}.saboxplugin-wrap .saboxplugin-desc{margin:0 10px 20px;text-align:center}.saboxplugin-wrap .saboxplugin-authorname{text-align:center;margin:10px 0 20px}}body .saboxplugin-authorname a,body .saboxplugin-authorname a:hover{box-shadow:none;-webkit-box-shadow:none}a.sab-profile-edit{font-size:16px!important;line-height:1!important}.sab-edit-settings a,a.sab-profile-edit{color:#0073aa!important;box-shadow:none!important;-webkit-box-shadow:none!important}.sab-edit-settings{margin-right:15px;position:absolute;right:0;z-index:2;bottom:10px;line-height:20px}.sab-edit-settings i{margin-left:5px}.saboxplugin-socials{line-height:1!important}.rtl .saboxplugin-wrap .saboxplugin-gravatar{float:right}.rtl .saboxplugin-wrap .saboxplugin-authorname{display:flex;align-items:center}.rtl .saboxplugin-wrap .saboxplugin-authorname .sab-profile-edit{margin-right:10px}.rtl .sab-edit-settings{right:auto;left:0}img.sab-custom-avatar{max-width:75px;}';
172
 
173
  // Border color of Simple Author Box
174
  if ( '' != $sabox_options['sab_box_border'] ) {
185
  // Avatar hover effect
186
  $style .= '.saboxplugin-wrap .saboxplugin-gravatar.sab-round-image.sab-rotate-img img {-webkit-transition:all .5s ease;-moz-transition:all .5s ease;-o-transition:all .5s ease;transition:all .5s ease;}';
187
  $style .= '.saboxplugin-wrap .saboxplugin-gravatar.sab-round-image.sab-rotate-img img:hover {-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-o-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);}';
188
+
189
  // Background color of social icons bar
190
  if ( '' != $sabox_options['sab_box_icons_back'] ) {
191
  $style .= '.saboxplugin-wrap .saboxplugin-socials{background-color:' . esc_html( $sabox_options['sab_box_icons_back'] ) . ';}';
202
  if ( '' != $sabox_options['sab_box_author_a_color'] ) {
203
  $style .= '.saboxplugin-wrap .saboxplugin-desc a, .saboxplugin-wrap .saboxplugin-desc {color:' . esc_html( $sabox_options['sab_box_author_a_color'] ) . ';}';
204
  }
205
+
206
  // Author name color
207
  if ( '' != $sabox_options['sab_box_author_color'] ) {
208
  $style .= '.saboxplugin-wrap .saboxplugin-authorname a {color:' . esc_html( $sabox_options['sab_box_author_color'] ) . ';}';
216
  // Author name font family
217
  $sab_box_name_font = Simple_Author_Box_Helper::get_option( 'sab_box_name_font' );
218
  if ( 'None' != $sab_box_name_font ) {
219
+ $style .= '.saboxplugin-wrap .saboxplugin-authorname {font-family:"' . esc_html( $sab_box_name_font ) . '";}';
220
  }
221
 
222
  // Author description font family
223
  $sab_box_desc_font = Simple_Author_Box_Helper::get_option( 'sab_box_desc_font' );
224
  if ( 'None' != $sab_box_name_font ) {
225
+ $style .= '.saboxplugin-wrap .saboxplugin-desc {font-family:' . esc_html( $sab_box_desc_font ) . ';}';
226
  }
227
 
228
  // Author web font family
229
  $sab_box_web_font = Simple_Author_Box_Helper::get_option( 'sab_box_web_font' );
230
  if ( '1' == $sabox_options['sab_web'] && 'None' != $sab_box_web_font ) {
231
+ $style .= '.saboxplugin-wrap .saboxplugin-web {font-family:"' . esc_html( $sab_box_web_font ) . '";}';
232
  }
233
 
234
  // Author description font style
235
+ if ( isset( $sabox_options['sab_desc_style'] ) && '1' == $sabox_options['sab_desc_style'] ) {
236
  $style .= '.saboxplugin-wrap .saboxplugin-desc {font-style:italic;}';
237
  }
238
  // Margin top & bottom, Padding
263
 
264
  // Icons size
265
  $icon_size = absint( $sabox_icon_size );
266
+ $icon_size_2x = absint( $sabox_icon_size ) * 2;
267
 
268
  $style .= '.saboxplugin-wrap .saboxplugin-socials a.saboxplugin-icon-grey svg {width:' . absint( $icon_size ) . 'px;height:' . absint( $icon_size ) . 'px;}';
269
  $style .= '.saboxplugin-wrap .saboxplugin-socials a.saboxplugin-icon-color svg {width:' . absint( $icon_size_2x ) . 'px;height:' . absint( $icon_size_2x ) . 'px;}';
271
  $style .= '.saboxplugin-wrap a{cursor:not-allowed;}';
272
 
273
  $style = apply_filters( 'sabox-previewer-css', $style, $sabox_options );
274
+
275
  return $style;
276
 
277
  }
inc/class-simple-author-box-social.php CHANGED
@@ -1,18 +1,18 @@
1
  <?php
2
 
3
  /**
4
- *
5
  */
6
  class Simple_Author_Box_Social {
7
-
8
  public static function icon_to_svg( $icon, $type = 'simple' ) {
9
 
10
  $icon_svg = '';
11
  if ( 'simple' == $type ) {
12
  $icon_svg = self::simple_icon( $icon );
13
- }elseif ( 'square' == $type ) {
14
  $icon_svg = self::square_long_shadow_icon( $icon );
15
- }elseif ( 'circle' == $type ) {
16
  $icon_svg = self::circle_long_shadow_icon( $icon );
17
  }
18
 
@@ -47,6 +47,9 @@ class Simple_Author_Box_Social {
47
  case 'facebook' :
48
  return '<svg aria-hidden="true" class="sab-' . $icon . '" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 264 512"><path fill="currentColor" d="M76.7 512V283H0v-91h76.7v-71.7C76.7 42.4 124.3 0 193.8 0c33.3 0 61.9 2.5 70.2 3.6V85h-48.2c-37.8 0-45.1 18-45.1 44.3V192H256l-11.7 91h-73.6v229"></path></svg>';
49
  break;
 
 
 
50
  case 'flickr' :
51
  return '<svg aria-hidden="true" class="sab-' . $icon . '" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zM144.5 319c-35.1 0-63.5-28.4-63.5-63.5s28.4-63.5 63.5-63.5 63.5 28.4 63.5 63.5-28.4 63.5-63.5 63.5zm159 0c-35.1 0-63.5-28.4-63.5-63.5s28.4-63.5 63.5-63.5 63.5 28.4 63.5 63.5-28.4 63.5-63.5 63.5z"></path></svg>';
52
  break;
@@ -154,9 +157,6 @@ class Simple_Author_Box_Social {
154
  break;
155
  case 'mastodont' :
156
  return '<svg aria-hidden="true" class="sab-' . $icon . '" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 417 512"><path fill="currentColor" d="M417.8 179.1c0-97.2-63.7-125.7-63.7-125.7-62.5-28.7-228.5-28.4-290.4 0 0 0-63.7 28.5-63.7 125.7 0 115.7-6.6 259.4 105.6 289.1 40.5 10.7 75.3 13 103.3 11.4 50.8-2.8 79.3-18.1 79.3-18.1l-1.7-36.9s-36.3 11.4-77.1 10.1c-40.4-1.4-83-4.4-89.6-54-.6-4.4-.9-9-.9-13.9 85.6 20.9 158.6 9.1 178.7 6.7 56.1-6.7 105-41.3 111.2-72.9 9.8-49.8 9-121.5 9-121.5zm-75.1 125.2h-46.6V190.1c0-49.7-64-51.6-64 6.9v62.5h-46.3V197c0-58.5-64-56.6-64-6.9v114.2H75.1c0-122.1-5.2-147.9 18.4-175 25.9-28.9 79.8-30.8 103.8 6.1l11.6 19.5 11.6-19.5c24.1-37.1 78.1-34.8 103.8-6.1 23.7 27.3 18.4 53 18.4 175z"></path></svg>';
157
- case 'whatsapp' :
158
- return '<svg aria-hidden="true" class="sab-' . $icon . '" data-prefix="fab" data-icon="whatsapp" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" class="svg-inline--fa fa-whatsapp fa-w-14"><path fill="currentColor" d="M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-32.6-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7.9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z" class=""></path></svg>';
159
- break;
160
  default :
161
  return '';
162
  break;
@@ -164,7 +164,7 @@ class Simple_Author_Box_Social {
164
  }
165
 
166
  public static function circle_long_shadow_icon( $icon ) {
167
-
168
  switch ( $icon ) {
169
  case 'addthis':
170
  return '<svg version="1.1" class="sab-' . $icon . '" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 500 500.7" xml:space="preserve"><path class="st0" fill="#ff6550" d="M500.2,250.5c0,24.1-3.4,47.4-9.8,69.4C466.9,401.5,403,466,321.6,490.3c-22.7,6.8-46.7,10.4-71.6,10.4 c-138.2,0-250.2-112-250.2-250.2C-0.2,112.3,111.8,0.3,250,0.3S500.2,112.3,500.2,250.5z"/><path class="st1" d="M490.5,319.9C466.9,401.5,403,466,321.6,490.3L106.3,276.1l3.9-33.1l136.7-4l0.3-80l28.5-53L490.5,319.9z"/><path class="st2" d="M379,218.1h-96.5v-96.5c0-11.8-9.6-21.5-21.5-21.5h-21.5c-11.8,0-21.5,9.6-21.5,21.5v96.5h-96.5 c-11.8,0-21.5,9.6-21.5,21.5V261c0,11.8,9.6,21.5,21.5,21.5H218V379c0,11.8,9.6,21.5,21.5,21.5H261c11.8,0,21.5-9.6,21.5-21.5v-96.5H379c11.8,0,21.5-9.6,21.5-21.5v-21.5C400.4,227.7,390.8,218.1,379,218.1z"/></svg>';
@@ -187,6 +187,9 @@ class Simple_Author_Box_Social {
187
  case 'facebook' :
188
  return '<svg version="1.1" class="sab-' . $icon . '" viewBox="0 0 500 500.7" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path class="st0" d="m499.4 250.9c0 9.9-0.6 19.7-1.7 29.2-0.1 0.6-0.1 1.1-0.2 1.7-0.8 6.3-1.8 12.4-3 18.5-0.2 1.1-0.5 2.2-0.7 3.3-1.2 5.6-2.6 11-4.2 16.5-23.4 81.3-87.1 145.6-168.2 169.8-4.5 1.3-9.1 2.6-13.7 3.7-7.6 1.8-15.4 3.3-23.3 4.4-5.5 0.8-11.1 1.3-16.7 1.7-0.8 0.1-1.6 0.1-2.4 0.1-5 0.3-10.1 0.4-15.2 0.4-137.8 0-249.4-111.6-249.4-249.3s111.6-249.4 249.4-249.4 249.3 111.7 249.3 249.4z" fill="#3b5998"/><path class="st1" d="m493.8 303.6c-1.2 5.6-2.6 11-4.2 16.5-23.4 81.3-87.1 145.6-168.2 169.8-4.5 1.3-9.1 2.6-13.7 3.7l-100.9-101 1.8-3.5 2.1-76.7-45.3-43.7 41.3-31 30-95.3 71.4-24.7 185.7 185.9z"/><path class="st2" d="M206.8,392.6V268.8h-41.5v-49.2h41.5v-38.8c0-42.1,25.7-65,63.3-65c18,0,33.5,1.4,38,1.9v44H282 c-20.4,0-24.4,9.7-24.4,24v33.9h46.1l-6.3,49.2h-39.8v123.8"/></svg>';
189
  break;
 
 
 
190
  case 'flickr' :
191
  return '<svg version="1.1" class="sab-' . $icon . '" viewBox="0 0 500 500.7" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path class="st0" d="m499.8 250.7c0 9.9-0.6 19.7-1.7 29.2-0.1 0.6-0.1 1.1-0.2 1.7-0.3 2.6-0.7 5.2-1.1 7.7-0.6 3.6-1.2 7.2-1.9 10.8-0.2 1.1-0.5 2.2-0.7 3.3-1.2 5.6-2.6 11-4.2 16.5-23.4 81.3-87.1 145.6-168.2 169.8-4.5 1.3-9.1 2.6-13.7 3.7-6.7 1.6-13.5 2.9-20.5 4-0.9 0.1-1.9 0.3-2.8 0.4-5.5 0.8-11.1 1.3-16.7 1.7-0.8 0.1-1.6 0.1-2.4 0.1-5 0.3-10.1 0.4-15.2 0.4-137.7 0-249.3-111.6-249.3-249.3s111.6-249.4 249.3-249.4 249.3 111.7 249.3 249.4z" fill="#0063dc"/><path class="st1" d="m496.8 289.3c-0.6 3.6-1.2 7.2-1.9 10.8-0.2 1.1-0.5 2.2-0.7 3.3-1.2 5.6-2.6 11-4.2 16.5-23.4 81.3-87.1 145.6-168.2 169.8-4.5 1.3-9.1 2.6-13.7 3.7-6.7 1.6-13.5 2.9-20.5 4l-142.6-143.6 35.3-165.1 169.7-46.6 146.8 147.2z"/><path class="st2" d="m337.9 139.4h-174.8c-13.2 0-23.8 10.7-23.8 23.8v174.8c0 13.2 10.7 23.8 23.8 23.8h174.8c13.2 0 23.8-10.7 23.8-23.8v-174.7c0-13.2-10.6-23.9-23.8-23.9zm-126.9 142.6c-17.4 0-31.5-14.1-31.5-31.5s14.1-31.5 31.5-31.5 31.5 14.1 31.5 31.5-14.1 31.5-31.5 31.5zm79 0c-17.4 0-31.5-14.1-31.5-31.5s14.1-31.5 31.5-31.5 31.5 14.1 31.5 31.5-14.1 31.5-31.5 31.5z"/></svg>';
192
  break;
@@ -294,9 +297,6 @@ class Simple_Author_Box_Social {
294
  break;
295
  case 'mastodont' :
296
  return '<svg class="sab-' . $icon . '" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 500.7"><path class="st0" d="M499.4 250.9c0 2.2 0 4.4-0.1 6.6v0.4c-0.1 1.8-0.2 3.6-0.2 5.3 0 0.4 0 0.8-0.1 1.2 -0.1 1.3-0.1 2.6-0.2 4 -0.1 1.7-0.2 3.3-0.4 5 0 0.2 0 0.4-0.1 0.6 -0.1 1.5-0.3 3-0.4 4.5 0 0.6-0.1 1.1-0.2 1.7 -0.1 0.6-0.1 1.1-0.2 1.7 -0.5 3-0.9 6-1.3 8.9 -0.2 1.4-0.4 2.9-0.7 4.3 0 0.4-0.1 0.7-0.2 1v0.3c-0.2 1-0.4 2-0.5 3 0 0.1 0 0.2-0.1 0.3v0.1c0 0.2-0.1 0.4-0.1 0.6 -0.1 0.5-0.2 1-0.3 1.6 0 0.2-0.1 0.3-0.1 0.5 -0.6 2.6-1.2 5.2-1.8 7.8 -0.4 1.8-0.9 3.6-1.3 5.5 -0.2 0.9-0.5 1.9-0.8 2.8 -0.2 0.6-0.3 1.1-0.5 1.7 -0.8 2.7-1.6 5.3-2.5 8 -1.4 4.2-2.8 8.5-4.4 12.5 -0.1 0.4-0.3 0.7-0.4 1.1 -0.9 2.3-1.8 4.6-2.8 6.8 -28.1 66.2-84.2 117.8-153.5 140 -0.5 0.2-0.9 0.3-1.3 0.4 -1.1 0.4-2.2 0.7-3.3 1 -2.9 0.9-5.9 1.6-8.8 2.4 -0.1 0-0.2 0.1-0.3 0.1 -0.4 0.1-0.7 0.2-1.1 0.3 -1 0.3-2.1 0.6-3.1 0.8 -1 0.3-2 0.5-3.1 0.6 -0.1 0-0.2 0-0.3 0.1 -1 0.2-1.8 0.4-2.8 0.7 0 0-0.1 0-0.1 0 -0.3 0.1-0.7 0.2-1 0.2 -0.2 0.1-0.5 0.1-0.7 0.2 -1 0.2-1.9 0.3-2.8 0.5 -0.5 0.1-1 0.2-1.5 0.3 -0.6 0.1-1.3 0.2-1.9 0.4 -0.2 0-0.3 0.1-0.5 0.1 -1.1 0.2-2.2 0.4-3.3 0.6 -1.2 0.2-2.4 0.4-3.5 0.5 -0.7 0.1-1.4 0.2-2.1 0.3 -0.3 0-0.5 0.1-0.8 0.1 -2.7 0.4-5.5 0.7-8.2 1 -0.3 0-0.7 0.1-1 0.1 -0.1 0-0.1 0-0.2 0 -1.1 0.1-2.1 0.2-3.2 0.3 -0.1 0-0.1 0-0.2 0 -1 0.1-2.1 0.2-3.2 0.2 -0.8 0.1-1.6 0.1-2.4 0.1 -1.4 0.1-2.9 0.2-4.4 0.2 -3.6 0.1-7.2 0.2-10.8 0.2 -4.3 0-8.7-0.1-13-0.3C105.4 493.1 0.7 384.3 0.7 250.9 0.7 113.2 112.3 1.5 250.1 1.5c129.3 0 235.3 98.2 248 223.9 0.5 4.4 0.8 8.9 1 13.3 0.1 1.5 0.1 3 0.2 4.6C499.4 245.8 499.4 248.4 499.4 250.9z" fill="#2b90d9"/><path class="st1" d="M496.2 290.8c-0.2 1.4-0.4 2.9-0.7 4.3 0 0.4-0.1 0.7-0.2 1v0.3c-0.2 1-0.4 2-0.5 3 0 0.1 0 0.2-0.1 0.3v0.1c0 0.2-0.1 0.4-0.1 0.6 -0.1 0.5-0.2 1-0.3 1.6 0 0.2-0.1 0.3-0.1 0.5 -0.6 2.6-1.2 5.2-1.8 7.8 -0.4 1.8-0.9 3.6-1.3 5.5 -0.2 0.9-0.5 1.9-0.8 2.8 -0.2 0.6-0.3 1.1-0.5 1.7 -0.8 2.7-1.6 5.3-2.5 8 -1.4 4.2-2.8 8.5-4.4 12.5 -0.1 0.4-0.3 0.7-0.4 1.1 -0.9 2.3-1.8 4.6-2.8 6.8 -28.1 66.2-84.2 117.8-153.5 140 -0.5 0.2-0.9 0.3-1.3 0.4 -1.1 0.4-2.2 0.7-3.3 1 -2.9 0.9-5.9 1.6-8.8 2.4 -0.1 0-0.2 0.1-0.3 0.1 -0.4 0.1-0.7 0.2-1.1 0.3 -1 0.3-2.1 0.6-3.1 0.8 -1 0.3-2 0.5-3.1 0.6 -0.1 0-0.2 0-0.3 0.1 -1 0.2-1.8 0.4-2.8 0.7L166.6 357.9l-13-59c0 0-2-103 0-109s20-38 20-38l100-15 73.1 5.1L496.2 290.8z"/><path class="st2" d="M374.6 208.5c0-55.8-36.6-72.2-36.6-72.2 -35.9-16.5-131.2-16.3-166.7 0 0 0-36.6 16.4-36.6 72.2 0 66.4-3.8 148.9 60.6 165.9 23.2 6.1 43.2 7.5 59.3 6.5 29.2-1.6 45.5-10.4 45.5-10.4l-1-21.2c0 0-20.8 6.5-44.3 5.8 -23.2-0.8-47.6-2.5-51.4-31 -0.3-2.5-0.5-5.2-0.5-8 49.1 12 91 5.2 102.6 3.8 32.2-3.8 60.3-23.7 63.8-41.8C375.1 249.7 374.6 208.5 374.6 208.5L374.6 208.5zM331.5 280.4h-26.7v-65.6c0-28.5-36.7-29.6-36.7 4v35.9h-26.6v-35.9c0-33.6-36.7-32.5-36.7-4v65.6h-26.8c0-70.1-3-84.9 10.6-100.5 14.9-16.6 45.8-17.7 59.6 3.5l6.7 11.2 6.7-11.2c13.8-21.3 44.8-20 59.6-3.5C334.6 195.6 331.5 210.4 331.5 280.4L331.5 280.4z"/></svg>';
297
- case 'whatsapp' :
298
- return '<svg version="1.1" class="sab-' . $icon . '" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 500 500.7" xml:space="preserve"><path fill="#25d366" class="st0" d="M499.4,250.9c0,2.2,0,4.4-0.1,6.6v0.4c-0.1,2.2-0.2,4.4-0.3,6.5c-0.1,1.3-0.1,2.6-0.2,4c-0.1,1.7-0.2,3.3-0.4,5 c-0.2,2.2-0.4,4.5-0.7,6.7c-0.1,0.6-0.1,1.1-0.2,1.7c-0.6,4-1.2,7.9-1.8,11.9c-0.1,0.4-0.1,0.9-0.2,1.3c0,0.4-0.1,0.7-0.2,1v0.3 c-0.2,1-0.4,2-0.5,3c0,0.1,0,0.2-0.1,0.3v0.1c0,0.2-0.1,0.4-0.1,0.6c-0.1,0.5-0.2,1-0.3,1.6c0,0.2-0.1,0.3-0.1,0.5 c-1,4.4-2,8.8-3.1,13.2c-0.2,0.9-0.5,1.9-0.8,2.8c-0.2,0.6-0.3,1.1-0.5,1.7c-0.8,2.7-1.6,5.3-2.5,8c-1.4,4.2-2.8,8.5-4.4,12.5 c-0.1,0.4-0.3,0.7-0.4,1.1c-0.9,2.3-1.8,4.6-2.8,6.8c-28.1,66.2-84.2,117.8-153.5,140c-0.5,0.2-0.9,0.3-1.3,0.4 c-1.1,0.4-2.2,0.7-3.3,1c-2.9,0.9-5.9,1.6-8.8,2.4c-0.1,0-0.2,0.1-0.3,0.1c-1.4,0.4-2.8,0.8-4.2,1.1c-1.1,0.3-2.2,0.5-3.4,0.7 c-1.3,0.3-2.6,0.6-3.9,0.9c-0.2,0.1-0.5,0.1-0.7,0.2c-1.5,0.3-2.9,0.5-4.3,0.8c-0.6,0.1-1.3,0.2-1.9,0.4c-0.2,0-0.3,0.1-0.5,0.1 c-1.1,0.2-2.2,0.4-3.3,0.6c-1.9,0.3-3.8,0.6-5.7,0.8c-0.3,0-0.5,0.1-0.8,0.1c-2.7,0.4-5.5,0.7-8.2,1c-0.4,0-0.8,0.1-1.2,0.1 c-1.1,0.1-2.1,0.2-3.2,0.3c-0.1,0-0.1,0-0.2,0c-1,0.1-2.1,0.2-3.2,0.2c-0.8,0.1-1.6,0.1-2.4,0.1c-1.4,0.1-2.9,0.2-4.4,0.2 c-3.6,0.1-7.2,0.2-10.8,0.2c-11,0-21.9-0.7-32.6-2.1C95.2,482.2,0.7,377.6,0.7,250.9C0.7,113.2,112.3,1.5,250.1,1.5 c133.8,0,242.7,105.2,249,237.2c0.1,1.5,0.1,3,0.2,4.6C499.4,245.8,499.4,248.4,499.4,250.9z" /><path class="st1" d="M495.7,293.7c-0.1,0.4-0.1,0.9-0.2,1.3c0,0.4-0.1,0.7-0.2,1v0.3c-0.2,1-0.4,2-0.5,3c0,0.1,0,0.2-0.1,0.3v0.1 c0,0.2-0.1,0.4-0.1,0.6c-0.1,0.5-0.2,1-0.3,1.6c0,0.2-0.1,0.3-0.1,0.5c-1,4.4-2,8.8-3.1,13.2c-0.2,0.9-0.5,1.9-0.8,2.8 c-0.2,0.6-0.3,1.1-0.5,1.7c-0.8,2.7-1.6,5.3-2.5,8c-1.4,4.2-2.8,8.5-4.4,12.5c-0.1,0.4-0.3,0.7-0.4,1.1c-0.9,2.3-1.8,4.6-2.8,6.8 c-28.1,66.2-84.2,117.8-153.5,140c-0.5,0.2-0.9,0.3-1.3,0.4c-1.1,0.4-2.2,0.7-3.3,1c-2.9,0.9-5.9,1.6-8.8,2.4 c-0.1,0-0.2,0.1-0.3,0.1c-1.4,0.4-2.8,0.8-4.2,1.1c-1.1,0.3-2.2,0.5-3.4,0.7c-1.3,0.3-2.6,0.6-3.9,0.9c-0.2,0.1-0.5,0.1-0.7,0.2 c-1.5,0.3-2.9,0.5-4.3,0.8c-0.6,0.1-1.3,0.2-1.9,0.4c-0.2,0-0.3,0.1-0.5,0.1c-1.1,0.2-2.2,0.4-3.3,0.6c-1.9,0.3-3.8,0.6-5.7,0.8 c-0.3,0-0.5,0.1-0.8,0.1c-2.7,0.4-5.5,0.7-8.2,1c-0.4,0-0.8,0.1-1.2,0.1c-1.1,0.1-2.1,0.2-3.2,0.3c-0.1,0-0.1,0-0.2,0 c-1,0.1-2.1,0.2-3.2,0.2c-0.8,0.1-1.6,0.1-2.4,0.1c-1.4,0.1-2.9,0.2-4.4,0.2c-3.6,0.1-7.2,0.2-10.8,0.2c-11,0-21.9-0.7-32.6-2.1 l-110.5-110l0.1-0.2l13.4-36.5l11.5-28.5l9.7-2.1l-14.7-20.4l-5.2-15.5l-4.1-30.9l-3.1-18.5l7.2-28.8l13.4-26.9l18.5-26.7l23.7-20.6 l38.1-15.5H294l43.2,17.6l23.3,23.4c0,0,0,0,0,0L495.7,293.7z"/> <path class="st2" d="M320.1,278.2c-0.8-1.6-3.2-2.5-6.7-4.2c-3.5-1.8-20.8-10.3-24-11.4c-3.2-1.2-5.6-1.8-7.9,1.8 c-2.3,3.6-9.1,11.4-11.2,13.8c-2,2.3-4.1,2.7-7.6,0.9c-20.7-10.3-34.3-18.5-47.9-41.9c-3.6-6.2,3.6-5.8,10.3-19.2 c1.1-2.3,0.6-4.4-0.3-6.2c-0.9-1.8-7.9-19.1-10.9-26.1c-2.9-6.8-5.8-5.9-7.9-6c-2-0.1-4.4-0.1-6.7-0.1c-2.4,0-6.2,0.9-9.4,4.4 c-3.2,3.6-12.3,12.1-12.3,29.4c0,17.3,12.6,34.1,14.3,36.4c1.8,2.3,24.8,37.9,60.2,53.2c22.3,9.6,31.1,10.5,42.3,8.8 c6.8-1,20.8-8.5,23.7-16.8S321,279.7,320.1,278.2z M320.1,278.2c-0.8-1.6-3.2-2.5-6.7-4.2c-3.5-1.8-20.8-10.3-24-11.4 c-3.2-1.2-5.6-1.8-7.9,1.8c-2.3,3.6-9.1,11.4-11.2,13.8c-2,2.3-4.1,2.7-7.6,0.9c-20.7-10.3-34.3-18.5-47.9-41.9 c-3.6-6.2,3.6-5.8,10.3-19.2c1.1-2.3,0.6-4.4-0.3-6.2c-0.9-1.8-7.9-19.1-10.9-26.1c-2.9-6.8-5.8-5.9-7.9-6c-2-0.1-4.4-0.1-6.7-0.1 c-2.4,0-6.2,0.9-9.4,4.4c-3.2,3.6-12.3,12.1-12.3,29.4c0,17.3,12.6,34.1,14.3,36.4c1.8,2.3,24.8,37.9,60.2,53.2 c22.3,9.6,31.1,10.5,42.3,8.8c6.8-1,20.8-8.5,23.7-16.8S321,279.7,320.1,278.2z M360.5,158.1C360.5,158,360.5,158,360.5,158.1 c-3.6-4.6-7.5-9-11.7-13.1c-26.6-26.7-62-41.3-99.6-41.3c-77.7,0-140.9,63.2-140.9,140.9c0,24.8,6.5,49,18.8,70.4l-20,73l0.1,0 l74.6-19.6c20.6,11.2,43.7,17.1,67.3,17.1h0.1c77.6,0,142.2-63.2,142.2-140.9C391.4,212.8,380,182.7,360.5,158.1z M249.2,361.7 c-21.1,0-41.7-5.7-59.7-16.3l-4.2-2.5L141,354.5l11.8-43.2l-2.8-4.5c-11.7-18.7-17.9-40.2-17.9-62.3c0-64.5,52.5-117.1,117.1-117.1 c31.3,0,60.7,12.2,82.8,34.3c22.1,22.1,35.7,51.5,35.6,82.8C367.6,309.2,313.7,361.7,249.2,361.7z M313.4,274 c-3.5-1.8-20.8-10.3-24-11.4c-3.2-1.2-5.6-1.8-7.9,1.8c-2.3,3.6-9.1,11.4-11.2,13.8c-2,2.3-4.1,2.7-7.6,0.9 c-20.7-10.3-34.3-18.5-47.9-41.9c-3.6-6.2,3.6-5.8,10.3-19.2c1.1-2.3,0.6-4.4-0.3-6.2c-0.9-1.8-7.9-19.1-10.9-26.1 c-2.9-6.8-5.8-5.9-7.9-6c-2-0.1-4.4-0.1-6.7-0.1c-2.4,0-6.2,0.9-9.4,4.4c-3.2,3.6-12.3,12.1-12.3,29.4c0,17.3,12.6,34.1,14.3,36.4 c1.8,2.3,24.8,37.9,60.2,53.2c22.3,9.6,31.1,10.5,42.3,8.8c6.8-1,20.8-8.5,23.7-16.8s2.9-15.3,2-16.8 C319.2,276.6,316.9,275.7,313.4,274z"/></svg>';
299
- break;
300
  default :
301
  return '';
302
  break;
@@ -305,7 +305,7 @@ class Simple_Author_Box_Social {
305
  }
306
 
307
  public static function square_long_shadow_icon( $icon ) {
308
-
309
  switch ( $icon ) {
310
  case 'addthis':
311
  return '<svg class="sab-' . $icon . '" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 500 500.7" xml:space="preserve"><rect x="0.2" y="0.3" class="st0" fill="#ff6550" width="500" height="500"/><polygon class="st1" points="500.2,335.1 500.2,500.3 331.7,500.3 106.3,276.1 110.2,243 246.9,239 247.2,159 275.7,106 497.6,327"/><path class="st2" d="M379,218.1h-96.5v-96.5c0-11.8-9.6-21.5-21.5-21.5h-21.5c-11.8,0-21.5,9.6-21.5,21.5v96.5h-96.5 c-11.8,0-21.5,9.6-21.5,21.5V261c0,11.8,9.6,21.5,21.5,21.5h96.5V379c0,11.8,9.6,21.5,21.5,21.5H261c11.8,0,21.5-9.6,21.5-21.5v-96.5H379c11.8,0,21.5-9.6,21.5-21.5v-21.5C400.4,227.7,390.8,218.1,379,218.1z"/></svg>';
@@ -328,6 +328,10 @@ class Simple_Author_Box_Social {
328
  case 'facebook' :
329
  return '<svg version="1.1" class="sab-' . $icon . '" viewBox="0 0 500 500.7" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><rect class="st0" x="-.3" y=".3" width="500" height="500" fill="#3b5998"/><polygon class="st1" points="499.7 292.6 499.7 500.3 331.4 500.3 219.8 388.7 221.6 385.3 223.7 308.6 178.3 264.9 219.7 233.9 249.7 138.6 321.1 113.9"/><path class="st2" d="M219.8,388.7V264.9h-41.5v-49.2h41.5V177c0-42.1,25.7-65,63.3-65c18,0,33.5,1.4,38,1.9v44H295 c-20.4,0-24.4,9.7-24.4,24v33.9h46.1l-6.3,49.2h-39.8v123.8"/></svg>';
330
  break;
 
 
 
 
331
  case 'flickr' :
332
  return '<svg version="1.1" class="sab-' . $icon . '" viewBox="0 0 500 500.7" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><rect class="st0" x=".3" y=".3" width="500" height="500" fill="#0063dc"/><polygon class="st1" points="500.3 298.3 500.3 500.3 297.2 500.3 151.4 353.6 185.7 193.3 350.4 148"/><path class="st2" d="m335.2 142.3h-169.7c-12.8 0-23.1 10.4-23.1 23.1v169.7c0 12.8 10.4 23.1 23.1 23.1h169.7c12.8 0 23.1-10.4 23.1-23.1v-169.6c0.1-12.8-10.3-23.2-23.1-23.2zm-123.2 138.4c-16.9 0-30.6-13.7-30.6-30.6s13.7-30.6 30.6-30.6 30.6 13.7 30.6 30.6-13.7 30.6-30.6 30.6zm76.7 0c-16.9 0-30.6-13.7-30.6-30.6s13.7-30.6 30.6-30.6 30.6 13.7 30.6 30.6-13.7 30.6-30.6 30.6z"/></svg>';
333
  break;
@@ -435,10 +439,6 @@ class Simple_Author_Box_Social {
435
  break;
436
  case 'mastodont' :
437
  return '<svg class="sab-' . $icon . '" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 500.7"><rect x="0.1" y="0.1" class="st0" width="500" height="500" fill="#2b90d9"/><path class="st1" d="M500.1 296.7v203.4h-195L162 355.3l-13-59c0 0-2-103 0-109s20-38 20-38l100-15 73.1 5.1L500.1 296.7z"/><path class="st2" d="M370.1 205.9c0-55.8-36.6-72.2-36.6-72.2 -35.9-16.5-131.2-16.3-166.7 0 0 0-36.6 16.4-36.6 72.2 0 66.4-3.8 148.9 60.6 165.9 23.2 6.1 43.2 7.5 59.3 6.5 29.2-1.6 45.5-10.4 45.5-10.4l-1-21.2c0 0-20.8 6.5-44.3 5.8 -23.2-0.8-47.6-2.5-51.4-31 -0.3-2.5-0.5-5.2-0.5-8 49.1 12 91 5.2 102.6 3.8 32.2-3.8 60.3-23.7 63.8-41.8C370.5 247.1 370.1 205.9 370.1 205.9L370.1 205.9zM327 277.8h-26.7v-65.6c0-28.5-36.7-29.6-36.7 4v35.9h-26.6v-35.9c0-33.6-36.7-32.5-36.7-4v65.6h-26.8c0-70.1-3-84.9 10.6-100.5 14.9-16.6 45.8-17.7 59.6 3.5l6.7 11.2 6.7-11.2c13.8-21.3 44.8-20 59.6-3.5C330 193 327 207.8 327 277.8L327 277.8z"/></svg>';
438
- case 'whatsapp' :
439
- return '<svg version="1.1" class="sab-' . $icon . '" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 500 500.7" xml:space="preserve"><rect x="-0.9" y="0.2" class="st0" width="500" height="500" fill="#25d366"/>
440
- <path class="st1" d="M499.1,304.9v195.3H225.9L118.6,393.4l0.1-0.2l13-35.5l11.2-27.7l9.4-2L138,308.2l-5-15l-4-30l-3-18l7-28 l13-26.1l18-25.9l23-20l37-15h76l41.9,17.1l22.6,22.7c0,0,0,0,0,0L499.1,304.9z"/><path fill="#25d366" class="st2" d="M325.3,286.7c-0.8-1.5-3.1-2.4-6.5-4.1c-3.4-1.7-20.2-10-23.3-11.1c-3.1-1.2-5.4-1.7-7.7,1.7 c-2.3,3.5-8.8,11.1-10.8,13.4c-2,2.3-4,2.6-7.4,0.9c-20.1-10-33.3-17.9-46.5-40.7c-3.5-6,3.5-5.6,10-18.7c1.1-2.3,0.6-4.3-0.3-6 c-0.9-1.7-7.7-18.5-10.5-25.4c-2.8-6.7-5.6-5.7-7.7-5.9c-2-0.1-4.2-0.1-6.5-0.1c-2.3,0-6,0.9-9.1,4.2c-3.1,3.5-12,11.7-12,28.5 c0,16.8,12.3,33.1,13.9,35.4c1.7,2.3,24.1,36.8,58.4,51.6c21.7,9.4,30.2,10.2,41,8.6c6.6-1,20.2-8.3,23-16.3 C326.2,294.9,326.2,288.1,325.3,286.7z M325.3,286.7c-0.8-1.5-3.1-2.4-6.5-4.1c-3.4-1.7-20.2-10-23.3-11.1 c-3.1-1.2-5.4-1.7-7.7,1.7c-2.3,3.5-8.8,11.1-10.8,13.4c-2,2.3-4,2.6-7.4,0.9c-20.1-10-33.3-17.9-46.5-40.7c-3.5-6,3.5-5.6,10-18.7 c1.1-2.3,0.6-4.3-0.3-6c-0.9-1.7-7.7-18.5-10.5-25.4c-2.8-6.7-5.6-5.7-7.7-5.9c-2-0.1-4.2-0.1-6.5-0.1c-2.3,0-6,0.9-9.1,4.2 c-3.1,3.5-12,11.7-12,28.5c0,16.8,12.3,33.1,13.9,35.4c1.7,2.3,24.1,36.8,58.4,51.6c21.7,9.4,30.2,10.2,41,8.6 c6.6-1,20.2-8.3,23-16.3C326.2,294.9,326.2,288.1,325.3,286.7z M364.6,170C364.6,170,364.6,170,364.6,170 c-3.5-4.5-7.3-8.7-11.3-12.7c-25.8-25.9-60.2-40.1-96.7-40.1c-75.4,0-136.8,61.4-136.8,136.8c0,24.1,6.3,47.6,18.2,68.4l-19.4,70.9 l0.1,0l72.4-19c20,10.9,42.4,16.6,65.4,16.6h0.1c75.3,0,138.1-61.4,138.1-136.8C394.6,223.2,383.5,194,364.6,170z M256.5,367.8 c-20.5,0-40.5-5.5-57.9-15.8l-4.1-2.5l-43,11.3l11.5-41.9l-2.7-4.3c-11.4-18.1-17.4-39-17.4-60.5c0-62.7,51-113.7,113.7-113.7 c30.4,0,58.9,11.8,80.3,33.3s34.6,50,34.6,80.4C371.5,316.7,319.2,367.8,256.5,367.8z M318.9,282.6c-3.4-1.7-20.2-10-23.3-11.1 c-3.1-1.2-5.4-1.7-7.7,1.7c-2.3,3.5-8.8,11.1-10.8,13.4c-2,2.3-4,2.6-7.4,0.9c-20.1-10-33.3-17.9-46.5-40.7c-3.5-6,3.5-5.6,10-18.7 c1.1-2.3,0.6-4.3-0.3-6c-0.9-1.7-7.7-18.5-10.5-25.4c-2.8-6.7-5.6-5.7-7.7-5.9c-2-0.1-4.2-0.1-6.5-0.1c-2.3,0-6,0.9-9.1,4.2 c-3.1,3.5-12,11.7-12,28.5c0,16.8,12.3,33.1,13.9,35.4c1.7,2.3,24.1,36.8,58.4,51.6c21.7,9.4,30.2,10.2,41,8.6 c6.6-1,20.2-8.3,23-16.3c2.8-8,2.8-14.8,2-16.3C324.5,285.1,322.3,284.3,318.9,282.6z"/></svg>';
441
- break;
442
  default :
443
  return '';
444
  break;
1
  <?php
2
 
3
  /**
4
+ *
5
  */
6
  class Simple_Author_Box_Social {
7
+
8
  public static function icon_to_svg( $icon, $type = 'simple' ) {
9
 
10
  $icon_svg = '';
11
  if ( 'simple' == $type ) {
12
  $icon_svg = self::simple_icon( $icon );
13
+ } elseif ( 'square' == $type ) {
14
  $icon_svg = self::square_long_shadow_icon( $icon );
15
+ } elseif ( 'circle' == $type ) {
16
  $icon_svg = self::circle_long_shadow_icon( $icon );
17
  }
18
 
47
  case 'facebook' :
48
  return '<svg aria-hidden="true" class="sab-' . $icon . '" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 264 512"><path fill="currentColor" d="M76.7 512V283H0v-91h76.7v-71.7C76.7 42.4 124.3 0 193.8 0c33.3 0 61.9 2.5 70.2 3.6V85h-48.2c-37.8 0-45.1 18-45.1 44.3V192H256l-11.7 91h-73.6v229"></path></svg>';
49
  break;
50
+ case 'whatsapp' :
51
+ return '<svg aria-hidden="true" class="sab-' . $icon . '" data-prefix="fab" data-icon="whatsapp" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" class="svg-inline--fa fa-whatsapp fa-w-14"><path fill="currentColor" d="M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-32.6-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7.9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z" class=""></path></svg>';
52
+ break;
53
  case 'flickr' :
54
  return '<svg aria-hidden="true" class="sab-' . $icon . '" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zM144.5 319c-35.1 0-63.5-28.4-63.5-63.5s28.4-63.5 63.5-63.5 63.5 28.4 63.5 63.5-28.4 63.5-63.5 63.5zm159 0c-35.1 0-63.5-28.4-63.5-63.5s28.4-63.5 63.5-63.5 63.5 28.4 63.5 63.5-28.4 63.5-63.5 63.5z"></path></svg>';
55
  break;
157
  break;
158
  case 'mastodont' :
159
  return '<svg aria-hidden="true" class="sab-' . $icon . '" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 417 512"><path fill="currentColor" d="M417.8 179.1c0-97.2-63.7-125.7-63.7-125.7-62.5-28.7-228.5-28.4-290.4 0 0 0-63.7 28.5-63.7 125.7 0 115.7-6.6 259.4 105.6 289.1 40.5 10.7 75.3 13 103.3 11.4 50.8-2.8 79.3-18.1 79.3-18.1l-1.7-36.9s-36.3 11.4-77.1 10.1c-40.4-1.4-83-4.4-89.6-54-.6-4.4-.9-9-.9-13.9 85.6 20.9 158.6 9.1 178.7 6.7 56.1-6.7 105-41.3 111.2-72.9 9.8-49.8 9-121.5 9-121.5zm-75.1 125.2h-46.6V190.1c0-49.7-64-51.6-64 6.9v62.5h-46.3V197c0-58.5-64-56.6-64-6.9v114.2H75.1c0-122.1-5.2-147.9 18.4-175 25.9-28.9 79.8-30.8 103.8 6.1l11.6 19.5 11.6-19.5c24.1-37.1 78.1-34.8 103.8-6.1 23.7 27.3 18.4 53 18.4 175z"></path></svg>';
 
 
 
160
  default :
161
  return '';
162
  break;
164
  }
165
 
166
  public static function circle_long_shadow_icon( $icon ) {
167
+
168
  switch ( $icon ) {
169
  case 'addthis':
170
  return '<svg version="1.1" class="sab-' . $icon . '" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 500 500.7" xml:space="preserve"><path class="st0" fill="#ff6550" d="M500.2,250.5c0,24.1-3.4,47.4-9.8,69.4C466.9,401.5,403,466,321.6,490.3c-22.7,6.8-46.7,10.4-71.6,10.4 c-138.2,0-250.2-112-250.2-250.2C-0.2,112.3,111.8,0.3,250,0.3S500.2,112.3,500.2,250.5z"/><path class="st1" d="M490.5,319.9C466.9,401.5,403,466,321.6,490.3L106.3,276.1l3.9-33.1l136.7-4l0.3-80l28.5-53L490.5,319.9z"/><path class="st2" d="M379,218.1h-96.5v-96.5c0-11.8-9.6-21.5-21.5-21.5h-21.5c-11.8,0-21.5,9.6-21.5,21.5v96.5h-96.5 c-11.8,0-21.5,9.6-21.5,21.5V261c0,11.8,9.6,21.5,21.5,21.5H218V379c0,11.8,9.6,21.5,21.5,21.5H261c11.8,0,21.5-9.6,21.5-21.5v-96.5H379c11.8,0,21.5-9.6,21.5-21.5v-21.5C400.4,227.7,390.8,218.1,379,218.1z"/></svg>';
187
  case 'facebook' :
188
  return '<svg version="1.1" class="sab-' . $icon . '" viewBox="0 0 500 500.7" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path class="st0" d="m499.4 250.9c0 9.9-0.6 19.7-1.7 29.2-0.1 0.6-0.1 1.1-0.2 1.7-0.8 6.3-1.8 12.4-3 18.5-0.2 1.1-0.5 2.2-0.7 3.3-1.2 5.6-2.6 11-4.2 16.5-23.4 81.3-87.1 145.6-168.2 169.8-4.5 1.3-9.1 2.6-13.7 3.7-7.6 1.8-15.4 3.3-23.3 4.4-5.5 0.8-11.1 1.3-16.7 1.7-0.8 0.1-1.6 0.1-2.4 0.1-5 0.3-10.1 0.4-15.2 0.4-137.8 0-249.4-111.6-249.4-249.3s111.6-249.4 249.4-249.4 249.3 111.7 249.3 249.4z" fill="#3b5998"/><path class="st1" d="m493.8 303.6c-1.2 5.6-2.6 11-4.2 16.5-23.4 81.3-87.1 145.6-168.2 169.8-4.5 1.3-9.1 2.6-13.7 3.7l-100.9-101 1.8-3.5 2.1-76.7-45.3-43.7 41.3-31 30-95.3 71.4-24.7 185.7 185.9z"/><path class="st2" d="M206.8,392.6V268.8h-41.5v-49.2h41.5v-38.8c0-42.1,25.7-65,63.3-65c18,0,33.5,1.4,38,1.9v44H282 c-20.4,0-24.4,9.7-24.4,24v33.9h46.1l-6.3,49.2h-39.8v123.8"/></svg>';
189
  break;
190
+ case 'whatsapp' :
191
+ return '<svg version="1.1" class="sab-' . $icon . '" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 500 500.7" xml:space="preserve"><path fill="#25d366" class="st0" d="M499.4,250.9c0,2.2,0,4.4-0.1,6.6v0.4c-0.1,2.2-0.2,4.4-0.3,6.5c-0.1,1.3-0.1,2.6-0.2,4c-0.1,1.7-0.2,3.3-0.4,5 c-0.2,2.2-0.4,4.5-0.7,6.7c-0.1,0.6-0.1,1.1-0.2,1.7c-0.6,4-1.2,7.9-1.8,11.9c-0.1,0.4-0.1,0.9-0.2,1.3c0,0.4-0.1,0.7-0.2,1v0.3 c-0.2,1-0.4,2-0.5,3c0,0.1,0,0.2-0.1,0.3v0.1c0,0.2-0.1,0.4-0.1,0.6c-0.1,0.5-0.2,1-0.3,1.6c0,0.2-0.1,0.3-0.1,0.5 c-1,4.4-2,8.8-3.1,13.2c-0.2,0.9-0.5,1.9-0.8,2.8c-0.2,0.6-0.3,1.1-0.5,1.7c-0.8,2.7-1.6,5.3-2.5,8c-1.4,4.2-2.8,8.5-4.4,12.5 c-0.1,0.4-0.3,0.7-0.4,1.1c-0.9,2.3-1.8,4.6-2.8,6.8c-28.1,66.2-84.2,117.8-153.5,140c-0.5,0.2-0.9,0.3-1.3,0.4 c-1.1,0.4-2.2,0.7-3.3,1c-2.9,0.9-5.9,1.6-8.8,2.4c-0.1,0-0.2,0.1-0.3,0.1c-1.4,0.4-2.8,0.8-4.2,1.1c-1.1,0.3-2.2,0.5-3.4,0.7 c-1.3,0.3-2.6,0.6-3.9,0.9c-0.2,0.1-0.5,0.1-0.7,0.2c-1.5,0.3-2.9,0.5-4.3,0.8c-0.6,0.1-1.3,0.2-1.9,0.4c-0.2,0-0.3,0.1-0.5,0.1 c-1.1,0.2-2.2,0.4-3.3,0.6c-1.9,0.3-3.8,0.6-5.7,0.8c-0.3,0-0.5,0.1-0.8,0.1c-2.7,0.4-5.5,0.7-8.2,1c-0.4,0-0.8,0.1-1.2,0.1 c-1.1,0.1-2.1,0.2-3.2,0.3c-0.1,0-0.1,0-0.2,0c-1,0.1-2.1,0.2-3.2,0.2c-0.8,0.1-1.6,0.1-2.4,0.1c-1.4,0.1-2.9,0.2-4.4,0.2 c-3.6,0.1-7.2,0.2-10.8,0.2c-11,0-21.9-0.7-32.6-2.1C95.2,482.2,0.7,377.6,0.7,250.9C0.7,113.2,112.3,1.5,250.1,1.5 c133.8,0,242.7,105.2,249,237.2c0.1,1.5,0.1,3,0.2,4.6C499.4,245.8,499.4,248.4,499.4,250.9z" /><path class="st1" d="M495.7,293.7c-0.1,0.4-0.1,0.9-0.2,1.3c0,0.4-0.1,0.7-0.2,1v0.3c-0.2,1-0.4,2-0.5,3c0,0.1,0,0.2-0.1,0.3v0.1 c0,0.2-0.1,0.4-0.1,0.6c-0.1,0.5-0.2,1-0.3,1.6c0,0.2-0.1,0.3-0.1,0.5c-1,4.4-2,8.8-3.1,13.2c-0.2,0.9-0.5,1.9-0.8,2.8 c-0.2,0.6-0.3,1.1-0.5,1.7c-0.8,2.7-1.6,5.3-2.5,8c-1.4,4.2-2.8,8.5-4.4,12.5c-0.1,0.4-0.3,0.7-0.4,1.1c-0.9,2.3-1.8,4.6-2.8,6.8 c-28.1,66.2-84.2,117.8-153.5,140c-0.5,0.2-0.9,0.3-1.3,0.4c-1.1,0.4-2.2,0.7-3.3,1c-2.9,0.9-5.9,1.6-8.8,2.4 c-0.1,0-0.2,0.1-0.3,0.1c-1.4,0.4-2.8,0.8-4.2,1.1c-1.1,0.3-2.2,0.5-3.4,0.7c-1.3,0.3-2.6,0.6-3.9,0.9c-0.2,0.1-0.5,0.1-0.7,0.2 c-1.5,0.3-2.9,0.5-4.3,0.8c-0.6,0.1-1.3,0.2-1.9,0.4c-0.2,0-0.3,0.1-0.5,0.1c-1.1,0.2-2.2,0.4-3.3,0.6c-1.9,0.3-3.8,0.6-5.7,0.8 c-0.3,0-0.5,0.1-0.8,0.1c-2.7,0.4-5.5,0.7-8.2,1c-0.4,0-0.8,0.1-1.2,0.1c-1.1,0.1-2.1,0.2-3.2,0.3c-0.1,0-0.1,0-0.2,0 c-1,0.1-2.1,0.2-3.2,0.2c-0.8,0.1-1.6,0.1-2.4,0.1c-1.4,0.1-2.9,0.2-4.4,0.2c-3.6,0.1-7.2,0.2-10.8,0.2c-11,0-21.9-0.7-32.6-2.1 l-110.5-110l0.1-0.2l13.4-36.5l11.5-28.5l9.7-2.1l-14.7-20.4l-5.2-15.5l-4.1-30.9l-3.1-18.5l7.2-28.8l13.4-26.9l18.5-26.7l23.7-20.6 l38.1-15.5H294l43.2,17.6l23.3,23.4c0,0,0,0,0,0L495.7,293.7z"/> <path class="st2" d="M320.1,278.2c-0.8-1.6-3.2-2.5-6.7-4.2c-3.5-1.8-20.8-10.3-24-11.4c-3.2-1.2-5.6-1.8-7.9,1.8 c-2.3,3.6-9.1,11.4-11.2,13.8c-2,2.3-4.1,2.7-7.6,0.9c-20.7-10.3-34.3-18.5-47.9-41.9c-3.6-6.2,3.6-5.8,10.3-19.2 c1.1-2.3,0.6-4.4-0.3-6.2c-0.9-1.8-7.9-19.1-10.9-26.1c-2.9-6.8-5.8-5.9-7.9-6c-2-0.1-4.4-0.1-6.7-0.1c-2.4,0-6.2,0.9-9.4,4.4 c-3.2,3.6-12.3,12.1-12.3,29.4c0,17.3,12.6,34.1,14.3,36.4c1.8,2.3,24.8,37.9,60.2,53.2c22.3,9.6,31.1,10.5,42.3,8.8 c6.8-1,20.8-8.5,23.7-16.8S321,279.7,320.1,278.2z M320.1,278.2c-0.8-1.6-3.2-2.5-6.7-4.2c-3.5-1.8-20.8-10.3-24-11.4 c-3.2-1.2-5.6-1.8-7.9,1.8c-2.3,3.6-9.1,11.4-11.2,13.8c-2,2.3-4.1,2.7-7.6,0.9c-20.7-10.3-34.3-18.5-47.9-41.9 c-3.6-6.2,3.6-5.8,10.3-19.2c1.1-2.3,0.6-4.4-0.3-6.2c-0.9-1.8-7.9-19.1-10.9-26.1c-2.9-6.8-5.8-5.9-7.9-6c-2-0.1-4.4-0.1-6.7-0.1 c-2.4,0-6.2,0.9-9.4,4.4c-3.2,3.6-12.3,12.1-12.3,29.4c0,17.3,12.6,34.1,14.3,36.4c1.8,2.3,24.8,37.9,60.2,53.2 c22.3,9.6,31.1,10.5,42.3,8.8c6.8-1,20.8-8.5,23.7-16.8S321,279.7,320.1,278.2z M360.5,158.1C360.5,158,360.5,158,360.5,158.1 c-3.6-4.6-7.5-9-11.7-13.1c-26.6-26.7-62-41.3-99.6-41.3c-77.7,0-140.9,63.2-140.9,140.9c0,24.8,6.5,49,18.8,70.4l-20,73l0.1,0 l74.6-19.6c20.6,11.2,43.7,17.1,67.3,17.1h0.1c77.6,0,142.2-63.2,142.2-140.9C391.4,212.8,380,182.7,360.5,158.1z M249.2,361.7 c-21.1,0-41.7-5.7-59.7-16.3l-4.2-2.5L141,354.5l11.8-43.2l-2.8-4.5c-11.7-18.7-17.9-40.2-17.9-62.3c0-64.5,52.5-117.1,117.1-117.1 c31.3,0,60.7,12.2,82.8,34.3c22.1,22.1,35.7,51.5,35.6,82.8C367.6,309.2,313.7,361.7,249.2,361.7z M313.4,274 c-3.5-1.8-20.8-10.3-24-11.4c-3.2-1.2-5.6-1.8-7.9,1.8c-2.3,3.6-9.1,11.4-11.2,13.8c-2,2.3-4.1,2.7-7.6,0.9 c-20.7-10.3-34.3-18.5-47.9-41.9c-3.6-6.2,3.6-5.8,10.3-19.2c1.1-2.3,0.6-4.4-0.3-6.2c-0.9-1.8-7.9-19.1-10.9-26.1 c-2.9-6.8-5.8-5.9-7.9-6c-2-0.1-4.4-0.1-6.7-0.1c-2.4,0-6.2,0.9-9.4,4.4c-3.2,3.6-12.3,12.1-12.3,29.4c0,17.3,12.6,34.1,14.3,36.4 c1.8,2.3,24.8,37.9,60.2,53.2c22.3,9.6,31.1,10.5,42.3,8.8c6.8-1,20.8-8.5,23.7-16.8s2.9-15.3,2-16.8 C319.2,276.6,316.9,275.7,313.4,274z"/></svg>';
192
+ break;
193
  case 'flickr' :
194
  return '<svg version="1.1" class="sab-' . $icon . '" viewBox="0 0 500 500.7" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path class="st0" d="m499.8 250.7c0 9.9-0.6 19.7-1.7 29.2-0.1 0.6-0.1 1.1-0.2 1.7-0.3 2.6-0.7 5.2-1.1 7.7-0.6 3.6-1.2 7.2-1.9 10.8-0.2 1.1-0.5 2.2-0.7 3.3-1.2 5.6-2.6 11-4.2 16.5-23.4 81.3-87.1 145.6-168.2 169.8-4.5 1.3-9.1 2.6-13.7 3.7-6.7 1.6-13.5 2.9-20.5 4-0.9 0.1-1.9 0.3-2.8 0.4-5.5 0.8-11.1 1.3-16.7 1.7-0.8 0.1-1.6 0.1-2.4 0.1-5 0.3-10.1 0.4-15.2 0.4-137.7 0-249.3-111.6-249.3-249.3s111.6-249.4 249.3-249.4 249.3 111.7 249.3 249.4z" fill="#0063dc"/><path class="st1" d="m496.8 289.3c-0.6 3.6-1.2 7.2-1.9 10.8-0.2 1.1-0.5 2.2-0.7 3.3-1.2 5.6-2.6 11-4.2 16.5-23.4 81.3-87.1 145.6-168.2 169.8-4.5 1.3-9.1 2.6-13.7 3.7-6.7 1.6-13.5 2.9-20.5 4l-142.6-143.6 35.3-165.1 169.7-46.6 146.8 147.2z"/><path class="st2" d="m337.9 139.4h-174.8c-13.2 0-23.8 10.7-23.8 23.8v174.8c0 13.2 10.7 23.8 23.8 23.8h174.8c13.2 0 23.8-10.7 23.8-23.8v-174.7c0-13.2-10.6-23.9-23.8-23.9zm-126.9 142.6c-17.4 0-31.5-14.1-31.5-31.5s14.1-31.5 31.5-31.5 31.5 14.1 31.5 31.5-14.1 31.5-31.5 31.5zm79 0c-17.4 0-31.5-14.1-31.5-31.5s14.1-31.5 31.5-31.5 31.5 14.1 31.5 31.5-14.1 31.5-31.5 31.5z"/></svg>';
195
  break;
297
  break;
298
  case 'mastodont' :
299
  return '<svg class="sab-' . $icon . '" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 500.7"><path class="st0" d="M499.4 250.9c0 2.2 0 4.4-0.1 6.6v0.4c-0.1 1.8-0.2 3.6-0.2 5.3 0 0.4 0 0.8-0.1 1.2 -0.1 1.3-0.1 2.6-0.2 4 -0.1 1.7-0.2 3.3-0.4 5 0 0.2 0 0.4-0.1 0.6 -0.1 1.5-0.3 3-0.4 4.5 0 0.6-0.1 1.1-0.2 1.7 -0.1 0.6-0.1 1.1-0.2 1.7 -0.5 3-0.9 6-1.3 8.9 -0.2 1.4-0.4 2.9-0.7 4.3 0 0.4-0.1 0.7-0.2 1v0.3c-0.2 1-0.4 2-0.5 3 0 0.1 0 0.2-0.1 0.3v0.1c0 0.2-0.1 0.4-0.1 0.6 -0.1 0.5-0.2 1-0.3 1.6 0 0.2-0.1 0.3-0.1 0.5 -0.6 2.6-1.2 5.2-1.8 7.8 -0.4 1.8-0.9 3.6-1.3 5.5 -0.2 0.9-0.5 1.9-0.8 2.8 -0.2 0.6-0.3 1.1-0.5 1.7 -0.8 2.7-1.6 5.3-2.5 8 -1.4 4.2-2.8 8.5-4.4 12.5 -0.1 0.4-0.3 0.7-0.4 1.1 -0.9 2.3-1.8 4.6-2.8 6.8 -28.1 66.2-84.2 117.8-153.5 140 -0.5 0.2-0.9 0.3-1.3 0.4 -1.1 0.4-2.2 0.7-3.3 1 -2.9 0.9-5.9 1.6-8.8 2.4 -0.1 0-0.2 0.1-0.3 0.1 -0.4 0.1-0.7 0.2-1.1 0.3 -1 0.3-2.1 0.6-3.1 0.8 -1 0.3-2 0.5-3.1 0.6 -0.1 0-0.2 0-0.3 0.1 -1 0.2-1.8 0.4-2.8 0.7 0 0-0.1 0-0.1 0 -0.3 0.1-0.7 0.2-1 0.2 -0.2 0.1-0.5 0.1-0.7 0.2 -1 0.2-1.9 0.3-2.8 0.5 -0.5 0.1-1 0.2-1.5 0.3 -0.6 0.1-1.3 0.2-1.9 0.4 -0.2 0-0.3 0.1-0.5 0.1 -1.1 0.2-2.2 0.4-3.3 0.6 -1.2 0.2-2.4 0.4-3.5 0.5 -0.7 0.1-1.4 0.2-2.1 0.3 -0.3 0-0.5 0.1-0.8 0.1 -2.7 0.4-5.5 0.7-8.2 1 -0.3 0-0.7 0.1-1 0.1 -0.1 0-0.1 0-0.2 0 -1.1 0.1-2.1 0.2-3.2 0.3 -0.1 0-0.1 0-0.2 0 -1 0.1-2.1 0.2-3.2 0.2 -0.8 0.1-1.6 0.1-2.4 0.1 -1.4 0.1-2.9 0.2-4.4 0.2 -3.6 0.1-7.2 0.2-10.8 0.2 -4.3 0-8.7-0.1-13-0.3C105.4 493.1 0.7 384.3 0.7 250.9 0.7 113.2 112.3 1.5 250.1 1.5c129.3 0 235.3 98.2 248 223.9 0.5 4.4 0.8 8.9 1 13.3 0.1 1.5 0.1 3 0.2 4.6C499.4 245.8 499.4 248.4 499.4 250.9z" fill="#2b90d9"/><path class="st1" d="M496.2 290.8c-0.2 1.4-0.4 2.9-0.7 4.3 0 0.4-0.1 0.7-0.2 1v0.3c-0.2 1-0.4 2-0.5 3 0 0.1 0 0.2-0.1 0.3v0.1c0 0.2-0.1 0.4-0.1 0.6 -0.1 0.5-0.2 1-0.3 1.6 0 0.2-0.1 0.3-0.1 0.5 -0.6 2.6-1.2 5.2-1.8 7.8 -0.4 1.8-0.9 3.6-1.3 5.5 -0.2 0.9-0.5 1.9-0.8 2.8 -0.2 0.6-0.3 1.1-0.5 1.7 -0.8 2.7-1.6 5.3-2.5 8 -1.4 4.2-2.8 8.5-4.4 12.5 -0.1 0.4-0.3 0.7-0.4 1.1 -0.9 2.3-1.8 4.6-2.8 6.8 -28.1 66.2-84.2 117.8-153.5 140 -0.5 0.2-0.9 0.3-1.3 0.4 -1.1 0.4-2.2 0.7-3.3 1 -2.9 0.9-5.9 1.6-8.8 2.4 -0.1 0-0.2 0.1-0.3 0.1 -0.4 0.1-0.7 0.2-1.1 0.3 -1 0.3-2.1 0.6-3.1 0.8 -1 0.3-2 0.5-3.1 0.6 -0.1 0-0.2 0-0.3 0.1 -1 0.2-1.8 0.4-2.8 0.7L166.6 357.9l-13-59c0 0-2-103 0-109s20-38 20-38l100-15 73.1 5.1L496.2 290.8z"/><path class="st2" d="M374.6 208.5c0-55.8-36.6-72.2-36.6-72.2 -35.9-16.5-131.2-16.3-166.7 0 0 0-36.6 16.4-36.6 72.2 0 66.4-3.8 148.9 60.6 165.9 23.2 6.1 43.2 7.5 59.3 6.5 29.2-1.6 45.5-10.4 45.5-10.4l-1-21.2c0 0-20.8 6.5-44.3 5.8 -23.2-0.8-47.6-2.5-51.4-31 -0.3-2.5-0.5-5.2-0.5-8 49.1 12 91 5.2 102.6 3.8 32.2-3.8 60.3-23.7 63.8-41.8C375.1 249.7 374.6 208.5 374.6 208.5L374.6 208.5zM331.5 280.4h-26.7v-65.6c0-28.5-36.7-29.6-36.7 4v35.9h-26.6v-35.9c0-33.6-36.7-32.5-36.7-4v65.6h-26.8c0-70.1-3-84.9 10.6-100.5 14.9-16.6 45.8-17.7 59.6 3.5l6.7 11.2 6.7-11.2c13.8-21.3 44.8-20 59.6-3.5C334.6 195.6 331.5 210.4 331.5 280.4L331.5 280.4z"/></svg>';
 
 
 
300
  default :
301
  return '';
302
  break;
305
  }
306
 
307
  public static function square_long_shadow_icon( $icon ) {
308
+
309
  switch ( $icon ) {
310
  case 'addthis':
311
  return '<svg class="sab-' . $icon . '" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 500 500.7" xml:space="preserve"><rect x="0.2" y="0.3" class="st0" fill="#ff6550" width="500" height="500"/><polygon class="st1" points="500.2,335.1 500.2,500.3 331.7,500.3 106.3,276.1 110.2,243 246.9,239 247.2,159 275.7,106 497.6,327"/><path class="st2" d="M379,218.1h-96.5v-96.5c0-11.8-9.6-21.5-21.5-21.5h-21.5c-11.8,0-21.5,9.6-21.5,21.5v96.5h-96.5 c-11.8,0-21.5,9.6-21.5,21.5V261c0,11.8,9.6,21.5,21.5,21.5h96.5V379c0,11.8,9.6,21.5,21.5,21.5H261c11.8,0,21.5-9.6,21.5-21.5v-96.5H379c11.8,0,21.5-9.6,21.5-21.5v-21.5C400.4,227.7,390.8,218.1,379,218.1z"/></svg>';
328
  case 'facebook' :
329
  return '<svg version="1.1" class="sab-' . $icon . '" viewBox="0 0 500 500.7" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><rect class="st0" x="-.3" y=".3" width="500" height="500" fill="#3b5998"/><polygon class="st1" points="499.7 292.6 499.7 500.3 331.4 500.3 219.8 388.7 221.6 385.3 223.7 308.6 178.3 264.9 219.7 233.9 249.7 138.6 321.1 113.9"/><path class="st2" d="M219.8,388.7V264.9h-41.5v-49.2h41.5V177c0-42.1,25.7-65,63.3-65c18,0,33.5,1.4,38,1.9v44H295 c-20.4,0-24.4,9.7-24.4,24v33.9h46.1l-6.3,49.2h-39.8v123.8"/></svg>';
330
  break;
331
+ case 'whatsapp' :
332
+ return '<svg version="1.1" class="sab-' . $icon . '" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 500 500.7" xml:space="preserve"><rect x="-0.9" y="0.2" class="st0" width="500" height="500" fill="#25d366"/>
333
+ <path class="st1" d="M499.1,304.9v195.3H225.9L118.6,393.4l0.1-0.2l13-35.5l11.2-27.7l9.4-2L138,308.2l-5-15l-4-30l-3-18l7-28 l13-26.1l18-25.9l23-20l37-15h76l41.9,17.1l22.6,22.7c0,0,0,0,0,0L499.1,304.9z"/><path fill="#25d366" class="st2" d="M325.3,286.7c-0.8-1.5-3.1-2.4-6.5-4.1c-3.4-1.7-20.2-10-23.3-11.1c-3.1-1.2-5.4-1.7-7.7,1.7 c-2.3,3.5-8.8,11.1-10.8,13.4c-2,2.3-4,2.6-7.4,0.9c-20.1-10-33.3-17.9-46.5-40.7c-3.5-6,3.5-5.6,10-18.7c1.1-2.3,0.6-4.3-0.3-6 c-0.9-1.7-7.7-18.5-10.5-25.4c-2.8-6.7-5.6-5.7-7.7-5.9c-2-0.1-4.2-0.1-6.5-0.1c-2.3,0-6,0.9-9.1,4.2c-3.1,3.5-12,11.7-12,28.5 c0,16.8,12.3,33.1,13.9,35.4c1.7,2.3,24.1,36.8,58.4,51.6c21.7,9.4,30.2,10.2,41,8.6c6.6-1,20.2-8.3,23-16.3 C326.2,294.9,326.2,288.1,325.3,286.7z M325.3,286.7c-0.8-1.5-3.1-2.4-6.5-4.1c-3.4-1.7-20.2-10-23.3-11.1 c-3.1-1.2-5.4-1.7-7.7,1.7c-2.3,3.5-8.8,11.1-10.8,13.4c-2,2.3-4,2.6-7.4,0.9c-20.1-10-33.3-17.9-46.5-40.7c-3.5-6,3.5-5.6,10-18.7 c1.1-2.3,0.6-4.3-0.3-6c-0.9-1.7-7.7-18.5-10.5-25.4c-2.8-6.7-5.6-5.7-7.7-5.9c-2-0.1-4.2-0.1-6.5-0.1c-2.3,0-6,0.9-9.1,4.2 c-3.1,3.5-12,11.7-12,28.5c0,16.8,12.3,33.1,13.9,35.4c1.7,2.3,24.1,36.8,58.4,51.6c21.7,9.4,30.2,10.2,41,8.6 c6.6-1,20.2-8.3,23-16.3C326.2,294.9,326.2,288.1,325.3,286.7z M364.6,170C364.6,170,364.6,170,364.6,170 c-3.5-4.5-7.3-8.7-11.3-12.7c-25.8-25.9-60.2-40.1-96.7-40.1c-75.4,0-136.8,61.4-136.8,136.8c0,24.1,6.3,47.6,18.2,68.4l-19.4,70.9 l0.1,0l72.4-19c20,10.9,42.4,16.6,65.4,16.6h0.1c75.3,0,138.1-61.4,138.1-136.8C394.6,223.2,383.5,194,364.6,170z M256.5,367.8 c-20.5,0-40.5-5.5-57.9-15.8l-4.1-2.5l-43,11.3l11.5-41.9l-2.7-4.3c-11.4-18.1-17.4-39-17.4-60.5c0-62.7,51-113.7,113.7-113.7 c30.4,0,58.9,11.8,80.3,33.3s34.6,50,34.6,80.4C371.5,316.7,319.2,367.8,256.5,367.8z M318.9,282.6c-3.4-1.7-20.2-10-23.3-11.1 c-3.1-1.2-5.4-1.7-7.7,1.7c-2.3,3.5-8.8,11.1-10.8,13.4c-2,2.3-4,2.6-7.4,0.9c-20.1-10-33.3-17.9-46.5-40.7c-3.5-6,3.5-5.6,10-18.7 c1.1-2.3,0.6-4.3-0.3-6c-0.9-1.7-7.7-18.5-10.5-25.4c-2.8-6.7-5.6-5.7-7.7-5.9c-2-0.1-4.2-0.1-6.5-0.1c-2.3,0-6,0.9-9.1,4.2 c-3.1,3.5-12,11.7-12,28.5c0,16.8,12.3,33.1,13.9,35.4c1.7,2.3,24.1,36.8,58.4,51.6c21.7,9.4,30.2,10.2,41,8.6 c6.6-1,20.2-8.3,23-16.3c2.8-8,2.8-14.8,2-16.3C324.5,285.1,322.3,284.3,318.9,282.6z"/></svg>';
334
+ break;
335
  case 'flickr' :
336
  return '<svg version="1.1" class="sab-' . $icon . '" viewBox="0 0 500 500.7" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><rect class="st0" x=".3" y=".3" width="500" height="500" fill="#0063dc"/><polygon class="st1" points="500.3 298.3 500.3 500.3 297.2 500.3 151.4 353.6 185.7 193.3 350.4 148"/><path class="st2" d="m335.2 142.3h-169.7c-12.8 0-23.1 10.4-23.1 23.1v169.7c0 12.8 10.4 23.1 23.1 23.1h169.7c12.8 0 23.1-10.4 23.1-23.1v-169.6c0.1-12.8-10.3-23.2-23.1-23.2zm-123.2 138.4c-16.9 0-30.6-13.7-30.6-30.6s13.7-30.6 30.6-30.6 30.6 13.7 30.6 30.6-13.7 30.6-30.6 30.6zm76.7 0c-16.9 0-30.6-13.7-30.6-30.6s13.7-30.6 30.6-30.6 30.6 13.7 30.6 30.6-13.7 30.6-30.6 30.6z"/></svg>';
337
  break;
439
  break;
440
  case 'mastodont' :
441
  return '<svg class="sab-' . $icon . '" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 500.7"><rect x="0.1" y="0.1" class="st0" width="500" height="500" fill="#2b90d9"/><path class="st1" d="M500.1 296.7v203.4h-195L162 355.3l-13-59c0 0-2-103 0-109s20-38 20-38l100-15 73.1 5.1L500.1 296.7z"/><path class="st2" d="M370.1 205.9c0-55.8-36.6-72.2-36.6-72.2 -35.9-16.5-131.2-16.3-166.7 0 0 0-36.6 16.4-36.6 72.2 0 66.4-3.8 148.9 60.6 165.9 23.2 6.1 43.2 7.5 59.3 6.5 29.2-1.6 45.5-10.4 45.5-10.4l-1-21.2c0 0-20.8 6.5-44.3 5.8 -23.2-0.8-47.6-2.5-51.4-31 -0.3-2.5-0.5-5.2-0.5-8 49.1 12 91 5.2 102.6 3.8 32.2-3.8 60.3-23.7 63.8-41.8C370.5 247.1 370.1 205.9 370.1 205.9L370.1 205.9zM327 277.8h-26.7v-65.6c0-28.5-36.7-29.6-36.7 4v35.9h-26.6v-35.9c0-33.6-36.7-32.5-36.7-4v65.6h-26.8c0-70.1-3-84.9 10.6-100.5 14.9-16.6 45.8-17.7 59.6 3.5l6.7 11.2 6.7-11.2c13.8-21.3 44.8-20 59.6-3.5C330 193 327 207.8 327 277.8L327 277.8z"/></svg>';
 
 
 
 
442
  default :
443
  return '';
444
  break;
inc/class-simple-author-box-user-profile.php CHANGED
@@ -29,62 +29,62 @@ class Simple_Author_Box_User_Profile {
29
  unset( $social_icons['user_email'] );
30
 
31
  ?>
32
- <div class="sab-user-profile-wrapper">
33
- <h2><?php _e( 'Social Media Links (Simple Author Box)', 'saboxplugin' ); ?></h2>
34
- <table class="form-table" id="sabox-social-table">
35
  <?php
36
 
37
  if ( ! empty( $social_links ) ) {
38
  foreach ( $social_links as $social_platform => $social_link ) {
39
  ?>
40
- <tr>
41
- <th>
42
- <span class="sabox-drag"></span>
43
- <select name="sabox-social-icons[]">
44
  <?php foreach ( $social_icons as $sabox_social_id => $sabox_social_name ) { ?>
45
- <option value="<?php echo $sabox_social_id; ?>" <?php selected( $sabox_social_id, $social_platform ); ?>><?php echo $sabox_social_name; ?></option>
46
  <?php } ?>
47
- </select>
48
- </th>
49
- <td>
50
- <?php if ( 'whatsapp' == $sabox_social_id ){ ?>
51
- <input name="sabox-social-links[]" type="text" class="regular-text" value="<?php echo esc_html( $social_link ); ?>">
52
- <?php }else{ ?>
53
- <input name="sabox-social-links[]" type="text" class="regular-text" value="<?php echo esc_url( $social_link ); ?>">
54
- <?php } ?>
55
-
56
- <span class="dashicons dashicons-trash"></span>
57
- <td>
58
- </tr>
59
  <?php
60
  }
61
  } else {
62
  ?>
63
- <tr>
64
- <th>
65
- <span class="sabox-drag"></span>
66
- <select name="sabox-social-icons[]">
67
  <?php foreach ( $social_icons as $sabox_social_id => $sabox_social_name ) { ?>
68
- <option value="<?php echo $sabox_social_id; ?>"><?php echo $sabox_social_name; ?></option>
69
  <?php } ?>
70
- </select>
71
- </th>
72
- <td>
73
- <input name="sabox-social-links[]" type="text" class="regular-text" value="">
74
- <span class="dashicons dashicons-trash"></span>
75
- <td>
76
- </tr>
77
  <?php
78
  }
79
 
80
  ?>
81
 
82
- </table>
83
 
84
- <div class="sabox-add-social-link">
85
- <a href="#" class="button button-primary button-hero"></span><?php esc_html_e( '+ Add new social platform', 'saboxplugin' ); ?></a>
86
- </div>
87
- </div>
 
88
 
89
  <?php
90
  }
@@ -96,29 +96,33 @@ class Simple_Author_Box_User_Profile {
96
  }
97
 
98
  $default_url = SIMPLE_AUTHOR_BOX_ASSETS . 'img/default.png';
99
- $image = get_user_meta( $user->ID, 'sabox-profile-image', true );
100
 
101
  ?>
102
 
103
- <div id="sabox-custom-profile-image">
104
- <h3><?php _e( 'Custom User Profile Image (Simple Author Box)', 'saboxplugin' ); ?></h3>
105
- <table class="form-table">
106
- <tr>
107
- <th><label for="cupp_meta"><?php _e( 'Profile Image', 'saboxplugin' ); ?></label></th>
108
- <td>
109
- <div id="sab-current-image">
110
  <?php wp_nonce_field( 'sabox-profile-image', 'sabox-profile-nonce' ); ?>
111
- <img data-default="<?php echo esc_url_raw( $default_url ); ?>" src="<?php echo '' != $image ? esc_url_raw( $image ) : esc_url_raw( $default_url ); ?>"><br>
112
- <input type="text" name="sabox-custom-image" id="sabox-custom-image" class="regular-text" value="<?php echo esc_attr( $image ); ?>">
113
- </div>
114
- <div class="actions">
115
- <a href="#" class="button-secondary" id="sabox-remove-image"><?php _e( 'Remove Image', 'saboxplugin' ); ?></a>
116
- <a href="#" class="button-primary" id="sabox-add-image"><?php _e( 'Upload Image', 'saboxplugin' ); ?></a>
117
- </div>
118
- </td>
119
- </tr>
120
- </table>
121
- </div>
 
 
 
 
122
 
123
  <?php
124
  }
@@ -134,8 +138,8 @@ class Simple_Author_Box_User_Profile {
134
  $social_platform = isset( $_POST['sabox-social-icons'][ $index ] ) ? $_POST['sabox-social-icons'][ $index ] : false;
135
  if ( $social_platform && isset( $social_platforms[ $social_platform ] ) ) {
136
  if ( 'whatsapp' == $social_platform ) {
137
- $social_links[ $social_platform ] = preg_replace( '/[^0-9]/', '', $social_link );
138
- }else{
139
  $social_links[ $social_platform ] = esc_url_raw( $social_link );
140
  }
141
  }
@@ -163,7 +167,6 @@ class Simple_Author_Box_User_Profile {
163
  }
164
 
165
 
166
-
167
  }
168
 
169
  }
29
  unset( $social_icons['user_email'] );
30
 
31
  ?>
32
+ <div class="sab-user-profile-wrapper">
33
+ <h2><?php _e( 'Social Media Links (Simple Author Box)', 'saboxplugin' ); ?></h2>
34
+ <table class="form-table" id="sabox-social-table">
35
  <?php
36
 
37
  if ( ! empty( $social_links ) ) {
38
  foreach ( $social_links as $social_platform => $social_link ) {
39
  ?>
40
+ <tr>
41
+ <th>
42
+ <span class="sabox-drag"></span>
43
+ <select name="sabox-social-icons[]">
44
  <?php foreach ( $social_icons as $sabox_social_id => $sabox_social_name ) { ?>
45
+ <option value="<?php echo $sabox_social_id; ?>" <?php selected( $sabox_social_id, $social_platform ); ?>><?php echo $sabox_social_name; ?></option>
46
  <?php } ?>
47
+ </select>
48
+ </th>
49
+ <td>
50
+ <input name="sabox-social-links[]"
51
+ type="<?php echo ( 'whatsapp' == $social_platform ) ? 'tel' : 'text'; ?>"
52
+ class="regular-text"
53
+ value="<?php echo ( 'whatsapp' == $social_platform ) ? $social_link : esc_url( $social_link ); ?>">
54
+
55
+ <span class="dashicons dashicons-trash"></span>
56
+ <td>
57
+ </tr>
 
58
  <?php
59
  }
60
  } else {
61
  ?>
62
+ <tr>
63
+ <th>
64
+ <span class="sabox-drag"></span>
65
+ <select name="sabox-social-icons[]">
66
  <?php foreach ( $social_icons as $sabox_social_id => $sabox_social_name ) { ?>
67
+ <option value="<?php echo $sabox_social_id; ?>"><?php echo $sabox_social_name; ?></option>
68
  <?php } ?>
69
+ </select>
70
+ </th>
71
+ <td>
72
+ <input name="sabox-social-links[]" type="text" class="regular-text" value="">
73
+ <span class="dashicons dashicons-trash"></span>
74
+ <td>
75
+ </tr>
76
  <?php
77
  }
78
 
79
  ?>
80
 
81
+ </table>
82
 
83
+ <div class="sabox-add-social-link">
84
+ <a href="#"
85
+ class="button button-primary button-hero"></span><?php esc_html_e( '+ Add new social platform', 'saboxplugin' ); ?></a>
86
+ </div>
87
+ </div>
88
 
89
  <?php
90
  }
96
  }
97
 
98
  $default_url = SIMPLE_AUTHOR_BOX_ASSETS . 'img/default.png';
99
+ $image = get_user_meta( $user->ID, 'sabox-profile-image', true );
100
 
101
  ?>
102
 
103
+ <div id="sabox-custom-profile-image">
104
+ <h3><?php _e( 'Custom User Profile Image (Simple Author Box)', 'saboxplugin' ); ?></h3>
105
+ <table class="form-table">
106
+ <tr>
107
+ <th><label for="cupp_meta"><?php _e( 'Profile Image', 'saboxplugin' ); ?></label></th>
108
+ <td>
109
+ <div id="sab-current-image">
110
  <?php wp_nonce_field( 'sabox-profile-image', 'sabox-profile-nonce' ); ?>
111
+ <img data-default="<?php echo esc_url_raw( $default_url ); ?>"
112
+ src="<?php echo '' != $image ? esc_url_raw( $image ) : esc_url_raw( $default_url ); ?>"><br>
113
+ <input type="text" name="sabox-custom-image" id="sabox-custom-image" class="regular-text"
114
+ value="<?php echo esc_attr( $image ); ?>">
115
+ </div>
116
+ <div class="actions">
117
+ <a href="#" class="button-secondary"
118
+ id="sabox-remove-image"><?php _e( 'Remove Image', 'saboxplugin' ); ?></a>
119
+ <a href="#" class="button-primary"
120
+ id="sabox-add-image"><?php _e( 'Upload Image', 'saboxplugin' ); ?></a>
121
+ </div>
122
+ </td>
123
+ </tr>
124
+ </table>
125
+ </div>
126
 
127
  <?php
128
  }
138
  $social_platform = isset( $_POST['sabox-social-icons'][ $index ] ) ? $_POST['sabox-social-icons'][ $index ] : false;
139
  if ( $social_platform && isset( $social_platforms[ $social_platform ] ) ) {
140
  if ( 'whatsapp' == $social_platform ) {
141
+ $social_links[ $social_platform ] = $social_link;
142
+ } else {
143
  $social_links[ $social_platform ] = esc_url_raw( $social_link );
144
  }
145
  }
167
  }
168
 
169
 
 
170
  }
171
 
172
  }
inc/class-simple-author-box.php CHANGED
@@ -18,6 +18,7 @@ class Simple_Author_Box {
18
 
19
  add_action( 'init', array( $this, 'define_public_hooks' ) );
20
 
 
21
  }
22
 
23
  /**
@@ -44,7 +45,9 @@ class Simple_Author_Box {
44
  require_once SIMPLE_AUTHOR_BOX_PATH . 'inc/class-simple-author-box-admin-page.php';
45
  require_once SIMPLE_AUTHOR_BOX_PATH . 'inc/class-simple-author-box-user-profile.php';
46
  require_once SIMPLE_AUTHOR_BOX_PATH . 'inc/class-simple-author-box-previewer.php';
 
47
  }
 
48
  }
49
 
50
  /**
@@ -91,6 +94,7 @@ class Simple_Author_Box {
91
  * @param [type] $default
92
  * @param [type] $alt
93
  * @param [type] $args
 
94
  * @return void
95
  */
96
  public function replace_gravatar_image( $avatar, $id_or_email, $size, $default, $alt, $args = array() ) {
@@ -156,12 +160,13 @@ class Simple_Author_Box {
156
 
157
  public function define_public_hooks() {
158
 
159
- $this->options = Simple_Author_Box_Helper::get_option( 'saboxplugin_options' );
160
  $this->options['sab_footer_inline_style'] = Simple_Author_Box_Helper::get_option( 'sab_footer_inline_style' );
161
 
162
  add_action( 'wp_enqueue_scripts', array( $this, 'saboxplugin_author_box_style' ), 10 );
163
  add_shortcode( 'simple-author-box', array( $this, 'shortcode' ) );
164
  add_filter( 'sabox_hide_social_icons', array( $this, 'show_social_media_icons' ), 10, 2 );
 
165
 
166
  if ( '0' == $this->options['sab_autoinsert'] ) {
167
  add_filter( 'the_content', 'wpsabox_author_box' );
@@ -170,9 +175,9 @@ class Simple_Author_Box {
170
  if ( '0' == $this->options['sab_footer_inline_style'] ) {
171
  add_action(
172
  'wp_footer', array(
173
- $this,
174
- 'inline_style',
175
- ), 13
176
  );
177
  } else {
178
  add_action( 'wp_head', array( $this, 'inline_style' ), 15 );
@@ -207,15 +212,15 @@ class Simple_Author_Box {
207
  // Scripts
208
  wp_enqueue_script(
209
  'sabox-admin-js', SIMPLE_AUTHOR_BOX_ASSETS . 'js/sabox-admin.js', array(
210
- 'jquery-ui-slider',
211
- 'wp-color-picker',
212
- ), false, true
213
  );
214
  wp_enqueue_script(
215
  'sabox-plugin-install', SIMPLE_AUTHOR_BOX_ASSETS . 'js/plugin-install.js', array(
216
- 'jquery',
217
- 'updates',
218
- ), '1.0.0', 'all'
219
  );
220
 
221
  // loaded only on user profile page
@@ -307,7 +312,7 @@ class Simple_Author_Box {
307
  * end changes introduced in 2.0.4
308
  */
309
 
310
- if ( ! is_single() and ! is_page() and ! is_author() and ! is_archive() ) {
311
  return;
312
  }
313
 
@@ -320,11 +325,11 @@ class Simple_Author_Box {
320
 
321
  public function inline_style() {
322
 
323
- if ( ! is_single() and ! is_page() and ! is_author() and ! is_archive() ) {
324
  return;
325
  }
326
 
327
- $style = '<style type="text/css">';
328
  $style .= Simple_Author_Box_Helper::generate_inline_css();
329
  $style .= '</style>';
330
 
@@ -339,19 +344,30 @@ class Simple_Author_Box {
339
  $atts = wp_parse_args( $atts, $defaults );
340
 
341
  if ( '' != $atts['ids'] ) {
342
- $ids = explode( ',', $atts['ids'] );
 
 
 
 
 
 
 
343
  ob_start();
344
  $sabox_options = Simple_Author_Box_Helper::get_option( 'saboxplugin_options' );
345
- foreach ( $ids as $user_id ) {
 
346
 
347
- $template = Simple_Author_Box_Helper::get_template();
348
- $sabox_author_id = $user_id;
349
- echo '<div class="sabox-plus-item">';
350
- include( $template );
351
- echo '</div>';
352
 
 
353
  }
 
354
  $html = ob_get_clean();
 
355
  } else {
356
  $html = wpsabox_author_box();
357
  }
@@ -368,6 +384,16 @@ class Simple_Author_Box {
368
  return true;
369
  }
370
 
 
 
 
 
 
 
 
 
 
 
371
  /**
372
  * AMP compatibility
373
  * @since 2.0
@@ -387,47 +413,47 @@ class Simple_Author_Box {
387
  }
388
 
389
  $data['post_amp_styles'] = array(
390
- '.saboxplugin-wrap .saboxplugin-gravatar' => array(
391
  'float: left',
392
  'padding: 20px',
393
  ),
394
- '.saboxplugin-wrap .saboxplugin-gravatar img' => array(
395
  'max-width: 100px',
396
  'height: auto',
397
  ),
398
- '.saboxplugin-wrap .saboxplugin-authorname' => array(
399
  'font-size: 18px',
400
  'line-height: 1',
401
  'margin: 20px 0 0 20px',
402
  'display: block',
403
  ),
404
- '.saboxplugin-wrap .saboxplugin-authorname a' => array(
405
  'text-decoration: none',
406
  ),
407
- '.saboxplugin-wrap .saboxplugin-desc' => array(
408
  'display: block',
409
  'margin: 5px 20px',
410
  ),
411
- '.saboxplugin-wrap .saboxplugin-desc a' => array(
412
  'text-decoration: none',
413
  ),
414
- '.saboxplugin-wrap .saboxplugin-desc p' => array(
415
  'margin: 5px 0 12px 0',
416
  'font-size: ' . absint( Simple_Author_Box_Helper::get_option( 'sab_box_desc_size' ) ) . 'px',
417
  'line-height: ' . absint( Simple_Author_Box_Helper::get_option( 'sab_box_desc_size' ) + 7 ) . 'px',
418
  ),
419
- '.saboxplugin-wrap .saboxplugin-web' => array(
420
  'margin: 0 20px 15px',
421
  'text-align: left',
422
  ),
423
- '.saboxplugin-wrap .saboxplugin-socials' => array(
424
  'position: relative',
425
  'display: block',
426
  'background: #fcfcfc',
427
  'padding: 5px',
428
  'border-top: 1px solid #eee;',
429
  ),
430
- '.saboxplugin-wrap .saboxplugin-socials a' => array(
431
  'text-decoration: none',
432
  'box-shadow: none',
433
  'padding: 0',
@@ -439,13 +465,13 @@ class Simple_Author_Box {
439
  '-o-transition: opacity 0.4s',
440
  'display: inline-block',
441
  ),
442
- '.saboxplugin-wrap .saboxplugin-socials .saboxplugin-icon-grey' => array(
443
  'display: inline-block',
444
  'vertical-align: middle',
445
  'margin: 10px 5px',
446
  'color: #444',
447
  ),
448
- '.saboxplugin-wrap .saboxplugin-socials a svg' => array(
449
  'width:' . absint( $icon_size ) . 'px;',
450
  'height:' . absint( $icon_size ) . 'px',
451
  'display:block'
@@ -456,17 +482,20 @@ class Simple_Author_Box {
456
  'vertical-align: middle',
457
  'display: inline-block',
458
  ),
459
- '.saboxplugin-wrap .clearfix' => array(
460
  'clear:both;',
461
  ),
462
- '.saboxplugin-wrap .saboxplugin-socials a svg .st2' => array(
463
  'fill: #fff;'
464
  ),
465
- '.saboxplugin-wrap .saboxplugin-socials a svg .st1' => array(
466
  'fill: rgba( 0, 0, 0, .3 );'
467
  ),
 
 
 
468
  // custom paddings & margins
469
- '.saboxplugin-wrap' => array(
470
  'margin-top: ' . absint( Simple_Author_Box_Helper::get_option( 'sab_box_margin_top' ) ) . 'px',
471
  'margin-bottom: ' . absint( Simple_Author_Box_Helper::get_option( 'sab_box_margin_bottom' ) ) . 'px',
472
  'padding: ' . absint( Simple_Author_Box_Helper::get_option( 'sab_box_padding_top_bottom' ) ) . 'px ' . absint( Simple_Author_Box_Helper::get_option( 'sab_box_padding_left_right' ) ) . 'px',
@@ -478,10 +507,10 @@ class Simple_Author_Box {
478
  'word-wrap: break-word',
479
  'position: relative',
480
  ),
481
- '.sab-edit-settings' => array(
482
  'display: none;',
483
  ),
484
- '.sab-profile-edit' => array(
485
  'display: none;',
486
  ),
487
  );
18
 
19
  add_action( 'init', array( $this, 'define_public_hooks' ) );
20
 
21
+
22
  }
23
 
24
  /**
45
  require_once SIMPLE_AUTHOR_BOX_PATH . 'inc/class-simple-author-box-admin-page.php';
46
  require_once SIMPLE_AUTHOR_BOX_PATH . 'inc/class-simple-author-box-user-profile.php';
47
  require_once SIMPLE_AUTHOR_BOX_PATH . 'inc/class-simple-author-box-previewer.php';
48
+
49
  }
50
+
51
  }
52
 
53
  /**
94
  * @param [type] $default
95
  * @param [type] $alt
96
  * @param [type] $args
97
+ *
98
  * @return void
99
  */
100
  public function replace_gravatar_image( $avatar, $id_or_email, $size, $default, $alt, $args = array() ) {
160
 
161
  public function define_public_hooks() {
162
 
163
+ $this->options = Simple_Author_Box_Helper::get_option( 'saboxplugin_options' );
164
  $this->options['sab_footer_inline_style'] = Simple_Author_Box_Helper::get_option( 'sab_footer_inline_style' );
165
 
166
  add_action( 'wp_enqueue_scripts', array( $this, 'saboxplugin_author_box_style' ), 10 );
167
  add_shortcode( 'simple-author-box', array( $this, 'shortcode' ) );
168
  add_filter( 'sabox_hide_social_icons', array( $this, 'show_social_media_icons' ), 10, 2 );
169
+ add_filter( 'sabox_check_if_show', array( $this, 'check_if_show_archive' ), 10 );
170
 
171
  if ( '0' == $this->options['sab_autoinsert'] ) {
172
  add_filter( 'the_content', 'wpsabox_author_box' );
175
  if ( '0' == $this->options['sab_footer_inline_style'] ) {
176
  add_action(
177
  'wp_footer', array(
178
+ $this,
179
+ 'inline_style',
180
+ ), 13
181
  );
182
  } else {
183
  add_action( 'wp_head', array( $this, 'inline_style' ), 15 );
212
  // Scripts
213
  wp_enqueue_script(
214
  'sabox-admin-js', SIMPLE_AUTHOR_BOX_ASSETS . 'js/sabox-admin.js', array(
215
+ 'jquery-ui-slider',
216
+ 'wp-color-picker',
217
+ ), false, true
218
  );
219
  wp_enqueue_script(
220
  'sabox-plugin-install', SIMPLE_AUTHOR_BOX_ASSETS . 'js/plugin-install.js', array(
221
+ 'jquery',
222
+ 'updates',
223
+ ), '1.0.0', 'all'
224
  );
225
 
226
  // loaded only on user profile page
312
  * end changes introduced in 2.0.4
313
  */
314
 
315
+ if ( ! is_single() && ! is_page() && ! is_author() && ! is_archive() ) {
316
  return;
317
  }
318
 
325
 
326
  public function inline_style() {
327
 
328
+ if ( ! is_single() && ! is_page() && ! is_author() && ! is_archive() ) {
329
  return;
330
  }
331
 
332
+ $style = '<style type="text/css">';
333
  $style .= Simple_Author_Box_Helper::generate_inline_css();
334
  $style .= '</style>';
335
 
344
  $atts = wp_parse_args( $atts, $defaults );
345
 
346
  if ( '' != $atts['ids'] ) {
347
+
348
+
349
+ if ( 'all' != $atts['ids'] ) {
350
+ $ids = explode( ',', $atts['ids'] );
351
+ } else {
352
+ $ids = get_users( array( 'fields' => 'ID' ) );
353
+ }
354
+
355
  ob_start();
356
  $sabox_options = Simple_Author_Box_Helper::get_option( 'saboxplugin_options' );
357
+ if ( ! empty( $ids ) ) {
358
+ foreach ( $ids as $user_id ) {
359
 
360
+ $template = Simple_Author_Box_Helper::get_template();
361
+ $sabox_author_id = $user_id;
362
+ echo '<div class="sabox-plus-item">';
363
+ include( $template );
364
+ echo '</div>';
365
 
366
+ }
367
  }
368
+
369
  $html = ob_get_clean();
370
+
371
  } else {
372
  $html = wpsabox_author_box();
373
  }
384
  return true;
385
  }
386
 
387
+ public function check_if_show_archive() {
388
+
389
+ if ( 1 == $this->options['sab_hide_on_archive'] && ! is_single() ) {
390
+ return false;
391
+ }
392
+
393
+ return true;
394
+
395
+ }
396
+
397
  /**
398
  * AMP compatibility
399
  * @since 2.0
413
  }
414
 
415
  $data['post_amp_styles'] = array(
416
+ '.saboxplugin-wrap .saboxplugin-gravatar' => array(
417
  'float: left',
418
  'padding: 20px',
419
  ),
420
+ '.saboxplugin-wrap .saboxplugin-gravatar img' => array(
421
  'max-width: 100px',
422
  'height: auto',
423
  ),
424
+ '.saboxplugin-wrap .saboxplugin-authorname' => array(
425
  'font-size: 18px',
426
  'line-height: 1',
427
  'margin: 20px 0 0 20px',
428
  'display: block',
429
  ),
430
+ '.saboxplugin-wrap .saboxplugin-authorname a' => array(
431
  'text-decoration: none',
432
  ),
433
+ '.saboxplugin-wrap .saboxplugin-desc' => array(
434
  'display: block',
435
  'margin: 5px 20px',
436
  ),
437
+ '.saboxplugin-wrap .saboxplugin-desc a' => array(
438
  'text-decoration: none',
439
  ),
440
+ '.saboxplugin-wrap .saboxplugin-desc p' => array(
441
  'margin: 5px 0 12px 0',
442
  'font-size: ' . absint( Simple_Author_Box_Helper::get_option( 'sab_box_desc_size' ) ) . 'px',
443
  'line-height: ' . absint( Simple_Author_Box_Helper::get_option( 'sab_box_desc_size' ) + 7 ) . 'px',
444
  ),
445
+ '.saboxplugin-wrap .saboxplugin-web' => array(
446
  'margin: 0 20px 15px',
447
  'text-align: left',
448
  ),
449
+ '.saboxplugin-wrap .saboxplugin-socials' => array(
450
  'position: relative',
451
  'display: block',
452
  'background: #fcfcfc',
453
  'padding: 5px',
454
  'border-top: 1px solid #eee;',
455
  ),
456
+ '.saboxplugin-wrap .saboxplugin-socials a' => array(
457
  'text-decoration: none',
458
  'box-shadow: none',
459
  'padding: 0',
465
  '-o-transition: opacity 0.4s',
466
  'display: inline-block',
467
  ),
468
+ '.saboxplugin-wrap .saboxplugin-socials .saboxplugin-icon-grey' => array(
469
  'display: inline-block',
470
  'vertical-align: middle',
471
  'margin: 10px 5px',
472
  'color: #444',
473
  ),
474
+ '.saboxplugin-wrap .saboxplugin-socials a svg' => array(
475
  'width:' . absint( $icon_size ) . 'px;',
476
  'height:' . absint( $icon_size ) . 'px',
477
  'display:block'
482
  'vertical-align: middle',
483
  'display: inline-block',
484
  ),
485
+ '.saboxplugin-wrap .clearfix' => array(
486
  'clear:both;',
487
  ),
488
+ '.saboxplugin-wrap .saboxplugin-socials a svg .st2' => array(
489
  'fill: #fff;'
490
  ),
491
+ '.saboxplugin-wrap .saboxplugin-socials a svg .st1' => array(
492
  'fill: rgba( 0, 0, 0, .3 );'
493
  ),
494
+ 'img.sab-custom-avatar' => array(
495
+ 'max-width:75px;'
496
+ ),
497
  // custom paddings & margins
498
+ '.saboxplugin-wrap' => array(
499
  'margin-top: ' . absint( Simple_Author_Box_Helper::get_option( 'sab_box_margin_top' ) ) . 'px',
500
  'margin-bottom: ' . absint( Simple_Author_Box_Helper::get_option( 'sab_box_margin_bottom' ) ) . 'px',
501
  'padding: ' . absint( Simple_Author_Box_Helper::get_option( 'sab_box_padding_top_bottom' ) ) . 'px ' . absint( Simple_Author_Box_Helper::get_option( 'sab_box_padding_left_right' ) ) . 'px',
507
  'word-wrap: break-word',
508
  'position: relative',
509
  ),
510
+ '.sab-edit-settings' => array(
511
  'display: none;',
512
  ),
513
+ '.sab-profile-edit' => array(
514
  'display: none;',
515
  ),
516
  );
inc/functions.php CHANGED
@@ -14,6 +14,12 @@ if ( ! function_exists( 'wpsabox_author_box' ) ) {
14
  function wpsabox_author_box( $saboxmeta = null ) {
15
 
16
  $show = ( is_single() || is_author() || is_archive() );
 
 
 
 
 
 
17
  $show = apply_filters( 'sabox_check_if_show', $show );
18
 
19
  if ( $show ) {
@@ -27,7 +33,6 @@ if ( ! function_exists( 'wpsabox_author_box' ) ) {
27
  $show_post_author_box = apply_filters( 'sabox_check_if_show_post_author_box', true, $sabox_options );
28
 
29
  do_action( 'sabox_before_author_box', $sabox_options );
30
-
31
  if ( $show_post_author_box ) {
32
  include( $template );
33
  }
@@ -41,6 +46,45 @@ if ( ! function_exists( 'wpsabox_author_box' ) ) {
41
  $saboxmeta = apply_filters( 'sabox_return_html', $return, $sabox, $saboxmeta );
42
 
43
  }
 
44
  return $saboxmeta;
45
  }
46
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  function wpsabox_author_box( $saboxmeta = null ) {
15
 
16
  $show = ( is_single() || is_author() || is_archive() );
17
+
18
+ /**
19
+ * Hook: sabox_check_if_show.
20
+ *
21
+ * @hooked Simple_Author_Box::check_if_show_archive - 10
22
+ */
23
  $show = apply_filters( 'sabox_check_if_show', $show );
24
 
25
  if ( $show ) {
33
  $show_post_author_box = apply_filters( 'sabox_check_if_show_post_author_box', true, $sabox_options );
34
 
35
  do_action( 'sabox_before_author_box', $sabox_options );
 
36
  if ( $show_post_author_box ) {
37
  include( $template );
38
  }
46
  $saboxmeta = apply_filters( 'sabox_return_html', $return, $sabox, $saboxmeta );
47
 
48
  }
49
+
50
  return $saboxmeta;
51
  }
52
  }
53
+
54
+ //return notice if user hasn't filled Biographical Info
55
+ function sab_user_description_notice() {
56
+ $user_id = get_current_user_id();
57
+ $user = get_userdata( $user_id );
58
+ $user_descrition = $user->description;
59
+ $user_roles = $user->roles;
60
+ if ( ! $user_descrition && in_array( 'author', $user_roles ) ) {
61
+
62
+ ?>
63
+ <div class="notice notice-info is-dismissible">
64
+ <p><?php _e( 'Please complete Biographical Info', 'saboxplugin' ); ?></p>
65
+ </div>
66
+ <?php
67
+ }
68
+ }
69
+
70
+ add_action( 'admin_notices', 'sab_user_description_notice' );
71
+
72
+
73
+ //return notice if user hasn't filled any social profiles
74
+ function sab_user_social_notice() {
75
+ $user_id = get_current_user_id();
76
+ $user_social = get_user_meta( $user_id, 'sabox_social_links' );
77
+ $user = get_userdata( $user_id );
78
+ $user_roles = $user->roles;
79
+
80
+ if ( ! $user_social && in_array( 'author', $user_roles ) ) {
81
+
82
+ ?>
83
+ <div class="notice notice-info is-dismissible">
84
+ <p><?php _e( 'Please enter a social profile', 'saboxplugin' ); ?></p>
85
+ </div>
86
+ <?php
87
+ }
88
+ }
89
+
90
+ add_action( 'admin_notices', 'sab_user_social_notice' );
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: machothemes, silkalns
3
  Tags: author box, responsive author box, author profile fields, author social icons, profile fields, author bio, author description, author profile, user profile, post author, rtl author box, amp, accelerated mobile pages
4
  Requires at least: 4.6
5
  Requires PHP: 5.6
 
6
  Tested up to: 5.0
7
- Stable tag: 2.1.5
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -66,10 +66,30 @@ You should add there your phone number, for more information read <a href="https
66
 
67
  The PRO version of Simple Author Box fixes this.
68
 
 
 
 
 
69
  = I have two author boxes. How can I hide one? =
70
 
71
  The second author box might be a theme feature and you will need to turn it off from your theme’s options, or hide it with custom CSS.
72
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73
  = How can I get support? =
74
 
75
  You can get free support either here on the support forums: <a href="https://wordpress.org/support/plugin/simple-author-box">https://wordpress.org/support/plugin/simple-author-box</a>
@@ -100,6 +120,12 @@ Or you can give back by recommending this amazing plugin to your friends!
100
 
101
  == Changelog ==
102
 
 
 
 
 
 
 
103
  = 2.1.5 =
104
  * Remove uninstall feedback.
105
 
3
  Tags: author box, responsive author box, author profile fields, author social icons, profile fields, author bio, author description, author profile, user profile, post author, rtl author box, amp, accelerated mobile pages
4
  Requires at least: 4.6
5
  Requires PHP: 5.6
6
+ Stable tag: 2.2.0
7
  Tested up to: 5.0
 
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
66
 
67
  The PRO version of Simple Author Box fixes this.
68
 
69
+ = Is there any widget in Simple Author Box ? =
70
+
71
+ No, but we have two awesome widgets in the PRO version.
72
+
73
  = I have two author boxes. How can I hide one? =
74
 
75
  The second author box might be a theme feature and you will need to turn it off from your theme’s options, or hide it with custom CSS.
76
 
77
+ = How I can translate the author's biography ? =
78
+
79
+ You can use 2 plugins in order to do this: Polylang or WPML. Here it is how to translate an author's biography with each plugin:
80
+
81
+ **Polylang**
82
+ When using Polylang a "Biographical Info" textarea is added for each language, this way you can enter the "Biographical Info" for each respective language.
83
+
84
+ **WPML**
85
+ In order to translate the "Biographical Info" using this plugin you have to have the wpml-string-translation plugin installed and the following configurations made:
86
+ In the String Translation settings at the bottom you will see a "More options" setting. Click "Edit" then select "Author" from there and finally click "Apply". After this, in the filters above, at "Select strings within domain" select "Authors". This will reveal the strings that can be translated from the author role.
87
+
88
+ = How can I use it with Content Blocks (Custom Post Widget) ? =
89
+
90
+ When adding a widget in the widget area you can select the content block to display and there you will also see a checkbox titled "Do not apply content filters". Checking this checkbox will prevent the author box from displaying for that custom post.
91
+ When using a shortcode, example [content_block id=41] you can stop the author box from displaying by using one of these shortocodes instead: [content_block id=41 suppress_content_filters=true] or [content_block id=41 suppress_filters=true], both work.
92
+
93
  = How can I get support? =
94
 
95
  You can get free support either here on the support forums: <a href="https://wordpress.org/support/plugin/simple-author-box">https://wordpress.org/support/plugin/simple-author-box</a>
120
 
121
  == Changelog ==
122
 
123
+ = 2.2.0 =
124
+ * Added option to show all authors with our shortcode
125
+ * Added option to disable the author box on archieve pages.
126
+ * Found a solution for "incompatibility with Content Blocks"
127
+ * Found a solution to translate the author description with WPML and Polylang
128
+
129
  = 2.1.5 =
130
  * Remove uninstall feedback.
131
 
simple-author-box.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Simple Author Box
4
  * Plugin URI: http://wordpress.org/plugins/simple-author-box/
5
  * Description: Adds a responsive author box with social icons on your posts.
6
- * Version: 2.1.5
7
  * Author: Macho Themes
8
  * Author URI: https://www.machothemes.com/
9
  * License: GPLv3
@@ -30,9 +30,22 @@
30
  define( 'SIMPLE_AUTHOR_BOX_PATH', plugin_dir_path( __FILE__ ) );
31
  define( 'SIMPLE_AUTHOR_BOX_ASSETS', plugins_url( '/assets/', __FILE__ ) );
32
  define( 'SIMPLE_AUTHOR_BOX_SLUG', plugin_basename( __FILE__ ) );
33
- define( 'SIMPLE_AUTHOR_BOX_VERSION', '2.1.5' );
34
  define( 'SIMPLE_AUTHOR_SCRIPT_DEBUG', false );
35
 
36
-
37
  require_once SIMPLE_AUTHOR_BOX_PATH . 'inc/class-simple-author-box.php';
 
38
  Simple_Author_Box::get_instance();
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  * Plugin Name: Simple Author Box
4
  * Plugin URI: http://wordpress.org/plugins/simple-author-box/
5
  * Description: Adds a responsive author box with social icons on your posts.
6
+ * Version: 2.2.0
7
  * Author: Macho Themes
8
  * Author URI: https://www.machothemes.com/
9
  * License: GPLv3
30
  define( 'SIMPLE_AUTHOR_BOX_PATH', plugin_dir_path( __FILE__ ) );
31
  define( 'SIMPLE_AUTHOR_BOX_ASSETS', plugins_url( '/assets/', __FILE__ ) );
32
  define( 'SIMPLE_AUTHOR_BOX_SLUG', plugin_basename( __FILE__ ) );
33
+ define( 'SIMPLE_AUTHOR_BOX_VERSION', '2.2.0' );
34
  define( 'SIMPLE_AUTHOR_SCRIPT_DEBUG', false );
35
 
 
36
  require_once SIMPLE_AUTHOR_BOX_PATH . 'inc/class-simple-author-box.php';
37
+
38
  Simple_Author_Box::get_instance();
39
+
40
+ function sab_check_for_review() {
41
+ if ( ! is_admin() ) {
42
+ return;
43
+ }
44
+ require_once SIMPLE_AUTHOR_BOX_PATH . 'inc/class-sab-review.php';
45
+
46
+ SAB_Review::get_instance( array(
47
+ 'slug' => 'simple-author-box',
48
+ ) );
49
+ }
50
+
51
+ sab_check_for_review();
template/template-sab.php CHANGED
@@ -27,96 +27,107 @@ $sab_author_link = sprintf( '<a href="%s" class="vcard author"><span class="fn">
27
 
28
  if ( get_the_author_meta( 'description' ) != '' || '0' == $sabox_options['sab_no_description'] ) { // hide the author box if no description is provided
29
 
 
30
 
31
- echo '<div class="saboxplugin-wrap">'; // start saboxplugin-wrap div
32
-
33
- // author box gravatar
34
- echo '<div class="saboxplugin-gravatar">';
35
- $custom_profile_image = get_the_author_meta( 'sabox-profile-image', $sabox_author_id );
36
- if ( '' != $custom_profile_image ) {
37
- $mediaid = attachment_url_to_postid( $custom_profile_image );
38
- $alt = $mediaid ? get_post_meta( $mediaid, '_wp_attachment_image_alt', true) : '';
39
- echo '<img src="' . esc_url( $custom_profile_image ) . '" alt="' . esc_attr( $alt ) . '">';
40
- } else {
41
- echo get_avatar( get_the_author_meta( 'user_email', $sabox_author_id ), '100' );
42
- }
43
 
44
- echo '</div>';
45
 
46
- // author box name
47
- echo '<div class="saboxplugin-authorname">';
48
- echo apply_filters( 'sabox_author_html', $sab_author_link, $sabox_options, $sabox_author_id );
49
- if ( is_user_logged_in() && get_current_user_id() == $sabox_author_id ) {
50
- echo '<a class="sab-profile-edit" target="_blank" href="' . get_edit_user_link() . '"> ' . __( 'Edit profile', 'saboxplugin' ) . '</a>';
51
- }
52
- echo '</div>';
53
-
54
-
55
- // author box description
56
- echo '<div class="saboxplugin-desc">';
57
- echo '<div>';
58
- $description = get_the_author_meta( 'description', $sabox_author_id );
59
- $description = wptexturize( $description );
60
- $description = wpautop( $description );
61
- echo wp_kses_post( $description );
62
- echo '</div>';
63
- echo '</div>';
64
-
65
- if ( is_single() ) {
66
- if ( get_the_author_meta( 'user_url' ) != '' && '1' == $sabox_options['sab_web'] ) { // author website on single
67
- echo '<div class="saboxplugin-web ' . esc_attr( $sab_web_align ) . '">';
68
- echo '<a href="' . esc_url( get_the_author_meta( 'user_url', $sabox_author_id ) ) . '" target="' . esc_attr( $sab_web_target ) . '" ' . $sab_web_rel . '>' . esc_html( get_the_author_meta( 'user_url', $sabox_author_id ) ) . '</a>';
69
- echo '</div>';
70
  }
71
- }
72
 
 
73
 
74
- if ( is_author() or is_archive() ) {
75
- if ( get_the_author_meta( 'user_url' ) != '' ) { // force show author website on author.php or archive.php
76
- echo '<div class="saboxplugin-web ' . esc_attr( $sab_web_align ) . '">';
77
- echo '<a href="' . esc_url( get_the_author_meta( 'user_url', $sabox_author_id ) ) . '" target="' . esc_attr( $sab_web_target ) . '" ' . $sab_web_rel . '>' . esc_html( get_the_author_meta( 'user_url', $sabox_author_id ) ) . '</a>';
78
- echo '</div>';
 
 
79
  }
80
- }
81
 
82
- // author box clearfix
83
- echo '<div class="clearfix"></div>';
 
 
 
 
 
 
 
 
 
 
84
 
85
- // author box social icons
86
- $author = get_userdata( $sabox_author_id );
87
- $show_social_icons = apply_filters( 'sabox_hide_social_icons', true, $author );
 
 
 
 
88
 
89
 
 
 
 
 
 
 
 
90
 
91
- if ( is_user_logged_in() && current_user_can( 'manage_options' ) ) {
92
- echo '<div class="sab-edit-settings">';
93
- echo '<a target="_blank" href="' . admin_url() . 'admin.php?page=simple-author-box-options">' . __( 'Settings', 'saboxplugin' ) . '<i class="dashicons dashicons-admin-settings"></i></a>';
94
- echo '</div>';
95
- }
96
 
97
- $show_email = '0' == $sabox_options['sab_email'] ? false : true;
98
- $social_links = Simple_Author_Box_Helper::get_user_social_links( $sabox_author_id, $show_email );
 
99
 
100
- if ( '0' == $sabox_options['sab_hide_socials'] && $show_social_icons && ! empty( $social_links ) ) { // hide social icons div option
101
- echo '<div class="saboxplugin-socials ' . esc_attr( $sabox_color ) . '">';
102
 
103
- foreach ( $social_links as $social_platform => $social_link ) {
 
 
 
 
 
 
 
104
 
105
- if ( 'user_email' == $social_platform ) {
106
- $social_link = 'mailto:' . antispambot( $social_link );
107
- }
108
 
109
- if ( 'whatsapp' == $social_platform ) {
110
- $social_link = 'https://wa.me/' . $social_link;
111
- }
112
 
113
- if ( ! empty( $social_link ) ) {
114
- echo Simple_Author_Box_Helper::get_sabox_social_icon( $social_link, $social_platform );
 
 
 
 
 
 
 
 
 
 
 
115
  }
116
- }
117
 
118
 
119
- echo '</div>';
120
- } // end of social icons
121
- echo '</div>'; // end of saboxplugin-wrap div
122
- }
 
27
 
28
  if ( get_the_author_meta( 'description' ) != '' || '0' == $sabox_options['sab_no_description'] ) { // hide the author box if no description is provided
29
 
30
+ $show_guest_only = ( get_post_meta( get_the_ID(), '_disable_sab_author_here', true ) ) ? get_post_meta( get_the_ID(), '_disable_sab_author_here', true ) : "false";
31
 
32
+ if ( $show_guest_only != "on" ) {
 
 
 
 
 
 
 
 
 
 
 
33
 
34
+ echo '<div class="saboxplugin-wrap">'; // start saboxplugin-wrap div
35
 
36
+ // author box gravatar
37
+ echo '<div class="saboxplugin-gravatar">';
38
+ $custom_profile_image = get_the_author_meta( 'sabox-profile-image', $sabox_author_id );
39
+ if ( '' != $custom_profile_image ) {
40
+ $mediaid = attachment_url_to_postid( $custom_profile_image );
41
+ $alt = $mediaid ? get_post_meta( $mediaid, '_wp_attachment_image_alt', true ) : '';
42
+ echo '<img src="' . esc_url( $custom_profile_image ) . '" alt="' . esc_attr( $alt ) . '">';
43
+ } else {
44
+ echo get_avatar( get_the_author_meta( 'user_email', $sabox_author_id ), '100' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  }
 
46
 
47
+ echo '</div>';
48
 
49
+ // author box name
50
+
51
+
52
+ echo '<div class="saboxplugin-authorname">';
53
+ echo apply_filters( 'sabox_author_html', $sab_author_link, $sabox_options, $sabox_author_id );
54
+ if ( is_user_logged_in() && get_current_user_id() == $sabox_author_id ) {
55
+ echo '<a class="sab-profile-edit" target="_blank" href="' . get_edit_user_link() . '"> ' . __( 'Edit profile', 'saboxplugin' ) . '</a>';
56
  }
57
+ echo '</div>';
58
 
59
+ // author box description
60
+ echo '<div class="saboxplugin-desc">';
61
+ echo '<div>';
62
+ $description = get_the_author_meta( 'description', $sabox_author_id );
63
+ $description = wptexturize( $description );
64
+ $description = wpautop( $description );
65
+ echo wp_kses_post( $description );
66
+ if ( $description == "" && is_user_logged_in() && $sabox_author_id == get_current_user_id() ) {
67
+ echo '<a target="_blank" href="' . admin_url() . 'profile.php?#wp-description-wrap">' . __( 'Add Biographical Info', 'saboxplugin' ) . '</a>';
68
+ }
69
+ echo '</div>';
70
+ echo '</div>';
71
 
72
+ if ( is_single() || is_page() ) {
73
+ if ( get_the_author_meta( 'user_url' ) != '' && '1' == $sabox_options['sab_web'] ) { // author website on single
74
+ echo '<div class="saboxplugin-web ' . esc_attr( $sab_web_align ) . '">';
75
+ echo '<a href="' . esc_url( get_the_author_meta( 'user_url', $sabox_author_id ) ) . '" target="' . esc_attr( $sab_web_target ) . '" ' . $sab_web_rel . '>' . esc_html( get_the_author_meta( 'user_url', $sabox_author_id ) ) . '</a>';
76
+ echo '</div>';
77
+ }
78
+ }
79
 
80
 
81
+ if ( is_author() or is_archive() ) {
82
+ if ( get_the_author_meta( 'user_url' ) != '' ) { // force show author website on author.php or archive.php
83
+ echo '<div class="saboxplugin-web ' . esc_attr( $sab_web_align ) . '">';
84
+ echo '<a href="' . esc_url( get_the_author_meta( 'user_url', $sabox_author_id ) ) . '" target="' . esc_attr( $sab_web_target ) . '" ' . $sab_web_rel . '>' . esc_html( get_the_author_meta( 'user_url', $sabox_author_id ) ) . '</a>';
85
+ echo '</div>';
86
+ }
87
+ }
88
 
89
+ // author box clearfix
90
+ echo '<div class="clearfix"></div>';
 
 
 
91
 
92
+ // author box social icons
93
+ $author = get_userdata( $sabox_author_id );
94
+ $show_social_icons = apply_filters( 'sabox_hide_social_icons', true, $author );
95
 
 
 
96
 
97
+ if ( is_user_logged_in() && current_user_can( 'manage_options' ) ) {
98
+ echo '<div class="sab-edit-settings">';
99
+ echo '<a target="_blank" href="' . admin_url() . 'admin.php?page=simple-author-box-options">' . __( 'Settings', 'saboxplugin' ) . '<i class="dashicons dashicons-admin-settings"></i></a>';
100
+ echo '</div>';
101
+ }
102
+
103
+ $show_email = '0' == $sabox_options['sab_email'] ? false : true;
104
+ $social_links = Simple_Author_Box_Helper::get_user_social_links( $sabox_author_id, $show_email );
105
 
106
+ if ( empty( $social_links ) && is_user_logged_in() && $sabox_author_id == get_current_user_id() ) {
107
+ echo '<a target="_blank" href="' . admin_url() . 'profile.php?#sabox-social-table">' . __( 'Add Social Links', 'saboxplugin' ) . '</a>';
108
+ }
109
 
110
+ if ( '0' == $sabox_options['sab_hide_socials'] && $show_social_icons && ! empty( $social_links ) ) { // hide social icons div option
111
+ echo '<div class="saboxplugin-socials ' . esc_attr( $sabox_color ) . '">';
 
112
 
113
+ foreach ( $social_links as $social_platform => $social_link ) {
114
+
115
+ if ( 'user_email' == $social_platform ) {
116
+ $social_link = 'mailto:' . antispambot( $social_link );
117
+ }
118
+
119
+ if ( 'whatsapp' == $social_platform ) {
120
+ $social_link = 'https://wa.me/' . $social_link;
121
+ }
122
+
123
+ if ( ! empty( $social_link ) ) {
124
+ echo Simple_Author_Box_Helper::get_sabox_social_icon( $social_link, $social_platform );
125
+ }
126
  }
 
127
 
128
 
129
+ echo '</div>';
130
+ } // end of social icons
131
+ echo '</div>'; // end of saboxplugin-wrap div
132
+ }
133
+ }