Simple Author Box - Version 2.41

Version Description

  • 2021-07-15
  • Minor bug fixes
Download this release

Release Info

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

Code changes from version 2.4 to 2.41

assets/js/sabox-admin.js CHANGED
@@ -52,9 +52,6 @@
52
  }
53
  }
54
 
55
- /**
56
- * Handle UI tab switching via jQuery instead of relying on CSS only
57
- */
58
  function adminTabSwitching() {
59
  var navTabSelector = ".nav-tab-wrapper .epfw-tab:not( .epfw-tab-link ):not( .not-tab )",
60
  initialTabHref,
@@ -75,10 +72,6 @@
75
  $(".sabox-preview").show();
76
  }
77
 
78
- /**
79
- * Default tab handling
80
- */
81
-
82
  // Make the first tab active by default
83
  $(navTabSelector + '[href="' + initialTabHref + '"]').addClass("nav-tab-active");
84
 
@@ -89,9 +82,6 @@
89
  }
90
  });
91
 
92
- /**
93
- * Listen for click events on nav-tab links
94
- */
95
  $(navTabSelector).click(function (event) {
96
  var clickedTab = $(this).attr("href") + "-tab";
97
 
@@ -112,7 +102,7 @@
112
  $(clickedTab).fadeIn();
113
  });
114
  });
115
- }
116
 
117
  $(document).on("click", function (e) {
118
  if ($(e.target).closest(".iris-picker").length === 0) {
@@ -173,22 +163,6 @@
173
  $(".saboxplugin-tab-" + $(this).data("tab")).show();
174
  });
175
 
176
- $("a.sab-element-picker").on("click", function (e) {
177
- e.preventDefault();
178
- $("body").css("overflow", "hidden");
179
- $("div.sabox-modal").css("display", "block");
180
- const id = $(this).attr("data-element-id");
181
- const element = $(this).attr("data-element");
182
- $("div.sabox-modal").attr("data-element-id", id);
183
- $("div.sabox-modal").attr("data-element", element);
184
- const content = $("div.sabox-modal-content");
185
- const iframe = $("iframe#sabox-modal-iframe")[0];
186
- iframe.style.top = "0px";
187
- iframe.style.width = "100%";
188
- iframe.style.height = content.height() + "px";
189
- iframe.src = sabox_admin.wp_url + "&sabox-element-id=" + id;
190
- });
191
-
192
  window.onmessage = function (e) {
193
  if (e.data.messageType == "sabox-iframe") {
194
  document.querySelector("span.sabox-modal-selected-path").innerText = e.data.pathToSelect;
@@ -347,7 +321,6 @@
347
  tmp = tmp.replace('pricing-table', feature);
348
  $(el).attr('href', tmp);
349
  });
350
-
351
  } // open_upsell
352
 
353
  $('#sab-pro-dialog').dialog({
@@ -372,6 +345,8 @@
372
  open_upsell('welcome');
373
  window.localStorage.setItem('sab_upsell_shown', 'true');
374
  }
 
 
375
  })(jQuery);
376
 
377
  function sab_fix_dialog_close(event, ui) {
52
  }
53
  }
54
 
 
 
 
55
  function adminTabSwitching() {
56
  var navTabSelector = ".nav-tab-wrapper .epfw-tab:not( .epfw-tab-link ):not( .not-tab )",
57
  initialTabHref,
72
  $(".sabox-preview").show();
73
  }
74
 
 
 
 
 
75
  // Make the first tab active by default
76
  $(navTabSelector + '[href="' + initialTabHref + '"]').addClass("nav-tab-active");
77
 
82
  }
83
  });
84
 
 
 
 
85
  $(navTabSelector).click(function (event) {
86
  var clickedTab = $(this).attr("href") + "-tab";
87
 
102
  $(clickedTab).fadeIn();
103
  });
104
  });
105
+ } // adminTabSwitching
106
 
107
  $(document).on("click", function (e) {
108
  if ($(e.target).closest(".iris-picker").length === 0) {
163
  $(".saboxplugin-tab-" + $(this).data("tab")).show();
164
  });
165
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
166
  window.onmessage = function (e) {
167
  if (e.data.messageType == "sabox-iframe") {
168
  document.querySelector("span.sabox-modal-selected-path").innerText = e.data.pathToSelect;
321
  tmp = tmp.replace('pricing-table', feature);
322
  $(el).attr('href', tmp);
323
  });
 
324
  } // open_upsell
325
 
326
  $('#sab-pro-dialog').dialog({
345
  open_upsell('welcome');
346
  window.localStorage.setItem('sab_upsell_shown', 'true');
347
  }
348
+
349
+ $('.sab-saved').delay(10000).fadeOut(300);
350
  })(jQuery);
351
 
352
  function sab_fix_dialog_close(event, ui) {
inc/class-simple-author-box-admin-page.php CHANGED
@@ -857,36 +857,6 @@ class Simple_Author_Box_Admin_Page
857
  </div><!-- sabox-left -->
858
 
859
  <div class="sabox-right">
860
- <div class="sabox-modal">
861
- <div class="sabox-modal-header">
862
- <div style="padding: 5px;">
863
- <div class="sabox-modal-header-logo">
864
- <img src="<?php echo SIMPLE_AUTHOR_BOX_ASSETS; ?>img/sab-big-icon.png" class="sab-logo">
865
- </div>
866
-
867
- <div class="sabox-modal-header-info">
868
- <div class="modal-title"><?php echo __('Please Pick and Element by Hover and Click the element You want to Stick', 'simple-author-box'); ?></div>
869
- <strong><?php echo __('Element Path: ', 'simple-author-box'); ?></strong><br />
870
- <span class="sabox-modal-selected-path"></span>
871
- </div>
872
-
873
- <div class="sabox-modal-header-right">
874
- <strong><?php echo __('Use click to navigate', 'simple-author-box'); ?></strong>
875
- <div class="toggle-wrapper">
876
- <input type="checkbox" id="sabox_use_normal_click" name="sabox_use_normal_click" class="sabox_use_normal_click" />
877
- <label for="sabox_use_normal_click" class="toggle"><span class="toggle_handler"></span></label>
878
- </div>
879
- </div>
880
-
881
-
882
- </div>
883
- <button class="sabox-modal-close-btn"><span class="dashicons dashicons-no"></span></button>
884
- </div>
885
- <div class="sabox-modal-content">
886
- <iframe id="sabox-modal-iframe" class="sabox-modal-content"></iframe>
887
- </div>
888
- </div>
889
-
890
 
891
  <div class="sabox-wrap">
892
  <div class="sabox-preview">
@@ -1144,7 +1114,7 @@ class Simple_Author_Box_Admin_Page
1144
  }
1145
 
1146
  do_action('sabox_save_settings');
1147
- set_transient('sab_error_msg', '<div class="sab-alert sab-alert-info"><strong>Settings Saved</strong><button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button></div>', 1);
1148
  Simple_Author_Box_Helper::reset_options();
1149
  $this->get_all_options();
1150
  }
857
  </div><!-- sabox-left -->
858
 
859
  <div class="sabox-right">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
860
 
861
  <div class="sabox-wrap">
862
  <div class="sabox-preview">
1114
  }
1115
 
1116
  do_action('sabox_save_settings');
1117
+ set_transient('sab_error_msg', '<div class="sab-alert sab-alert-info sab-saved"><strong>Settings Saved</strong><button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button></div>', 1);
1118
  Simple_Author_Box_Helper::reset_options();
1119
  $this->get_all_options();
1120
  }
inc/class-simple-author-box-helper.php CHANGED
@@ -152,7 +152,7 @@ class Simple_Author_Box_Helper
152
  $url = ('skype' != $icon_name) ? esc_url($url) : esc_attr($url);
153
 
154
  $svg_icon = Simple_Author_Box_Social::icon_to_svg($icon_name, $type);
155
- return '<a target="' . esc_attr($sabox_blank) . '" href="' . $url . '" area-label="' . esc_attr(ucfirst(str_replace('_',' ',$icon_name))) . '" rel="nofollow noopener" class="' . esc_attr($sab_color) . '">' . $svg_icon . '</span></a>';
156
  }
157
 
158
  public static function get_user_social_links($userd_id, $show_email = false)
@@ -1170,7 +1170,7 @@ class Simple_Author_Box_Helper
1170
  if (!empty($sabox_options['sab_bg_image'])) {
1171
  $style .= '.saboxplugin-wrap {background-image:url(\'' . $sabox_options['sab_bg_image'] . '\'); background-size:cover;}';
1172
  }
1173
-
1174
  if (!empty($sabox_options['sab_custom_css'])) {
1175
  $sabox_options['sab_custom_css'];
1176
  }
152
  $url = ('skype' != $icon_name) ? esc_url($url) : esc_attr($url);
153
 
154
  $svg_icon = Simple_Author_Box_Social::icon_to_svg($icon_name, $type);
155
+ return '<a target="' . esc_attr($sabox_blank) . '" href="' . $url . '" aria-label="' . esc_attr(ucfirst(str_replace('_',' ',$icon_name))) . '" rel="nofollow noopener" class="' . esc_attr($sab_color) . '">' . $svg_icon . '</span></a>';
156
  }
157
 
158
  public static function get_user_social_links($userd_id, $show_email = false)
1170
  if (!empty($sabox_options['sab_bg_image'])) {
1171
  $style .= '.saboxplugin-wrap {background-image:url(\'' . $sabox_options['sab_bg_image'] . '\'); background-size:cover;}';
1172
  }
1173
+
1174
  if (!empty($sabox_options['sab_custom_css'])) {
1175
  $sabox_options['sab_custom_css'];
1176
  }
inc/class-simple-author-box.php CHANGED
@@ -361,7 +361,7 @@ class Simple_Author_Box
361
 
362
 
363
  // globally loaded
364
- wp_enqueue_style('sabox-css', SIMPLE_AUTHOR_BOX_ASSETS . 'css/sabox.css');
365
 
366
 
367
  // loaded only on plugin page
@@ -370,13 +370,13 @@ class Simple_Author_Box
370
  delete_option(SIMPLE_AUTHOR_POINTERS);
371
 
372
  // Styles
373
- wp_enqueue_style('saboxplugin-admin-style', SIMPLE_AUTHOR_BOX_ASSETS . 'css/sabox-admin-style' . $suffix . '.css');
374
  wp_enqueue_style('saboxplugin-admin-font', 'https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&display=swap');
375
 
376
  wp_enqueue_style('wp-color-picker');
377
- wp_enqueue_style('jquery-ui', SIMPLE_AUTHOR_BOX_ASSETS . 'css/jquery-ui.min.css');
378
- wp_enqueue_media();
379
- wp_enqueue_style('saboxplugin-sweetalert', SIMPLE_AUTHOR_BOX_ASSETS . 'css/sweetalert2.min.css');
380
 
381
  wp_enqueue_style('wp-jquery-ui-dialog');
382
  wp_enqueue_script('jquery-ui-dialog');
@@ -389,7 +389,7 @@ class Simple_Author_Box
389
  'jquery-ui-slider',
390
  'wp-color-picker',
391
  ),
392
- false,
393
  true
394
  );
395
 
@@ -400,7 +400,7 @@ class Simple_Author_Box
400
  'jquery-ui-slider',
401
  'wp-color-picker',
402
  ),
403
- false,
404
  true
405
  );
406
 
361
 
362
 
363
  // globally loaded
364
+ wp_enqueue_style('sabox-css', SIMPLE_AUTHOR_BOX_ASSETS . 'css/sabox.css', array(), SIMPLE_AUTHOR_BOX_VERSION);
365
 
366
 
367
  // loaded only on plugin page
370
  delete_option(SIMPLE_AUTHOR_POINTERS);
371
 
372
  // Styles
373
+ wp_enqueue_style('saboxplugin-admin-style', SIMPLE_AUTHOR_BOX_ASSETS . 'css/sabox-admin-style' . $suffix . '.css', array(), SIMPLE_AUTHOR_BOX_VERSION);
374
  wp_enqueue_style('saboxplugin-admin-font', 'https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&display=swap');
375
 
376
  wp_enqueue_style('wp-color-picker');
377
+ //wp_enqueue_style('jquery-ui', SIMPLE_AUTHOR_BOX_ASSETS . 'css/jquery-ui.min.css');
378
+ //wp_enqueue_media();
379
+ wp_enqueue_style('saboxplugin-sweetalert', SIMPLE_AUTHOR_BOX_ASSETS . 'css/sweetalert2.min.css', array(), SIMPLE_AUTHOR_BOX_VERSION);
380
 
381
  wp_enqueue_style('wp-jquery-ui-dialog');
382
  wp_enqueue_script('jquery-ui-dialog');
389
  'jquery-ui-slider',
390
  'wp-color-picker',
391
  ),
392
+ SIMPLE_AUTHOR_BOX_VERSION,
393
  true
394
  );
395
 
400
  'jquery-ui-slider',
401
  'wp-color-picker',
402
  ),
403
+ SIMPLE_AUTHOR_BOX_VERSION,
404
  true
405
  );
406
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: author box, responsive author box, author profile fields, author social ic
4
  Requires at least: 4.6
5
  Requires PHP: 5.6
6
  Tested up to: 5.7
7
- Stable tag: 2.4
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.4 =
53
  * 2021-07-14
54
  * Completely new GUI
4
  Requires at least: 4.6
5
  Requires PHP: 5.6
6
  Tested up to: 5.7
7
+ Stable tag: 2.41
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
49
 
50
  == Changelog ==
51
 
52
+ = 2.41 =
53
+ * 2021-07-15
54
+ * Minor bug fixes
55
+
56
  = 2.4 =
57
  * 2021-07-14
58
  * Completely new GUI
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.4
7
  * Author: WebFactory Ltd
8
  * Author URI: https://www.webfactoryltd.com/
9
  * Requires: 4.6
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.41
7
  * Author: WebFactory Ltd
8
  * Author URI: https://www.webfactoryltd.com/
9
  * Requires: 4.6