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

Version Description

  • Miscellaneous bug fixes and performance enhancements to Related Content
  • New Admin Bar options!
Download this release

Release Info

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

Code changes from version 7.1.0.0 to 7.2.0.0

admin.php CHANGED
@@ -191,8 +191,8 @@ class ShareaholicAdmin {
191
  SHAREAHOLIC_ASSET_DIR . 'img/shareaholic_16x16_2.png'
192
  );
193
  add_submenu_page('shareaholic-settings',
194
- 'Available Apps',
195
- 'Available Apps',
196
  'manage_options',
197
  'shareaholic-settings',
198
  array('ShareaholicAdmin', 'admin')
191
  SHAREAHOLIC_ASSET_DIR . 'img/shareaholic_16x16_2.png'
192
  );
193
  add_submenu_page('shareaholic-settings',
194
+ 'App Manager',
195
+ 'App Manager',
196
  'manage_options',
197
  'shareaholic-settings',
198
  array('ShareaholicAdmin', 'admin')
content_manager.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * File for the ShareaholicContentManager class.
4
+ *
5
+ * @package shareaholic
6
+ */
7
+
8
+ /**
9
+ * An interface to the Shareaholic Content Manager API's
10
+ *
11
+ * @package shareaholic
12
+ */
13
+ class ShareaholicContentManager {
14
+
15
+ }
16
+
17
+ ?>
readme.txt CHANGED
@@ -3,26 +3,29 @@ 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.8
6
- Stable tag: 7.1.0.0
7
 
8
  Adds an attractive social bookmarking menu and related content widget to your posts, pages, index, or any combination of the three.
9
 
10
  == Description ==
11
 
12
- Shareaholic has proven time and time again to be an extremely useful and successful tool in getting your readers to actually **discover** and **submit your articles** to numerous social bookmarking sites.
13
-
14
- Our sole aim was to stray away from the "in the box" thinking behind most social bookmarking plugins, and add a little flair that would entice your readers, rather than deterring them with microscopic icons that get lost in pages heavy laden with content.
15
 
16
  = Recent Updates =
17
-
18
- * Recommendations & Related Content - Increase reader engagement and pageviews by highlighting related content from across your site
19
- * Social Analytics - Actionable and easy to understand
20
  * Full support for Facebook, Twitter, Google Plus, Pinterest, etc
21
  * Share Counters for Twitter, Facebook, LinkedIn, etc
22
  * Official support for Google's URL shortener (goo.gl) and Google Analytics
23
- * Utilizes the [Share API](https://shareaholic.com/api/)
24
  * Localized in 15+ languages
25
 
 
 
 
 
 
 
26
  = Recommendations / Related Content =
27
 
28
  Increase pageviews and engagement by highlighting relevant content from across your site to your readers who would not otherwise encounter them. Shareaholic is not just yet another related posts content plugin. It involves a simple installation that's easy to update and tweak. You'll be using well-engineered and optimized code that won't slow or block your pages from loading. You can choose between several themes to match your site's design and customize every pixel if you'd like. Optimized for mobile devices like the iPhone, iPod touch, iPad, Android mobile phones, and more!
@@ -148,6 +151,10 @@ Please see here: [Usage & Installation Instructions](https://shareaholic.com/too
148
 
149
  == Changelog ==
150
 
 
 
 
 
151
  = 7.1.0.0 =
152
  * Shareaholic API's now use endpoints with static IP's. [Instruction on allowing Shareaholic to work with your firewall](https://blog.shareaholic.com/shareaholic-hosting-faq/).
153
 
@@ -991,6 +998,9 @@ Please see here: [Usage & Installation Instructions](https://shareaholic.com/too
991
 
992
  == Upgrade Notice ==
993
 
 
 
 
994
  = 7.1.0.0 =
995
  Shareaholic API's now use endpoints with static IP's. [Instruction on allowing Shareaholic to work with your firewall](https://blog.shareaholic.com/shareaholic-hosting-faq/).
996
 
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.8
6
+ Stable tag: 7.2.0.0
7
 
8
  Adds an attractive social bookmarking menu and related content widget to your posts, pages, index, or any combination of the three.
9
 
10
  == Description ==
11
 
12
+ Three powerful apps to amplify your content and create conversations, across the web. Shareaholic has proven time and time again to be an extremely useful and successful tool in getting your readers to actually **discover** and **submit your articles** to numerous social bookmarking sites.
 
 
13
 
14
  = Recent Updates =
15
+ * [Shareable Images](https://blog.shareaholic.com/image-share-buttons/) (share buttons for images)
16
+ * Recommendations & Related Content - Increases engagement and time on site by highlighting relevant content that may not otherwise be discovered from across your site.
17
+ * Social Analytics - Provides you with important actionable metrics including insights into how your content is performing, who's sharing it, and through which channels.
18
  * Full support for Facebook, Twitter, Google Plus, Pinterest, etc
19
  * Share Counters for Twitter, Facebook, LinkedIn, etc
20
  * Official support for Google's URL shortener (goo.gl) and Google Analytics
 
21
  * Localized in 15+ languages
22
 
23
+ = Share Buttons =
24
+
25
+ Our aim was to stray away from the "in the box" thinking behind most social bookmarking plugins, and add a little flair that would entice your readers, rather than deterring them with microscopic icons that get lost in pages heavy laden with content.
26
+
27
+ [Share Buttons](https://shareaholic.com/publishers/sharing/) (demo)
28
+
29
  = Recommendations / Related Content =
30
 
31
  Increase pageviews and engagement by highlighting relevant content from across your site to your readers who would not otherwise encounter them. Shareaholic is not just yet another related posts content plugin. It involves a simple installation that's easy to update and tweak. You'll be using well-engineered and optimized code that won't slow or block your pages from loading. You can choose between several themes to match your site's design and customize every pixel if you'd like. Optimized for mobile devices like the iPhone, iPod touch, iPad, Android mobile phones, and more!
151
 
152
  == Changelog ==
153
 
154
+ = 7.2.0.0 =
155
+ * Miscellaneous bug fixes and performance enhancements to Related Content
156
+ * New Admin Bar options!
157
+
158
  = 7.1.0.0 =
159
  * Shareaholic API's now use endpoints with static IP's. [Instruction on allowing Shareaholic to work with your firewall](https://blog.shareaholic.com/shareaholic-hosting-faq/).
160
 
998
 
999
  == Upgrade Notice ==
1000
 
1001
+ = 7.2.0.0 =
1002
+ New Admin Bar options + miscellaneous bug fixes and performance enhancements to Related Content
1003
+
1004
  = 7.1.0.0 =
1005
  Shareaholic API's now use endpoints with static IP's. [Instruction on allowing Shareaholic to work with your firewall](https://blog.shareaholic.com/shareaholic-hosting-faq/).
1006
 
shareaholic.php CHANGED
@@ -3,14 +3,14 @@
3
  * The main file!
4
  *
5
  * @package shareaholic
6
- * @version 7.1.0.0
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.1.0.0
14
  Author: Shareaholic
15
  Author URI: https://shareaholic.com
16
  Text Domain: shareaholic
@@ -55,7 +55,7 @@ class Shareaholic {
55
  const URL = 'https://shareaholic.com';
56
  const API_URL = 'https://web.shareaholic.com'; // uses static IPs for firewall whitelisting
57
  const CM_API_URL = 'https://cm-web.shareaholic.com'; // uses static IPs for firewall whitelisting
58
- const VERSION = '7.1.0.0';
59
 
60
  /**
61
  * Starts off as false so that ::get_instance() returns
@@ -93,14 +93,15 @@ class Shareaholic {
93
 
94
  // Check if at least one Related Content location is enabled, if so, notify CM when a new post is published
95
  if (ShareaholicUtilities::should_notify_cm()) {
96
- add_action('publish_post', array('ShareaholicUtilities', 'notify_content_manager'));
97
- add_action('publish_page', array('ShareaholicUtilities', 'notify_content_manager'));
98
  }
99
- add_action('trashed_post', array('ShareaholicUtilities', 'notify_content_manager'));
100
  register_activation_hook(__FILE__, array($this, 'after_activation'));
101
  register_deactivation_hook( __FILE__, array($this, 'deactivate'));
102
  register_uninstall_hook(__FILE__, array('Shareaholic', 'uninstall'));
103
-
 
104
  add_filter('plugin_action_links_'.plugin_basename(__FILE__), 'ShareaholicUtilities::admin_plugin_action_links', -10);
105
  }
106
 
@@ -137,7 +138,6 @@ class Shareaholic {
137
  ShareaholicUtilities::localize();
138
  }
139
 
140
-
141
  /**
142
  * Runs any update code if the version is different from what's
143
  * stored in the settings. This will only run if we are on the
@@ -152,7 +152,7 @@ class Shareaholic {
152
  ShareaholicUtilities::log_event("Upgrade", array ('previous_plugin_version' => ShareaholicUtilities::get_version()));
153
  ShareaholicUtilities::perform_update();
154
  ShareaholicUtilities::set_version(self::VERSION);
155
- ShareaholicUtilities::recommendations_status_check();
156
  }
157
  }
158
  }
@@ -175,7 +175,10 @@ class Shareaholic {
175
  public function after_activation() {
176
  $this->terms_of_service();
177
  ShareaholicUtilities::log_event("Activate");
178
- ShareaholicUtilities::recommendations_status_check();
 
 
 
179
 
180
  if (!ShareaholicUtilities::get_version()) {
181
  ShareaholicUtilities::log_event("Install_Fresh");
3
  * The main file!
4
  *
5
  * @package shareaholic
6
+ * @version 7.2.0.0
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.2.0.0
14
  Author: Shareaholic
15
  Author URI: https://shareaholic.com
16
  Text Domain: shareaholic
55
  const URL = 'https://shareaholic.com';
56
  const API_URL = 'https://web.shareaholic.com'; // uses static IPs for firewall whitelisting
57
  const CM_API_URL = 'https://cm-web.shareaholic.com'; // uses static IPs for firewall whitelisting
58
+ const VERSION = '7.2.0.0';
59
 
60
  /**
61
  * Starts off as false so that ::get_instance() returns
93
 
94
  // Check if at least one Related Content location is enabled, if so, notify CM when a new post is published
95
  if (ShareaholicUtilities::should_notify_cm()) {
96
+ add_action('publish_post', array('ShareaholicUtilities', 'notify_content_manager_singlepage'));
97
+ add_action('publish_page', array('ShareaholicUtilities', 'notify_content_manager_singlepage'));
98
  }
99
+ add_action('trashed_post', array('ShareaholicUtilities', 'notify_content_manager_singlepage'));
100
  register_activation_hook(__FILE__, array($this, 'after_activation'));
101
  register_deactivation_hook( __FILE__, array($this, 'deactivate'));
102
  register_uninstall_hook(__FILE__, array('Shareaholic', 'uninstall'));
103
+
104
+ add_action('wp_before_admin_bar_render', array('ShareaholicUtilities', 'admin_bar_extended'));
105
  add_filter('plugin_action_links_'.plugin_basename(__FILE__), 'ShareaholicUtilities::admin_plugin_action_links', -10);
106
  }
107
 
138
  ShareaholicUtilities::localize();
139
  }
140
 
 
141
  /**
142
  * Runs any update code if the version is different from what's
143
  * stored in the settings. This will only run if we are on the
152
  ShareaholicUtilities::log_event("Upgrade", array ('previous_plugin_version' => ShareaholicUtilities::get_version()));
153
  ShareaholicUtilities::perform_update();
154
  ShareaholicUtilities::set_version(self::VERSION);
155
+ ShareaholicUtilities::notify_content_manager_singledomain();
156
  }
157
  }
158
  }
175
  public function after_activation() {
176
  $this->terms_of_service();
177
  ShareaholicUtilities::log_event("Activate");
178
+
179
+ if (ShareaholicUtilities::has_accepted_terms_of_service() && ShareaholicUtilities::get_option('api_key') != NULL){
180
+ ShareaholicUtilities::notify_content_manager_singledomain();
181
+ }
182
 
183
  if (!ShareaholicUtilities::get_version()) {
184
  ShareaholicUtilities::log_event("Install_Fresh");
templates/advanced_settings.php CHANGED
@@ -43,7 +43,18 @@
43
  <?php } ?>
44
  </fieldset>
45
 
46
- <div class='clear'></div>
 
 
 
 
 
 
 
 
 
 
 
47
 
48
  <form name='reset_settings' method='post' action='<?php echo $action ?>'>
49
  <?php wp_nonce_field($action, 'nonce_field') ?>
43
  <?php } ?>
44
  </fieldset>
45
 
46
+ <div class='clear'></div>
47
+
48
+ <fieldset class="app">
49
+ <legend><h2><?php _e('Shareaholic Site ID', 'shareaholic'); ?></h2></legend>
50
+ <?php if (ShareaholicUtilities::get_option('api_key')){
51
+ echo '<code>'.ShareaholicUtilities::get_option('api_key').'</code>';
52
+ } else {
53
+ _e('Not set.', 'shareaholic');
54
+ } ?>
55
+ </fieldset>
56
+
57
+ <div class='clear'></div>
58
 
59
  <form name='reset_settings' method='post' action='<?php echo $action ?>'>
60
  <?php wp_nonce_field($action, 'nonce_field') ?>
templates/settings.php CHANGED
@@ -1,6 +1,6 @@
1
  <div class='wrap'>
2
  <div id="icon-options-general" class="icon32"></div>
3
- <h2><?php echo sprintf(__('Shareaholic: Available Apps', 'shareaholic')); ?></h2>
4
 
5
  <div class='reveal-modal' id='editing_modal'>
6
  <div id='iframe_container' class='bg-loading-img' allowtransparency='true'></div>
@@ -76,7 +76,7 @@ window.verification_key = '<?php echo $settings['verification_key'] ?>'
76
 
77
  <div class='clear'></div>
78
 
79
- <strong><?php echo sprintf(__('Data Status:', 'shareaholic')); ?></strong>
80
  <?php
81
  $status = ShareaholicUtilities::recommendations_status_check();
82
  if ($status == "processing" || $status == 'unknown'){
1
  <div class='wrap'>
2
  <div id="icon-options-general" class="icon32"></div>
3
+ <h2><?php echo sprintf(__('Shareaholic: App Manager', 'shareaholic')); ?></h2>
4
 
5
  <div class='reveal-modal' id='editing_modal'>
6
  <div id='iframe_container' class='bg-loading-img' allowtransparency='true'></div>
76
 
77
  <div class='clear'></div>
78
 
79
+ <strong><?php echo sprintf(__('Related Content:', 'shareaholic')); ?></strong>
80
  <?php
81
  $status = ShareaholicUtilities::recommendations_status_check();
82
  if ($status == "processing" || $status == 'unknown'){
utilities.php CHANGED
@@ -92,6 +92,49 @@ class ShareaholicUtilities {
92
  $links[] = '<a href="admin.php?page=shareaholic-settings">'.__('Settings', 'shareaholic').'</a>';
93
  return $links;
94
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
95
 
96
  /**
97
  * Returns whether the user has accepted our terms of service.
@@ -784,13 +827,13 @@ class ShareaholicUtilities {
784
  }
785
 
786
  /**
787
- * This is a wrapper for Shareaholic Content Manager API's
788
  *
789
  * @param string $post_id
790
  */
791
- public static function notify_content_manager($post_id = NULL) {
792
  $post_permalink = get_permalink($post_id);
793
-
794
  if ($post_permalink != NULL) {
795
  $cm_single_page_job_url = Shareaholic::CM_API_URL . '/jobs/uber_single_page';
796
  $payload = array (
@@ -803,6 +846,28 @@ class ShareaholicUtilities {
803
  }
804
  }
805
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
806
  /**
807
  * This is a wrapper for the Event API
808
  *
92
  $links[] = '<a href="admin.php?page=shareaholic-settings">'.__('Settings', 'shareaholic').'</a>';
93
  return $links;
94
  }
95
+
96
+ /**
97
+ * Extend the admin bar
98
+ *
99
+ */
100
+
101
+ function admin_bar_extended() {
102
+ global $wp_admin_bar;
103
+
104
+ if(!current_user_can('update_plugins') || !is_admin_bar_showing())
105
+ return;
106
+
107
+ $wp_admin_bar->add_menu(array(
108
+ 'id' => 'wp_shareaholic_adminbar_menu',
109
+ 'title' => __('Shareaholic', 'shareaholic'),
110
+ 'href' => admin_url('admin.php?page=shareaholic-settings'),
111
+ ));
112
+
113
+ /*
114
+ $wp_admin_bar->add_menu(array(
115
+ 'parent' => 'wp_shareaholic_adminbar_menu',
116
+ 'id' => 'wp_shareaholic_adminbar_submenu-analytics',
117
+ 'title' => __('Social Analytics', 'shareaholic'),
118
+ 'href' => 'https://shareaholic.com/publishers/analytics/'. ShareaholicUtilities::get_host(),
119
+ 'meta' => Array( 'target' => '_blank' )
120
+ ));
121
+ */
122
+
123
+ $wp_admin_bar->add_menu(array(
124
+ 'parent' => 'wp_shareaholic_adminbar_menu',
125
+ 'id' => 'wp_shareaholic_adminbar_submenu-settings',
126
+ 'title' => __('App Manager', 'shareaholic'),
127
+ 'href' => admin_url('admin.php?page=shareaholic-settings'),
128
+ ));
129
+
130
+ $wp_admin_bar->add_menu(array(
131
+ 'parent' => 'wp_shareaholic_adminbar_menu',
132
+ 'id' => 'wp_shareaholic_adminbar_submenu-general',
133
+ 'title' => __('General Settings', 'shareaholic'),
134
+ 'href' => 'https://shareaholic.com/publisher_tools/'.self::get_option('api_key').'/edit?verification_key='.self::get_option('verification_key'),
135
+ 'meta' => Array( 'target' => '_blank' )
136
+ ));
137
+ }
138
 
139
  /**
140
  * Returns whether the user has accepted our terms of service.
827
  }
828
 
829
  /**
830
+ * Wrapper for the Shareaholic Content Manager Single Page worker API
831
  *
832
  * @param string $post_id
833
  */
834
+ public static function notify_content_manager_singlepage($post_id = NULL) {
835
  $post_permalink = get_permalink($post_id);
836
+
837
  if ($post_permalink != NULL) {
838
  $cm_single_page_job_url = Shareaholic::CM_API_URL . '/jobs/uber_single_page';
839
  $payload = array (
846
  }
847
  }
848
 
849
+ /**
850
+ * Wrapper for the Shareaholic Content Manager Single Domain worker API
851
+ *
852
+ * @param string $domain
853
+ */
854
+ public static function notify_content_manager_singledomain($domain = NULL) {
855
+ if ($domain == NULL) {
856
+ $domain = get_bloginfo('url');
857
+ }
858
+
859
+ if ($domain != NULL) {
860
+ $cm_single_domain_job_url = Shareaholic::CM_API_URL . '/jobs/single_domain';
861
+ $payload = array (
862
+ 'args' => array (
863
+ $domain,
864
+ array ('force' => true)
865
+ )
866
+ );
867
+ $response = ShareaholicCurl::post($cm_single_domain_job_url, $payload, 'json');
868
+ }
869
+ }
870
+
871
  /**
872
  * This is a wrapper for the Event API
873
  *