'Automatic','af'=>'Afrikaaner', 'ar'=>'Arabic', 'zh'=>'Chinese', 'cs'=>'Czech', 'da'=>'Danish', 'nl'=>'Dutch', 'en'=>'English', 'fa'=>'Farsi', 'fi'=>'Finnish', 'fr'=>'French', 'ga'=>'Gaelic', 'de'=>'German', 'el'=>'Greek', 'he'=>'Hebrew', 'hi'=>'Hindi', 'it'=>'Italian', 'ja'=>'Japanese', 'ko'=>'Korean', 'lv'=>'Latvian', 'lt'=>'Lithuanian', 'no'=>'Norwegian', 'pl'=>'Polish', 'pt'=>'Portugese', 'ro'=>'Romanian', 'ru'=>'Russian', 'sk'=>'Slovakian', 'sl'=>'Slovenian', 'es'=>'Spanish', 'sv'=>'Swedish', 'th'=>'Thai', 'ur'=>'Urdu', 'cy'=>'Welsh', 'vi'=>'Vietnamese'); $addthis_menu_types = array('static', 'dropdown', 'toolbox'); $addthis_styles = array( 'share' => array('img'=>'lg-share-%lang%.gif', 'w'=>125, 'h'=>16), 'bookmark' => array('img'=>'lg-bookmark-en.gif', 'w'=>125, 'h'=>16), 'addthis' => array('img'=>'lg-addthis-en.gif', 'w'=>125, 'h'=>16), 'share-small' => array('img'=>'sm-share-%lang%.gif', 'w'=>83, 'h'=>16), 'bookmark-small' => array('img'=>'sm-bookmark-en.gif', 'w'=>83, 'h'=>16), 'plus' => array('img'=>'sm-plus.gif', 'w'=>16, 'h'=>16) /* Add your own style here, like this: , 'custom' => array('img'=>'http://example.com/button.gif', 'w'=>16, 'h'=>16) */ ); $addthis_new_styles = array( 'small_toolbox' => array( 'src' => '
', 'img' => 'toolbox-small.png', 'name' => 'Small Toolbox', 'above' => 'hidden ', 'below' => '' ), // 32x32 'small_toolbox_with_share' => array( 'src' => '', 'img' => 'small-toolbox.jpg', 'name' => 'Small Toolbox with Share first', 'above' => '', 'below' => 'hidden' ), // Plus sign share | four buttons 'large_toolbox' => array( 'src' => '', 'img' => 'toolbox-large.png', 'name' => 'Large Toolbox', 'above' => 'hidden ', 'below' => '' ), // 32x32 'fb_tw_sc' => array( 'src' => '' , 'img' => 'fb-tw-sc.jpg' , 'name' => 'Like, Tweet, Counter', 'above' => '', 'below' => 'hidden' ), // facebook tweet share counter 'simple_button' => array('src' => '', 'img' => 'share.jpg', 'name' => 'Share Button', 'above' => 'hidden ', 'below' => 'hidden' ), // Plus sign share 'button' => array( 'src' => '', 'img' => 'button.jpg', 'name' => 'Classic Share Button', 'above' => 'hidden ', 'below' => 'hidden' ), // classic 'share_counter' => array( 'src' => '', 'img' => 'share_counter.png', 'name' => 'Share Counter', 'above' => 'hidden ', 'below' => 'hidden' ), ); add_filter('the_title', 'at_title_check'); function at_title_check($title) { global $addthis_did_filters_added; if (!isset ($addthis_did_filters_added) || $addthis_did_filters_added != true) { addthis_add_content_filters(); add_filter('the_content', 'addthis_script_to_content'); } return $title; } function addthis_script_to_content($content) { addthis_output_script(); return $content; } define( 'addthis_style_default' , 'small_toolbox_with_share'); define( 'ADDTHIS_PLUGIN_VERSION', '2.0.2'); /** * Converts our old many options in to one beautiful array * */ function addthis_options_200() { global $current_user; $user_id = $current_user->ID; $addthis_new_options = array(); if ($username = get_option('addthis_username')) $addthis_new_options['username'] = $username; if ($password = get_option('addthis_password')) $addthis_new_options['password'] = $password; if ($show_stats = get_option('addthis_show_stats')) $addthis_new_options['addthis_show_stats'] = $show_stats; if ($append_data = get_option('addthis_append_data')) $addthis_new_options['addthis_append_data'] = $append_data; if ($showonhome = get_option('addthis_showonhome')) $addthis_new_options['addthis_showonhome'] = $showonhome; if ($showonpages = get_option('addthis_showonpages')) $addthis_new_options['addthis_showonpages'] = $showonpages; if ($showoncats = get_option('addthis_showoncats')) $addthis_new_options['addthis_showoncats'] = $showoncats; if ($showonarchives = get_option('addthis_showonarchives')) $addthis_new_options['addthis_showonarchives'] = $showonarchives; if (get_option('addthis_showonposts') != true) $addthis_new_options['below'] = 'none'; elseif (get_option('addthis_sidebar_only') == true) $addthis_new_options['below'] = 'none'; else { if ( ($menu_type = get_option('addthis_menu_type')) == 'toolbox' ) $addthis_new_options['below'] = 'small_toolbox_with_share'; else $addthis_new_options['below'] = 'button'; } if ($header_background = get_option('addthis_header_background')) $addthis_new_options['addthis_header_background'] = $header_background; if ($header_color = get_option('addthis_header_color')) $addthis_new_options['addthis_header_color'] = $header_color; if ($brand = get_option('addthis_brand')) $addthis_new_options['addthis_brand'] = $brand; if ($language = get_option('addthis_language')) $addthis_new_options['addthis_language'] = $language; // Above is new, set it to none $addthis_new_options['above'] = 'none'; // Save option add_option('addthis_settings', $addthis_new_options); // if the option saved, delete the old options delete_option('addthis_show_stats'); delete_option('addthis_password'); delete_option('addthis_fallback_username'); delete_option('addthis_options'); delete_option('addthis_product'); delete_option('addthis_isdropdown'); delete_option('addthis_menu_type'); delete_option('addthis_append_data'); delete_option('addthis_showonhome'); delete_option('addthis_showonposts'); delete_option('addthis_showonpages'); delete_option('addthis_showoncats'); delete_option('addthis_showonarchives'); delete_option('addthis_style'); delete_option('addthis_header_background'); delete_option('addthis_header_color'); delete_option('addthis_sidebar_only'); delete_option('addthis_brand'); delete_option('addthis_language');; global $current_user; $user_id = $current_user->ID; add_user_meta($user_id, 'addthis_nag_updated_options', 'true', true); } function addthis_options_210() { $options = get_option('addthis_settings'); if ( isset( $options['username'] ) ) $options['profile'] = $options['username']; $$options['dbversion'] == '210'; update_option( 'addthis_settings', $options); } /** * Generates unique IDs */ function cuid() { $mt = dechex(mt_rand(0,min(0xffffffff,mt_getrandmax()))); $now = dechex(time()); $cuid = $now . str_pad($mt, 8, '0', STR_PAD_LEFT); return $cuid; } define('ADDTHIS_FALLBACK_USERNAME', 'wp-'.cuid() ); /** * Returns major.minor WordPress version. */ function addthis_get_wp_version() { return (float)substr(get_bloginfo('version'),0,3); } /** * For templates, we need a wrapper for printing out the code on demand. */ function addthis_print_widget($url=null, $title=null, $style = addthis_style_default ) { global $addthis_new_styles ; $identifier = addthis_get_identifier($url, $title); echo "\n\n"; if ( ! is_array($style) && isset($addthis_new_styles[$style]) ){ echo sprintf($addthis_new_styles[$style]['src'], $identifier); } elseif (is_array($style)) echo addthis_custom_toolbox($style, $url, $title); echo "\n\n"; } /* * Generates the addthis:url and addthis:title attributes */ function addthis_get_identifier($url = null, $title = null) { if (! is_null($url) ) $identifier = "addthis:url='$url' "; if (! is_null($title) ) $identifier .= "addthis:title='$title'"; if (! isset($identifier) ) $identifier = ''; return $identifier; } /** * Options is an array that contains * size - either 16 or 32. Defaults to 16 * services - comma sepperated list of services * preferred - number of Prefered services to be displayed after listed services * more - bool to show or not show the more icon at the end * * @param $options array */ function addthis_custom_toolbox($options, $url, $title) { $identifier = addthis_get_identifier($url, $title); $outerClasses = 'addthis_toolbox addthis_default_style'; if (isset($options['size']) && $options['size'] == '32') $outerClasses .= ' addthis_32x32_style'; $button = '';
printf(__('Setup the AddThis plugin so you can start having your users share your content around the web
Setup options | Ignore this notice'), admin_url('options-general.php?page=addthis/addthis_social_widget.php'), '?addthis_nag_ignore=0');
echo "
';
printf( __('Sign up for AddThis and add your username/password to recieve analytics about how people are sharing your content.
Enter username and password | Sign Up | Ignore this notice'), admin_url('options-general.php?page=addthis/addthis_social_widget.php'), 'https://www.addthis.com/register', '?addthis_nag_username_ignore=0');
echo "
';
printf( __('We have updated the options for the AddThis plugin. Check out the AddThis settings page to see the new styles and options.
See New Options | Ignore this notice'), admin_url('options-general.php?page=addthis/addthis_social_widget.php'), '?addthis_nag_updated_ignore=0');
echo "
'. $stats['shares'].'Shares | ';
echo ''. $stats['clickbacks'].'Clicks | ';
echo ''. $viral .'Viral Lift | ';
echo '
If you want some ideas for increasing your sharing, check out: