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

Version Description

  • Related Content
    • Related Content now excludes attachments automatically
    • You can now exclude any of your posts from Related Content via metabox options
Download this release

Release Info

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

Code changes from version 7.0.4.7 to 7.0.4.8

admin.php CHANGED
@@ -133,7 +133,7 @@ class ShareaholicAdmin {
133
  }
134
 
135
  /**
136
- * For each of the things that a user can disable per post,
137
  * we iterate through and turn add the post meta, or make it false
138
  * if it *used* to be true, but did not come through in $_POST
139
  * (because unchecked boxes are not submitted).
@@ -144,6 +144,7 @@ class ShareaholicAdmin {
144
  foreach (array(
145
  'disable_share_buttons',
146
  'disable_open_graph_tags',
 
147
  'disable_recommendations'
148
  ) as $attribute) {
149
  $key = 'shareaholic_' . $attribute;
133
  }
134
 
135
  /**
136
+ * For each of the things that a user can disable or exclude per post,
137
  * we iterate through and turn add the post meta, or make it false
138
  * if it *used* to be true, but did not come through in $_POST
139
  * (because unchecked boxes are not submitted).
144
  foreach (array(
145
  'disable_share_buttons',
146
  'disable_open_graph_tags',
147
+ 'exclude_recommendations',
148
  'disable_recommendations'
149
  ) as $attribute) {
150
  $key = 'shareaholic_' . $attribute;
public.php CHANGED
@@ -140,7 +140,7 @@ class ShareaholicPublic {
140
  $keywords .= ', '.stripslashes(get_post_meta($post->ID, '_aioseop_keywords', true));
141
 
142
  // Encode & trim appropriately
143
- $keywords = trim(strtolower(trim(htmlspecialchars(htmlspecialchars_decode($keywords), ENT_QUOTES))), ",");
144
 
145
  // Unique keywords
146
  $keywords_array = array();
@@ -171,19 +171,24 @@ class ShareaholicPublic {
171
  if (!empty($article_modified_time)) {
172
  echo "<meta name='shareaholic:article_modified_time' content='" . date('c', $article_modified_time) . "' />\n";
173
  }
174
-
175
  // Article Visibility
176
  $article_visibility = $post->post_status;
177
  $article_password = $post->post_password;
178
 
179
  if ($article_visibility == 'draft' || $article_visibility == 'auto-draft'){
180
  $article_visibility = 'draft';
181
- } else if ($article_visibility == 'private' || $post->post_password != '') {
182
  $article_visibility = 'private';
183
  } else {
184
  $article_visibility = NULL;
185
  }
186
-
 
 
 
 
 
187
  if (!empty($article_visibility)) {
188
  echo "<meta name='shareaholic:article_visibility' content='" . $article_visibility . "' />\n";
189
  }
140
  $keywords .= ', '.stripslashes(get_post_meta($post->ID, '_aioseop_keywords', true));
141
 
142
  // Encode & trim appropriately
143
+ $keywords = trim(trim(strtolower(trim(htmlspecialchars(htmlspecialchars_decode($keywords), ENT_QUOTES))), ","));
144
 
145
  // Unique keywords
146
  $keywords_array = array();
171
  if (!empty($article_modified_time)) {
172
  echo "<meta name='shareaholic:article_modified_time' content='" . date('c', $article_modified_time) . "' />\n";
173
  }
174
+
175
  // Article Visibility
176
  $article_visibility = $post->post_status;
177
  $article_password = $post->post_password;
178
 
179
  if ($article_visibility == 'draft' || $article_visibility == 'auto-draft'){
180
  $article_visibility = 'draft';
181
+ } else if ($article_visibility == 'private' || $post->post_password != '' || is_attachment()) {
182
  $article_visibility = 'private';
183
  } else {
184
  $article_visibility = NULL;
185
  }
186
+
187
+ // Lookup Metabox value
188
+ if (get_post_meta($post->ID, 'shareaholic_exclude_recommendations', true)) {
189
+ $article_visibility = 'private';
190
+ }
191
+
192
  if (!empty($article_visibility)) {
193
  echo "<meta name='shareaholic:article_visibility' content='" . $article_visibility . "' />\n";
194
  }
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: shareaholic
3
  Tags: sexybookmarks, shareaholic, shareholic, facebook, twitter, linkedin, URL Shortener, bitly, tinyurl, Goo.gl, Google+1, Google Analytics, Google Plus, Google, Instapaper, Wish List, Digg, Gmail, Google Bookmarks, Translate, Tumblr, AIM, Yahoo Messenger, Delicious, StumbleUpon, mister wong, evernote, add this, addtoany, share this, sharethis, share and follow, share and enjoy, sharing is sexy, sharing is caring, yahoo, reddit, hackernews, tweet button, twitter button, fark, buffer, myspace, orkut, netlog, hubspot, weheartit, printfriendly, yammer, wanelo, pinterest, google translate, bookmarks, social, email button, social share, socialize, sociable, sharebar, bookmark button, share button, social bookmarking, bookmarks menu, bookmarking, share, seo, analytics, stats, sharing, facebook like, facebook recommend, WPMU, mutisite, shortcode, yaarp, yarpp, nrelate, outbrain, linkwithin, related content, related posts, related, popular posts, popular, thumbnails, recommendations
4
  Requires at least: 2.7
5
  Tested up to: 3.6.1
6
- Stable tag: 7.0.4.7
7
 
8
  Adds an attractive social bookmarking menu and related content widget to your posts, pages, index, or any combination of the three.
9
 
@@ -148,6 +148,11 @@ Please see here: [Usage & Installation Instructions](https://shareaholic.com/too
148
 
149
  == Changelog ==
150
 
 
 
 
 
 
151
  = 7.0.4.7 =
152
  * Support for additional Shareaholic content meta tags
153
  * shareaholic:article_visibility
@@ -959,6 +964,9 @@ Please see here: [Usage & Installation Instructions](https://shareaholic.com/too
959
 
960
  == Upgrade Notice ==
961
 
 
 
 
962
  = 7.0.4.7 =
963
  * Support for additional Shareaholic content meta tags! More improvements for Related Content.
964
 
3
  Tags: sexybookmarks, shareaholic, shareholic, facebook, twitter, linkedin, URL Shortener, bitly, tinyurl, Goo.gl, Google+1, Google Analytics, Google Plus, Google, Instapaper, Wish List, Digg, Gmail, Google Bookmarks, Translate, Tumblr, AIM, Yahoo Messenger, Delicious, StumbleUpon, mister wong, evernote, add this, addtoany, share this, sharethis, share and follow, share and enjoy, sharing is sexy, sharing is caring, yahoo, reddit, hackernews, tweet button, twitter button, fark, buffer, myspace, orkut, netlog, hubspot, weheartit, printfriendly, yammer, wanelo, pinterest, google translate, bookmarks, social, email button, social share, socialize, sociable, sharebar, bookmark button, share button, social bookmarking, bookmarks menu, bookmarking, share, seo, analytics, stats, sharing, facebook like, facebook recommend, WPMU, mutisite, shortcode, yaarp, yarpp, nrelate, outbrain, linkwithin, related content, related posts, related, popular posts, popular, thumbnails, recommendations
4
  Requires at least: 2.7
5
  Tested up to: 3.6.1
6
+ Stable tag: 7.0.4.8
7
 
8
  Adds an attractive social bookmarking menu and related content widget to your posts, pages, index, or any combination of the three.
9
 
148
 
149
  == Changelog ==
150
 
151
+ = 7.0.4.8 =
152
+ * Related Content
153
+ * Related Content now excludes attachments automatically
154
+ * You can now exclude *any* of your posts from Related Content via metabox options
155
+
156
  = 7.0.4.7 =
157
  * Support for additional Shareaholic content meta tags
158
  * shareaholic:article_visibility
964
 
965
  == Upgrade Notice ==
966
 
967
+ = 7.0.4.8 =
968
+ * Related Content now excludes attachments automatically. You can now also exclude *any* of your posts from Related Content via post and page metabox options.
969
+
970
  = 7.0.4.7 =
971
  * Support for additional Shareaholic content meta tags! More improvements for Related Content.
972
 
shareaholic.php CHANGED
@@ -3,14 +3,14 @@
3
  * The main file!
4
  *
5
  * @package shareaholic
6
- * @version 7.0.4.7
7
  */
8
 
9
  /*
10
  Plugin Name: Shareaholic | share buttons, analytics, related content
11
  Plugin URI: https://shareaholic.com/publishers/
12
  Description: Whether you want to get people sharing, grow your fans, make money, or know who's reading your content, Shareaholic will help you get it done. See <a href="admin.php?page=shareaholic-settings">configuration panel</a> for more settings.
13
- Version: 7.0.4.7
14
  Author: Shareaholic
15
  Author URI: https://shareaholic.com
16
  Text Domain: shareaholic
@@ -53,7 +53,7 @@ require_once(SHAREAHOLIC_DIR . '/deprecation.php');
53
  */
54
  class Shareaholic {
55
  const URL = 'https://shareaholic.com';
56
- const VERSION = '7.0.4.7';
57
  /**
58
  * Starts off as false so that ::get_instance() returns
59
  * a new instance.
3
  * The main file!
4
  *
5
  * @package shareaholic
6
+ * @version 7.0.4.8
7
  */
8
 
9
  /*
10
  Plugin Name: Shareaholic | share buttons, analytics, related content
11
  Plugin URI: https://shareaholic.com/publishers/
12
  Description: Whether you want to get people sharing, grow your fans, make money, or know who's reading your content, Shareaholic will help you get it done. See <a href="admin.php?page=shareaholic-settings">configuration panel</a> for more settings.
13
+ Version: 7.0.4.8
14
  Author: Shareaholic
15
  Author URI: https://shareaholic.com
16
  Text Domain: shareaholic
53
  */
54
  class Shareaholic {
55
  const URL = 'https://shareaholic.com';
56
+ const VERSION = '7.0.4.8';
57
  /**
58
  * Starts off as false so that ::get_instance() returns
59
  * a new instance.
templates/meta_boxes.php CHANGED
@@ -18,6 +18,16 @@
18
 
19
  <br>
20
 
 
 
 
 
 
 
 
 
 
 
21
  <label>
22
  <input type='checkbox' name='shareaholic[disable_open_graph_tags]'
23
  <?php if (get_post_meta($post->ID, 'shareaholic_disable_open_graph_tags', true)) { ?>
18
 
19
  <br>
20
 
21
+ <label>
22
+ <input type='checkbox' name='shareaholic[exclude_recommendations]'
23
+ <?php if (get_post_meta($post->ID, 'shareaholic_exclude_recommendations', true)) { ?>
24
+ checked
25
+ <?php } ?>>
26
+ <?php echo sprintf(__('Exclude from Related Content', 'shareaholic')); ?>
27
+ </label>
28
+
29
+ <br>
30
+
31
  <label>
32
  <input type='checkbox' name='shareaholic[disable_open_graph_tags]'
33
  <?php if (get_post_meta($post->ID, 'shareaholic_disable_open_graph_tags', true)) { ?>
templates/settings.php CHANGED
@@ -23,7 +23,7 @@ window.verification_key = '<?php echo $settings['verification_key'] ?>'
23
  </fieldset>
24
 
25
  <fieldset class="app"><legend><h2><img src="<?php echo SHAREAHOLIC_ASSET_DIR; ?>img/sharebuttons@2x.png" height=32 width=32 /> <?php echo sprintf(__('Share Buttons', 'shareaholic')); ?></h2></legend>
26
- <span class="helper"><i class="icon-star"></i> <?php echo sprintf(__('Pick where you want your buttons to be displayed. Click "Edit" to customize look & feel, themes, share counters, alignment, etc.', 'shareaholic')); ?></span>
27
 
28
  <?php foreach(array('post', 'page', 'index', 'category') as $page_type) { ?>
29
  <fieldset id='sharebuttons'>
@@ -50,7 +50,7 @@ window.verification_key = '<?php echo $settings['verification_key'] ?>'
50
  <div class='clear'></div>
51
 
52
  <fieldset class="app"><legend><h2><img src="<?php echo SHAREAHOLIC_ASSET_DIR; ?>img/related_content@2x.png" height=32 width=32 /> <?php echo sprintf(__('Related Content / Recommendations', 'shareaholic')); ?></h2></legend>
53
- <span class="helper"><i class="icon-star"></i> <?php echo sprintf(__('Pick where you want Related Content to be displayed. Click "Edit" to customize look & feel, themes, block lists, etc.', 'shareaholic')); ?></span>
54
  <?php foreach(array('post', 'page', 'index', 'category') as $page_type) { ?>
55
  <?php if (isset($settings['location_name_ids']['recommendations']["{$page_type}_{$position}_content"])) { ?>
56
  <?php $location_id = $settings['location_name_ids']['recommendations']["{$page_type}_{$position}_content"] ?>
23
  </fieldset>
24
 
25
  <fieldset class="app"><legend><h2><img src="<?php echo SHAREAHOLIC_ASSET_DIR; ?>img/sharebuttons@2x.png" height=32 width=32 /> <?php echo sprintf(__('Share Buttons', 'shareaholic')); ?></h2></legend>
26
+ <span class="helper"><i class="icon-star"></i> <?php echo sprintf(__('Pick where you want your buttons to be displayed. Click "Customize" to customize look & feel, themes, share counters, alignment, etc.', 'shareaholic')); ?></span>
27
 
28
  <?php foreach(array('post', 'page', 'index', 'category') as $page_type) { ?>
29
  <fieldset id='sharebuttons'>
50
  <div class='clear'></div>
51
 
52
  <fieldset class="app"><legend><h2><img src="<?php echo SHAREAHOLIC_ASSET_DIR; ?>img/related_content@2x.png" height=32 width=32 /> <?php echo sprintf(__('Related Content / Recommendations', 'shareaholic')); ?></h2></legend>
53
+ <span class="helper"><i class="icon-star"></i> <?php echo sprintf(__('Pick where you want Related Content to be displayed. Click "Customize" to customize look & feel, themes, block lists, etc.', 'shareaholic')); ?></span>
54
  <?php foreach(array('post', 'page', 'index', 'category') as $page_type) { ?>
55
  <?php if (isset($settings['location_name_ids']['recommendations']["{$page_type}_{$position}_content"])) { ?>
56
  <?php $location_id = $settings['location_name_ids']['recommendations']["{$page_type}_{$position}_content"] ?>