Starbox – the Author Box for Humans - Version 3.4.4

Version Description

  • Added hooks for profile image "abh_author_profile_image" to load different images for an author
  • Added hooks for latest posts query "abh_author_latest_posts" to add custom query in the Latest Posts section
  • Added compatibility with WP 5.8.x
Download this release

Release Info

Developer cifi
Plugin Icon 128x128 Starbox – the Author Box for Humans
Version 3.4.4
Comparing to
See all releases

Code changes from version 3.4.3 to 3.4.4

Files changed (4) hide show
  1. controllers/Frontend.php +0 -1
  2. models/Frontend.php +12 -4
  3. readme.txt +8 -2
  4. starbox.php +2 -2
controllers/Frontend.php CHANGED
@@ -93,7 +93,6 @@ class ABH_Controllers_Frontend extends ABH_Classes_FrontController {
93
  break; //don't show multiple authors in post list
94
  }
95
  }
96
- $str;
97
  } else {
98
  $str = ABH_Classes_ObjController::getController('ABH_Controllers_Frontend')->showStarboximg((int)$id);
99
  }
93
  break; //don't show multiple authors in post list
94
  }
95
  }
 
96
  } else {
97
  $str = ABH_Classes_ObjController::getController('ABH_Controllers_Frontend')->showStarboximg((int)$id);
98
  }
models/Frontend.php CHANGED
@@ -82,10 +82,13 @@ class ABH_Models_Frontend {
82
  */
83
  public function getProfileImage() {
84
  if (isset($this->details['abh_gravatar']) && $this->details['abh_gravatar'] <> '' && file_exists(_ABH_GRAVATAR_DIR_ . $this->details['abh_gravatar'])) {
85
- return '<img src="' . _ABH_GRAVATAR_URL_ . $this->details['abh_gravatar'] . '" class="photo" width="' . ABH_IMAGESIZE . '" alt="' . $this->author->display_name . '" />';
86
  } else {
87
- return get_avatar($this->author->ID, ABH_IMAGESIZE);
88
  }
 
 
 
89
  }
90
 
91
  /**
@@ -131,7 +134,9 @@ class ABH_Models_Frontend {
131
  <div class="description note abh_description" ' . (($this->single) ? 'itemprop="description"' : '') . ' ' . ((ABH_Classes_Tools::getOption('abh_descfontsize') <> 'default') ? 'style="font-size:' . ABH_Classes_Tools::getOption('abh_descfontsize') . ' !important;"' : '') . '>' . ((isset($this->details['abh_extra_description']) && $this->details['abh_extra_description'] <> '') ? nl2br($this->details['abh_extra_description']) : nl2br($this->author->user_description)) . '</div>
132
  </div>
133
  </section>';
134
- return $content;
 
 
135
  }
136
 
137
  /**
@@ -166,7 +171,9 @@ class ABH_Models_Frontend {
166
  <div class="abh_description note" >' . $this->getLatestPosts() . '</div>
167
  </div>
168
  </section>';
169
- return $content;
 
 
170
  }
171
 
172
  /**
@@ -256,6 +263,7 @@ class ABH_Models_Frontend {
256
  $content = '<ul>';
257
  $latest_posts = new WP_Query(array('posts_per_page' => ABH_Classes_Tools::getOption('anh_crt_posts'), 'author' => $this->author->ID));
258
 
 
259
 
260
  while ($latest_posts->have_posts()) : $latest_posts->the_post();
261
 
82
  */
83
  public function getProfileImage() {
84
  if (isset($this->details['abh_gravatar']) && $this->details['abh_gravatar'] <> '' && file_exists(_ABH_GRAVATAR_DIR_ . $this->details['abh_gravatar'])) {
85
+ $image = '<img src="' . _ABH_GRAVATAR_URL_ . $this->details['abh_gravatar'] . '" class="photo" width="' . ABH_IMAGESIZE . '" alt="' . $this->author->display_name . '" />';
86
  } else {
87
+ $image = get_avatar($this->author->ID, ABH_IMAGESIZE);
88
  }
89
+
90
+ return apply_filters('abh_author_profile_image', $image);
91
+
92
  }
93
 
94
  /**
134
  <div class="description note abh_description" ' . (($this->single) ? 'itemprop="description"' : '') . ' ' . ((ABH_Classes_Tools::getOption('abh_descfontsize') <> 'default') ? 'style="font-size:' . ABH_Classes_Tools::getOption('abh_descfontsize') . ' !important;"' : '') . '>' . ((isset($this->details['abh_extra_description']) && $this->details['abh_extra_description'] <> '') ? nl2br($this->details['abh_extra_description']) : nl2br($this->author->user_description)) . '</div>
135
  </div>
136
  </section>';
137
+
138
+ return apply_filters('abh_author_description_html', $content);
139
+
140
  }
141
 
142
  /**
171
  <div class="abh_description note" >' . $this->getLatestPosts() . '</div>
172
  </div>
173
  </section>';
174
+
175
+ return apply_filters('abh_author_latest_posts_html', $content);
176
+
177
  }
178
 
179
  /**
263
  $content = '<ul>';
264
  $latest_posts = new WP_Query(array('posts_per_page' => ABH_Classes_Tools::getOption('anh_crt_posts'), 'author' => $this->author->ID));
265
 
266
+ $latest_posts = apply_filters('abh_author_latest_posts', $latest_posts);
267
 
268
  while ($latest_posts->have_posts()) : $latest_posts->the_post();
269
 
readme.txt CHANGED
@@ -1,8 +1,9 @@
1
  ==== Starbox - the Author Box for Humans ====
2
  Contributors: cifi, calinvingan, florinmuresan
3
  Tags: author,author box,author profile fields,author social icons,bio,profile fields,
4
- Requires at least: 4.0
5
- Tested up to: 5.7
 
6
  Stable tag: trunk
7
  Donate link: http://starbox.squirrly.co/starbox-the-author-box-for-humans/
8
  License: GPLv2 or later
@@ -102,6 +103,11 @@ Download it from the Wordpress directory and try it out. Having an author box af
102
  16. Author Box with Drop-Down Theme
103
 
104
  == Changelog ==
 
 
 
 
 
105
  = 3.4.3 =
106
  * Added compatibility with WP 5.7.2
107
 
1
  ==== Starbox - the Author Box for Humans ====
2
  Contributors: cifi, calinvingan, florinmuresan
3
  Tags: author,author box,author profile fields,author social icons,bio,profile fields,
4
+ Requires at least: 4.3
5
+ Tested up to: 5.8
6
+ Requires PHP: 5.6
7
  Stable tag: trunk
8
  Donate link: http://starbox.squirrly.co/starbox-the-author-box-for-humans/
9
  License: GPLv2 or later
103
  16. Author Box with Drop-Down Theme
104
 
105
  == Changelog ==
106
+ = 3.4.4 =
107
+ * Added hooks for profile image "abh_author_profile_image" to load different images for an author
108
+ * Added hooks for latest posts query "abh_author_latest_posts" to add custom query in the Latest Posts section
109
+ * Added compatibility with WP 5.8.x
110
+
111
  = 3.4.3 =
112
  * Added compatibility with WP 5.7.2
113
 
starbox.php CHANGED
@@ -6,7 +6,7 @@
6
  * Plugin Name: StarBox
7
  * Author: Squirrly UK
8
  * Description: Starbox is the Author Box for Humans. Professional Themes to choose from, HTML5, Social Media Profiles, Google Authorship
9
- * Version: 3.4.3
10
  * Author URI: https://www.squirrly.co/wordpress-seo-by-squirrly
11
  * License: GPLv2 or later
12
  * License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
@@ -25,7 +25,7 @@
25
  */
26
 
27
  /* SET THE CURRENT VERSION ABOVE AND BELOW */
28
- define('ABH_VERSION', '3.4.3');
29
 
30
  if (!defined('ABHP_VERSION')) {
31
 
6
  * Plugin Name: StarBox
7
  * Author: Squirrly UK
8
  * Description: Starbox is the Author Box for Humans. Professional Themes to choose from, HTML5, Social Media Profiles, Google Authorship
9
+ * Version: 3.4.4
10
  * Author URI: https://www.squirrly.co/wordpress-seo-by-squirrly
11
  * License: GPLv2 or later
12
  * License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
25
  */
26
 
27
  /* SET THE CURRENT VERSION ABOVE AND BELOW */
28
+ define('ABH_VERSION', '3.4.4');
29
 
30
  if (!defined('ABHP_VERSION')) {
31