Simple Author Box - Version 2.3.22

Version Description

  • 2021-05-26
  • Minor update for social links (noopener and aria-label)
Download this release

Release Info

Developer WebFactory
Plugin Icon 128x128 Simple Author Box
Version 2.3.22
Comparing to
See all releases

Code changes from version 2.3.21 to 2.3.22

assets/css/sabox-admin-style.css CHANGED
@@ -497,7 +497,7 @@ a.upgrade-pro:after {
497
  display: none !important;
498
  }
499
  #adminmenu .wp-has-current-submenu .wp-submenu a[href*="admin.php?page=sab-news"] {
500
- color:#faff00;
501
  font-weight: bold;
502
  }
503
 
@@ -640,4 +640,22 @@ body .simple-author-box-wrap .wp-badge {
640
  background-color: #f8efa7;
641
  border: 1px solid #ccc;
642
  color: #333;
643
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
497
  display: none !important;
498
  }
499
  #adminmenu .wp-has-current-submenu .wp-submenu a[href*="admin.php?page=sab-news"] {
500
+ color:#faff00;
501
  font-weight: bold;
502
  }
503
 
640
  background-color: #f8efa7;
641
  border: 1px solid #ccc;
642
  color: #333;
643
+ }
644
+
645
+ #simple-author-box-epsilon-review-notice {
646
+ text-align: left;
647
+ padding: 15px;
648
+ font-size: 14px;
649
+ background: #fff;
650
+ border: 1px solid #c3c4c7;
651
+ border-left-width: 4px;
652
+ box-shadow: 0 1px 1px rgb(0 0 0 / 4%);
653
+ margin: 15px 0;
654
+ padding: 1px 12px;
655
+ border-left-color: #00a32a;
656
+ }
657
+
658
+ #simple-author-box-epsilon-review-notice p {
659
+ text-align: left;
660
+ font-size: 14px;
661
+ }
assets/img/simple-author-box.png ADDED
Binary file
inc/class-sab-review.php CHANGED
@@ -3,7 +3,7 @@
3
  class SAB_Review {
4
 
5
  private static $instance;
6
- private $when = array( 2, 15, 30, 90, 200 );
7
  private $value;
8
  private $messages;
9
  private $link = 'https://wordpress.org/support/plugin/%s/reviews/#new-post';
@@ -19,9 +19,9 @@ class SAB_Review {
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
 
@@ -49,7 +49,8 @@ class SAB_Review {
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
  }
@@ -57,11 +58,10 @@ class SAB_Review {
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
 
@@ -69,6 +69,8 @@ class SAB_Review {
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 ) {
@@ -102,14 +104,14 @@ class SAB_Review {
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>
@@ -125,7 +127,7 @@ class SAB_Review {
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 );
@@ -180,4 +182,4 @@ class SAB_Review {
180
 
181
  <?php
182
  }
183
- }
3
  class SAB_Review {
4
 
5
  private static $instance;
6
+ private $when = array(0, 1, 2, 15, 30, 90, 200 );
7
  private $value;
8
  private $messages;
9
  private $link = 'https://wordpress.org/support/plugin/%s/reviews/#new-post';
19
  $this->value = $this->value();
20
 
21
  $this->messages = array(
22
+ 'notice' => __( "<b>Hey 👋 we need YOUR HELP 🙌</b><br>Could you please do us a small favor and rate the plugin? It's what keeps the plugin maintained and bug-free 🚀", 'saboxplugin' ),
23
+ 'rate' => __( 'Sure! I want to help!', 'saboxplugin' ),
24
+ 'rated' => __( 'I already rated it', 'saboxplugin' ),
25
  'no_rate' => __( 'No, not good enough', 'saboxplugin' ),
26
  );
27
 
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( 'sab_admin_above_tabs', array( $this, 'five_star_wp_rate_notice' ) );
54
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue' ) );
55
  add_action( 'admin_print_footer_scripts', array( $this, 'ajax_script' ) );
56
  }
58
  }
59
 
60
  private function check() {
 
61
  $options = get_option( 'saboxplugin_options' );
62
  $option = isset( $options['givemereview'] ) ? $options['givemereview'] : '';
63
  $currDate = date( 'Y-m-d' );
64
+ if ( 'already-rated' == $option || 'rated' == $option) {
65
  return false;
66
  }
67
 
69
  return false;
70
  }
71
 
72
+ return true;
73
+
74
  if ( is_array( $this->when ) ) {
75
  foreach ( $this->when as $et ) {
76
  if ( date( 'Y-m-d', strtotime( $currDate . ' +' . $et . ' days' ) ) == $this->value ) {
104
  $url = sprintf( $this->link, $this->slug );
105
 
106
  ?>
107
+ <div id="<?php echo $this->slug ?>-epsilon-review-notice" class="xnotice notice-success _is-dismissible">
108
  <p><?php echo sprintf( wp_kses_post( $this->messages['notice'] ), $this->value ); ?></p>
109
  <p class="actions">
110
  <a id="epsilon-rate" href="<?php echo esc_url( $url ) ?>"
111
  class="button button-primary epsilon-review-button"><?php echo esc_html( $this->messages['rate'] ); ?></a>
112
+ &nbsp; &nbsp;<a id="epsilon-rated" href="#"
113
+ class="_button _button-secondary epsilon-review-button"><?php echo esc_html( $this->messages['rated'] ); ?></a>
114
+ <a id="epsilon-no-rate" href="#" style="display: none"
115
  class="button button-secondary epsilon-review-button"><?php echo esc_html( $this->messages['no_rate'] ); ?></a>
116
  </p>
117
  </div>
127
  if ( isset( $_POST['epsilon-review'] ) ) {
128
  $options['givemereview'] = 'already-rated';
129
  } else {
130
+ $options['givemereview'] = 'rated';
131
  }
132
 
133
  update_option( 'saboxplugin_options', $options );
182
 
183
  <?php
184
  }
185
+ }
inc/class-simple-author-box-admin-page.php CHANGED
@@ -487,8 +487,7 @@ class Simple_Author_Box_Admin_Page {
487
  <div class="sabox-masthead-left">
488
  <h1 class="wp-heading-inline">
489
  <?php
490
- /* Translators: Welcome Screen Title. */
491
- echo esc_html( apply_filters( 'sabox_show_pro_title', __( 'Simple Author Box', 'saboxplugin' ) ) );
492
  ?>
493
  </h1>
494
 
@@ -515,7 +514,9 @@ class Simple_Author_Box_Admin_Page {
515
  </div><!--/.sabox-preview-topbar-->
516
  <?php do_action( 'sab_admin_preview' ) ?>
517
  </div>
518
- <?php do_action( 'sab_admin_old_premium' ) ?>
 
 
519
  <h2 class="epfw-tab-wrapper nav-tab-wrapper wp-clearfix">
520
  <?php foreach ( $this->sections as $id => $section ) { ?>
521
  <?php
487
  <div class="sabox-masthead-left">
488
  <h1 class="wp-heading-inline">
489
  <?php
490
+ echo '<img style="height: 35px;" src="' . SIMPLE_AUTHOR_BOX_ASSETS . 'img/simple-author-box.png" alt="Simple Author Box" title="Simple Author Box">';
 
491
  ?>
492
  </h1>
493
 
514
  </div><!--/.sabox-preview-topbar-->
515
  <?php do_action( 'sab_admin_preview' ) ?>
516
  </div>
517
+ <?php do_action( 'sab_admin_old_premium' );
518
+ do_action( 'sab_admin_above_tabs' );
519
+ ?>
520
  <h2 class="epfw-tab-wrapper nav-tab-wrapper wp-clearfix">
521
  <?php foreach ( $this->sections as $id => $section ) { ?>
522
  <?php
inc/class-simple-author-box-helper.php CHANGED
@@ -86,7 +86,7 @@ class Simple_Author_Box_Helper {
86
  $url = ('skype' != $icon_name) ? esc_url($url) : esc_attr($url);
87
 
88
  $svg_icon = Simple_Author_Box_Social::icon_to_svg( $icon_name, $type );
89
- return '<a target="' . esc_attr( $sabox_blank ) . '" href="' . $url . '" rel="nofollow" class="' . esc_attr( $sab_color ) . '">' . $svg_icon . '</span></a>';
90
 
91
  }
92
 
@@ -900,7 +900,7 @@ class Simple_Author_Box_Helper {
900
  'sab_box_desc_size' => '14',
901
  'sab_box_icon_size' => '18',
902
  'sab_desc_style' => '0',
903
-
904
  ) );
905
 
906
  if ( 'saboxplugin_options' == $key ) {
@@ -1056,4 +1056,4 @@ class Simple_Author_Box_Helper {
1056
 
1057
  return apply_filters( 'sabox_inline_css', $style );
1058
  }
1059
- }
86
  $url = ('skype' != $icon_name) ? esc_url($url) : esc_attr($url);
87
 
88
  $svg_icon = Simple_Author_Box_Social::icon_to_svg( $icon_name, $type );
89
+ return '<a aria-label="' . ucfirst($icon_name) . '" target="' . esc_attr( $sabox_blank ) . '" href="' . $url . '" rel="nofollow noopener" class="' . esc_attr( $sab_color ) . '">' . $svg_icon . '</span></a>';
90
 
91
  }
92
 
900
  'sab_box_desc_size' => '14',
901
  'sab_box_icon_size' => '18',
902
  'sab_desc_style' => '0',
903
+
904
  ) );
905
 
906
  if ( 'saboxplugin_options' == $key ) {
1056
 
1057
  return apply_filters( 'sabox_inline_css', $style );
1058
  }
1059
+ }
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Simple Author Box ===
2
  Contributors: WebFactory
3
- Tags: author box, responsive author box, author profile fields, author social icons, author bio, author description, author profile, post author, guest author, guest posts, guest author box, block
4
  Requires at least: 4.6
5
  Requires PHP: 5.6
6
  Tested up to: 5.7
7
- Stable tag: 2.3.21
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -49,6 +49,10 @@ Add a responsive author box with social icons to any post. Great author box for
49
 
50
  == Changelog ==
51
 
 
 
 
 
52
  = 2.3.21 =
53
  * 2021-03-07
54
  * Updated Freemius library
1
  === Simple Author Box ===
2
  Contributors: WebFactory
3
+ Tags: author box, responsive author box, author profile fields, author social icons, author bio, author description, author profile, post author, guest author, guest posts, guest author box
4
  Requires at least: 4.6
5
  Requires PHP: 5.6
6
  Tested up to: 5.7
7
+ Stable tag: 2.3.22
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
49
 
50
  == Changelog ==
51
 
52
+ = 2.3.22 =
53
+ * 2021-05-26
54
+ * Minor update for social links (noopener and aria-label)
55
+
56
  = 2.3.21 =
57
  * 2021-03-07
58
  * Updated Freemius library
simple-author-box.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Simple Author Box
5
  * Plugin URI: https://wpauthorbox.com/
6
  * Description: Adds a responsive author box with social icons on your posts.
7
- * Version: 2.3.21
8
  * Author: WebFactory Ltd
9
  * Author URI: https://www.webfactoryltd.com/
10
  * Requires: 4.6 or higher
@@ -87,7 +87,7 @@ if ( function_exists( 'sab_fs' ) ) {
87
  define( 'SIMPLE_AUTHOR_BOX_PATH', plugin_dir_path( __FILE__ ) );
88
  define( 'SIMPLE_AUTHOR_BOX_ASSETS', plugins_url( '/assets/', __FILE__ ) );
89
  define( 'SIMPLE_AUTHOR_BOX_SLUG', plugin_basename( __FILE__ ) );
90
- define( 'SIMPLE_AUTHOR_BOX_VERSION', '2.3.21' );
91
  define( 'SIMPLE_AUTHOR_SCRIPT_DEBUG', false );
92
  require_once SIMPLE_AUTHOR_BOX_PATH . 'inc/class-simple-author-box.php';
93
  Simple_Author_Box::get_instance();
4
  * Plugin Name: Simple Author Box
5
  * Plugin URI: https://wpauthorbox.com/
6
  * Description: Adds a responsive author box with social icons on your posts.
7
+ * Version: 2.3.22
8
  * Author: WebFactory Ltd
9
  * Author URI: https://www.webfactoryltd.com/
10
  * Requires: 4.6 or higher
87
  define( 'SIMPLE_AUTHOR_BOX_PATH', plugin_dir_path( __FILE__ ) );
88
  define( 'SIMPLE_AUTHOR_BOX_ASSETS', plugins_url( '/assets/', __FILE__ ) );
89
  define( 'SIMPLE_AUTHOR_BOX_SLUG', plugin_basename( __FILE__ ) );
90
+ define( 'SIMPLE_AUTHOR_BOX_VERSION', '2.3.22' );
91
  define( 'SIMPLE_AUTHOR_SCRIPT_DEBUG', false );
92
  require_once SIMPLE_AUTHOR_BOX_PATH . 'inc/class-simple-author-box.php';
93
  Simple_Author_Box::get_instance();