Simple Author Box - Version 2.45

Version Description

  • 2021-11-28
  • Fixed missing ALT attribute on author avatars
Download this release

Release Info

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

Code changes from version 2.42 to 2.45

assets/js/sab-pointers.js CHANGED
@@ -1,8 +1,8 @@
1
  /**
2
  * SAB
3
- * (c) Web factory Ltd, 2016 - 2021
4
  */
5
-
6
  jQuery(document).ready(function($){
7
  if (typeof sab_pointers != "undefined") {
8
  $.each(sab_pointers, function (index, pointer) {
@@ -27,6 +27,5 @@ jQuery(document).ready(function($){
27
  .pointer("open");
28
  });
29
  }
30
-
31
  });
32
-
1
  /**
2
  * SAB
3
+ * (c) WebFactory Ltd, 2016 - 2021
4
  */
5
+
6
  jQuery(document).ready(function($){
7
  if (typeof sab_pointers != "undefined") {
8
  $.each(sab_pointers, function (index, pointer) {
27
  .pointer("open");
28
  });
29
  }
30
+
31
  });
 
assets/js/sab-preview.js CHANGED
@@ -1,8 +1,8 @@
1
  /**
2
  * SAB
3
- * (c) Web factory Ltd, 2016 - 2021
4
  */
5
-
6
  wp.SAB = 'undefined' === typeof( wp.SAB ) ? {} : wp.SAB;
7
  wp.SAB.views = 'undefined' === typeof( wp.SAB.views ) ? {} : wp.SAB.views;
8
  wp.SAB.models = 'undefined' === typeof( wp.SAB.models ) ? {} : wp.SAB.models;
@@ -72,12 +72,12 @@ wp.SAB.views.Settings = Backbone.View.extend({
72
 
73
  // Author Box Background
74
  this.listenTo( this.model, 'change:sab_bg_image', this.adjustBoxBackground );
75
-
76
  // Author Box Border
77
  this.listenTo( this.model, 'change:sab_box_border_width', this.adjustBorder );
78
  this.listenTo( this.model, 'change:sab_box_border', this.adjustBorder );
79
  this.listenTo( this.model, 'change:sab_border_type', this.adjustBorder );
80
-
81
  // Adjust Author name settings
82
  this.listenTo( this.model, 'change:sab_box_name_size', this.adjustAuthorName );
83
  this.listenTo( this.model, 'change:sab_box_name_font', this.adjustAuthorName );
@@ -94,7 +94,7 @@ wp.SAB.views.Settings = Backbone.View.extend({
94
  this.listenTo( this.model, 'change:sab_box_author_p_color', this.adjustAuthorDescription );
95
  this.listenTo( this.model, 'change:sab_box_author_a_color', this.adjustAuthorDescription );
96
  this.listenTo( this.model, 'change:sab_desc_style', this.adjustAuthorDescription );
97
-
98
  //Tabs
99
  this.listenTo( this.model, 'change:sab_tab_background_color', this.adjustTabs );
100
  this.listenTo( this.model, 'change:sab_tab_text_color', this.adjustTabs );
@@ -149,7 +149,7 @@ wp.SAB.views.Settings = Backbone.View.extend({
149
 
150
  websitePosition: function() {
151
  var attribute = wp.SAB.Settings.get( 'sab_web_position' );
152
-
153
  if ( '1' == attribute ) {
154
  jQuery('.saboxplugin-web').addClass( 'sab-web-position' );
155
  }else{
@@ -176,7 +176,7 @@ wp.SAB.views.Settings = Backbone.View.extend({
176
 
177
  socialIconHover: function() {
178
  var attribute = wp.SAB.Settings.get( 'sab_social_hover' );
179
-
180
  if ( '1' == attribute ) {
181
  jQuery('.saboxplugin-socials').addClass( 'sab-rotate-icons' );
182
  }else{
@@ -186,7 +186,7 @@ wp.SAB.views.Settings = Backbone.View.extend({
186
 
187
  socialIconShadow: function() {
188
  var attribute = wp.SAB.Settings.get( 'sab_box_long_shadow' );
189
-
190
  if ( '1' == attribute ) {
191
  jQuery('.saboxplugin-socials').removeClass( 'without-long-shadow' );
192
  }else{
@@ -196,7 +196,7 @@ wp.SAB.views.Settings = Backbone.View.extend({
196
 
197
  socialIconBorder: function() {
198
  var attribute = wp.SAB.Settings.get( 'sab_box_thin_border' );
199
-
200
  if ( '1' == attribute ) {
201
  jQuery('.saboxplugin-socials').addClass( 'sab-icons-with-border' );
202
  }else{
@@ -213,7 +213,7 @@ wp.SAB.views.Settings = Backbone.View.extend({
213
 
214
  avatarStyle: function() {
215
  var attribute = wp.SAB.Settings.get( 'sab_avatar_style' );
216
-
217
  jQuery('.saboxplugin-gravatar').removeClass( 'sab-round-image' );
218
  jQuery('.saboxplugin-gravatar').removeClass( 'sab-fancy-image' );
219
  jQuery('.saboxplugin-gravatar').removeClass( 'sab-elypse-image' );
@@ -235,7 +235,7 @@ wp.SAB.views.Settings = Backbone.View.extend({
235
 
236
  avatarHover: function() {
237
  var attribute = wp.SAB.Settings.get( 'sab_avatar_hover' );
238
-
239
  if ( '1' == attribute ) {
240
  jQuery('.saboxplugin-gravatar').addClass( 'sab-rotate-img' );
241
  }else{
@@ -266,7 +266,7 @@ wp.SAB.views.Settings = Backbone.View.extend({
266
  var border = wp.SAB.Settings.getAttribute( 'sab_box_border_width' ),
267
  borderColor = wp.SAB.Settings.getAttribute( 'sab_box_border' ),
268
  borderStyle = wp.SAB.Settings.getAttribute( 'sab_border_type' );
269
-
270
  if ( '' == borderStyle ) {
271
  borderStyle = 'solid';
272
  }
@@ -306,27 +306,27 @@ wp.SAB.views.Settings = Backbone.View.extend({
306
  tab_hover_bg_color = wp.SAB.Settings.getAttribute( 'sab_tab_hover_background_color' ),
307
  tab_hover_text_color = wp.SAB.Settings.getAttribute( 'sab_tab_hover_text_color' ),
308
  tab_hover_border_color = wp.SAB.Settings.getAttribute( 'sab_tab_hover_border_color' );
309
-
310
  if ( '' == tab_bg_color ) {
311
  tab_bg_color = 'inherit';
312
  }
313
-
314
  if ( '' == tab_text_color ) {
315
  tab_text_color = 'inherit';
316
  }
317
-
318
  if ( '' == tab_border_color ) {
319
  tab_border_color = 'inherit';
320
  }
321
-
322
  if ( '' == tab_hover_bg_color ) {
323
  tab_hover_bg_color = 'inherit';
324
  }
325
-
326
  if ( '' == tab_hover_text_color ) {
327
  tab_hover_text_color = 'inherit';
328
  }
329
-
330
  if ( '' == tab_hover_border_color ) {
331
  tab_hover_border_color = 'inherit';
332
  }
@@ -484,7 +484,7 @@ wp.SAB.views.Settings = Backbone.View.extend({
484
  });
485
  }
486
  },
487
-
488
  });
489
 
490
  jQuery( document ).ready(function(){
@@ -492,4 +492,4 @@ jQuery( document ).ready(function(){
492
  wp.SAB.Fonts = [];
493
  wp.SAB.Settings = new wp.SAB.models.Settings();
494
 
495
- });
1
  /**
2
  * SAB
3
+ * (c) WebFactory Ltd, 2016 - 2021
4
  */
5
+
6
  wp.SAB = 'undefined' === typeof( wp.SAB ) ? {} : wp.SAB;
7
  wp.SAB.views = 'undefined' === typeof( wp.SAB.views ) ? {} : wp.SAB.views;
8
  wp.SAB.models = 'undefined' === typeof( wp.SAB.models ) ? {} : wp.SAB.models;
72
 
73
  // Author Box Background
74
  this.listenTo( this.model, 'change:sab_bg_image', this.adjustBoxBackground );
75
+
76
  // Author Box Border
77
  this.listenTo( this.model, 'change:sab_box_border_width', this.adjustBorder );
78
  this.listenTo( this.model, 'change:sab_box_border', this.adjustBorder );
79
  this.listenTo( this.model, 'change:sab_border_type', this.adjustBorder );
80
+
81
  // Adjust Author name settings
82
  this.listenTo( this.model, 'change:sab_box_name_size', this.adjustAuthorName );
83
  this.listenTo( this.model, 'change:sab_box_name_font', this.adjustAuthorName );
94
  this.listenTo( this.model, 'change:sab_box_author_p_color', this.adjustAuthorDescription );
95
  this.listenTo( this.model, 'change:sab_box_author_a_color', this.adjustAuthorDescription );
96
  this.listenTo( this.model, 'change:sab_desc_style', this.adjustAuthorDescription );
97
+
98
  //Tabs
99
  this.listenTo( this.model, 'change:sab_tab_background_color', this.adjustTabs );
100
  this.listenTo( this.model, 'change:sab_tab_text_color', this.adjustTabs );
149
 
150
  websitePosition: function() {
151
  var attribute = wp.SAB.Settings.get( 'sab_web_position' );
152
+
153
  if ( '1' == attribute ) {
154
  jQuery('.saboxplugin-web').addClass( 'sab-web-position' );
155
  }else{
176
 
177
  socialIconHover: function() {
178
  var attribute = wp.SAB.Settings.get( 'sab_social_hover' );
179
+
180
  if ( '1' == attribute ) {
181
  jQuery('.saboxplugin-socials').addClass( 'sab-rotate-icons' );
182
  }else{
186
 
187
  socialIconShadow: function() {
188
  var attribute = wp.SAB.Settings.get( 'sab_box_long_shadow' );
189
+
190
  if ( '1' == attribute ) {
191
  jQuery('.saboxplugin-socials').removeClass( 'without-long-shadow' );
192
  }else{
196
 
197
  socialIconBorder: function() {
198
  var attribute = wp.SAB.Settings.get( 'sab_box_thin_border' );
199
+
200
  if ( '1' == attribute ) {
201
  jQuery('.saboxplugin-socials').addClass( 'sab-icons-with-border' );
202
  }else{
213
 
214
  avatarStyle: function() {
215
  var attribute = wp.SAB.Settings.get( 'sab_avatar_style' );
216
+
217
  jQuery('.saboxplugin-gravatar').removeClass( 'sab-round-image' );
218
  jQuery('.saboxplugin-gravatar').removeClass( 'sab-fancy-image' );
219
  jQuery('.saboxplugin-gravatar').removeClass( 'sab-elypse-image' );
235
 
236
  avatarHover: function() {
237
  var attribute = wp.SAB.Settings.get( 'sab_avatar_hover' );
238
+
239
  if ( '1' == attribute ) {
240
  jQuery('.saboxplugin-gravatar').addClass( 'sab-rotate-img' );
241
  }else{
266
  var border = wp.SAB.Settings.getAttribute( 'sab_box_border_width' ),
267
  borderColor = wp.SAB.Settings.getAttribute( 'sab_box_border' ),
268
  borderStyle = wp.SAB.Settings.getAttribute( 'sab_border_type' );
269
+
270
  if ( '' == borderStyle ) {
271
  borderStyle = 'solid';
272
  }
306
  tab_hover_bg_color = wp.SAB.Settings.getAttribute( 'sab_tab_hover_background_color' ),
307
  tab_hover_text_color = wp.SAB.Settings.getAttribute( 'sab_tab_hover_text_color' ),
308
  tab_hover_border_color = wp.SAB.Settings.getAttribute( 'sab_tab_hover_border_color' );
309
+
310
  if ( '' == tab_bg_color ) {
311
  tab_bg_color = 'inherit';
312
  }
313
+
314
  if ( '' == tab_text_color ) {
315
  tab_text_color = 'inherit';
316
  }
317
+
318
  if ( '' == tab_border_color ) {
319
  tab_border_color = 'inherit';
320
  }
321
+
322
  if ( '' == tab_hover_bg_color ) {
323
  tab_hover_bg_color = 'inherit';
324
  }
325
+
326
  if ( '' == tab_hover_text_color ) {
327
  tab_hover_text_color = 'inherit';
328
  }
329
+
330
  if ( '' == tab_hover_border_color ) {
331
  tab_hover_border_color = 'inherit';
332
  }
484
  });
485
  }
486
  },
487
+
488
  });
489
 
490
  jQuery( document ).ready(function(){
492
  wp.SAB.Fonts = [];
493
  wp.SAB.Settings = new wp.SAB.models.Settings();
494
 
495
+ });
assets/js/sabox-admin.js CHANGED
@@ -1,6 +1,6 @@
1
  /**
2
  * SAB
3
- * (c) Web factory Ltd, 2016 - 2021
4
  */
5
 
6
  (function ($) {
@@ -210,7 +210,6 @@
210
 
211
  if (preview_visible === "visible") {
212
  $(".sabox-preview").show();
213
- $("#sabox-toggle-preview").html("Hide preview");
214
  }
215
 
216
  $('.sabox-table').on('change', 'select', function(e) {
@@ -223,21 +222,6 @@
223
  }
224
  });
225
 
226
- $("#sabox-toggle-preview").on("click", function (e) {
227
- e.preventDefault();
228
- if (preview_visible == "visible") {
229
- $("#sabox-toggle-preview").html("Show preview");
230
- preview_visible = "hidden";
231
- $(".sabox-preview").hide();
232
- window.localStorage.setItem("sab_preview", "hidden");
233
- } else {
234
- $("#sabox-toggle-preview").html("Hide preview");
235
- preview_visible = "visible";
236
- $(".sabox-preview").show();
237
- window.localStorage.setItem("sab_preview", "visible");
238
- }
239
- });
240
-
241
  $(".sabox-content").on("click", ".confirm-action", function (e) {
242
  message = $(this).data("confirm");
243
  e.preventDefault();
1
  /**
2
  * SAB
3
+ * (c) WebFactory Ltd, 2016 - 2021
4
  */
5
 
6
  (function ($) {
210
 
211
  if (preview_visible === "visible") {
212
  $(".sabox-preview").show();
 
213
  }
214
 
215
  $('.sabox-table').on('change', 'select', function(e) {
222
  }
223
  });
224
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
225
  $(".sabox-content").on("click", ".confirm-action", function (e) {
226
  message = $(this).data("confirm");
227
  e.preventDefault();
assets/js/sabox-editor.js CHANGED
@@ -1,8 +1,8 @@
1
  /**
2
  * SAB
3
- * (c) Web factory Ltd, 2016 - 2021
4
  */
5
-
6
  (function( $ ) {
7
 
8
  'use strict';
1
  /**
2
  * SAB
3
+ * (c) WebFactory Ltd, 2016 - 2021
4
  */
5
+
6
  (function( $ ) {
7
 
8
  'use strict';
assets/js/sabox-picker.js CHANGED
@@ -1,6 +1,6 @@
1
  /**
2
  * SAB
3
- * (c) Web factory Ltd, 2016 - 2021
4
  */
5
 
6
  var canClick = false;
@@ -64,7 +64,7 @@ function activateSABVisualPicker($) {
64
 
65
  function handlerMouseEnter(ev) {
66
  var target = $(ev.target);
67
-
68
  var pathToSelect = target.getPath();
69
 
70
  $(pathToSelect).addClass("sabox-visual-picker-selected");
@@ -100,7 +100,7 @@ function activateSABVisualPicker($) {
100
  activateSABVisualPicker($);
101
 
102
  $('body').append('<style>.sabox-visual-picker-selected { outline: 3px dashed #007cba; outline-offset: -3px; } </style>');
103
-
104
  var urlParams = new URLSearchParams(window.location.search);
105
  if(urlParams.has('sabox-can-click')){
106
  canClick = urlParams.get('sabox-can-click');
1
  /**
2
  * SAB
3
+ * (c) WebFactory Ltd, 2016 - 2021
4
  */
5
 
6
  var canClick = false;
64
 
65
  function handlerMouseEnter(ev) {
66
  var target = $(ev.target);
67
+
68
  var pathToSelect = target.getPath();
69
 
70
  $(pathToSelect).addClass("sabox-visual-picker-selected");
100
  activateSABVisualPicker($);
101
 
102
  $('body').append('<style>.sabox-visual-picker-selected { outline: 3px dashed #007cba; outline-offset: -3px; } </style>');
103
+
104
  var urlParams = new URLSearchParams(window.location.search);
105
  if(urlParams.has('sabox-can-click')){
106
  canClick = urlParams.get('sabox-can-click');
readme.txt CHANGED
@@ -3,8 +3,8 @@ 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.8
7
- Stable tag: 2.42
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -49,9 +49,13 @@ Add a responsive author box with social icons to any post. Great author box for
49
 
50
  == Changelog ==
51
 
 
 
 
 
52
  = 2.42 =
53
  * 2021-07-19
54
- * more bug fixes
55
 
56
  = 2.41 =
57
  * 2021-07-15
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.9
7
+ Stable tag: 2.45
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
49
 
50
  == Changelog ==
51
 
52
+ = 2.45 =
53
+ * 2021-11-28
54
+ * Fixed missing ALT attribute on author avatars
55
+
56
  = 2.42 =
57
  * 2021-07-19
58
+ * More bug fixes
59
 
60
  = 2.41 =
61
  * 2021-07-15
simple-author-box.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Simple Author Box
4
  * Plugin URI: https://wpauthorbox.com/
5
  * Description: Adds a responsive author box with social icons on any post.
6
- * Version: 2.42
7
  * Author: WebFactory Ltd
8
  * Author URI: https://www.webfactoryltd.com/
9
  * Requires: 4.6
@@ -16,7 +16,7 @@
16
  * Copyright 2014-2017 Tiguan office@tiguandesign.com
17
  * Copyright 2017-2019 MachoThemes office@machothemes.com
18
  * Copyright 2019 GreenTreeLabs diego@greentreelabs.net
19
- * Copyright 2021 WebFactory Ltd support@webfactoryltd.com
20
  *
21
  * This program is free software; you can redistribute it and/or modify
22
  * it under the terms of the GNU General Public License, version 3, as
3
  * Plugin Name: Simple Author Box
4
  * Plugin URI: https://wpauthorbox.com/
5
  * Description: Adds a responsive author box with social icons on any post.
6
+ * Version: 2.45
7
  * Author: WebFactory Ltd
8
  * Author URI: https://www.webfactoryltd.com/
9
  * Requires: 4.6
16
  * Copyright 2014-2017 Tiguan office@tiguandesign.com
17
  * Copyright 2017-2019 MachoThemes office@machothemes.com
18
  * Copyright 2019 GreenTreeLabs diego@greentreelabs.net
19
+ * Copyright 2019-2021 WebFactory Ltd support@webfactoryltd.com
20
  *
21
  * This program is free software; you can redistribute it and/or modify
22
  * it under the terms of the GNU General Public License, version 3, as
template/template-sab.php CHANGED
@@ -43,8 +43,7 @@ if ('' != $author_description || isset($sabox_options['sab_no_description']) &&
43
  $custom_profile_image = get_the_author_meta('sabox-profile-image', $sabox_author_id);
44
  if ('' != $custom_profile_image) {
45
  $mediaid = attachment_url_to_postid($custom_profile_image);
46
- $alt = $mediaid ? get_post_meta($mediaid, '_wp_attachment_image_alt', true) : '';
47
-
48
 
49
  $link = null;
50
  $nofollow = '';
@@ -71,7 +70,7 @@ if ('' != $author_description || isset($sabox_options['sab_no_description']) &&
71
  if ($link != null)
72
  echo "</a>";
73
  } else {
74
- echo get_avatar(get_the_author_meta('user_email', $sabox_author_id), $sabox_options['sab_avatar_size'], '', '', array('extra_attr' => 'itemprop="image"'));
75
  }
76
 
77
  echo '</div>';
43
  $custom_profile_image = get_the_author_meta('sabox-profile-image', $sabox_author_id);
44
  if ('' != $custom_profile_image) {
45
  $mediaid = attachment_url_to_postid($custom_profile_image);
46
+ $alt = $mediaid ? get_post_meta($mediaid, '_wp_attachment_image_alt', true) : get_the_author_meta('display_name', $sabox_author_id);
 
47
 
48
  $link = null;
49
  $nofollow = '';
70
  if ($link != null)
71
  echo "</a>";
72
  } else {
73
+ echo get_avatar(get_the_author_meta('user_email', $sabox_author_id), $sabox_options['sab_avatar_size'], '', get_the_author_meta('display_name', $sabox_author_id), array('extra_attr' => 'itemprop="image"'));
74
  }
75
 
76
  echo '</div>';