Skip to content
Browse files

remove @anywhere support

  • Loading branch information...
1 parent 6803268 commit c4bad95da236d0015f2cba85c354fab85f236f12 @jondavidjohn jondavidjohn committed
Showing with 1 addition and 45 deletions.
  1. +0 −9 assets/social.js
  2. +0 −5 lib/social/controller/settings.php
  3. +1 −9 lib/social/service/twitter.php
  4. +0 −13 social-twitter.php
  5. +0 −1 social.php
  6. +0 −8 views/wp-admin/options.php
View
9 assets/social.js
@@ -438,15 +438,6 @@
});
/**
- * Twitter @Anywhere
- */
- if (typeof twttr != 'undefined' && typeof twttr.anywhere != 'undefined') {
- twttr.anywhere(function(T) {
- T.hovercards();
- });
- }
-
- /**
* Social items
*/
if ($('.social-items-and-more').length) {
View
5 lib/social/controller/settings.php
@@ -47,11 +47,6 @@ public function action_index() {
delete_option('social_default_accounts');
}
- // Anywhere key
- if ($this->request->post('social_twitter_anywhere_api_key') !== null) {
- Social::option('twitter_anywhere_api_key', $this->request->post('social_twitter_anywhere_api_key'));
- }
-
// System CRON
if ($this->request->post('social_fetch_comments') !== null) {
Social::option('fetch_comments', $this->request->post('social_fetch_comments'));
View
10 lib/social/service/twitter.php
@@ -626,15 +626,7 @@ public static function get_comment_author_link($url) {
if (in_array($comment->comment_type, self::comment_types())) {
$status_id = get_comment_meta($comment->comment_ID, 'social_status_id', true);
$output = str_replace("rel='", "rel='".$status_id." ", $url);
-
- $api_key = Social::option('twitter_anywhere_api_key');
- if (!empty($api_key)) {
- $output = str_replace("'>", "' style='display:none'>@", $output);
- $output .= '@'.get_comment_author($comment->comment_ID);
- }
- else {
- $output = str_replace("'>", "'>@", $output);
- }
+ $output = str_replace("'>", "'>@", $output);
return $output;
}
View
13 social-twitter.php
@@ -216,18 +216,6 @@ public static function comments_array(array $comments, $post_id) {
return $comments;
}
- /**
- * Enqueues the @Anywhere script.
- *
- * @static
- * @return void
- */
- public static function enqueue_assets() {
- $api_key = Social::option('twitter_anywhere_api_key');
- if (!empty($api_key)) {
- wp_enqueue_script('twitter_anywhere', 'http://platform.twitter.com/anywhere.js?id='.$api_key, array('social_js'), Social::$version, true);
- }
- }
/**
* Sets the raw data for the broadcasted post.
@@ -394,7 +382,6 @@ public static function social_broadcast_form_item_edit($post, $service, $account
add_filter('social_comments_array', array('Social_Twitter', 'comments_array'), 10, 2);
add_filter('social_save_broadcasted_ids_data', array('Social_Twitter', 'social_save_broadcasted_ids_data'), 10, 5);
add_filter('social_item_output_title', array('Social_Twitter', 'social_item_output_title'), 10, 2);
-add_action('wp_enqueue_scripts', array('Social_Twitter', 'enqueue_assets'));
add_action('social_broadcast_form_item_edit', array('Social_Twitter', 'social_broadcast_form_item_edit'), 10, 3);
}
View
1 social.php
@@ -66,7 +66,6 @@
'installed_version' => 0,
'broadcast_format' => '{title}: {content} {url}',
'comment_broadcast_format' => '{content} {url}',
- 'twitter_anywhere_api_key' => null,
'system_cron_api_key' => null,
'fetch_comments' => '1',
'broadcast_by_default' => '0',
View
8 views/wp-admin/options.php
@@ -87,14 +87,6 @@
</div>
</td>
</tr>
- <tr>
- <th><?php _e('Twitter @anywhere', 'social'); ?></th>
- <td>
- <label for="social_twitter_anywhere_api_key"><?php _e('Consumer API Key', 'social'); ?></label><br />
- <input type="text" class="regular-text" name="social_twitter_anywhere_api_key" id="social_twitter_anywhere_api_key" value="<?php echo esc_attr(Social::option('twitter_anywhere_api_key')); ?>" />
- <p class="description"><?php printf(__('To enable Twitter\'s @anywhere hovercards for Twitter usernames, enter your application\'s Consumer API key here. (<a href="%1$s" target="_blank">Click here to get an API key</a>)', 'social'), 'https://dev.twitter.com/docs/anywhere'); ?></p>
- </td>
- </tr>
</table>
<?php
$fetch = Social::option('fetch_comments');

0 comments on commit c4bad95

Please sign in to comment.
Something went wrong with that request. Please try again.