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

Version Description

  • Ensure featured image theme support
  • Faster and more reliable Related Content on-boarding!
  • Welcome message for new users
  • Share Buttons
    • Added support for Yummly (recommended for food & recipe content) and Houzz (recommended for home & garden content)
Download this release

Release Info

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

Code changes from version 7.5.0.0 to 7.5.0.1

admin.php CHANGED
@@ -17,10 +17,9 @@ class ShareaholicAdmin {
17
  */
18
  public static function admin_init() {
19
  ShareaholicUtilities::check_for_other_plugin();
20
-
21
  // workaround: http://codex.wordpress.org/Function_Reference/register_activation_hook
22
- if ( is_admin() && get_option( 'Activated_Plugin_Shareaholic' ) == 'shareaholic' ) {
23
- delete_option( 'Activated_Plugin_Shareaholic' );
24
  /* do stuff once right after activation */
25
  if (has_action('wp_ajax_nopriv_shareaholic_share_counts_api') && has_action('wp_ajax_shareaholic_share_counts_api')) {
26
  ShareaholicUtilities::share_counts_api_connectivity_check();
@@ -253,7 +252,6 @@ class ShareaholicAdmin {
253
  ShareaholicUtilities::log_event("UpdatedSettings");
254
  // clear cache after settings update
255
  ShareaholicUtilities::clear_cache();
256
-
257
  }
258
 
259
  /*
@@ -392,4 +390,48 @@ class ShareaholicAdmin {
392
  ));
393
  }
394
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
395
  }
17
  */
18
  public static function admin_init() {
19
  ShareaholicUtilities::check_for_other_plugin();
 
20
  // workaround: http://codex.wordpress.org/Function_Reference/register_activation_hook
21
+ if (is_admin() && get_option( 'Activated_Plugin_Shareaholic') == 'shareaholic') {
22
+ delete_option('Activated_Plugin_Shareaholic');
23
  /* do stuff once right after activation */
24
  if (has_action('wp_ajax_nopriv_shareaholic_share_counts_api') && has_action('wp_ajax_shareaholic_share_counts_api')) {
25
  ShareaholicUtilities::share_counts_api_connectivity_check();
252
  ShareaholicUtilities::log_event("UpdatedSettings");
253
  // clear cache after settings update
254
  ShareaholicUtilities::clear_cache();
 
255
  }
256
 
257
  /*
390
  ));
391
  }
392
  }
393
+
394
+ /**
395
+ * This function is in charge of determining whether to send the "get started" email
396
+ */
397
+ public static function welcome_email() {
398
+ // check whether email has been sent
399
+ if (ShareaholicUtilities::get_option('welcome_email_sent') != true) {
400
+ ShareaholicAdmin::send_welcome_email();
401
+ // set flag that the email has been sent
402
+ ShareaholicUtilities::update_options(array('welcome_email_sent' => true));
403
+ }
404
+ }
405
+
406
+ /**
407
+ * This function is in charge of sending the "get started" email
408
+ */
409
+ public static function send_welcome_email() {
410
+ $sign_up_link = 'https://shareaholic.com/publisher_tools/'.ShareaholicUtilities::get_option('api_key').'/verify?verification_key='.ShareaholicUtilities::get_option('verification_key').'&redirect_to='.'https://shareaholic.com/publisher_tools/'.ShareaholicUtilities::get_option('api_key').'/websites/edit?verification_key='.ShareaholicUtilities::get_option('verification_key');
411
+
412
+ $to = get_bloginfo('admin_email');
413
+ $subject = 'Thank you for upgrading to Shareaholic for WordPress!';
414
+ $message = "
415
+ <p>Hi there,</p>
416
+ <p>Thank you for upgrading to Shareaholic for WordPress, my name is Mary Anne, and I'm going to help you get set-up!</p>
417
+ <p>To start, make sure you sign-up for a Shareaholic.com account, because it will give you access to analytics and more features like Follow Buttons and opportunities to earn revenue from your site. <a href=\"$sign_up_link\">Sign-up now</a> - it's free!</p>
418
+ <p>Next, reply to this email with any questions or problems you're having as you customize your Shareaholic settings. Consider me your personal assistant!</p>
419
+ <p>Last step? Sit back, and watch your visitors engage with your content.</p>
420
+ Enjoy the show :)<br />
421
+ <br />
422
+ Mary Anne<br />
423
+ Happiness Specialist<br />
424
+ <a href='http://support.shareaholic.com'>support.shareaholic.com</a><br /><br />
425
+ <img width='200' height='36' src='https://shareaholic.com/assets/layouts/shareaholic-logo.png' alt='Shareaholic' title='Shareaholic'>";
426
+
427
+ $headers = "From: Shareaholic <hello@shareaholic.com>\r\n";
428
+ $headers.= "Reply-To: Mary Anne <hello@shareaholic.com>\r\n";
429
+ $headers.= "X-Mailer: PHP/" . phpversion() . "\r\n";
430
+ $headers.= "MIME-Version: 1.0\r\n";
431
+ $headers.= "Content-type: text/html; charset=utf-8\r\n";
432
+
433
+ if (function_exists('wp_mail')){
434
+ wp_mail($to, $subject, $message, $headers);
435
+ }
436
+ }
437
  }
assets/img/shareaholic-logo.png CHANGED
Binary file
public.php CHANGED
@@ -26,6 +26,16 @@ class ShareaholicPublic {
26
  add_filter('wp_headers', array('ShareaholicUtilities', 'add_header_xua'));
27
  }
28
 
 
 
 
 
 
 
 
 
 
 
29
  /**
30
  * The function called during the wp_head action. The
31
  * rest of the plugin doesn't need to know exactly what happens.
@@ -518,12 +528,61 @@ class ShareaholicPublic {
518
  exit;
519
  }
520
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
521
  /**
522
  * Checks to see if curl is installed
523
  *
524
  * @return bool true or false that curl is installed
525
  */
526
- public static function has_curl() {
527
  return function_exists('curl_version') && function_exists('curl_multi_init') && function_exists('curl_multi_add_handle') && function_exists('curl_multi_exec');
528
  }
529
  }
26
  add_filter('wp_headers', array('ShareaholicUtilities', 'add_header_xua'));
27
  }
28
 
29
+ /**
30
+ * Loads before all else
31
+ */
32
+ public static function after_setup_theme() {
33
+ // Ensure thumbnail/featured image support
34
+ if(!current_theme_supports('post-thumbnails')){
35
+ add_theme_support('post-thumbnails');
36
+ }
37
+ }
38
+
39
  /**
40
  * The function called during the wp_head action. The
41
  * rest of the plugin doesn't need to know exactly what happens.
528
  exit;
529
  }
530
 
531
+
532
+ /**
533
+ * Function to return list of permalinks
534
+ *
535
+ * @return list of permalinks in JSON or plain text
536
+ */
537
+ public static function permalink_list(){
538
+ $post_type = isset($_GET['post_type']) ? $_GET['post_type'] : "any";
539
+ $n = isset($_GET['n']) ? $_GET['n'] : -1;
540
+ $format = isset($_GET['format']) ? $_GET['format'] : "json";
541
+
542
+ $permalink_list = array();
543
+ $permalink_query = "post_type=$post_type&post_status=publish&posts_per_page=$n";
544
+ $posts = new WP_Query ($permalink_query);
545
+ $posts = $posts->posts;
546
+ foreach($posts as $post){
547
+ switch ($post->post_type){
548
+ case 'revision':
549
+ case 'nav_menu_item':
550
+ break;
551
+ case 'page':
552
+ $permalink = get_page_link($post->ID);
553
+ array_push($permalink_list, $permalink);
554
+ break;
555
+ case 'post':
556
+ $permalink = get_permalink($post->ID);
557
+ array_push($permalink_list, $permalink);
558
+ break;
559
+ case 'attachment':
560
+ break;
561
+ default:
562
+ $permalink = get_post_permalink($post->ID);
563
+ array_push($permalink_list, $permalink);
564
+ break;
565
+ }
566
+ }
567
+
568
+ if ($format == "text"){
569
+ header('Content-Type: text/plain; charset=utf-8');
570
+ foreach($permalink_list as $link) {
571
+ echo $link. "\r\n";
572
+ }
573
+ } elseif ($format == "json"){
574
+ header('Content-Type: application/json; charset=utf-8');
575
+ echo json_encode($permalink_list);
576
+ }
577
+ exit;
578
+ }
579
+
580
  /**
581
  * Checks to see if curl is installed
582
  *
583
  * @return bool true or false that curl is installed
584
  */
585
+ public static function has_curl(){
586
  return function_exists('curl_version') && function_exists('curl_multi_init') && function_exists('curl_multi_add_handle') && function_exists('curl_multi_exec');
587
  }
588
  }
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.9.1
6
- Stable tag: 7.5.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
 
@@ -119,6 +119,8 @@ You can place Share Buttons, Related Content and any other Shareaholic app manua
119
 
120
  `[shareaholic app="share_buttons" id="<insert shareaholic app ID here>"]`
121
  `[shareaholic app="recommendations" id="<insert shareaholic app ID here>"]`
 
 
122
 
123
  Notes: optionally, you can also specify `title`, `link` or `summary` as Shareaholic shortcode parameters. If you don't specify these optional parameters, the shortcode will automatically determine these values.
124
 
@@ -131,6 +133,7 @@ In your PHP / theme template code, you would add:
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
 
@@ -155,6 +158,13 @@ Please see here: [Usage & Installation Instructions](http://support.shareaholic.
155
 
156
  == Changelog ==
157
 
 
 
 
 
 
 
 
158
  = 7.5.0.0 =
159
  * Several usability improvements to the admin UI!
160
  * Bugfix: Fixed missing Share Counts on pages that were excluded from Related Content
@@ -1079,6 +1089,10 @@ Please see here: [Usage & Installation Instructions](http://support.shareaholic.
1079
 
1080
  == Upgrade Notice ==
1081
 
 
 
 
 
1082
  = 7.5.0.0 =
1083
 
1084
  Several usability improvements to the admin UI!
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.9.1
6
+ Stable tag: 7.5.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
 
119
 
120
  `[shareaholic app="share_buttons" id="<insert shareaholic app ID here>"]`
121
  `[shareaholic app="recommendations" id="<insert shareaholic app ID here>"]`
122
+ `[shareaholic app="ad_spaces" id="<insert shareaholic app ID here>"]`
123
+ `[shareaholic app="follow_buttons" id="<insert shareaholic app ID here>"]`
124
 
125
  Notes: optionally, you can also specify `title`, `link` or `summary` as Shareaholic shortcode parameters. If you don't specify these optional parameters, the shortcode will automatically determine these values.
126
 
133
  `<?php echo do_shortcode ('[shareaholic app="share_buttons" id="<insert shareaholic app ID here>"]'); ?>`
134
  `<?php echo do_shortcode ('[shareaholic app="recommendations" id="<insert shareaholic app ID here>"]'); ?>`
135
  `<?php echo do_shortcode ('[shareaholic app="ad_spaces" id="<insert shareaholic app ID here>"]'); ?>`
136
+ `<?php echo do_shortcode ('[shareaholic app="follow_buttons" id="<insert shareaholic app ID here>"]'); ?>`
137
 
138
  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;`
139
 
158
 
159
  == Changelog ==
160
 
161
+ = 7.5.0.1 =
162
+ * Ensure featured image theme support
163
+ * Faster and more reliable Related Content on-boarding!
164
+ * Welcome message for new users
165
+ * Share Buttons
166
+ * Added support for Yummly (recommended for food & recipe content) and Houzz (recommended for home & garden content)
167
+
168
  = 7.5.0.0 =
169
  * Several usability improvements to the admin UI!
170
  * Bugfix: Fixed missing Share Counts on pages that were excluded from Related Content
1089
 
1090
  == Upgrade Notice ==
1091
 
1092
+ = 7.5.0.1 =
1093
+
1094
+ Many improvements to the Related Content app.
1095
+
1096
  = 7.5.0.0 =
1097
 
1098
  Several usability improvements to the admin UI!
shareaholic.php CHANGED
@@ -3,14 +3,14 @@
3
  * The main file!
4
  *
5
  * @package shareaholic
6
- * @version 7.5.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.5.0.0
14
  Author: Shareaholic
15
  Author URI: https://shareaholic.com
16
  Text Domain: shareaholic
@@ -61,7 +61,7 @@ class Shareaholic {
61
  const CM_API_URL = 'https://cm-web.shareaholic.com'; // uses static IPs for firewall whitelisting
62
  const REC_API_URL = 'http://recommendations.shareaholic.com';
63
 
64
- const VERSION = '7.5.0.0';
65
 
66
  /**
67
  * Starts off as false so that ::get_instance() returns
@@ -77,16 +77,21 @@ class Shareaholic {
77
 
78
  // Share Counts API
79
  add_action('wp_ajax_nopriv_shareaholic_share_counts_api', array('ShareaholicPublic', 'share_counts_api'));
80
- add_action('wp_ajax_shareaholic_share_counts_api', array('ShareaholicPublic', 'share_counts_api'));
81
 
82
  // Debug info
83
- add_action('wp_ajax_nopriv_shareaholic_debug_info', array('ShareaholicPublic', 'debug_info'));
84
- add_action('wp_ajax_shareaholic_debug_info', array('ShareaholicPublic', 'debug_info'));
 
 
 
 
85
 
86
- add_action('init', array('ShareaholicPublic', 'init'));
87
- add_action('the_content', array('ShareaholicPublic', 'draw_canvases'));
88
- add_action('wp_head', array('ShareaholicPublic', 'wp_head'), 6);
89
- add_shortcode('shareaholic', array('ShareaholicPublic', 'shortcode'));
 
90
 
91
  add_action('plugins_loaded', array($this, 'shareaholic_init'));
92
 
@@ -146,6 +151,11 @@ class Shareaholic {
146
  */
147
  public function shareaholic_init() {
148
  ShareaholicUtilities::localize();
 
 
 
 
 
149
  }
150
 
151
  /**
@@ -162,6 +172,7 @@ class Shareaholic {
162
  ShareaholicUtilities::log_event("Upgrade", array ('previous_plugin_version' => ShareaholicUtilities::get_version()));
163
  ShareaholicUtilities::perform_update();
164
  ShareaholicUtilities::set_version(self::VERSION);
 
165
  ShareaholicUtilities::notify_content_manager_singledomain();
166
 
167
  // Call the share counts api to check for connectivity on update
@@ -195,6 +206,7 @@ class Shareaholic {
195
  add_option( 'Activated_Plugin_Shareaholic', 'shareaholic' );
196
 
197
  if (ShareaholicUtilities::has_accepted_terms_of_service() && ShareaholicUtilities::get_option('api_key') != NULL){
 
198
  ShareaholicUtilities::notify_content_manager_singledomain();
199
  }
200
 
3
  * The main file!
4
  *
5
  * @package shareaholic
6
+ * @version 7.5.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.5.0.1
14
  Author: Shareaholic
15
  Author URI: https://shareaholic.com
16
  Text Domain: shareaholic
61
  const CM_API_URL = 'https://cm-web.shareaholic.com'; // uses static IPs for firewall whitelisting
62
  const REC_API_URL = 'http://recommendations.shareaholic.com';
63
 
64
+ const VERSION = '7.5.0.1';
65
 
66
  /**
67
  * Starts off as false so that ::get_instance() returns
77
 
78
  // Share Counts API
79
  add_action('wp_ajax_nopriv_shareaholic_share_counts_api', array('ShareaholicPublic', 'share_counts_api'));
80
+ add_action('wp_ajax_shareaholic_share_counts_api', array('ShareaholicPublic', 'share_counts_api'));
81
 
82
  // Debug info
83
+ add_action('wp_ajax_nopriv_shareaholic_debug_info', array('ShareaholicPublic', 'debug_info'));
84
+ add_action('wp_ajax_shareaholic_debug_info', array('ShareaholicPublic', 'debug_info'));
85
+
86
+ // Permalink list for Related Content content index
87
+ add_action('wp_ajax_nopriv_shareaholic_permalink_list', array('ShareaholicPublic', 'permalink_list'));
88
+ add_action('wp_ajax_shareaholic_permalink_list', array('ShareaholicPublic', 'permalink_list'));
89
 
90
+ add_action('init', array('ShareaholicPublic', 'init'));
91
+ add_action('after_setup_theme', array('ShareaholicPublic', 'after_setup_theme'));
92
+ add_action('the_content', array('ShareaholicPublic', 'draw_canvases'));
93
+ add_action('wp_head', array('ShareaholicPublic', 'wp_head'), 6);
94
+ add_shortcode('shareaholic', array('ShareaholicPublic', 'shortcode'));
95
 
96
  add_action('plugins_loaded', array($this, 'shareaholic_init'));
97
 
151
  */
152
  public function shareaholic_init() {
153
  ShareaholicUtilities::localize();
154
+
155
+ // Send Welcome email if we haven't sent it already (check whenever a new site ID is set)
156
+ if (ShareaholicUtilities::get_option('api_key') != NULL) {
157
+ ShareaholicAdmin::welcome_email();
158
+ }
159
  }
160
 
161
  /**
172
  ShareaholicUtilities::log_event("Upgrade", array ('previous_plugin_version' => ShareaholicUtilities::get_version()));
173
  ShareaholicUtilities::perform_update();
174
  ShareaholicUtilities::set_version(self::VERSION);
175
+ ShareaholicUtilities::notify_content_manager_sitemap();
176
  ShareaholicUtilities::notify_content_manager_singledomain();
177
 
178
  // Call the share counts api to check for connectivity on update
206
  add_option( 'Activated_Plugin_Shareaholic', 'shareaholic' );
207
 
208
  if (ShareaholicUtilities::has_accepted_terms_of_service() && ShareaholicUtilities::get_option('api_key') != NULL){
209
+ ShareaholicUtilities::notify_content_manager_sitemap();
210
  ShareaholicUtilities::notify_content_manager_singledomain();
211
  }
212
 
six_to_seven.php CHANGED
@@ -108,6 +108,7 @@ class ShareaholicSixToSeven {
108
  );
109
 
110
  self::transform_wordpress_specific_settings();
 
111
  } else {
112
  ShareaholicUtilities::log_event('6To7ConversionFailed', array(
113
  'the_posted_json' => $new_configuration,
@@ -369,7 +370,7 @@ class ShareaholicSixToSeven {
369
  'headline_text' => 'You may also like:',
370
  // if they requested text, honor that,
371
  // otherwise give them the default style
372
- 'theme' => $recommendations_configuration['style'] == 'text' ? 'text-only' : 'default'
373
  )
374
  );
375
 
@@ -442,7 +443,7 @@ class ShareaholicSixToSeven {
442
 
443
  return $result;
444
  }
445
-
446
  /**
447
  * This function is for all settings that are specific to wordpress
448
  * and are not stored in a publisher configuration object. So far
@@ -456,6 +457,25 @@ class ShareaholicSixToSeven {
456
 
457
  ShareaholicUtilities::update_options($new_shareaholic_settings);
458
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
459
  }
460
 
461
- ?>
108
  );
109
 
110
  self::transform_wordpress_specific_settings();
111
+ self::cleanup_v6_options();
112
  } else {
113
  ShareaholicUtilities::log_event('6To7ConversionFailed', array(
114
  'the_posted_json' => $new_configuration,
370
  'headline_text' => 'You may also like:',
371
  // if they requested text, honor that,
372
  // otherwise give them the default style
373
+ 'theme' => $recommendations_configuration['style'] == 'text' ? 'text-only' : ''
374
  )
375
  );
376
 
443
 
444
  return $result;
445
  }
446
+
447
  /**
448
  * This function is for all settings that are specific to wordpress
449
  * and are not stored in a publisher configuration object. So far
457
 
458
  ShareaholicUtilities::update_options($new_shareaholic_settings);
459
  }
460
+
461
+ /**
462
+ * This function cleans up options created by <= v6 of the plugin
463
+ *
464
+ */
465
+ private static function cleanup_v6_options() {
466
+ delete_option('SexyBookmarks');
467
+ delete_option('ShareaholicTopbar');
468
+ delete_option('ShareaholicAnalytics');
469
+ delete_option('ShareaholicRecommendations');
470
+ delete_option('ShareaholicClassicBookmarks');
471
+ delete_option('shr_reportupgrade');
472
+ delete_option('SHRSBvNum');
473
+ delete_option('SHRSB_apikey');
474
+ delete_option('SEXY_SPONSORS');
475
+ delete_option('SHRSB_DefaultSprite');
476
+ delete_option('SHRSB_CustomSprite');
477
+ delete_option('SexyCustomSprite');
478
+ }
479
  }
480
 
481
+ ?>
templates/settings.php CHANGED
@@ -107,4 +107,4 @@ window.verification_key = '<?php echo $settings['verification_key'] ?>'
107
 
108
 
109
  <?php ShareaholicAdmin::show_footer(); ?>
110
- <?php ShareaholicAdmin::include_snapengage(); ?>
107
 
108
 
109
  <?php ShareaholicAdmin::show_footer(); ?>
110
+ <?php ShareaholicAdmin::include_snapengage(); ?>
utilities.php CHANGED
@@ -134,10 +134,9 @@ class ShareaholicUtilities {
134
  'parent' => 'wp_shareaholic_adminbar_menu',
135
  'id' => 'wp_shareaholic_adminbar_submenu-general',
136
  'title' => __('General Settings', 'shareaholic'),
137
- 'href' => 'https://shareaholic.com/publisher_tools/'.self::get_option('api_key').'/websites/edit?verification_key='.self::get_option('verification_key'),
138
  'meta' => Array( 'target' => '_blank' )
139
  ));
140
-
141
  $wp_admin_bar->add_menu(array(
142
  'parent' => 'wp_shareaholic_adminbar_menu',
143
  'id' => 'wp_shareaholic_adminbar_submenu-help',
@@ -909,6 +908,24 @@ class ShareaholicUtilities {
909
  }
910
  }
911
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
912
  /**
913
  * Wrapper for the Shareaholic Content Manager Single Domain worker API
914
  *
134
  'parent' => 'wp_shareaholic_adminbar_menu',
135
  'id' => 'wp_shareaholic_adminbar_submenu-general',
136
  'title' => __('General Settings', 'shareaholic'),
137
+ 'href' => 'https://shareaholic.com/publisher_tools/'.self::get_option('api_key').'/verify?verification_key='.self::get_option('verification_key').'&redirect_to='.'https://shareaholic.com/publisher_tools/'.self::get_option('api_key').'/websites/edit?verification_key='.self::get_option('verification_key'),
138
  'meta' => Array( 'target' => '_blank' )
139
  ));
 
140
  $wp_admin_bar->add_menu(array(
141
  'parent' => 'wp_shareaholic_adminbar_menu',
142
  'id' => 'wp_shareaholic_adminbar_submenu-help',
908
  }
909
  }
910
 
911
+ /**
912
+ * Wrapper for the Shareaholic Content Manager Single Domain worker API
913
+ *
914
+ * @param string $domain
915
+ */
916
+ public static function notify_content_manager_sitemap() {
917
+ $text_sitemap_url = admin_url('admin-ajax.php') . '?action=shareaholic_permalink_list&n=500&format=text';
918
+
919
+ $cm_sitemap_job_url = Shareaholic::CM_API_URL . '/jobs/sitemap';
920
+ $payload = array (
921
+ 'args' => array (
922
+ $text_sitemap_url,
923
+ array ('force' => true)
924
+ )
925
+ );
926
+ $response = ShareaholicCurl::post($cm_sitemap_job_url, $payload, 'json');
927
+ }
928
+
929
  /**
930
  * Wrapper for the Shareaholic Content Manager Single Domain worker API
931
  *