WordPress Social Tools, Related Posts, Monetization – Shareaholic - Version 8.13.12

Version Description

We update this plugin regularly so we can make it better for you. Update to the latest version for all of the available features and improvements. Thanks for using Shareaholic!

Download this release

Release Info

Developer shareaholic
Plugin Icon 128x128 WordPress Social Tools, Related Posts, Monetization – Shareaholic
Version 8.13.12
Comparing to
See all releases

Code changes from version 8.13.11 to 8.13.12

Files changed (3) hide show
  1. public.php +30 -29
  2. readme.txt +8 -2
  3. shareaholic.php +3 -3
public.php CHANGED
@@ -128,51 +128,52 @@ class ShareaholicPublic {
128
  */
129
  private static function draw_keywords_meta_tag() {
130
  if (in_array(ShareaholicUtilities::page_type(), array('page', 'post'))) {
131
- global $post;
132
- $keywords = '';
133
 
 
 
134
  if (is_attachment() && $post->post_parent){
135
  $id = $post->post_parent;
136
  } else {
137
  $id = $post->ID;
138
  }
139
-
140
  // Get post tags
141
- $keywords = implode(', ' , ShareaholicUtilities::permalink_keywords($id));
142
 
143
  // Get post categories
144
  $categories_array = get_the_category($id);
145
- $categories = '';
146
- $separator = ', ';
147
- $output = '';
148
-
149
  if($categories_array) {
150
- foreach($categories_array as $category) {
151
- if ($category->cat_name != "Uncategorized") {
152
- $output .= $separator.$category->cat_name;
153
- }
154
- }
155
- $categories = trim($output, $separator);
156
- }
157
 
158
- // Merge post tags, categories and post type
159
- if ($keywords != ''){
160
- $keywords .= ', '.$categories.', '.$post->post_type;
161
- } else {
162
- $keywords .= $categories.', '.$post->post_type;
 
 
163
  }
164
-
165
- // Encode, lowercase & trim appropriately
166
- $keywords = ShareaholicUtilities::normalize_keywords($keywords);
167
 
168
  // Unique keywords
169
- $keywords_array = array();
170
- $keywords_array = explode(', ', $keywords);
171
- $keywords_array = array_unique($keywords_array);
172
- $keywords_unique_list = implode(', ', $keywords_array);
 
 
 
 
173
 
174
- if ($keywords_unique_list != '' && $keywords_unique_list != "array") {
175
- echo "<meta name='shareaholic:keywords' content='" . $keywords_unique_list . "' />\n";
176
  }
177
  }
178
  }
128
  */
129
  private static function draw_keywords_meta_tag() {
130
  if (in_array(ShareaholicUtilities::page_type(), array('page', 'post'))) {
 
 
131
 
132
+ global $post;
133
+ $tags = array();
134
  if (is_attachment() && $post->post_parent){
135
  $id = $post->post_parent;
136
  } else {
137
  $id = $post->ID;
138
  }
139
+
140
  // Get post tags
141
+ $tags = preg_filter('/^/', 'tag:', ShareaholicUtilities::permalink_keywords($id));
142
 
143
  // Get post categories
144
  $categories_array = get_the_category($id);
145
+ $categories = array();
146
+
 
 
147
  if($categories_array) {
148
+ foreach($categories_array as $category) {
149
+ if ($category->cat_name != "Uncategorized") {
150
+ array_push($categories, $category->cat_name);
151
+ }
152
+ }
153
+ $categories = preg_filter('/^/', 'cat:', $categories);
154
+ }
155
 
156
+ $keywords_array = array();
157
+ $keywords = '';
158
+
159
+ // Merge + add page type
160
+ $keywords_array = array_merge($tags, $categories);
161
+ if ($post->post_type) {
162
+ array_push($keywords_array, 'type:'.$post->post_type);
163
  }
 
 
 
164
 
165
  // Unique keywords
166
+ $keywords_array = array_unique($keywords_array);
167
+
168
+ if (!empty($keywords_array[0])){
169
+ $keywords = implode(', ' , $keywords_array);
170
+
171
+ // Encode, lowercase & trim appropriately
172
+ $keywords = ShareaholicUtilities::normalize_keywords($keywords);
173
+ }
174
 
175
+ if ($keywords != '' && $keywords != "array") {
176
+ echo "<meta name='shareaholic:keywords' content='" . $keywords . "' />\n";
177
  }
178
  }
179
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: social, social sharing, google analytics, pinterest, twitter, share butto
4
  Requires at least: 3.7
5
  Tested up to: 5.3
6
  Requires PHP: 5.2
7
- Stable tag: 8.13.11
8
 
9
 
10
  Boost Audience Engagement with Award Winning Speed Optimized Social Tools: Share Buttons, Related Posts, Monetization & Google Analytics.
@@ -310,6 +310,12 @@ The default Shareaholic thumbnail width is 640px with dynamic height and no crop
310
  Each time you change Shareaholic's thumbnail dimensions like this, you will probably want to have WordPress regenerate appropriate sized thumbnails for all of your images. We highly recommend the [Regenerate Thumbnails](https://wordpress.org/plugins/regenerate-thumbnails/) plugin for this purpose.
311
 
312
  == Changelog ==
 
 
 
 
 
 
313
  = 8.13.11 (2019-11-06) =
314
  * Support for WordPress 5.3+
315
 
@@ -1003,7 +1009,7 @@ Each time you change Shareaholic's thumbnail dimensions like this, you will prob
1003
  * Show Related Posts data status
1004
 
1005
  == Upgrade Notice ==
1006
- = 8.13.11 =
1007
  We update this plugin regularly so we can make it better for you. Update to the latest version for all of the available features and improvements. Thanks for using Shareaholic!
1008
 
1009
  = 8.12.1 =
4
  Requires at least: 3.7
5
  Tested up to: 5.3
6
  Requires PHP: 5.2
7
+ Stable tag: 8.13.12
8
 
9
 
10
  Boost Audience Engagement with Award Winning Speed Optimized Social Tools: Share Buttons, Related Posts, Monetization & Google Analytics.
310
  Each time you change Shareaholic's thumbnail dimensions like this, you will probably want to have WordPress regenerate appropriate sized thumbnails for all of your images. We highly recommend the [Regenerate Thumbnails](https://wordpress.org/plugins/regenerate-thumbnails/) plugin for this purpose.
311
 
312
  == Changelog ==
313
+ = 8.13.12 (2019-12-04) =
314
+ * Feature: Disambiguate between page type, category and page tags for more control over the Related Posts algorithm
315
+ * Feature: Share Buttons are now ADA (Americans with Disabilities Act) accessiblity standards compliant
316
+ * Enhancement: Various Share Buttons for Images App improvements
317
+ * Enhancement: More efficient Google Font loading for headlines
318
+
319
  = 8.13.11 (2019-11-06) =
320
  * Support for WordPress 5.3+
321
 
1009
  * Show Related Posts data status
1010
 
1011
  == Upgrade Notice ==
1012
+ = 8.13.12 =
1013
  We update this plugin regularly so we can make it better for you. Update to the latest version for all of the available features and improvements. Thanks for using Shareaholic!
1014
 
1015
  = 8.12.1 =
shareaholic.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Shareaholic - Grow and Engage Your Audience
4
  Plugin URI: https://www.shareaholic.com/website-tools/
5
  Description: Shareaholic’s official WordPress plugin allows you to add Award-Winning Social Share Buttons, Related Posts, Content Analytics, Ad Monetization, and more to your website.
6
- Version: 8.13.11
7
  Author: Shareaholic
8
  Author URI: https://www.shareaholic.com
9
  Text Domain: shareaholic
@@ -14,7 +14,7 @@ Domain Path: /languages
14
  * The main file!
15
  *
16
  * @package shareaholic
17
- * @version 8.13.11
18
  */
19
 
20
  /**
@@ -72,7 +72,7 @@ if (!class_exists('Shareaholic')) {
72
  const API_URL = 'https://web.shareaholic.com'; // uses static IPs for firewall whitelisting
73
  const CM_API_URL = 'https://cm-web.shareaholic.com'; // uses static IPs for firewall whitelisting
74
 
75
- const VERSION = '8.13.11';
76
 
77
  /**
78
  * Starts off as false so that ::get_instance() returns
3
  Plugin Name: Shareaholic - Grow and Engage Your Audience
4
  Plugin URI: https://www.shareaholic.com/website-tools/
5
  Description: Shareaholic’s official WordPress plugin allows you to add Award-Winning Social Share Buttons, Related Posts, Content Analytics, Ad Monetization, and more to your website.
6
+ Version: 8.13.12
7
  Author: Shareaholic
8
  Author URI: https://www.shareaholic.com
9
  Text Domain: shareaholic
14
  * The main file!
15
  *
16
  * @package shareaholic
17
+ * @version 8.13.12
18
  */
19
 
20
  /**
72
  const API_URL = 'https://web.shareaholic.com'; // uses static IPs for firewall whitelisting
73
  const CM_API_URL = 'https://cm-web.shareaholic.com'; // uses static IPs for firewall whitelisting
74
 
75
+ const VERSION = '8.13.12';
76
 
77
  /**
78
  * Starts off as false so that ::get_instance() returns