WordPress Share Buttons Plugin – AddThis - Version 2.1.2

Version Description

Add Address Bar sharing

Download this release

Release Info

Developer jorbin
Plugin Icon 128x128 WordPress Share Buttons Plugin – AddThis
Version 2.1.2
Comparing to
See all releases

Code changes from version 2.1.1 to 2.1.2

Files changed (3) hide show
  1. addthis_social_widget.php +70 -43
  2. js/options-page.32.js +139 -0
  3. readme.txt +10 -2
addthis_social_widget.php CHANGED
@@ -26,7 +26,7 @@ else return;
26
  * Plugin Name: AddThis Social Bookmarking Widget
27
  * Plugin URI: http://www.addthis.com
28
  * Description: Help your visitor promote your site! The AddThis Social Bookmarking Widget allows any visitor to bookmark your site easily with many popular services. Sign up for an AddThis.com account to see how your visitors are sharing your content--which services they're using for sharing, which content is shared the most, and more. It's all free--even the pretty charts and graphs.
29
- * Version: 2.1.1
30
  *
31
  * Author: The AddThis Team
32
  * Author URI: http://www.addthis.com/blog
@@ -113,12 +113,12 @@ function addthis_script_to_content($content)
113
  }
114
 
115
  define( 'addthis_style_default' , 'small_toolbox_with_share');
116
- define( 'ADDTHIS_PLUGIN_VERSION', '2.1.1');
117
  /**
118
  * Converts our old many options in to one beautiful array
119
  *
120
  */
121
- if ( apply_filters( 'at_do_options_upgrades', '__return_true') )
122
  {
123
  function addthis_options_200()
124
  {
@@ -245,8 +245,15 @@ function addthis_get_wp_version() {
245
  * For templates, we need a wrapper for printing out the code on demand.
246
  */
247
  function addthis_print_widget($url=null, $title=null, $style = addthis_style_default ) {
248
- global $addthis_new_styles ;
 
 
249
 
 
 
 
 
 
250
  $identifier = addthis_get_identifier($url, $title);
251
 
252
  echo "\n<!-- AddThis Custom -->\n";
@@ -255,7 +262,16 @@ echo "\n<!-- AddThis Custom -->\n";
255
  if ( ! is_array($style) && isset($addthis_new_styles[$style]) ){
256
  echo sprintf($addthis_new_styles[$style]['src'], $identifier);
257
  }
258
-
 
 
 
 
 
 
 
 
 
259
  elseif (is_array($style))
260
  echo addthis_custom_toolbox($style, $url, $title);
261
  echo "\n<!-- End AddThis Custom -->\n";
@@ -776,8 +792,9 @@ if ( isset($data['addthis_profile']) )
776
  if ( isset($data['addthis_password']) )
777
  $options['password'] = sanitize_text_field($data['addthis_password']);
778
 
779
-
780
- if ( isset ($data['show_above']) )
 
781
  $options['above'] = 'none';
782
  elseif ( isset($styles[$data['above']]) )
783
  $options['above'] = $data['above'];
@@ -797,8 +814,9 @@ elseif ($data['above'] = 'custom')
797
  $options['above_custom_preferred'] = (int) $data['above_custom_preferred'] ;
798
  $options['above_custom_more'] = isset($data['above_custom_more']);
799
  }
800
-
801
- if ( isset ($data['show_below']) )
 
802
  $options['below'] = 'none';
803
  elseif ( isset($styles[$data['below']]) )
804
  $options['below'] = $data['below'];
@@ -821,7 +839,7 @@ elseif ($data['below'] = 'custom')
821
 
822
 
823
  // All the checkbox fields
824
- foreach (array('addthis_show_stats', 'addthis_append_data', 'addthis_showonhome', 'addthis_showonpages', 'addthis_showonarchives', 'addthis_showoncats', 'addthis_showonexcerpts', 'addthis_addressbar') as $field)
825
  {
826
  if ( isset($data[$field]) && $data[$field] == true)
827
  $options[$field] = true;
@@ -908,7 +926,7 @@ function addthis_init()
908
 
909
  add_action( 'wp_head', 'addthis_add_content_filters');
910
 
911
- if (addthis_get_wp_version() >= 2.7 || apply_filters('at_assume_latest', '__return_false') ) {
912
  if ( is_admin() ) {
913
  add_action( 'admin_init', 'register_addthis_settings' );
914
  }
@@ -918,7 +936,11 @@ function addthis_init()
918
 
919
 
920
  $script_location = apply_filters( 'at_files_uri', plugins_url( '', basename(dirname(__FILE__)) ) ) . '/addthis/js/addthis.js' ;
 
 
921
  $style_location = apply_filters( 'at_files_uri', plugins_url( '', basename(dirname(__FILE__)) ) ) .'/addthis/css/addthis.css' ;
 
 
922
 
923
  wp_register_style( 'addthis', $style_location );
924
  wp_register_script( 'addthis', $script_location , array('jquery-ui-tabs') );
@@ -928,7 +950,7 @@ function addthis_init()
928
 
929
  add_filter('admin_menu', 'addthis_admin_menu');
930
 
931
- if ( apply_filters( 'at_do_options_upgrades', '__return_true') )
932
  {
933
  if ( get_option('addthis_product') !== false && ! is_array( $options ) )
934
  addthis_options_200();
@@ -1004,9 +1026,13 @@ function addthis_remove_tag($content, $text = '')
1004
 
1005
  $text = get_the_content('');
1006
  $text = strip_shortcodes( $text );
 
1007
  remove_filter('the_content', 'addthis_display_social_widget', 15);
1008
 
1009
  $text = apply_filters('the_content', $text);
 
 
 
1010
  $text = str_replace(']]>', ']]&gt;', $text);
1011
  $text = strip_tags($text);
1012
  $excerpt_length = apply_filters('excerpt_length', 55);
@@ -1225,7 +1251,7 @@ function addthis_output_script($return = false )
1225
 
1226
  $script = "\n<!-- AddThis Button Begin -->\n"
1227
  .'<script type="text/javascript">'
1228
- ."var addthis_product = 'wpp-258';\n";
1229
 
1230
 
1231
  $pub = (isset($options['profile'])) ? $options['profile'] : false ;
@@ -1261,6 +1287,8 @@ function addthis_output_script($return = false )
1261
  if ( isset($options['addthis_brand']) )
1262
  $addthis_config['ui_cobrand'] = $options['addthis_brand'];
1263
 
 
 
1264
 
1265
  $addthis_config = apply_filters('addthis_config_js_var', $addthis_config);
1266
 
@@ -1272,11 +1300,17 @@ function addthis_output_script($return = false )
1272
  $script .= 'var addthis_options = "'.$options['addthis_options'].'";';
1273
 
1274
  if (isset($options['addthis_twitter_template'])){
1275
- $script .= 'if (typeof(addthis_share) == "undefined"){
1276
- var addthis_share = { templates: { twitter: "' . esc_js($options['addthis_twitter_template']) . '" } };
1277
- }';
 
 
 
 
1278
  }
1279
 
 
 
1280
  $script .= '</script>';
1281
 
1282
 
@@ -1418,13 +1452,18 @@ EOF;
1418
 
1419
  function addthis_options_page_scripts()
1420
  {
1421
- $script_location = apply_filters( 'at_files_uri', plugins_url( '', basename(dirname(__FILE__)) ) ) . '/addthis/js/options-page.js' ;
 
 
 
1422
  wp_enqueue_script( 'addthis_options_page_script', $script_location , array('jquery-ui-tabs', 'thickbox' ));
 
1423
  }
1424
 
1425
  function addthis_options_page_style()
1426
  {
1427
  $style_location = apply_filters( 'at_files_uri' , plugins_url('', basename(dirname(__FILE__)) ) ) . '/addthis/css/options-page.css' ;
 
1428
  wp_enqueue_style( 'addthis_options_page_style', $style_location);
1429
  wp_enqueue_style( 'thickbox' );
1430
  }
@@ -1467,6 +1506,9 @@ function addthis_admin_menu()
1467
  'below_custom_preferred' => '',
1468
  'below_custom_more' => '',
1469
  'addthis_twitter_template' => '',
 
 
 
1470
  );
1471
 
1472
  function addthis_plugin_options_php4() {
@@ -1489,13 +1531,16 @@ function addthis_plugin_options_php4() {
1489
  <form id="addthis_settings" method="post" action="options.php">
1490
  <?php
1491
  // use the old-school settings style in older versions of wordpress
1492
- if (addthis_get_wp_version() >= 2.7 || apply_filters('at_assume_latest', '__return_false') ) {
1493
  settings_fields('addthis');
1494
  } else {
1495
  wp_nonce_field('update-options');
1496
  }
1497
 
1498
- $addthis_options = get_option('addthis_settings');
 
 
 
1499
  foreach ( array( 'addthis_show_stats', 'addthis_append_data', 'addthis_showonhome', 'addthis_showonpages', 'addthis_showonarchives', 'addthis_showoncats' ) as $option)
1500
  {
1501
  if ( $addthis_options && ! isset($addthis_options[$option]) )
@@ -1521,6 +1566,7 @@ function addthis_plugin_options_php4() {
1521
  <td id="above" colspan="2">
1522
  <p><?php _e("Above the post", 'addthis_trans_domain') ?>&nbsp;&nbsp;<span class="description"><input type="checkbox" name="addthis_settings[show_above]" <?php echo ('none' == $above) ? 'checked="checked"' : '';?> />&nbsp;none</span></p>
1523
  <?php $imgLocationBase = apply_filters( 'at_files_uri', plugins_url( '' , basename(dirname(__FILE__)))) . '/addthis/img/' ;
 
1524
  foreach ($addthis_new_styles as $k => $v)
1525
  {
1526
  $class = 'hidden';
@@ -1654,12 +1700,10 @@ function addthis_plugin_options_php4() {
1654
  <th scope="row"><?php _e("Track <a href=\"//www.addthis.com/blog/2010/03/11/clickback-analytics-measure-traffic-back-to-your-site-from-addthis/\" target=\"_blank\">clickbacks</a>:", 'addthis_trans_domain' ); ?></th>
1655
  <td><input type="checkbox" name="addthis_settings[addthis_append_data]" value="true" <?php echo $addthis_append_data == true ? 'checked="checked"' : ''; ?>/></td>
1656
  </tr>
1657
- <?php /* ?>
1658
  <tr>
1659
  <th scope="row"><?php _e("Track Address Bar Shares", 'addthis_trans_domain' ); ?></th>
1660
  <td><input type="checkbox" name="addthis_settings[addthis_addressbar]" value="true" <?php echo ($addthis_addressbar == true ? 'checked="checked"' : ''); ?>/></td>
1661
  </tr>
1662
- <?php //*/ ?>
1663
  <tr>
1664
  <th scope="row"><?php _e("Show on homepage:", 'addthis_trans_domain' ); ?></th>
1665
  <td><input type="checkbox" name="addthis_settings[addthis_showonhome]" value="true" <?php echo ($addthis_showonhome == true ? 'checked="checked"' : ''); ?>/></td>
@@ -1680,6 +1724,10 @@ function addthis_plugin_options_php4() {
1680
  <th scope="row"><?php _e("Show on excerpts:", 'addthis_trans_domain' ); ?></th>
1681
  <td><input type="checkbox" name="addthis_settings[addthis_showonexcerpts]" value="true" <?php echo ( $addthis_showonexcerpts == true ? 'checked="checked"' : ''); ?>/></td>
1682
  </tr>
 
 
 
 
1683
  <tr valign="top">
1684
  <td colspan="2"></td>
1685
  </tr>
@@ -1700,7 +1748,7 @@ function addthis_plugin_options_php4() {
1700
  <td><input type="text" name="addthis_settings[addthis_brand]" value="<?php echo $addthis_brand; ?>" /></td>
1701
  </tr>
1702
  <tr valign="top">
1703
- <th scope="row"><?php _e("<a href='http://www.addthis.com/help/client-api#configuration-sharing-templates'>Twitter Template</a>:", 'addthis_trans_domain' ); ?></th>
1704
  <td><input type="text" name="addthis_settings[addthis_twitter_template]" value="<?php echo $addthis_twitter_template; ?>" /></td>
1705
  </tr>
1706
  <tr valign="top">
@@ -1822,25 +1870,4 @@ register_activation_hook( __FILE__, 'addthis_activation_hook' );
1822
 
1823
  require_once('addthis_post_metabox.php');
1824
 
1825
- // remove the generator tag if plus one is being used. Hopefully only temp.
1826
- add_action('wp_head', 'addthis_rm_genTag', 2);
1827
-
1828
- function addthis_rm_genTag(){
1829
-
1830
- if ( isset($_GET['preview']) && $_GET['preview'] == 1 && $options = get_transient('addthis_settings') )
1831
- $preview = true;
1832
- else
1833
- $options = get_option('addthis_settings');
1834
-
1835
- if ($options['above'] =='plus_one_share_counter' || $options['below'] == 'plus_one_share_counter')
1836
- remove_action('wp_head', 'wp_generator');
1837
- elseif ($options['above'] == 'custom' && ( strpos( $options['above_custom_services'], 'google_plusone') !== false) )
1838
- remove_action('wp_head', 'wp_generator');
1839
- elseif ($options['below'] == 'custom' && ( strpos( $options['below_custom_services'], 'google_plusone') !== false) )
1840
- remove_action('wp_head', 'wp_generator');
1841
-
1842
-
1843
- }
1844
-
1845
-
1846
  ?>
26
  * Plugin Name: AddThis Social Bookmarking Widget
27
  * Plugin URI: http://www.addthis.com
28
  * Description: Help your visitor promote your site! The AddThis Social Bookmarking Widget allows any visitor to bookmark your site easily with many popular services. Sign up for an AddThis.com account to see how your visitors are sharing your content--which services they're using for sharing, which content is shared the most, and more. It's all free--even the pretty charts and graphs.
29
+ * Version: 2.1.2
30
  *
31
  * Author: The AddThis Team
32
  * Author URI: http://www.addthis.com/blog
113
  }
114
 
115
  define( 'addthis_style_default' , 'small_toolbox_with_share');
116
+ define( 'ADDTHIS_PLUGIN_VERSION', '2.1.2');
117
  /**
118
  * Converts our old many options in to one beautiful array
119
  *
120
  */
121
+ if ( apply_filters( 'at_do_options_upgrades', '__return_true') || apply_filters( 'addthis_do_options_upgrades', '__return_true') )
122
  {
123
  function addthis_options_200()
124
  {
245
  * For templates, we need a wrapper for printing out the code on demand.
246
  */
247
  function addthis_print_widget($url=null, $title=null, $style = addthis_style_default ) {
248
+
249
+ global $addthis_styles, $addthis_new_styles;
250
+ $styles = array_merge($addthis_styles, $addthis_new_styles);
251
 
252
+ if ( isset($_GET['preview']) && $_GET['preview'] == 1 && $options = get_transient('addthis_settings') )
253
+ $preview = true;
254
+ else
255
+ $options = get_option('addthis_settings');
256
+
257
  $identifier = addthis_get_identifier($url, $title);
258
 
259
  echo "\n<!-- AddThis Custom -->\n";
262
  if ( ! is_array($style) && isset($addthis_new_styles[$style]) ){
263
  echo sprintf($addthis_new_styles[$style]['src'], $identifier);
264
  }
265
+ elseif ($style == 'above')
266
+ {
267
+ if ( isset ($styles[$options['above']]['src'] ))
268
+ echo sprintf($styles[$options['above']]['src'], $identifier);
269
+ }
270
+ elseif ($style == 'below')
271
+ {
272
+ if ( isset ($styles[$options['below']]['src'] ))
273
+ echo sprintf($styles[$options['below']]['src'], $identifier);
274
+ }
275
  elseif (is_array($style))
276
  echo addthis_custom_toolbox($style, $url, $title);
277
  echo "\n<!-- End AddThis Custom -->\n";
792
  if ( isset($data['addthis_password']) )
793
  $options['password'] = sanitize_text_field($data['addthis_password']);
794
 
795
+ if (! isset($data['above']) ){
796
+ }
797
+ elseif ( isset ($data['show_above']) )
798
  $options['above'] = 'none';
799
  elseif ( isset($styles[$data['above']]) )
800
  $options['above'] = $data['above'];
814
  $options['above_custom_preferred'] = (int) $data['above_custom_preferred'] ;
815
  $options['above_custom_more'] = isset($data['above_custom_more']);
816
  }
817
+ if ( ! isset($data['below'] )){
818
+ }
819
+ elseif ( isset ($data['show_below']) )
820
  $options['below'] = 'none';
821
  elseif ( isset($styles[$data['below']]) )
822
  $options['below'] = $data['below'];
839
 
840
 
841
  // All the checkbox fields
842
+ foreach (array('addthis_show_stats', 'addthis_append_data', 'addthis_showonhome', 'addthis_showonpages', 'addthis_showonarchives', 'addthis_showoncats', 'addthis_showonexcerpts', 'addthis_addressbar','addthis_508' ) as $field)
843
  {
844
  if ( isset($data[$field]) && $data[$field] == true)
845
  $options[$field] = true;
926
 
927
  add_action( 'wp_head', 'addthis_add_content_filters');
928
 
929
+ if (addthis_get_wp_version() >= 2.7 || apply_filters('at_assume_latest', __return_false() ) || apply_filters('addthis_assume_latest', __return_false() ) ) {
930
  if ( is_admin() ) {
931
  add_action( 'admin_init', 'register_addthis_settings' );
932
  }
936
 
937
 
938
  $script_location = apply_filters( 'at_files_uri', plugins_url( '', basename(dirname(__FILE__)) ) ) . '/addthis/js/addthis.js' ;
939
+ $script_location = apply_filters( 'addthis_files_uri', plugins_url( '', basename(dirname(__FILE__)) ) ) . '/addthis/js/addthis.js' ;
940
+
941
  $style_location = apply_filters( 'at_files_uri', plugins_url( '', basename(dirname(__FILE__)) ) ) .'/addthis/css/addthis.css' ;
942
+ $style_location = apply_filters( 'addthis_files_uri', plugins_url( '', basename(dirname(__FILE__)) ) ) .'/addthis/css/addthis.css' ;
943
+
944
 
945
  wp_register_style( 'addthis', $style_location );
946
  wp_register_script( 'addthis', $script_location , array('jquery-ui-tabs') );
950
 
951
  add_filter('admin_menu', 'addthis_admin_menu');
952
 
953
+ if ( apply_filters( 'at_do_options_upgrades', '__return_true') || apply_filters( 'addthis_do_options_upgrades', '__return_true') )
954
  {
955
  if ( get_option('addthis_product') !== false && ! is_array( $options ) )
956
  addthis_options_200();
1026
 
1027
  $text = get_the_content('');
1028
  $text = strip_shortcodes( $text );
1029
+
1030
  remove_filter('the_content', 'addthis_display_social_widget', 15);
1031
 
1032
  $text = apply_filters('the_content', $text);
1033
+
1034
+ add_filter('the_content', 'addthis_display_social_widget', 15);
1035
+
1036
  $text = str_replace(']]>', ']]&gt;', $text);
1037
  $text = strip_tags($text);
1038
  $excerpt_length = apply_filters('excerpt_length', 55);
1251
 
1252
  $script = "\n<!-- AddThis Button Begin -->\n"
1253
  .'<script type="text/javascript">'
1254
+ ."var addthis_product = 'wpp-259';\n";
1255
 
1256
 
1257
  $pub = (isset($options['profile'])) ? $options['profile'] : false ;
1287
  if ( isset($options['addthis_brand']) )
1288
  $addthis_config['ui_cobrand'] = $options['addthis_brand'];
1289
 
1290
+ if (isset($options['addthis_508']) && $options['addthis_508'] == true)
1291
+ $addthis_config['ui_508_compliant'] = true;
1292
 
1293
  $addthis_config = apply_filters('addthis_config_js_var', $addthis_config);
1294
 
1300
  $script .= 'var addthis_options = "'.$options['addthis_options'].'";';
1301
 
1302
  if (isset($options['addthis_twitter_template'])){
1303
+ $addthis_share['templates']['twitter'] = esc_js($options['addthis_twitter_template']);
1304
+
1305
+ }
1306
+ if (isset($options['addthis_bitly_login']) && isset($options['addthis_bitly_key']) ){
1307
+ $addthis_share['url_transforms']['shorten']['twitter'] = 'bitly';
1308
+ $addthis_share['shorteners']['bitly']['login'] = esc_js($options['addthis_bitly_login']);
1309
+ $addthis_share['shorteners']['bitly']['apiKey'] = esc_js($options['addthis_bitly_key']);
1310
  }
1311
 
1312
+ if (isset($addthis_share))
1313
+ $script .= 'if (typeof(addthis_share) == "undefined"){ addthis_share = ' . json_encode( apply_filters('addthis_share_js_var', $addthis_share ) ) .';}';
1314
  $script .= '</script>';
1315
 
1316
 
1452
 
1453
  function addthis_options_page_scripts()
1454
  {
1455
+ $script = (addthis_get_wp_version() >= 3.2 || apply_filters('at_assume_latest', __return_false() ) || apply_filters('addthis_assume_latest', __return_false() ) ) ? 'options-page.32.js' : 'options-page.js';
1456
+
1457
+ $script_location = apply_filters( 'at_files_uri', plugins_url( '', basename(dirname(__FILE__)) ) ) . '/addthis/js/'.$script ;
1458
+ $script_location = apply_filters( 'addthis_files_uri', plugins_url( '', basename(dirname(__FILE__)) ) ) . '/addthis/js/'.$script ;
1459
  wp_enqueue_script( 'addthis_options_page_script', $script_location , array('jquery-ui-tabs', 'thickbox' ));
1460
+
1461
  }
1462
 
1463
  function addthis_options_page_style()
1464
  {
1465
  $style_location = apply_filters( 'at_files_uri' , plugins_url('', basename(dirname(__FILE__)) ) ) . '/addthis/css/options-page.css' ;
1466
+ $style_location = apply_filters( 'addthis_files_uri' , plugins_url('', basename(dirname(__FILE__)) ) ) . '/addthis/css/options-page.css' ;
1467
  wp_enqueue_style( 'addthis_options_page_style', $style_location);
1468
  wp_enqueue_style( 'thickbox' );
1469
  }
1506
  'below_custom_preferred' => '',
1507
  'below_custom_more' => '',
1508
  'addthis_twitter_template' => '',
1509
+ 'addthis_508' => '',
1510
+ 'addthis_bitly_login' => '',
1511
+ 'addthis_bitly_key' => '',
1512
  );
1513
 
1514
  function addthis_plugin_options_php4() {
1531
  <form id="addthis_settings" method="post" action="options.php">
1532
  <?php
1533
  // use the old-school settings style in older versions of wordpress
1534
+ if (addthis_get_wp_version() >= 2.7 || apply_filters('at_assume_latest', __return_false() ) || apply_filters('addthis_assume_latest', __return_false() ) ) {
1535
  settings_fields('addthis');
1536
  } else {
1537
  wp_nonce_field('update-options');
1538
  }
1539
 
1540
+ $addthis_options = get_option('addthis_settings');
1541
+ if ($addthis_options == false)
1542
+ add_option('addthis_settings', array() );
1543
+
1544
  foreach ( array( 'addthis_show_stats', 'addthis_append_data', 'addthis_showonhome', 'addthis_showonpages', 'addthis_showonarchives', 'addthis_showoncats' ) as $option)
1545
  {
1546
  if ( $addthis_options && ! isset($addthis_options[$option]) )
1566
  <td id="above" colspan="2">
1567
  <p><?php _e("Above the post", 'addthis_trans_domain') ?>&nbsp;&nbsp;<span class="description"><input type="checkbox" name="addthis_settings[show_above]" <?php echo ('none' == $above) ? 'checked="checked"' : '';?> />&nbsp;none</span></p>
1568
  <?php $imgLocationBase = apply_filters( 'at_files_uri', plugins_url( '' , basename(dirname(__FILE__)))) . '/addthis/img/' ;
1569
+ $imgLocationBase = apply_filters( 'addthis_files_uri', plugins_url( '' , basename(dirname(__FILE__)))) . '/addthis/img/' ;
1570
  foreach ($addthis_new_styles as $k => $v)
1571
  {
1572
  $class = 'hidden';
1700
  <th scope="row"><?php _e("Track <a href=\"//www.addthis.com/blog/2010/03/11/clickback-analytics-measure-traffic-back-to-your-site-from-addthis/\" target=\"_blank\">clickbacks</a>:", 'addthis_trans_domain' ); ?></th>
1701
  <td><input type="checkbox" name="addthis_settings[addthis_append_data]" value="true" <?php echo $addthis_append_data == true ? 'checked="checked"' : ''; ?>/></td>
1702
  </tr>
 
1703
  <tr>
1704
  <th scope="row"><?php _e("Track Address Bar Shares", 'addthis_trans_domain' ); ?></th>
1705
  <td><input type="checkbox" name="addthis_settings[addthis_addressbar]" value="true" <?php echo ($addthis_addressbar == true ? 'checked="checked"' : ''); ?>/></td>
1706
  </tr>
 
1707
  <tr>
1708
  <th scope="row"><?php _e("Show on homepage:", 'addthis_trans_domain' ); ?></th>
1709
  <td><input type="checkbox" name="addthis_settings[addthis_showonhome]" value="true" <?php echo ($addthis_showonhome == true ? 'checked="checked"' : ''); ?>/></td>
1724
  <th scope="row"><?php _e("Show on excerpts:", 'addthis_trans_domain' ); ?></th>
1725
  <td><input type="checkbox" name="addthis_settings[addthis_showonexcerpts]" value="true" <?php echo ( $addthis_showonexcerpts == true ? 'checked="checked"' : ''); ?>/></td>
1726
  </tr>
1727
+ <tr>
1728
+ <th scope="row"><?php _e("Enable Enhanced Accessibility", 'addthis_trans_domain' ); ?></th>
1729
+ <td><input type="checkbox" name="addthis_settings[addthis_508]" value="true" <?php echo ( $addthis_508 == true ? 'checked="checked"' : ''); ?>/></td>
1730
+ </tr>
1731
  <tr valign="top">
1732
  <td colspan="2"></td>
1733
  </tr>
1748
  <td><input type="text" name="addthis_settings[addthis_brand]" value="<?php echo $addthis_brand; ?>" /></td>
1749
  </tr>
1750
  <tr valign="top">
1751
+ <th scope="row"><?php _e("<a href='http://www.addthis.com/help/client-api#configuration-sharing-templates'>Twitter Template</a>( not for tweet button) :", 'addthis_trans_domain' ); ?></th>
1752
  <td><input type="text" name="addthis_settings[addthis_twitter_template]" value="<?php echo $addthis_twitter_template; ?>" /></td>
1753
  </tr>
1754
  <tr valign="top">
1870
 
1871
  require_once('addthis_post_metabox.php');
1872
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1873
  ?>
js/options-page.32.js ADDED
@@ -0,0 +1,139 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).ready(function($) {
2
+ $( "#tabs" ).tabs();
3
+
4
+ var thickDims, tbWidth, tbHeight;
5
+ thickDims = function() {
6
+ var tbWindow = $('#TB_window'), H = $(window).height(), W = $(window).width(), w, h;
7
+
8
+ w = (tbWidth && tbWidth < W - 90) ? tbWidth : W - 90;
9
+ h = (tbHeight && tbHeight < H - 60) ? tbHeight : H - 60;
10
+ if ( tbWindow.size() ) {
11
+ tbWindow.width(w).height(h);
12
+ $('#TB_iframeContent').width(w).height(h - 27);
13
+ tbWindow.css({'margin-left': '-' + parseInt((w / 2),10) + 'px'});
14
+ if ( typeof document.body.style.maxWidth != 'undefined' )
15
+ tbWindow.css({'top':'30px','margin-top':'0'});
16
+ }
17
+ };
18
+
19
+ $('a.thickbox-preview').click( function() {
20
+
21
+ var previewLink = this;
22
+
23
+ var $inputs = $('#addthis_settings :input');
24
+
25
+ var values = {};
26
+ $.each($('#addthis_settings').serializeArray(), function(i, field) {
27
+
28
+ var thisName = field.name
29
+ if (thisName.indexOf("addthis_settings[") != -1 )
30
+ {
31
+ thisName = thisName.replace("addthis_settings[", '');
32
+ thisName = thisName.replace("]", '');
33
+ }
34
+
35
+ values[thisName] = field.value;
36
+ });
37
+
38
+ var stuff = $.param(values, true);
39
+
40
+ var data = {
41
+ action: 'at_save_transient',
42
+ value : stuff
43
+ };
44
+
45
+ jQuery.post(ajaxurl, data, function(response) {
46
+ // Fix for WP 2.9's version of lightbox
47
+ if ( typeof tb_click != 'undefined' && $.isFunction(tb_click.call))
48
+ {
49
+ tb_click.call(previewLink);
50
+ }
51
+ var href = $(previewLink).attr('href');
52
+ var link = '';
53
+
54
+
55
+ if ( tbWidth = href.match(/&tbWidth=[0-9]+/) )
56
+ tbWidth = parseInt(tbWidth[0].replace(/[^0-9]+/g, ''), 10);
57
+ else
58
+ tbWidth = $(window).width() - 90;
59
+
60
+ if ( tbHeight = href.match(/&tbHeight=[0-9]+/) )
61
+ tbHeight = parseInt(tbHeight[0].replace(/[^0-9]+/g, ''), 10);
62
+ else
63
+ tbHeight = $(window).height() - 60;
64
+
65
+ $('#TB_title').css({'background-color':'#222','color':'#dfdfdf'});
66
+ $('#TB_closeAjaxWindow').css({'float':'left'});
67
+ $('#TB_ajaxWindowTitle').css({'float':'right'}).html(link);
68
+
69
+ $('#TB_iframeContent').width('100%');
70
+
71
+ thickDims();
72
+
73
+ });
74
+ return false;
75
+ });
76
+
77
+ $('#above_more').click( function() {
78
+ $('#above .select_row').removeClass('hidden');
79
+ $(this).hide();
80
+ return false;
81
+ });
82
+ $('#below_more').click( function() {
83
+ $('#below .select_row').removeClass('hidden');
84
+ $(this).hide();
85
+ return false;
86
+ });
87
+
88
+ var show_above = $('input[name="addthis_settings[show_above]"]');
89
+ var show_below = $('input[name="addthis_settings[show_below]"]');
90
+ if ( show_above.prop('checked') != "undefined" && show_above.prop('checked') == true)
91
+ {
92
+ $('.above_option').toggleClass('hide');
93
+ }
94
+
95
+ if ( show_below.prop('checked') != "undefined" && show_below.prop('checked') == true)
96
+ {
97
+ $('.below_option').toggleClass('hide');
98
+ }
99
+
100
+ $('input[name="addthis_settings[show_above]"]').change( function() {
101
+ $('.above_option').toggleClass('hide');
102
+ });
103
+
104
+ $('input[name="addthis_settings[show_below]"]').change( function() {
105
+ $('.below_option').toggleClass('hide');
106
+ });
107
+
108
+
109
+ var aboveCustom = $('#above_custom_button');
110
+ var aboveCustomShow = function(){
111
+ if ( aboveCustom.prop('checked') != 'undefined' && aboveCustom.prop('checked') == true)
112
+ {
113
+ $('.above_option_custom').removeClass('hidden');
114
+ }
115
+ else
116
+ {
117
+ $('.above_option_custom').addClass('hidden');
118
+ }
119
+ };
120
+ var belowCustom = $('#below_custom_button');
121
+ var belowCustomShow = function(){
122
+ if ( belowCustom.prop('checked') != 'undefined' && belowCustom.prop('checked') == true)
123
+ {
124
+ $('.below_option_custom').removeClass('hidden');
125
+ }
126
+ else
127
+ {
128
+ $('.below_option_custom').addClass('hidden');
129
+ }
130
+ };
131
+
132
+ aboveCustomShow();
133
+ belowCustomShow();
134
+
135
+ $('input[name="addthis_settings[above]"]').change( function(){aboveCustomShow();} );
136
+ $('input[name="addthis_settings[below]"]').change( function(){belowCustomShow();} );
137
+
138
+
139
+ });
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === AddThis featuring Sharing Buttons / Facebook Like / Tweet Button / Google + 1 ===
2
  Contributors: _mjk_, jorbin
3
- Tags: share, addthis, social, bookmark, sharing, bookmarking, widget,AddThis, addtoany, aim, bookmark, buzz, del.icio.us, Digg,e-mail, email, Facebook, google bookmarks, google buzz, myspace,network, NewsVine, Reddit, Share, share this, sharethis, social, socialize, stumbleupon, twitter, windows live, yahoo buzz, plus one, google plus one, plus 1, + one, + 1
4
  Requires at least: 2.9
5
  Tested up to: 3.1.3
6
- Stable tag: 2.1.1
7
 
8
  The AddThis Social Bookmarking Widget allows any visitor to bookmark and share your site easily with many popular services.
9
 
@@ -12,6 +12,8 @@ Get more traffic back to your site by installing the AddThis WordPress plugin. W
12
 
13
  Optionally, sign up for a free AddThis.com account to see how your visitors are sharing your content: which services they're using for sharing, which content is shared the most, and more.
14
 
 
 
15
  <a href="http://www.addthis.com/blog">AddThis Blog</a> | <a href="http://www.addthis.com/privacy">Privacy Policy</a>
16
 
17
  == Installation ==
@@ -73,6 +75,9 @@ In the screen options you can enable the AddThis meta box. Check the box and sa
73
  PHP 5+ is preferred; PHP 4 is supported.
74
 
75
  == Changelog ==
 
 
 
76
  = 2.1.1 =
77
  * Add Google +1
78
 
@@ -158,6 +163,9 @@ Fixed nondeterministic bug with the_title(), causing the title to occasionally a
158
 
159
 
160
  == Upgrade Notice ==
 
 
 
161
  = 2.1.1 =
162
  Add +1 to the button options
163
 
1
  === AddThis featuring Sharing Buttons / Facebook Like / Tweet Button / Google + 1 ===
2
  Contributors: _mjk_, jorbin
3
+ Tags: share, addthis, social, bookmark, sharing, bookmarking, widget,AddThis, addtoany, aim, bookmark, buzz, del.icio.us, Digg,e-mail, email, Facebook, google bookmarks, google buzz, myspace,network, NewsVine, Reddit, Share, share this, sharethis, social, socialize, stumbleupon, twitter, windows live, yahoo buzz, plus one, google plus one, plus 1, + one, + 1, address bar sharing
4
  Requires at least: 2.9
5
  Tested up to: 3.1.3
6
+ Stable tag: 2.1.2
7
 
8
  The AddThis Social Bookmarking Widget allows any visitor to bookmark and share your site easily with many popular services.
9
 
12
 
13
  Optionally, sign up for a free AddThis.com account to see how your visitors are sharing your content: which services they're using for sharing, which content is shared the most, and more.
14
 
15
+ Another options feature is Address Bar sharing. <a title="Address Bar Sharing Information" href="http://www.addthis.com/help/address-bar-sharing-analytics">Address Bar sharing analytics</a> give you the ability to track URLs that have been sent via emails, IMs and to forums using copy/paste. This captures a whole new segment of sharing that we have found to be up to 10x that of using social buttons. You now get a larger picture of where your direct traffic is coming from and how your users are really sharing your content.
16
+
17
  <a href="http://www.addthis.com/blog">AddThis Blog</a> | <a href="http://www.addthis.com/privacy">Privacy Policy</a>
18
 
19
  == Installation ==
75
  PHP 5+ is preferred; PHP 4 is supported.
76
 
77
  == Changelog ==
78
+ = 2.1.2 =
79
+ Add Address Bar sharing
80
+
81
  = 2.1.1 =
82
  * Add Google +1
83
 
163
 
164
 
165
  == Upgrade Notice ==
166
+ = 2.1.2 =
167
+ Add Addresss Bar Sharing
168
+
169
  = 2.1.1 =
170
  Add +1 to the button options
171