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

Version Description

Various speed improvements and bug fixes

Download this release

Release Info

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

Code changes from version 8.8.4 to 8.9.0

admin.php CHANGED
@@ -13,7 +13,7 @@
13
  class ShareaholicAdmin {
14
 
15
  const ACTIVATE_TIMESTAMP_OPTION = 'shareaholic_activate_timestamp';
16
- const REVIEW_PERIOD = 1296000; // 15 days in seconds
17
  const REVIEW_DISMISS_OPTION = 'shareaholic_review_dismiss';
18
 
19
  /**
@@ -148,6 +148,7 @@ JQUERY;
148
 
149
  }
150
 
 
151
  /**
152
  * The function called during the admin_head action.
153
  *
@@ -172,12 +173,11 @@ JQUERY;
172
  }
173
 
174
  /**
175
- * Renders footer
176
  */
177
  public static function show_header() {
178
  $settings = ShareaholicUtilities::get_settings();
179
  $settings['base_link'] = Shareaholic::URL . '/publisher_tools/' . $settings['api_key'] . '/';
180
- $settings['website_settings_link'] = $settings['base_link'] . 'websites/edit?verification_key=' . $settings['verification_key'];
181
  ShareaholicUtilities::load_template('header', array(
182
  'settings' => $settings
183
  ));
@@ -249,12 +249,12 @@ JQUERY;
249
 
250
  die();
251
  }
252
-
253
  /**
254
  * Shows the message about failing to create an api key
255
  */
256
  public static function failed_to_create_api_key() {
257
- ShareaholicUtilities::load_template('failed_to_create_api_key');
258
  if (isset($_GET['page']) && preg_match('/shareaholic-settings/', $_GET['page'])) {
259
  ShareaholicUtilities::load_template('failed_to_create_api_key_modal');
260
  }
@@ -354,6 +354,16 @@ JQUERY;
354
  'shareaholic-settings',
355
  array('ShareaholicAdmin', 'admin')
356
  );
 
 
 
 
 
 
 
 
 
 
357
  add_submenu_page(
358
  'shareaholic-settings',
359
  __('Advanced Settings', 'shareaholic'),
@@ -438,17 +448,63 @@ JQUERY;
438
  ShareaholicUtilities::get_new_location_name_ids($api_key);
439
  }
440
 
441
- self::draw_deprecation_warnings();
442
  self::draw_admin_form();
443
  self::draw_verify_api_key();
444
  }
445
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
446
  /**
447
  * The function for the advanced admin section
448
  */
449
  public static function advanced_admin() {
450
  $settings = ShareaholicUtilities::get_settings();
451
- $api_key = ShareaholicUtilities::get_or_create_api_key();
 
 
 
 
452
  $action = str_replace( '%7E', '~', $_SERVER['REQUEST_URI']);
453
 
454
  if (!ShareaholicUtilities::has_accepted_terms_of_service()) {
@@ -514,19 +570,6 @@ JQUERY;
514
  ));
515
  }
516
 
517
- /**
518
- * Checks for any deprecations and then shows them
519
- * to the end user.
520
- */
521
- private static function draw_deprecation_warnings() {
522
- $deprecations = ShareaholicDeprecation::all();
523
- if (!empty($deprecations)) {
524
- ShareaholicUtilities::load_template('deprecation_warnings', array(
525
- 'deprecation_warnings' => $deprecations
526
- ));
527
- }
528
- }
529
-
530
  /**
531
  * Outputs the actual html for the form
532
  */
@@ -627,7 +670,7 @@ JQUERY;
627
  $headers.= "Content-type: text/html; charset=utf-8\r\n";
628
 
629
  // Send email
630
- wp_mail($to, $subject, $message, $headers);
631
  }
632
  }
633
 
@@ -648,7 +691,7 @@ JQUERY;
648
 
649
  if ($current_screen->id === 'options-permalink' || $current_screen->id === 'options-general') {
650
  $css_class = 'notice notice-warning is-dismissible';
651
- $message = 'WARNING: Updating your URL or permalink structure will reset the social share counts for your pages. <a href="https://www.shareaholic.com/plans">Upgrade to Shareaholic Premium</a> to enable <a href="https://support.shareaholic.com/hc/en-us/articles/115002083586">Share Count Recovery</a>.';
652
  echo "<div class='$css_class'><p style='font-weight: bold;'>";
653
  _e($message, 'Shareaholic');
654
  echo '</p></div>';
13
  class ShareaholicAdmin {
14
 
15
  const ACTIVATE_TIMESTAMP_OPTION = 'shareaholic_activate_timestamp';
16
+ const REVIEW_PERIOD = 259200; // 3 days in seconds
17
  const REVIEW_DISMISS_OPTION = 'shareaholic_review_dismiss';
18
 
19
  /**
148
 
149
  }
150
 
151
+
152
  /**
153
  * The function called during the admin_head action.
154
  *
173
  }
174
 
175
  /**
176
+ * Renders header
177
  */
178
  public static function show_header() {
179
  $settings = ShareaholicUtilities::get_settings();
180
  $settings['base_link'] = Shareaholic::URL . '/publisher_tools/' . $settings['api_key'] . '/';
 
181
  ShareaholicUtilities::load_template('header', array(
182
  'settings' => $settings
183
  ));
249
 
250
  die();
251
  }
252
+
253
  /**
254
  * Shows the message about failing to create an api key
255
  */
256
  public static function failed_to_create_api_key() {
257
+ // ShareaholicUtilities::load_template('failed_to_create_api_key');
258
  if (isset($_GET['page']) && preg_match('/shareaholic-settings/', $_GET['page'])) {
259
  ShareaholicUtilities::load_template('failed_to_create_api_key_modal');
260
  }
354
  'shareaholic-settings',
355
  array('ShareaholicAdmin', 'admin')
356
  );
357
+ /*
358
+ add_submenu_page(
359
+ 'shareaholic-settings',
360
+ __('App Manager - beta!', 'shareaholic'),
361
+ __('App Manager - beta!', 'shareaholic'),
362
+ 'manage_options',
363
+ 'shareaholic-settings-beta',
364
+ array('ShareaholicAdmin', 'admin_beta')
365
+ );
366
+ */
367
  add_submenu_page(
368
  'shareaholic-settings',
369
  __('Advanced Settings', 'shareaholic'),
448
  ShareaholicUtilities::get_new_location_name_ids($api_key);
449
  }
450
 
 
451
  self::draw_admin_form();
452
  self::draw_verify_api_key();
453
  }
454
 
455
+ /**
456
+ * The function for the admin beta section
457
+ */
458
+ public static function admin_beta() {
459
+
460
+ if (!ShareaholicUtilities::has_accepted_terms_of_service()) {
461
+ ShareaholicUtilities::load_template('terms_of_service_modal', array(
462
+ 'image_url' => SHAREAHOLIC_ASSET_DIR . 'img'
463
+ ));
464
+ }
465
+
466
+ if (ShareaholicUtilities::has_accepted_terms_of_service()) {
467
+ $api_key = ShareaholicUtilities::get_or_create_api_key();
468
+ $jwt = ShareaholicAdmin::get_publisher_token();
469
+
470
+ if ($jwt) {
471
+ ShareaholicUtilities::load_template('admin_beta', array(
472
+ 'jwt' => $jwt,
473
+ 'api_key' => $api_key
474
+ ));
475
+ } else {
476
+ ShareaholicUtilities::load_template('failed_to_create_api_key_modal');
477
+ }
478
+ }
479
+ }
480
+
481
+ /**
482
+ * Gets the JWT auth for React UI
483
+ */
484
+ private static function get_publisher_token() {
485
+ $settings = ShareaholicUtilities::get_settings();
486
+ $verificationKey = $settings['verification_key'];
487
+
488
+ $response = ShareaholicCurl::post(Shareaholic::API_URL . "/api/v3/sessions",
489
+ array('verification_key' => $verificationKey)
490
+ ,'json');
491
+
492
+ if ($response && preg_match('/20*/', $response['response']['code'])) {
493
+ return $response['body']['publisher_token'];
494
+ }
495
+ return false;
496
+ }
497
+
498
  /**
499
  * The function for the advanced admin section
500
  */
501
  public static function advanced_admin() {
502
  $settings = ShareaholicUtilities::get_settings();
503
+
504
+ if (ShareaholicUtilities::has_accepted_terms_of_service()) {
505
+ $api_key = ShareaholicUtilities::get_or_create_api_key();
506
+ }
507
+
508
  $action = str_replace( '%7E', '~', $_SERVER['REQUEST_URI']);
509
 
510
  if (!ShareaholicUtilities::has_accepted_terms_of_service()) {
570
  ));
571
  }
572
 
 
 
 
 
 
 
 
 
 
 
 
 
 
573
  /**
574
  * Outputs the actual html for the form
575
  */
670
  $headers.= "Content-type: text/html; charset=utf-8\r\n";
671
 
672
  // Send email
673
+ // wp_mail($to, $subject, $message, $headers);
674
  }
675
  }
676
 
691
 
692
  if ($current_screen->id === 'options-permalink' || $current_screen->id === 'options-general') {
693
  $css_class = 'notice notice-warning is-dismissible';
694
+ $message = 'WARNING: Updating your URL or permalink structure will reset the social share counts for your pages. <a href="https://www.shareaholic.com/plans">Upgrade Shareaholic</a> to enable <a href="https://support.shareaholic.com/hc/en-us/articles/115002083586">Share Count Recovery</a>.';
695
  echo "<div class='$css_class'><p style='font-weight: bold;'>";
696
  _e($message, 'Shareaholic');
697
  echo '</p></div>';
assets/css/main.css CHANGED
@@ -1,5 +1,5 @@
1
  body {
2
- background: #f1f1f1;
3
  font-family: sans-serif;
4
  font-size: 12px !important;
5
  color: #666666;
@@ -7,6 +7,15 @@ body {
7
  font-smoothing: antialiased;
8
  }
9
 
 
 
 
 
 
 
 
 
 
10
  /* Header */
11
  #shr-header {
12
  position: initial !important;
@@ -221,18 +230,18 @@ table h1,table h2,table h3, table h4, table h5, table h6, table p, table ul, tab
221
  line-height: 16pt;
222
  box-shadow: 0px 0px 52px rgba(0,0,0,0.32);
223
  padding: 0;
224
- height: 520px;
225
  }
226
 
227
  .api-key-modal {
228
- height: 400px;
229
  }
230
 
231
  h4 {
232
  background: #424142;
233
  color: #e6e6e6;
234
- font-size: 30px;
235
- line-height: 60px;
236
  height: auto;
237
  font-weight: 300;
238
  margin: 0;
@@ -257,8 +266,8 @@ h4 {
257
  .blocking-modal p {
258
  margin: 10px;
259
  font-size: 12px;
260
- line-height: 21px;
261
- padding: 20px;
262
  }
263
 
264
  .blocking-modal img {
@@ -267,12 +276,11 @@ h4 {
267
  }
268
 
269
  .blocking-modal .btn_main {
270
- margin-top: -20px;
271
  margin-bottom: 5px;
272
  position: relative;
273
  cursor: pointer;
274
  display: inline-block;
275
- background: #27ae60;
276
  color: white;
277
  text-transform: uppercase;
278
  text-decoration: none;
@@ -293,11 +301,19 @@ h4 {
293
  }
294
 
295
  .blocking-modal .btn_main:hover {
296
- background: #21A057;
297
  color: white;
298
  border: none;
299
  }
300
 
 
 
 
 
 
 
 
 
301
  .blocking-modal .small {
302
  font-size: 12px;
303
  color: #888888;
1
  body {
2
+ background: #f1f1f1 !important;
3
  font-family: sans-serif;
4
  font-size: 12px !important;
5
  color: #666666;
7
  font-smoothing: antialiased;
8
  }
9
 
10
+ .app a, .text-muted a {
11
+ color: #337ab7;
12
+ text-decoration: none;
13
+ }
14
+
15
+ .btn-warning {
16
+ color: #fff !important;
17
+ }
18
+
19
  /* Header */
20
  #shr-header {
21
  position: initial !important;
230
  line-height: 16pt;
231
  box-shadow: 0px 0px 52px rgba(0,0,0,0.32);
232
  padding: 0;
233
+ height: 495px;
234
  }
235
 
236
  .api-key-modal {
237
+ height: 320px;
238
  }
239
 
240
  h4 {
241
  background: #424142;
242
  color: #e6e6e6;
243
+ font-size: 24px;
244
+ line-height: 1.8em;
245
  height: auto;
246
  font-weight: 300;
247
  margin: 0;
266
  .blocking-modal p {
267
  margin: 10px;
268
  font-size: 12px;
269
+ line-height: 1.6em;
270
+ padding: 0px 20px 0px 20px;
271
  }
272
 
273
  .blocking-modal img {
276
  }
277
 
278
  .blocking-modal .btn_main {
 
279
  margin-bottom: 5px;
280
  position: relative;
281
  cursor: pointer;
282
  display: inline-block;
283
+ background: #FF9800;
284
  color: white;
285
  text-transform: uppercase;
286
  text-decoration: none;
301
  }
302
 
303
  .blocking-modal .btn_main:hover {
304
+ background: #f79300;
305
  color: white;
306
  border: none;
307
  }
308
 
309
+ .blocking-modal .shr-people {
310
+ background-image: url(../img/happy-people-cover.png);
311
+ background-position: center;
312
+ min-height: 200px;
313
+ background-size: contain;
314
+ background-repeat: no-repeat;
315
+ }
316
+
317
  .blocking-modal .small {
318
  font-size: 12px;
319
  color: #888888;
assets/img/happy-people-cover.png ADDED
Binary file
deprecation.php DELETED
@@ -1,77 +0,0 @@
1
- <?php
2
- /**
3
- * Holds the `ShareaholicDeprecation` class
4
- *
5
- * @package shareaholic
6
- */
7
-
8
- /**
9
- * This class keeps track of various deprecations and what files
10
- * and line numbers they occur on.
11
- *
12
- * @package shareaholic
13
- */
14
- class ShareaholicDeprecation {
15
- /**
16
- * Constructor for the `ShareaholicDeprecation` class.
17
- *
18
- * @param string $function the name of a function.
19
- */
20
- public function __construct($function) {
21
- $this->function = $function;
22
- $deprecations = get_option('shareaholic_deprecations');
23
- $this->deprecations = isset($deprecations[$function]) ? $deprecations[$function] : array();
24
- }
25
-
26
- /**
27
- * Store a file and line number of the call site of a deprecated function.
28
- *
29
- * If the file already has a deprecated function in it and a differe line number,
30
- * the line number will be appended (i.e. the user has called it multiple times).
31
- *
32
- * @param string $file the name of the file
33
- * @param string $line the line number of the call site
34
- */
35
- public function push($file, $line) {
36
- $line_numbers = isset($this->deprecations[$file]) ? $this->deprecations[$file] : array();
37
- array_push($line_numbers, $line);
38
- $this->deprecations[$file] = array_unique($line_numbers);
39
-
40
- $this->update($this->deprecations);
41
- }
42
-
43
- /**
44
- * Returns all of the deprecations and their call sites
45
- *
46
- * @return array
47
- */
48
- public static function all() {
49
- return get_option('shareaholic_deprecations') ? get_option('shareaholic_deprecations') : array();
50
- }
51
-
52
- /**
53
- * Destroy all deprecation warnings. This is called as early
54
- * as possible in wordpress loading so that if someone has
55
- * removed a deprecated function, the warning does not stick
56
- * around. Because this occurs *before* the theme is set up,
57
- * those warnings will get relogged.
58
- */
59
- public static function destroy_all(){
60
- delete_option('shareaholic_deprecations');
61
- }
62
-
63
- /**
64
- * Updates the wordpress option.
65
- *
66
- * @param array $function_calls key of the file name and the value
67
- * is an array of the line numbers
68
- */
69
- private function update($function_calls) {
70
- $deprecations = get_option('shareaholic_deprecations');
71
- $deprecations[$this->function] = $function_calls;
72
- update_option('shareaholic_deprecations', $deprecations);
73
- }
74
-
75
- }
76
-
77
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
global_functions.php CHANGED
@@ -4,7 +4,6 @@
4
  *
5
  * @package shareaholic
6
  */
7
-
8
  /**
9
  * The old 'shortcode' function, which wasn't a real
10
  * WordPress shortcode. This is currently deprecated so it
@@ -15,13 +14,10 @@
15
 
16
  if (!function_exists('selfserv_shareaholic')) {
17
  function selfserv_shareaholic() {
18
- $trace = debug_backtrace();
19
- $deprecation = new ShareaholicDeprecation('selfserv_shareaholic');
20
- $deprecation->push($trace[0]['file'], $trace[0]['line']);
21
- echo ShareaholicPublic::canvas(NULL, 'share_buttons');
22
  }
23
  }
24
-
25
  /**
26
  * Another old 'shortcode' function. Because this accepts a position
27
  * (either 'Top' or 'Bottom') it requres a little more finessing in
@@ -29,29 +25,10 @@
29
  *
30
  * @param string $position either 'Top' or 'Bottom'
31
  */
32
-
33
  if (!function_exists('get_shr_like_buttonset')) {
34
  function get_shr_like_buttonset($position) {
35
- $trace = debug_backtrace();
36
- $deprecation = new ShareaholicDeprecation('get_shr_like_buttonset');
37
- $deprecation->push($trace[0]['file'], $trace[0]['line']);
38
-
39
- $settings = ShareaholicUtilities::get_settings();
40
- $page_type = ShareaholicUtilities::page_type();
41
-
42
- switch ($position) {
43
- case 'Top':
44
- $id = isset($settings['location_name_ids']["{$page_type}_above_content"])
45
- ? $settings['location_name_ids']["{$page_type}_above_content"] : NULL;
46
- break;
47
- case 'Bottom':
48
- $id = isset($settings['location_name_ids']["{$page_type}_below_content"])
49
- ? $settings['location_name_ids']["{$page_type}_below_content"] : NULL;
50
- break;
51
- }
52
-
53
- echo ShareaholicPublic::canvas($id, 'share_buttons');
54
  }
55
  }
56
-
57
- ?>
4
  *
5
  * @package shareaholic
6
  */
 
7
  /**
8
  * The old 'shortcode' function, which wasn't a real
9
  * WordPress shortcode. This is currently deprecated so it
14
 
15
  if (!function_exists('selfserv_shareaholic')) {
16
  function selfserv_shareaholic() {
17
+ _deprecated_function( __FUNCTION__, '7.0.0.0' );
18
+ return false;
 
 
19
  }
20
  }
 
21
  /**
22
  * Another old 'shortcode' function. Because this accepts a position
23
  * (either 'Top' or 'Bottom') it requres a little more finessing in
25
  *
26
  * @param string $position either 'Top' or 'Bottom'
27
  */
 
28
  if (!function_exists('get_shr_like_buttonset')) {
29
  function get_shr_like_buttonset($position) {
30
+ _deprecated_function( __FUNCTION__, '7.0.0.0' );
31
+ return false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  }
33
  }
34
+ ?>
 
public.php CHANGED
@@ -49,11 +49,6 @@ class ShareaholicPublic {
49
  * rest of the plugin doesn't need to know exactly what happens.
50
  */
51
  public static function wp_head() {
52
- // this will only run on pages that would actually call
53
- // the deprecated functions. For some reason I could not
54
- // get this function to run using a hook, though that
55
- // should not discourage anyone in the future. -DG
56
- ShareaholicDeprecation::destroy_all();
57
  self::script_tag();
58
  self::shareaholic_tags();
59
  self::draw_og_tags();
@@ -66,6 +61,7 @@ class ShareaholicPublic {
66
  if ('dns-prefetch' === $relation_type) {
67
  if ($hints) {
68
  array_push($hints,
 
69
  '//apps.shareaholic.com',
70
  '//grace.shareaholic.com',
71
  '//analytics.shareaholic.com',
49
  * rest of the plugin doesn't need to know exactly what happens.
50
  */
51
  public static function wp_head() {
 
 
 
 
 
52
  self::script_tag();
53
  self::shareaholic_tags();
54
  self::draw_og_tags();
61
  if ('dns-prefetch' === $relation_type) {
62
  if ($hints) {
63
  array_push($hints,
64
+ '//dsms0mj1bbhn4.cloudfront.net',
65
  '//apps.shareaholic.com',
66
  '//grace.shareaholic.com',
67
  '//analytics.shareaholic.com',
public_js.php CHANGED
@@ -84,7 +84,7 @@ class ShareaholicPublicJS {
84
  $output = '';
85
 
86
  if (ShareaholicUtilities::get_env() === 'staging') {
87
- $output = "data-shr-environment='stage' data-shr-assetbase='//cdn-staging-shareaholic.s3.amazonaws.com/v2/'";
88
  }
89
 
90
  return $output;
84
  $output = '';
85
 
86
  if (ShareaholicUtilities::get_env() === 'staging') {
87
+ $output = "data-shr-environment='stage' data-shr-assetbase='https://s3.amazonaws.com/cdn-staging-shareaholic/v2/'";
88
  }
89
 
90
  return $output;
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: buttons, related posts, google analytics, share buttons, social sharing,
4
  Requires at least: 3.0
5
  Tested up to: 5.0
6
  Requires PHP: 5.2
7
- Stable tag: 8.8.4
8
 
9
 
10
  Consolidate plugins with a high-speed suite of social tools: social share buttons, related content, related posts, ad monetization & Google Analytics.
@@ -16,7 +16,7 @@ Shareaholic is the **world's leading suite of social, analytics, monetization, a
16
 
17
  Our plugin and suite of tools make it easy for any website — big or small — to engage and grow their traffic, market their content, gain insight, and monetize their audience. And it all lives in one simple dashboard. Built on lightweight JavaScript, our functionality is highly customizable, without hurting your page load speed. In fact, we’re recognized by WP Engine as being a [“Essential Speed Friendly Social Media & SEO Toolkit”](https://wpengine.com/solution-center/shareaholic-the-essential-social-media-toolkit/).
18
 
19
- Our single plugin combines the functionality of many social, content, and monetization plugins including: JetPack, Contextual Related Posts (CRP), Social Warfare, Tasty Pins, Yet Another Related Posts Plugin (YARPP), Shariff, AddThis, AddToAny, and many others.
20
 
21
  = Social Media Share Buttons =
22
 
@@ -258,6 +258,13 @@ Each time you change Shareaholic's thumbnail dimensions like this, you will prob
258
 
259
  == Changelog ==
260
 
 
 
 
 
 
 
 
261
  = 8.8.4 (2018-11-09) =
262
  * Enhancement: Support for additional Structure Tags for [Share Count Recovery](https://www.shareaholic.com/sharecounter/) ([Documentation](https://support.shareaholic.com/hc/en-us/articles/115002083586-Share-Count-Recovery-How-to-Recover-Your-Social-Share-Counts-If-They-ve-Been-Lost))
263
  * %hour%
@@ -819,11 +826,18 @@ Each time you change Shareaholic's thumbnail dimensions like this, you will prob
819
  * Show Related Posts data status
820
 
821
  == Upgrade Notice ==
 
 
 
 
 
822
  = 8.8.4 =
 
823
  Adds support for additional Structure Tags for Share Count Recovery
824
 
825
  = 8.8.3 =
826
- New Share and Follow Buttons! Plus compatability with WP Rocket.
 
827
 
828
  = 8.8.2 =
829
  Various [Related Posts](https://www.shareaholic.com/website-tools/related-content) enhancements
4
  Requires at least: 3.0
5
  Tested up to: 5.0
6
  Requires PHP: 5.2
7
+ Stable tag: 8.9.0
8
 
9
 
10
  Consolidate plugins with a high-speed suite of social tools: social share buttons, related content, related posts, ad monetization & Google Analytics.
16
 
17
  Our plugin and suite of tools make it easy for any website — big or small — to engage and grow their traffic, market their content, gain insight, and monetize their audience. And it all lives in one simple dashboard. Built on lightweight JavaScript, our functionality is highly customizable, without hurting your page load speed. In fact, we’re recognized by WP Engine as being a [“Essential Speed Friendly Social Media & SEO Toolkit”](https://wpengine.com/solution-center/shareaholic-the-essential-social-media-toolkit/).
18
 
19
+ Our single plugin combines the functionality of many social, content, and monetization plugins including: JetPack, Contextual Related Posts (CRP), Social Warfare, Tasty Pins, Yet Another Related Posts Plugin (YARPP), SexyBookmarks, Shariff, AddThis, AddToAny, and many others.
20
 
21
  = Social Media Share Buttons =
22
 
258
 
259
  == Changelog ==
260
 
261
+ = 8.9.0 (2018-11-15) =
262
+ * Various speed improvements
263
+ * Bugfix: Share Buttons admin UI drag and drop fixed
264
+ * Bugfix: Share Buttons admin UI missing arrow fixed
265
+ * Bugfix: Fix for Firefox blocking Shareaholic's entire admin interface
266
+ * Bugfix: Fix for some Android web browsers blocking Shareaholic
267
+
268
  = 8.8.4 (2018-11-09) =
269
  * Enhancement: Support for additional Structure Tags for [Share Count Recovery](https://www.shareaholic.com/sharecounter/) ([Documentation](https://support.shareaholic.com/hc/en-us/articles/115002083586-Share-Count-Recovery-How-to-Recover-Your-Social-Share-Counts-If-They-ve-Been-Lost))
270
  * %hour%
826
  * Show Related Posts data status
827
 
828
  == Upgrade Notice ==
829
+
830
+ = 8.9.0 =
831
+
832
+ Various speed improvements and bug fixes
833
+
834
  = 8.8.4 =
835
+
836
  Adds support for additional Structure Tags for Share Count Recovery
837
 
838
  = 8.8.3 =
839
+
840
+ New Share and Follow Buttons! Plus compatability with WP Rocket
841
 
842
  = 8.8.2 =
843
  Various [Related Posts](https://www.shareaholic.com/website-tools/related-content) enhancements
shareaholic.php CHANGED
@@ -3,14 +3,14 @@
3
  * The main file!
4
  *
5
  * @package shareaholic
6
- * @version 8.8.4
7
  */
8
 
9
  /*
10
- Plugin Name: Shareaholic | share buttons, analytics, related posts
11
- Plugin URI: https://www.shareaholic.com/publishers/
12
- Description: The world's leading all-in-one Audience Amplification Platform that helps grow your website traffic, engagement, conversions & monetization. See <a href="admin.php?page=shareaholic-settings">configuration panel</a> for more settings.
13
- Version: 8.8.4
14
  Author: Shareaholic
15
  Author URI: https://www.shareaholic.com
16
  Text Domain: shareaholic
@@ -42,13 +42,11 @@ if(!defined('SHARE_COUNTS_CHECK_CACHE_LENGTH')) define( 'SHARE_COUNTS_CHECK_CACH
42
  // because define can use function returns and const can't
43
  if(!defined('SHAREAHOLIC_DEBUG')) define('SHAREAHOLIC_DEBUG', getenv('SHAREAHOLIC_DEBUG'));
44
 
45
-
46
  require_once(SHAREAHOLIC_DIR . '/utilities.php');
47
  require_once(SHAREAHOLIC_DIR . '/global_functions.php');
48
  require_once(SHAREAHOLIC_DIR . '/admin.php');
49
  require_once(SHAREAHOLIC_DIR . '/public.php');
50
  require_once(SHAREAHOLIC_DIR . '/notifier.php');
51
- require_once(SHAREAHOLIC_DIR . '/deprecation.php');
52
  require_once(SHAREAHOLIC_DIR . '/cron.php');
53
 
54
  if (!class_exists('Shareaholic')) {
@@ -58,11 +56,12 @@ if (!class_exists('Shareaholic')) {
58
  * @package shareaholic
59
  */
60
  class Shareaholic {
61
- const URL = 'https://www.shareaholic.com';
62
- const API_URL = 'https://web.shareaholic.com'; // uses static IPs for firewall whitelisting
 
63
  const CM_API_URL = 'https://cm-web.shareaholic.com'; // uses static IPs for firewall whitelisting
64
 
65
- const VERSION = '8.8.4';
66
 
67
  /**
68
  * Starts off as false so that ::get_instance() returns
3
  * The main file!
4
  *
5
  * @package shareaholic
6
+ * @version 8.9.0
7
  */
8
 
9
  /*
10
+ Plugin Name: Shareaholic - Share Buttons, Analytics, Related Posts
11
+ Plugin URI: https://www.shareaholic.com/website-tools/
12
+ Description: The best WordPress all-in-one Social Media and Related Posts solution. Get found on social and grow your following. See <a href="admin.php?page=shareaholic-settings">configuration panel</a> for settings.
13
+ Version: 8.9.0
14
  Author: Shareaholic
15
  Author URI: https://www.shareaholic.com
16
  Text Domain: shareaholic
42
  // because define can use function returns and const can't
43
  if(!defined('SHAREAHOLIC_DEBUG')) define('SHAREAHOLIC_DEBUG', getenv('SHAREAHOLIC_DEBUG'));
44
 
 
45
  require_once(SHAREAHOLIC_DIR . '/utilities.php');
46
  require_once(SHAREAHOLIC_DIR . '/global_functions.php');
47
  require_once(SHAREAHOLIC_DIR . '/admin.php');
48
  require_once(SHAREAHOLIC_DIR . '/public.php');
49
  require_once(SHAREAHOLIC_DIR . '/notifier.php');
 
50
  require_once(SHAREAHOLIC_DIR . '/cron.php');
51
 
52
  if (!class_exists('Shareaholic')) {
56
  * @package shareaholic
57
  */
58
  class Shareaholic {
59
+
60
+ const URL = 'https://www.stageaholic.com';
61
+ const API_URL = 'https://web.stageaholic.com'; // uses static IPs for firewall whitelisting
62
  const CM_API_URL = 'https://cm-web.shareaholic.com'; // uses static IPs for firewall whitelisting
63
 
64
+ const VERSION = '8.9.0';
65
 
66
  /**
67
  * Starts off as false so that ::get_instance() returns
templates/admin_beta.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ($api_key) { ?>
2
+
3
+ <?php ShareaholicAdmin::show_header(); ?>
4
+
5
+ <div class='wrap'>
6
+ <script>
7
+ window.ShareaholicConfig = {
8
+ apiKey: "<?php echo $api_key ?>",
9
+ verificationKey: "<?php echo $jwt ?>",
10
+ apiHost: "<?php echo Shareaholic::API_URL ?>",
11
+ serviceHost: "<?php echo Shareaholic::URL ?>",
12
+ assetHost: "<?php echo ShareaholicUtilities::asset_url_admin() ?>",
13
+ assetFolders: true,
14
+ origin: "wp_plugin"
15
+ };
16
+ </script>
17
+
18
+ <div id="root" class="shr-site-settings"></div>
19
+
20
+ <script type="text/javascript" src="<?php echo ShareaholicUtilities::asset_url_admin('ui-site-settings/loader.js') ?>"></script>
21
+ </div>
22
+
23
+ <?php } ?>
24
+
25
+ <?php ShareaholicAdmin::include_snapengage(); ?>
templates/deprecation_warnings.php DELETED
@@ -1,16 +0,0 @@
1
- <div class='error'>
2
- <p><strong>Shareaholic now supports Shortcodes! Yay!</strong> Please upgrade your theme to use the Shareaholic shortcode by <strong><a href="http://wordpress.org/plugins/shareaholic/installation/" target="_new">following these installation instructions</a></strong>.</p>
3
- <dl>
4
- <?php foreach($deprecation_warnings as $function => $places) { ?>
5
- <dt>
6
- <code><?php echo $function ?>()</code> <?php echo sprintf(__('will be deprecated SOON. Please update the code found in the following files at your convenience:', 'shareaholic')); ?></dt>
7
- <?php foreach($places as $file => $numbers) { ?>
8
- <dd>
9
- <?php echo $file ?> at line(s) <?php echo implode(', ', $numbers) ?><br /><br />
10
- </dd>
11
- <?php } ?>
12
- <?php } ?>
13
- </dl>
14
- </div>
15
-
16
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/failed_to_create_api_key_modal.php CHANGED
@@ -1,17 +1,17 @@
1
  <div class='reveal-modal blocking-modal api-key-modal' id='failed_to_create_api_key'>
2
  <h4><?php echo sprintf(__('Setup Shareaholic', 'shareaholic')); ?></h4>
3
- <div class="content pal">
4
  <p>
5
  <?php _e('It appears that we are having some trouble setting up Shareaholic for WordPress right now. This is usually temporary. Please revisit this section after a few minutes or click "retry" now.', 'shareaholic'); ?>
6
  </p>
7
- <a id='get_started' class="btn_main" href=''><?php echo _e('Retry', 'shareaholic'); ?></a>
8
  <br />
9
  <span style="font-size:12px; font-weight:normal;">
10
  <a href='<?php echo admin_url() ?>'><?php _e('or, try again later.', 'shareaholic'); ?></a>
11
  </span>
12
  <br /><br />
13
  <span style="font-size:11px; font-weight:normal;">
14
- <?php echo sprintf(__('If you continue to get this prompt for more than a few hours, try to check server connectivity or reset the plugin in %sadvanced settings%s.', 'shareaholic'), '<a href="admin.php?page=shareaholic-advanced">', '</a>'); ?> <?php echo sprintf(__('Also, if you have a question or have a bug to report, please %slet us know%s.', 'shareaholic'), '<a href="#" onclick="SnapEngage.startLink();">','</a>'); ?>
15
  </span>
16
  </div>
17
  </div>
1
  <div class='reveal-modal blocking-modal api-key-modal' id='failed_to_create_api_key'>
2
  <h4><?php echo sprintf(__('Setup Shareaholic', 'shareaholic')); ?></h4>
3
+ <div class="content pal" style="padding:10px;">
4
  <p>
5
  <?php _e('It appears that we are having some trouble setting up Shareaholic for WordPress right now. This is usually temporary. Please revisit this section after a few minutes or click "retry" now.', 'shareaholic'); ?>
6
  </p>
7
+ <a id='get_started' class="btn_main" style="margin-top: 15px;" href=''><?php echo _e('Retry', 'shareaholic'); ?></a>
8
  <br />
9
  <span style="font-size:12px; font-weight:normal;">
10
  <a href='<?php echo admin_url() ?>'><?php _e('or, try again later.', 'shareaholic'); ?></a>
11
  </span>
12
  <br /><br />
13
  <span style="font-size:11px; font-weight:normal;">
14
+ <?php echo sprintf(__('If you continue to get this prompt for more than a few minutes, try to check Shareaholic server connectivity or reset the plugin. Both are available under %sadvanced settings%s.', 'shareaholic'), '<a href="admin.php?page=shareaholic-advanced">', '</a>'); ?> <?php echo sprintf(__('Also, if you have a question or have a bug to report, please %slet us know%s.', 'shareaholic'), '<a href="#" onclick="SnapEngage.startLink();">','</a>'); ?>
15
  </span>
16
  </div>
17
  </div>
templates/footer.php CHANGED
@@ -4,7 +4,7 @@
4
  <?php echo sprintf(__('%sShareaholic for WordPress v'. ShareaholicUtilities::get_version() .'%s | %sPrivacy Policy%s | %sTerms of Service%s | %sSupport Center%s | %sAPI%s', 'shareaholic'), '<a href="https://www.shareaholic.com/?src=wp_admin" target="_new">', '</a>', '<a href="https://www.shareaholic.com/privacy/?src=wp_admin" target="_new">', '</a>', '<a href="https://www.shareaholic.com/terms/?src=wp_admin" target="_new">', '</a>', '<a href="https://support.shareaholic.com/" target="_new">', '</a>', '<a href="https://www.shareaholic.com/api/?src=wp_admin" target="_new">', '</a>'); ?>
5
  </p>
6
  <p class="text-muted">
7
- <?php echo sprintf(__('If you like our work, show some love and %sgive us a 5 star rating%s. Made with much love in Boston, Massachusetts.', 'shareaholic'), '<a href="https://wordpress.org/support/view/plugin-reviews/shareaholic?rate=5#postform" target="_new">', '</a>'); ?>
8
  <br />
9
  <br />
10
  <iframe src="//www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2Fshareaholic&amp;width&amp;layout=standard&amp;action=like&amp;show_faces=true&amp;share=false&amp;height=80&amp;width=500&amp;appId=207766518608" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe>
4
  <?php echo sprintf(__('%sShareaholic for WordPress v'. ShareaholicUtilities::get_version() .'%s | %sPrivacy Policy%s | %sTerms of Service%s | %sSupport Center%s | %sAPI%s', 'shareaholic'), '<a href="https://www.shareaholic.com/?src=wp_admin" target="_new">', '</a>', '<a href="https://www.shareaholic.com/privacy/?src=wp_admin" target="_new">', '</a>', '<a href="https://www.shareaholic.com/terms/?src=wp_admin" target="_new">', '</a>', '<a href="https://support.shareaholic.com/" target="_new">', '</a>', '<a href="https://www.shareaholic.com/api/?src=wp_admin" target="_new">', '</a>'); ?>
5
  </p>
6
  <p class="text-muted">
7
+ <?php echo sprintf(__('If you like our work, please show some love and %sleave a ⭐️⭐️⭐️⭐️⭐️ review%s. It would help us out a lot and we would really appreciate it.', 'shareaholic'), '<a href="https://wordpress.org/support/view/plugin-reviews/shareaholic?rate=5#postform" target="_new">', '</a>'); ?>
8
  <br />
9
  <br />
10
  <iframe src="//www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2Fshareaholic&amp;width&amp;layout=standard&amp;action=like&amp;show_faces=true&amp;share=false&amp;height=80&amp;width=500&amp;appId=207766518608" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe>
templates/header.php CHANGED
@@ -1,6 +1,6 @@
1
  <!-- Header - start -->
2
  <div id="shr-header-container"></div>
3
- <script type="text/javascript" src="//dsms0mj1bbhn4.cloudfront.net/ui-header/loader.js"></script>
4
  <!-- Header - end -->
5
 
6
  <script>
1
  <!-- Header - start -->
2
  <div id="shr-header-container"></div>
3
+ <script type="text/javascript" src="<?php echo ShareaholicUtilities::asset_url_admin('ui-header/loader.js') ?>"></script>
4
  <!-- Header - end -->
5
 
6
  <script>
templates/script_tag.php CHANGED
@@ -1,5 +1,5 @@
1
  <!-- Powered by Shareaholic; Grow your audience faster - https://www.shareaholic.com -->
2
- <link rel='preload' href='<?php echo ShareaholicUtilities::asset_url('assets/pub/shareaholic.js') ?>' as='script'>
3
  <script type='text/javascript' data-cfasync='false'>
4
  //<![CDATA[
5
  _SHR_SETTINGS = <?php echo json_encode($base_settings); ?>;
@@ -7,5 +7,5 @@
7
  </script>
8
  <script type='text/javascript' data-cfasync='false'
9
  src='<?php echo ShareaholicUtilities::asset_url('assets/pub/shareaholic.js') ?>'
10
- data-shr-siteid='<?php echo $api_key; ?>' async='async' <?php echo $overrides ?>>
11
  </script>
1
  <!-- Powered by Shareaholic; Grow your audience faster - https://www.shareaholic.com -->
2
+ <link rel='preload' href='<?php echo ShareaholicUtilities::asset_url('assets/pub/shareaholic.js') ?>' as='script' />
3
  <script type='text/javascript' data-cfasync='false'>
4
  //<![CDATA[
5
  _SHR_SETTINGS = <?php echo json_encode($base_settings); ?>;
7
  </script>
8
  <script type='text/javascript' data-cfasync='false'
9
  src='<?php echo ShareaholicUtilities::asset_url('assets/pub/shareaholic.js') ?>'
10
+ data-shr-siteid='<?php echo $api_key; ?>' async <?php echo $overrides ?>>
11
  </script>
templates/terms_of_service_modal.php CHANGED
@@ -1,42 +1,50 @@
1
  <div class='reveal-modal blocking-modal' id='terms_of_service_modal'>
2
- <h4><?php echo sprintf(__('Welcome to Shareaholic!', 'shareaholic')); ?></h4>
3
  <div class="content pal">
4
- <p style="font-size: 15px; padding-bottom: 18px;"><?php echo sprintf(__('%sThe all-in-one content amplification platform%s that takes your content to the next level.', 'shareaholic'), '<strong>', '</strong>'); ?></p>
5
-
6
- <div class="plugin-value-section-container">
7
- <section class="plugin-value-section">
8
- <span class="plugin-value-line"></span>
9
- <ul class="plugin-value">
10
- <li class="engage">
11
- <span class="icon fa fa-fire"></span>
12
- <span class="title"><?php _e('Engage', 'shareaholic'); ?></span>
13
- <p><?php _e('Increase traffic, time on site and repeat visits with our award winning toolset.', 'shareaholic'); ?></p>
14
- </li>
15
- <li class="learn">
16
- <span class="icon fa fa-bar-chart-o"></span>
17
- <span class="title"><?php _e('Discover', 'shareaholic'); ?></span>
18
- <p><?php _e('Understand your audience with our easy-to-use analytics dashboard.', 'shareaholic'); ?></p>
19
- </li>
20
- <li class="monetize">
21
- <span class="icon fa fa-usd"></span>
22
- <span class="title"><?php _e('Earn', 'shareaholic'); ?></span>
23
- <p><?php _e('Generate revenue with personalized, unobtrusive native ads.', 'shareaholic'); ?></p>
24
- </li>
25
- <li class="acquire">
26
- <span class="icon fa fa-bullhorn"></span>
27
- <span class="title"><?php _e('Acquire', 'shareaholic'); ?></span>
28
- <p><?php _e('Reach over 400 million people with native ads and promoted content.', 'shareaholic'); ?></p>
29
- </li>
30
- </ul>
31
- </section>
32
- </div>
 
 
 
 
 
 
 
 
 
33
 
34
- <div class="pvl">
35
- <a id='get_started' class="btn_main"><?php echo sprintf(__('Get Started »', 'shareaholic')); ?></a>
36
- <p><small style="font-size:12px; color: rgb(136, 136, 136);"><?php echo sprintf(__('By clicking "Get Started" you agree to Shareholic\'s %sTerms of Service%s and %sPrivacy Policy%s.', 'shareaholic'), '<a href="https://www.shareaholic.com/terms/?src=wp_admin" target="_new">', '</a>', '<a href="https://www.shareaholic.com/privacy/?src=wp_admin" target="_new">', '</a>'); ?></small>
37
- </p>
 
38
 
39
- <p><small style="font-size:10px; line-height: 17px; display: block; font-weight:normal; color: rgb(136, 136, 136);"><?php echo sprintf(__('Note: Shareaholic incorporates trusted 3rd party services like Google Analytics to enhance social analytics and service reliability.', 'shareaholic')); ?> <?php echo sprintf(__('You can toggle this setting under "Advanced Settings" at any time.', 'shareaholic')); ?></small></p>
40
- </div>
41
  </div>
42
  </div>
1
  <div class='reveal-modal blocking-modal' id='terms_of_service_modal'>
2
+ <h4><?php echo sprintf(__('Welcome to Shareaholic!', 'shareaholic')); ?></h4>
3
  <div class="content pal">
4
+ <p style="font-size: 18px; color: #323648; line-height: 1.4em; padding-top: 24px; margin: 0;">
5
+ <?php echo sprintf(__('%sA Suite of Essential Tools to Grow Your Audience%s', 'shareaholic'), '<strong>', '</strong>'); ?>
6
+ </p>
7
+ <p style="font-size: 12px; color: #666; line-height: 1.8em; padding-bottom: 0;">
8
+ <?php echo sprintf(__('Shareaholic provides you with a comprehensive set of marketing tools to engage with your audience, get found on social, and grow your following. Our toolkit includes Award-Winning Social Share Buttons, Related Posts, Analytics, and more.', 'shareaholic')); ?>
9
+ </p>
10
+
11
+ <div class="shr-people"></div>
12
+
13
+ <!--
14
+ <div class="plugin-value-section-container">
15
+ <section class="plugin-value-section">
16
+ <span class="plugin-value-line"></span>
17
+ <ul class="plugin-value">
18
+ <li class="engage">
19
+ <span class="icon fa fa-fire"></span>
20
+ <span class="title"><?php _e('Engage', 'shareaholic'); ?></span>
21
+ <p><?php _e('Increase traffic, time on site and repeat visits.', 'shareaholic'); ?></p>
22
+ </li>
23
+ <li class="learn">
24
+ <span class="icon fa fa-bar-chart-o"></span>
25
+ <span class="title"><?php _e('Discover', 'shareaholic'); ?></span>
26
+ <p><?php _e('Understand your audience with our easy-to-use analytics dashboard.', 'shareaholic'); ?></p>
27
+ </li>
28
+ <li class="monetize">
29
+ <span class="icon fa fa-usd"></span>
30
+ <span class="title"><?php _e('Earn', 'shareaholic'); ?></span>
31
+ <p><?php _e('Generate revenue with personalized, unobtrusive native ads.', 'shareaholic'); ?></p>
32
+ </li>
33
+ <li class="acquire">
34
+ <span class="icon fa fa-bullhorn"></span>
35
+ <span class="title"><?php _e('Acquire', 'shareaholic'); ?></span>
36
+ <p><?php _e('Reach over 400 million people with native ads and promoted content.', 'shareaholic'); ?></p>
37
+ </li>
38
+ </ul>
39
+ </section>
40
+ </div>
41
+ -->
42
 
43
+ <div class="pvl">
44
+ <a id="get_started" class="btn_main" style="margin-top: -20px;"><?php echo sprintf(__('Get Started »', 'shareaholic')); ?></a>
45
+ <p><small style="font-size:12px; color: rgb(136, 136, 136);"><?php echo sprintf(__('By clicking "Get Started" you agree to Shareholic\'s %sTerms of Service%s and %sPrivacy Policy%s.', 'shareaholic'), '<a href="https://www.shareaholic.com/terms/?src=wp_admin" target="_new">', '</a>', '<a href="https://www.shareaholic.com/privacy/?src=wp_admin" target="_new">', '</a>'); ?></small>
46
+ </p>
47
+ </div>
48
 
 
 
49
  </div>
50
  </div>
templates/terms_of_service_notice.php CHANGED
@@ -1,11 +1,13 @@
1
  <?php if ( current_user_can( 'manage_options' ) ){ ?>
2
- <div class="shareaholic-wrap-container" style="padding: 0 20px 0px 15px; background-color: #45a147; margin: 25px 0px 20px -18px;">
3
- <div style="margin: 0px 8px 0 4px; float: left;"><img src="<?php echo SHAREAHOLIC_ASSET_DIR; ?>img/check.png" width=56 height=50 /></div>
4
- <div class="shareaholic-text-container" style="color: #fff; text-shadow: 0px 1px 1px rgba(0,0,0,0.4); font-size: 14px; display: table-cell;">
5
- <p>
6
- <strong><?php echo sprintf(__('Action required: You\'ve installed Shareaholic for WordPress. We\'re ready when you are. %sGet started now &raquo;%s', 'shareaholic'), '<a href="admin.php?page=shareaholic-settings" class="button-secondary">', '</a>'); ?></strong>
7
- </p>
 
8
  </div>
9
  </div>
10
  <div style="clear:both;"></div>
 
11
  <?php } ?>
1
  <?php if ( current_user_can( 'manage_options' ) ){ ?>
2
+
3
+ <div class="shareaholic-wrap-container" style="background-color: #FF9800; margin: 5px 0px 5px -20px;">
4
+ <div style="margin: 0px 15px 0 20px; float: left;">
5
+ <img src="<?php echo SHAREAHOLIC_ASSET_DIR; ?>img/check.png" width="56" height="50" />
6
+ </div>
7
+ <div class="shareaholic-text-container" style="color: #fff; text-shadow: 0px 1px 1px rgba(0,0,0,0.2); font-size: 14px; line-height: 1.5em; height: 50px; vertical-align: middle; display: table-cell; line-height: 1.5;">
8
+ <?php echo sprintf(__('You\'ve added Shareaholic. Action required: %sComplete Installation &raquo;%s', 'shareaholic'), '<a href="admin.php?page=shareaholic-settings" class="button-secondary" style="vertical-align: initial;">', '</a>'); ?>
9
  </div>
10
  </div>
11
  <div style="clear:both;"></div>
12
+
13
  <?php } ?>
utilities.php CHANGED
@@ -82,7 +82,7 @@ class ShareaholicUtilities {
82
  */
83
  private static function defaults() {
84
  return array(
85
- 'disable_admin_bar_menu' => 'off',
86
  'disable_debug_info' => 'off',
87
  'disable_internal_share_counts_api' => 'on',
88
  'api_key' => '',
@@ -123,7 +123,7 @@ class ShareaholicUtilities {
123
 
124
  $wp_admin_bar->add_menu(array(
125
  'id' => 'wp_shareaholic_adminbar_menu',
126
- 'title' => __('Grow', 'shareaholic'),
127
  'href' => esc_url(admin_url('admin.php?page=shareaholic-settings')),
128
  ));
129
 
@@ -415,14 +415,14 @@ class ShareaholicUtilities {
415
  * @param string $asset
416
  * @return string
417
  */
418
- public static function asset_url($asset) {
419
  $env = self::get_env();
420
  if ($env === 'development') {
421
  return "http://spreadaholic.com:8080/" . $asset;
422
  } elseif ($env === 'staging') {
423
  return '//d2062rwknz205x.cloudfront.net/' . $asset;
424
  } else {
425
- return '//apps.shareaholic.com/' . $asset;
426
  }
427
  }
428
 
@@ -442,13 +442,13 @@ class ShareaholicUtilities {
442
  * @param string $asset
443
  * @return string
444
  */
445
- public static function asset_url_admin($asset) {
446
  if (preg_match('/spreadaholic/', Shareaholic::URL)) {
447
  return "http://spreadaholic.com:8080/" . $asset;
448
  } elseif (preg_match('/stageaholic/', Shareaholic::URL)) {
449
  return 'https://d2062rwknz205x.cloudfront.net/' . $asset;
450
  } else {
451
- return 'https://apps.shareaholic.com/' . $asset;
452
  }
453
  }
454
 
@@ -521,7 +521,7 @@ class ShareaholicUtilities {
521
  self::update_location_name_ids($result);
522
  } else {
523
  ShareaholicUtilities::load_template('failed_to_create_api_key_modal');
524
- ShareaholicUtilities::log_bad_response('FailedToCreateApiKey', $response);
525
  }
526
  }
527
 
@@ -726,7 +726,7 @@ class ShareaholicUtilities {
726
  ShareaholicUtilities::log_bad_response('FailedToCreateApiKey', $response);
727
  }
728
  } else {
729
- add_action('admin_notices', array('ShareaholicAdmin', 'failed_to_create_api_key'));
730
  ShareaholicUtilities::log_bad_response('FailedToCreateApiKey', $response);
731
  }
732
 
82
  */
83
  private static function defaults() {
84
  return array(
85
+ 'disable_admin_bar_menu' => 'on',
86
  'disable_debug_info' => 'off',
87
  'disable_internal_share_counts_api' => 'on',
88
  'api_key' => '',
123
 
124
  $wp_admin_bar->add_menu(array(
125
  'id' => 'wp_shareaholic_adminbar_menu',
126
+ 'title' => __('Social', 'shareaholic'),
127
  'href' => esc_url(admin_url('admin.php?page=shareaholic-settings')),
128
  ));
129
 
415
  * @param string $asset
416
  * @return string
417
  */
418
+ public static function asset_url($asset = NULL) {
419
  $env = self::get_env();
420
  if ($env === 'development') {
421
  return "http://spreadaholic.com:8080/" . $asset;
422
  } elseif ($env === 'staging') {
423
  return '//d2062rwknz205x.cloudfront.net/' . $asset;
424
  } else {
425
+ return '//dsms0mj1bbhn4.cloudfront.net/' . $asset;
426
  }
427
  }
428
 
442
  * @param string $asset
443
  * @return string
444
  */
445
+ public static function asset_url_admin($asset = NULL) {
446
  if (preg_match('/spreadaholic/', Shareaholic::URL)) {
447
  return "http://spreadaholic.com:8080/" . $asset;
448
  } elseif (preg_match('/stageaholic/', Shareaholic::URL)) {
449
  return 'https://d2062rwknz205x.cloudfront.net/' . $asset;
450
  } else {
451
+ return 'https://dsms0mj1bbhn4.cloudfront.net/' . $asset;
452
  }
453
  }
454
 
521
  self::update_location_name_ids($result);
522
  } else {
523
  ShareaholicUtilities::load_template('failed_to_create_api_key_modal');
524
+ ShareaholicUtilities::log_bad_response('FailedToFetchPubConfig', $response);
525
  }
526
  }
527
 
726
  ShareaholicUtilities::log_bad_response('FailedToCreateApiKey', $response);
727
  }
728
  } else {
729
+ // add_action('admin_notices', array('ShareaholicAdmin', 'failed_to_create_api_key'));
730
  ShareaholicUtilities::log_bad_response('FailedToCreateApiKey', $response);
731
  }
732