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

Version Description

  • Miscellaneous bug fixes and performance enhancements
Download this release

Release Info

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

Code changes from version 7.3.0.0 to 7.3.0.1

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: 3.0
5
  Tested up to: 3.8.1
6
- Stable tag: 7.3.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
 
@@ -130,11 +130,13 @@ In your PHP / theme template code, you would add:
130
 
131
  `<?php echo do_shortcode ('[shareaholic app="share_buttons" id="<insert shareaholic app ID here>"]'); ?>`
132
  `<?php echo do_shortcode ('[shareaholic app="recommendations" id="<insert shareaholic app ID here>"]'); ?>`
 
133
 
134
  Grab the corresponding App ID from your Shareaholic Dashboard for the App you want to manually insert into your theme. If use double quotes ("'s) in your title or summary, make sure to encode them properly as `&quot;`
135
 
136
  Shareaholic Shortcode's are full featured and support all available configuration options available. Enjoy!
137
 
 
138
 
139
  Old legacy methods (not officially supported as of version 7.0.0.0):
140
 
@@ -146,21 +148,21 @@ Old legacy methods (not officially supported as of version 7.0.0.0):
146
  == Frequently Asked Questions ==
147
 
148
  = Where can I find a detailed FAQ? =
149
- Please see here: [Frequently Asked Questions](https://shareaholic.com/tools/wordpress/faq)
150
 
151
  = Where can I get detailed Usage & Installation instructions? =
152
- Please see here: [Usage & Installation Instructions](https://shareaholic.com/tools/wordpress/usage-installation)
153
 
154
  == Changelog ==
155
 
 
 
 
156
  = 7.3.0.0 =
157
  * Share Buttons App
158
  * New alignment options - you can now pick whether you want your text to wrap around your buttons
159
  * Multishare toggle for Twitter
160
- * New services:
161
- * VK (the 2nd largest social network service in Europe after Facebook)
162
- * Fancy (recommended for e-commerce sites)
163
- * Wanelo (recommended for e-commerce sites)
164
  * New Share Counts library
165
  * Floating Share Buttons App (NEW!)
166
  * To enable, click on "Edit General Settings" -> Sign In -> Click on "Site Tools" -> Turn on the "Floated Share Buttons" App
@@ -1034,6 +1036,9 @@ Please see here: [Usage & Installation Instructions](https://shareaholic.com/too
1034
 
1035
  == Upgrade Notice ==
1036
 
 
 
 
1037
  = 7.3.0.0 =
1038
  Lots of new features - including Floating Share Buttons and Shareable Images!
1039
 
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: 3.0
5
  Tested up to: 3.8.1
6
+ Stable tag: 7.3.0.1
7
 
8
  Adds an attractive social bookmarking menu and related content widget to your posts, pages, index, or any combination of the three.
9
 
130
 
131
  `<?php echo do_shortcode ('[shareaholic app="share_buttons" id="<insert shareaholic app ID here>"]'); ?>`
132
  `<?php echo do_shortcode ('[shareaholic app="recommendations" id="<insert shareaholic app ID here>"]'); ?>`
133
+ `<?php echo do_shortcode ('[shareaholic app="ad_spaces" id="<insert shareaholic app ID here>"]'); ?>`
134
 
135
  Grab the corresponding App ID from your Shareaholic Dashboard for the App you want to manually insert into your theme. If use double quotes ("'s) in your title or summary, make sure to encode them properly as `&quot;`
136
 
137
  Shareaholic Shortcode's are full featured and support all available configuration options available. Enjoy!
138
 
139
+ [General information about shortcodes and WordPress](https://codex.wordpress.org/Shortcode)
140
 
141
  Old legacy methods (not officially supported as of version 7.0.0.0):
142
 
148
  == Frequently Asked Questions ==
149
 
150
  = Where can I find a detailed FAQ? =
151
+ Please see here: [Shareaholic Helpdesk](http://support.shareaholic.com/hc/en-us)
152
 
153
  = Where can I get detailed Usage & Installation instructions? =
154
+ Please see here: [Usage & Installation Instructions](http://support.shareaholic.com/hc/en-us/categories/200101476-WordPress-Plugin)
155
 
156
  == Changelog ==
157
 
158
+ = 7.3.0.1 =
159
+ * Miscellaneous bug fixes and performance enhancements
160
+
161
  = 7.3.0.0 =
162
  * Share Buttons App
163
  * New alignment options - you can now pick whether you want your text to wrap around your buttons
164
  * Multishare toggle for Twitter
165
+ * New services: VK (the 2nd largest social network service in Europe after Facebook), Fancy (recommended for e-commerce sites), Wanelo (recommended for e-commerce sites)
 
 
 
166
  * New Share Counts library
167
  * Floating Share Buttons App (NEW!)
168
  * To enable, click on "Edit General Settings" -> Sign In -> Click on "Site Tools" -> Turn on the "Floated Share Buttons" App
1036
 
1037
  == Upgrade Notice ==
1038
 
1039
+ = 7.3.0.1 =
1040
+ Miscellaneous bug fixes and performance enhancements
1041
+
1042
  = 7.3.0.0 =
1043
  Lots of new features - including Floating Share Buttons and Shareable Images!
1044
 
shareaholic.php CHANGED
@@ -3,14 +3,14 @@
3
  * The main file!
4
  *
5
  * @package shareaholic
6
- * @version 7.3.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.3.0.0
14
  Author: Shareaholic
15
  Author URI: https://shareaholic.com
16
  Text Domain: shareaholic
@@ -56,8 +56,8 @@ class Shareaholic {
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 REC_API_URL = 'http://recommendations.shareaholic.com';
59
-
60
- const VERSION = '7.3.0.0';
61
 
62
  /**
63
  * Starts off as false so that ::get_instance() returns
@@ -73,7 +73,7 @@ class Shareaholic {
73
 
74
  add_action('init', array('ShareaholicPublic', 'init'));
75
  add_action('the_content', array('ShareaholicPublic', 'draw_canvases'));
76
- add_action('wp_head', array('ShareaholicPublic', 'wp_head'), 5);
77
  add_shortcode('shareaholic', array('ShareaholicPublic', 'shortcode'));
78
 
79
  add_action('plugins_loaded', array($this, 'shareaholic_init'));
@@ -102,7 +102,7 @@ class Shareaholic {
102
  register_activation_hook(__FILE__, array($this, 'after_activation'));
103
  register_deactivation_hook( __FILE__, array($this, 'deactivate'));
104
  register_uninstall_hook(__FILE__, array('Shareaholic', 'uninstall'));
105
-
106
  add_action('wp_before_admin_bar_render', array('ShareaholicUtilities', 'admin_bar_extended'));
107
  add_filter('plugin_action_links_'.plugin_basename(__FILE__), 'ShareaholicUtilities::admin_plugin_action_links', -10);
108
 
@@ -159,9 +159,6 @@ class Shareaholic {
159
  ShareaholicUtilities::perform_update();
160
  ShareaholicUtilities::set_version(self::VERSION);
161
  ShareaholicUtilities::notify_content_manager_singledomain();
162
- if(has_action('wp_ajax_nopriv_shareaholic_share_counts_api') && has_action('wp_ajax_shareaholic_share_counts_api')) {
163
- $result = ShareaholicCurl::get(admin_url('admin-ajax.php') . '?action=shareaholic_share_counts_api&url=http%3A%2F%2Fwww.odnoklassniki.ru%2F&services[]=twitter');
164
- }
165
  }
166
  }
167
  }
3
  * The main file!
4
  *
5
  * @package shareaholic
6
+ * @version 7.3.0.1
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.3.0.1
14
  Author: Shareaholic
15
  Author URI: https://shareaholic.com
16
  Text Domain: shareaholic
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 REC_API_URL = 'http://recommendations.shareaholic.com';
59
+
60
+ const VERSION = '7.3.0.1';
61
 
62
  /**
63
  * Starts off as false so that ::get_instance() returns
73
 
74
  add_action('init', array('ShareaholicPublic', 'init'));
75
  add_action('the_content', array('ShareaholicPublic', 'draw_canvases'));
76
+ add_action('wp_head', array('ShareaholicPublic', 'wp_head'), 6);
77
  add_shortcode('shareaholic', array('ShareaholicPublic', 'shortcode'));
78
 
79
  add_action('plugins_loaded', array($this, 'shareaholic_init'));
102
  register_activation_hook(__FILE__, array($this, 'after_activation'));
103
  register_deactivation_hook( __FILE__, array($this, 'deactivate'));
104
  register_uninstall_hook(__FILE__, array('Shareaholic', 'uninstall'));
105
+
106
  add_action('wp_before_admin_bar_render', array('ShareaholicUtilities', 'admin_bar_extended'));
107
  add_filter('plugin_action_links_'.plugin_basename(__FILE__), 'ShareaholicUtilities::admin_plugin_action_links', -10);
108
 
159
  ShareaholicUtilities::perform_update();
160
  ShareaholicUtilities::set_version(self::VERSION);
161
  ShareaholicUtilities::notify_content_manager_singledomain();
 
 
 
162
  }
163
  }
164
  }
six_to_seven.php CHANGED
@@ -64,13 +64,10 @@ class ShareaholicSixToSeven {
64
  null;
65
 
66
  $verification_key = md5(mt_rand());
67
-
68
- list($turned_on_share_buttons_locations, $turned_off_share_buttons_locations) = self::pad_locations($new_share_buttons_configuration);
69
- list($turned_on_recommendations_locations, $turned_off_recommendations_locations) = self::pad_locations($new_recommendations_configuration);
70
-
71
- // print_r($new_share_buttons_configuration);
72
- // print_r($new_recommendations_configuration);
73
-
74
  $new_configuration = array(
75
  'configuration_publisher' => array(
76
  'share_buttons_attributes' => $new_share_buttons_configuration,
@@ -83,9 +80,6 @@ class ShareaholicSixToSeven {
83
  ),
84
  );
85
 
86
- ShareaholicUtilities::log($turned_off_share_buttons_locations);
87
- ShareaholicUtilities::log($turned_off_recommendations_locations);
88
-
89
  $shortener_configuration = (isset($sexybookmarks_configuration['shorty']) ?
90
  self::transform_shortener_configuration($sexybookmarks_configuration) : array());
91
  $new_configuration = array_merge($new_configuration, $shortener_configuration);
@@ -109,8 +103,8 @@ class ShareaholicSixToSeven {
109
  ));
110
 
111
  ShareaholicUtilities::turn_on_locations(
112
- array('share_buttons' => $turned_on_share_buttons_locations, 'recommendations' => $turned_on_recommendations_locations),
113
- array('share_buttons' => $turned_off_share_buttons_locations, 'recommendations' => $turned_off_recommendations_locations)
114
  );
115
 
116
  self::transform_wordpress_specific_settings();
@@ -141,14 +135,11 @@ class ShareaholicSixToSeven {
141
  foreach($names_to_pad as $name) {
142
  $configuration['locations_attributes'][] = array('name' => $name);
143
  }
144
- if (isset($configuration['location_name_ids'])) {
145
- return array(
146
- ShareaholicUtilities::associative_array_slice($configuration['location_name_ids'], $already_set_names),
147
- ShareaholicUtilities::associative_array_slice($configuration['location_name_ids'], $names_to_pad)
148
- );
149
- } else {
150
- return array();
151
- }
152
  }
153
 
154
  private static function grab_location_iterator($location) {
64
  null;
65
 
66
  $verification_key = md5(mt_rand());
67
+
68
+ list($turned_on_share_buttons_location_names, $turned_off_share_buttons_location_names) = self::pad_locations($new_share_buttons_configuration);
69
+ list($turned_on_recommendations_location_names, $turned_off_recommendations_location_names) = self::pad_locations($new_recommendations_configuration);
70
+
 
 
 
71
  $new_configuration = array(
72
  'configuration_publisher' => array(
73
  'share_buttons_attributes' => $new_share_buttons_configuration,
80
  ),
81
  );
82
 
 
 
 
83
  $shortener_configuration = (isset($sexybookmarks_configuration['shorty']) ?
84
  self::transform_shortener_configuration($sexybookmarks_configuration) : array());
85
  $new_configuration = array_merge($new_configuration, $shortener_configuration);
103
  ));
104
 
105
  ShareaholicUtilities::turn_on_locations(
106
+ array('share_buttons' => array_flip($turned_on_share_buttons_location_names), 'recommendations' => array_flip($turned_on_recommendations_location_names)),
107
+ array('share_buttons' => array_flip($turned_off_share_buttons_location_names), 'recommendations' => array_flip($turned_off_recommendations_location_names))
108
  );
109
 
110
  self::transform_wordpress_specific_settings();
135
  foreach($names_to_pad as $name) {
136
  $configuration['locations_attributes'][] = array('name' => $name);
137
  }
138
+
139
+ return array(
140
+ $already_set_names,
141
+ $names_to_pad
142
+ );
 
 
 
143
  }
144
 
145
  private static function grab_location_iterator($location) {
templates/settings.php CHANGED
@@ -54,23 +54,25 @@ window.verification_key = '<?php echo $settings['verification_key'] ?>'
54
  <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>
55
  <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>
56
  <?php foreach(array('post', 'page', 'index', 'category') as $page_type) { ?>
57
- <?php if (isset($settings['location_name_ids']['recommendations']["{$page_type}_{$position}_content"])) { ?>
58
- <?php $location_id = $settings['location_name_ids']['recommendations']["{$page_type}_{$position}_content"] ?>
59
- <?php } else { $location_id = ''; } ?>
60
- <fieldset id='recommendations'>
61
- <legend><?php echo ucfirst($page_type) ?></legend>
62
- <div>
63
- <input type="checkbox" id="recommendations_<?php echo "{$page_type}_below_content" ?>" name="recommendations[<?php echo "{$page_type}_below_content" ?>]" class="check"
64
- <?php if (isset($recommendations["{$page_type}_below_content"])) { ?>
65
- <?php echo ($recommendations["{$page_type}_below_content"] == 'on' ? 'checked' : '') ?>
66
- <?php } ?>>
67
- <label for="recommendations_<?php echo "{$page_type}_below_content" ?>"><?php echo ucfirst($position) ?> Content</label>
68
- <button data-app='recommendations'
69
- data-location_id='<?php echo $location_id ?>'
70
- data-href="recommendations/locations/{{id}}/edit"
71
- class="btn btn-success">
72
- <?php _e('Customize', 'shareaholic'); ?></button>
73
- </div>
 
 
74
  </fieldset>
75
  <?php } ?>
76
 
54
  <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>
55
  <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>
56
  <?php foreach(array('post', 'page', 'index', 'category') as $page_type) { ?>
57
+ <?php foreach(array('below') as $position) { ?>
58
+ <?php if (isset($settings['location_name_ids']['recommendations']["{$page_type}_{$position}_content"])) { ?>
59
+ <?php $location_id = $settings['location_name_ids']['recommendations']["{$page_type}_{$position}_content"] ?>
60
+ <?php } else { $location_id = ''; } ?>
61
+ <fieldset id='recommendations'>
62
+ <legend><?php echo ucfirst($page_type) ?></legend>
63
+ <div>
64
+ <input type="checkbox" id="recommendations_<?php echo "{$page_type}_below_content" ?>" name="recommendations[<?php echo "{$page_type}_below_content" ?>]" class="check"
65
+ <?php if (isset($recommendations["{$page_type}_below_content"])) { ?>
66
+ <?php echo ($recommendations["{$page_type}_below_content"] == 'on' ? 'checked' : '') ?>
67
+ <?php } ?>>
68
+ <label for="recommendations_<?php echo "{$page_type}_below_content" ?>"><?php echo ucfirst($position) ?> Content</label>
69
+ <button data-app='recommendations'
70
+ data-location_id='<?php echo $location_id ?>'
71
+ data-href="recommendations/locations/{{id}}/edit"
72
+ class="btn btn-success">
73
+ <?php _e('Customize', 'shareaholic'); ?></button>
74
+ </div>
75
+ <?php } ?>
76
  </fieldset>
77
  <?php } ?>
78
 
templates/why_to_sign_up.php CHANGED
@@ -14,6 +14,6 @@
14
  <li><?php echo sprintf(__('Additional themes for share buttons, related content, etc to match your site.', 'shareaholic')); ?></li>
15
  <li><?php echo sprintf(__('Opportunities to make money with your site, plus lots more!', 'shareaholic')); ?></li>
16
  </ul>
17
- <button data-href='edit' id='general_settings' class="btn btn-large"><?php echo sprintf(__('Edit General Website Settings', 'shareaholic')); ?></button>
18
  <p class="signuppromo_note"><?php echo sprintf(__("Connecting is simple. Simply click the button above and sign in to your Shareaholic account to connect this plugin to your account. If you don't have an account already, simply create a new account — it takes just seconds and it's free!", 'shareaholic')); ?></p>
19
  </div>
14
  <li><?php echo sprintf(__('Additional themes for share buttons, related content, etc to match your site.', 'shareaholic')); ?></li>
15
  <li><?php echo sprintf(__('Opportunities to make money with your site, plus lots more!', 'shareaholic')); ?></li>
16
  </ul>
17
+ <button data-href='edit' id='general_settings' class="btn btn-large btn-success"><?php echo sprintf(__('Edit General Website Settings', 'shareaholic')); ?></button>
18
  <p class="signuppromo_note"><?php echo sprintf(__("Connecting is simple. Simply click the button above and sign in to your Shareaholic account to connect this plugin to your account. If you don't have an account already, simply create a new account — it takes just seconds and it's free!", 'shareaholic')); ?></p>
19
  </div>
utilities.php CHANGED
@@ -93,24 +93,24 @@ class ShareaholicUtilities {
93
  $links[] = '<a href="admin.php?page=shareaholic-settings">'.__('Settings', 'shareaholic').'</a>';
94
  return $links;
95
  }
96
-
97
  /**
98
  * Extend the admin bar
99
  *
100
  */
101
-
102
  public static function admin_bar_extended() {
103
  global $wp_admin_bar;
104
-
105
  if(!current_user_can('update_plugins') || !is_admin_bar_showing() || self::get_option('disable_admin_bar_menu') == "on")
106
  return;
107
-
108
  $wp_admin_bar->add_menu(array(
109
  'id' => 'wp_shareaholic_adminbar_menu',
110
  'title' => __('Shareaholic', 'shareaholic'),
111
  'href' => admin_url('admin.php?page=shareaholic-settings'),
112
  ));
113
-
114
  /*
115
  $wp_admin_bar->add_menu(array(
116
  'parent' => 'wp_shareaholic_adminbar_menu',
@@ -120,14 +120,14 @@ class ShareaholicUtilities {
120
  'meta' => Array( 'target' => '_blank' )
121
  ));
122
  */
123
-
124
  $wp_admin_bar->add_menu(array(
125
  'parent' => 'wp_shareaholic_adminbar_menu',
126
  'id' => 'wp_shareaholic_adminbar_submenu-settings',
127
  'title' => __('App Manager', 'shareaholic'),
128
  'href' => admin_url('admin.php?page=shareaholic-settings'),
129
  ));
130
-
131
  $wp_admin_bar->add_menu(array(
132
  'parent' => 'wp_shareaholic_adminbar_menu',
133
  'id' => 'wp_shareaholic_adminbar_submenu-general',
@@ -447,7 +447,7 @@ class ShareaholicUtilities {
447
  * @param array $array
448
  */
449
  public static function turn_on_locations($array, $turn_off_array = array()) {
450
-
451
  if (is_array($array)) {
452
  foreach($array as $app => $ids) {
453
  if (is_array($ids)) {
@@ -459,7 +459,7 @@ class ShareaholicUtilities {
459
  }
460
  }
461
  }
462
-
463
  if (is_array($turn_off_array)) {
464
  foreach($turn_off_array as $app => $ids) {
465
  if (is_array($ids)) {
@@ -564,7 +564,7 @@ class ShareaholicUtilities {
564
  delete_option('shareaholic_settings');
565
 
566
  $verification_key = md5(mt_rand());
567
-
568
  $turned_on_share_buttons_locations = array(
569
  array('name' => 'post_below_content', 'counter' => 'badge-counter'),
570
  array('name' => 'page_below_content', 'counter' => 'badge-counter'),
@@ -843,7 +843,7 @@ class ShareaholicUtilities {
843
  */
844
  public static function notify_content_manager_singlepage($post_id = NULL) {
845
  $post_permalink = get_permalink($post_id);
846
-
847
  if ($post_permalink != NULL) {
848
  $cm_single_page_job_url = Shareaholic::CM_API_URL . '/jobs/uber_single_page';
849
  $payload = array (
@@ -865,7 +865,7 @@ class ShareaholicUtilities {
865
  if ($domain == NULL) {
866
  $domain = get_bloginfo('url');
867
  }
868
-
869
  if ($domain != NULL) {
870
  $cm_single_domain_job_url = Shareaholic::CM_API_URL . '/jobs/single_domain';
871
  $payload = array (
@@ -877,7 +877,7 @@ class ShareaholicUtilities {
877
  $response = ShareaholicCurl::post($cm_single_domain_job_url, $payload, 'json');
878
  }
879
  }
880
-
881
  /**
882
  * This is a wrapper for the Event API
883
  *
93
  $links[] = '<a href="admin.php?page=shareaholic-settings">'.__('Settings', 'shareaholic').'</a>';
94
  return $links;
95
  }
96
+
97
  /**
98
  * Extend the admin bar
99
  *
100
  */
101
+
102
  public static function admin_bar_extended() {
103
  global $wp_admin_bar;
104
+
105
  if(!current_user_can('update_plugins') || !is_admin_bar_showing() || self::get_option('disable_admin_bar_menu') == "on")
106
  return;
107
+
108
  $wp_admin_bar->add_menu(array(
109
  'id' => 'wp_shareaholic_adminbar_menu',
110
  'title' => __('Shareaholic', 'shareaholic'),
111
  'href' => admin_url('admin.php?page=shareaholic-settings'),
112
  ));
113
+
114
  /*
115
  $wp_admin_bar->add_menu(array(
116
  'parent' => 'wp_shareaholic_adminbar_menu',
120
  'meta' => Array( 'target' => '_blank' )
121
  ));
122
  */
123
+
124
  $wp_admin_bar->add_menu(array(
125
  'parent' => 'wp_shareaholic_adminbar_menu',
126
  'id' => 'wp_shareaholic_adminbar_submenu-settings',
127
  'title' => __('App Manager', 'shareaholic'),
128
  'href' => admin_url('admin.php?page=shareaholic-settings'),
129
  ));
130
+
131
  $wp_admin_bar->add_menu(array(
132
  'parent' => 'wp_shareaholic_adminbar_menu',
133
  'id' => 'wp_shareaholic_adminbar_submenu-general',
447
  * @param array $array
448
  */
449
  public static function turn_on_locations($array, $turn_off_array = array()) {
450
+
451
  if (is_array($array)) {
452
  foreach($array as $app => $ids) {
453
  if (is_array($ids)) {
459
  }
460
  }
461
  }
462
+
463
  if (is_array($turn_off_array)) {
464
  foreach($turn_off_array as $app => $ids) {
465
  if (is_array($ids)) {
564
  delete_option('shareaholic_settings');
565
 
566
  $verification_key = md5(mt_rand());
567
+
568
  $turned_on_share_buttons_locations = array(
569
  array('name' => 'post_below_content', 'counter' => 'badge-counter'),
570
  array('name' => 'page_below_content', 'counter' => 'badge-counter'),
843
  */
844
  public static function notify_content_manager_singlepage($post_id = NULL) {
845
  $post_permalink = get_permalink($post_id);
846
+
847
  if ($post_permalink != NULL) {
848
  $cm_single_page_job_url = Shareaholic::CM_API_URL . '/jobs/uber_single_page';
849
  $payload = array (
865
  if ($domain == NULL) {
866
  $domain = get_bloginfo('url');
867
  }
868
+
869
  if ($domain != NULL) {
870
  $cm_single_domain_job_url = Shareaholic::CM_API_URL . '/jobs/single_domain';
871
  $payload = array (
877
  $response = ShareaholicCurl::post($cm_single_domain_job_url, $payload, 'json');
878
  }
879
  }
880
+
881
  /**
882
  * This is a wrapper for the Event API
883
  *