Changeset 1822395 for add-to-any
- Timestamp:
- 02/14/2018 11:35:41 PM (4 months ago)
- Location:
- add-to-any/trunk
- Files:
-
- 10 deleted
- 5 edited
-
README.txt (modified) (3 diffs)
-
add-to-any.php (modified) (12 diffs)
-
addtoany.admin.php (modified) (8 diffs)
-
addtoany.services.php (modified) (9 diffs)
-
addtoany.widgets.php (modified) (2 diffs)
-
icons/aim.svg (deleted)
-
icons/buddymarks.svg (deleted)
-
icons/dihitt.svg (deleted)
-
icons/jamespot.svg (deleted)
-
icons/netlog.svg (deleted)
-
icons/newsvine.svg (deleted)
-
icons/nujij.svg (deleted)
-
icons/segnalo.svg (deleted)
-
icons/stumpedia.svg (deleted)
-
icons/youmob.svg (deleted)
Legend:
- Unmodified
- Added
- Removed
-
add-to-any/trunk/README.txt
r1793931 r1822395 4 4 Requires at least: 3.7 5 5 Tested up to: 4.9 6 Stable tag: 1.7.2 36 Stable tag: 1.7.24 7 7 8 8 Share buttons for WordPress including the AddToAny sharing button, Facebook, Twitter, Google+, Pinterest, WhatsApp, many more, and follow icons too. … … 62 62 63 63 * Over 10 years of development 64 * Over 7million downloads64 * Over 8 million downloads 65 65 * Translated into dozens of languages 66 66 * Ongoing support from the community … … 351 351 352 352 == Changelog == 353 354 = 1.7.24 = 355 * Move JS into a single block to prevent issues caused by some site optimization plugins 356 * Simplify file paths & URLs 357 * Prevent Cloudflare's experimental Rocket Loader from causing script issues 358 * Remove Google+ share count options because Google+ no longer provides counters 359 * Remove AIM, BuddyMarks, diHITT, Jamespot, Netlog, NewsVine, NUjij, Segnalo, Stumpedia, YouMob 353 360 354 361 = 1.7.23 = -
add-to-any/trunk/add-to-any.php
r1793931 r1822395 4 4 Plugin URI: https://www.addtoany.com/ 5 5 Description: Share buttons for your pages including AddToAny's universal sharing button, Facebook, Twitter, Google+, Pinterest, WhatsApp and many more. 6 Version: 1.7.2 36 Version: 1.7.24 7 7 Author: AddToAny 8 8 Author URI: https://www.addtoany.com/ … … 13 13 // Explicitly globalize to support bootstrapped WordPress 14 14 global $A2A_locale, $A2A_FOLLOW_services, 15 $A2A_SHARE_SAVE_ plugin_basename, $A2A_SHARE_SAVE_options, $A2A_SHARE_SAVE_plugin_dir, $A2A_SHARE_SAVE_plugin_url_path,15 $A2A_SHARE_SAVE_options, $A2A_SHARE_SAVE_plugin_dir, $A2A_SHARE_SAVE_plugin_url, 16 16 $A2A_SHARE_SAVE_services, $A2A_SHARE_SAVE_amp_icons_css; 17 17 18 $A2A_SHARE_SAVE_plugin_basename = plugin_basename( dirname( __FILE__ ) );19 18 $A2A_SHARE_SAVE_plugin_dir = untrailingslashit( plugin_dir_path( __FILE__ ) ); 20 $A2A_SHARE_SAVE_plugin_url_path = untrailingslashit( plugin_dir_url( __FILE__ ) ); 21 22 // HTTPS? 23 $A2A_SHARE_SAVE_plugin_url_path = is_ssl() ? str_replace( 'http:', 'https:', $A2A_SHARE_SAVE_plugin_url_path ) : $A2A_SHARE_SAVE_plugin_url_path; 19 $A2A_SHARE_SAVE_plugin_url = untrailingslashit( plugin_dir_url( __FILE__ ) ); 20 24 21 // Set AddToAny locale (JavaScript) 25 22 $A2A_locale = ! isset ( $A2A_locale ) ? '' : $A2A_locale; … … 32 29 function A2A_SHARE_SAVE_init() { 33 30 global $A2A_SHARE_SAVE_plugin_dir, 34 $A2A_SHARE_SAVE_plugin_basename,35 31 $A2A_SHARE_SAVE_options; 36 32 37 33 // Load the textdomain for translations 38 load_plugin_textdomain( 'add-to-any', false, $A2A_SHARE_SAVE_plugin_basename. '/languages/' );34 load_plugin_textdomain( 'add-to-any', false, plugin_basename( dirname( __FILE__ ) ) . '/languages/' ); 39 35 40 36 // Update plugin options … … 187 183 // $args array: output_later, html_container_open, html_container_close, html_wrap_open, html_wrap_close, linkname, linkurl 188 184 189 global $A2A_SHARE_SAVE_plugin_url_path, 190 $A2A_SHARE_SAVE_services, 185 global $A2A_SHARE_SAVE_services, 191 186 $A2A_FOLLOW_services, 192 187 $A2A_SHARE_SAVE_amp_icons_css; … … 237 232 } else { 238 233 // Default to local SVGs (not an option currently) 239 $icons_dir = $A2A_SHARE_SAVE_plugin_url_path . '/icons/';234 $icons_dir = plugins_url('/icons/', __FILE__ ); 240 235 $icons_type = 'svg'; 241 236 } … … 383 378 384 379 // $args array = output_later, html_container_open, html_container_close, html_wrap_open, html_wrap_close, linkname, linkurl, no_universal_button 385 386 global $A2A_SHARE_SAVE_plugin_url_path;387 380 388 381 $options = get_option( 'addtoany_options', array() ); … … 516 509 517 510 elseif ( $special_service_code == 'google_plusone' ) { 518 $custom_attributes .= ( $options['special_google_plusone_options']['show_count'] == '1' ) ? '' : ' data-annotation="none"';519 511 $custom_attributes .= ' data-href="' . $linkurl . '"'; 520 512 $special_html = sprintf( $special_anchor_template, $special_service_code, $custom_attributes ); … … 522 514 523 515 elseif ( $special_service_code == 'google_plus_share' ) { 524 $custom_attributes .= ( $options['special_google_plus_share_options']['show_count'] == '1' ) ? '' : ' data-annotation="none"';525 516 $custom_attributes .= ' data-href="' . $linkurl . '"'; 526 517 $special_html = sprintf( $special_anchor_template, $special_service_code, $custom_attributes ); … … 766 757 . ( $additional_js ? "\n" . stripslashes( $additional_js ) : '' ); 767 758 768 $javascript_header = "\n" . '<script type="text/javascript">' . "\n"769 759 $javascript_header = "\n" 760 . '<script data-cfasync="false">' . "\n" 770 761 . 'window.a2a_config=window.a2a_config||{};' 771 762 . 'a2a_config.callbacks=[];a2a_config.overlays=[];' … … 773 764 . A2A_menu_locale() 774 765 . $script_configs 775 776 . "\n</script>\n" 777 778 . '<script type="text/javascript" src="' . $static_server . '/page.js" async="async"></script>' . "\n"; 766 . "\n" 767 . '(function(d,s,a,b){' 768 . 'a=d.createElement(s);' 769 . 'b=d.getElementsByTagName(s)[0];' 770 . 'a.async=1;' 771 . 'a.src="' . $static_server . '/page.js";' 772 . 'b.parentNode.insertBefore(a,b);' 773 . '})(document,"script");' 774 . "\n</script>\n"; 779 775 780 776 echo $javascript_header; … … 935 931 936 932 function A2A_SHARE_SAVE_stylesheet() { 937 global $A2A_SHARE_SAVE_options , $A2A_SHARE_SAVE_plugin_url_path;933 global $A2A_SHARE_SAVE_options; 938 934 939 935 $options = $A2A_SHARE_SAVE_options; 940 936 941 937 if ( ! is_admin() ) { 942 wp_enqueue_style( 'addtoany', $A2A_SHARE_SAVE_plugin_url_path . '/addtoany.min.css', false, '1.14' );938 wp_enqueue_style( 'addtoany', plugins_url('/addtoany.min.css', __FILE__ ), false, '1.14' ); 943 939 944 940 // Prepare inline CSS … … 1006 1002 1007 1003 function A2A_SHARE_SAVE_enqueue_script() { 1008 global $A2A_SHARE_SAVE_plugin_url_path;1009 1010 1004 if ( wp_script_is( 'jquery', 'registered' ) ) { 1011 wp_enqueue_script( 'addtoany', $A2A_SHARE_SAVE_plugin_url_path . '/addtoany.min.js', array( 'jquery' ), '1.0' );1005 wp_enqueue_script( 'addtoany', plugins_url('/addtoany.min.js', __FILE__ ), array( 'jquery' ), '1.0' ); 1012 1006 } 1013 1007 } -
add-to-any/trunk/addtoany.admin.php
r1772754 r1822395 194 194 function A2A_SHARE_SAVE_options_page() { 195 195 196 global $A2A_SHARE_SAVE_plugin_url _path,196 global $A2A_SHARE_SAVE_plugin_url, 197 197 $A2A_SHARE_SAVE_services; 198 198 … … 355 355 'show_count' => '-1' // Twitter doesn't provide counts anymore 356 356 ); 357 $new_options['special_google_plusone_options'] = array(358 'show_count' => ( ( isset( $_POST['addtoany_google_plusone_show_count'] ) && $_POST['addtoany_google_plusone_show_count'] == '1' ) ? '1' : '-1' )359 );360 $new_options['special_google_plus_share_options'] = array(361 'show_count' => ( ( isset( $_POST['addtoany_google_plus_share_show_count'] ) && $_POST['addtoany_google_plus_share_show_count'] == '1' ) ? '1' : '-1' )362 );363 357 $new_options['special_pinterest_pin_options'] = array( 364 358 'show_count' => ( ( isset( $_POST['addtoany_pinterest_pin_show_count'] ) && $_POST['addtoany_pinterest_pin_show_count'] == '1' ) ? '1' : '-1' ) … … 439 433 <td><fieldset> 440 434 <ul id="addtoany_services_sortable" class="addtoany_admin_list addtoany_override"> 441 <li class="dummy"><img src="<?php echo $A2A_SHARE_SAVE_plugin_url _path; ?>/icons/transparent.gif" width="32" height="32" alt="" /></li>435 <li class="dummy"><img src="<?php echo $A2A_SHARE_SAVE_plugin_url; ?>/icons/transparent.gif" width="32" height="32" alt="" /></li> 442 436 </ul> 443 437 <p id="addtoany_services_info"><?php _e("Choose the services you want below. Click a chosen service again to remove. Reorder services by dragging and dropping as they appear above.", 'add-to-any'); ?></p> … … 458 452 ?> 459 453 <li data-addtoany-icon-name="<?php echo $site['icon']; ?>"<?php echo $special_service; ?> id="a2a_wp_<?php echo $service_safe_name; ?>" title="<?php echo $site['name']; ?>"> 460 <img src="<?php echo (isset($site['icon_url'])) ? $site['icon_url'] : $A2A_SHARE_SAVE_plugin_url _path.'/icons/'.$site['icon'].'.svg'; ?>" width="<?php echo (isset($site['icon_width'])) ? $site['icon_width'] : '24'; ?>" height="<?php echo (isset($site['icon_height'])) ? $site['icon_height'] : '24'; ?>"<?php if ( isset( $site['color'] ) ) : ?> style="background-color:#<?php echo $site['color']; endif; ?>"><?php echo $site['name']; ?>454 <img src="<?php echo (isset($site['icon_url'])) ? $site['icon_url'] : $A2A_SHARE_SAVE_plugin_url.'/icons/'.$site['icon'].'.svg'; ?>" width="<?php echo (isset($site['icon_width'])) ? $site['icon_width'] : '24'; ?>" height="<?php echo (isset($site['icon_height'])) ? $site['icon_height'] : '24'; ?>"<?php if ( isset( $site['color'] ) ) : ?> style="background-color:#<?php echo $site['color']; endif; ?>"><?php echo $site['name']; ?> 461 455 </li> 462 456 <?php 463 457 } ?> 464 458 <li style="clear:left" id="a2a_wp_facebook_like" class="addtoany_special_service addtoany_3p_button" title="Facebook Like button"> 465 <img src="<?php echo $A2A_SHARE_SAVE_plugin_url _path.'/icons/facebook_like_2x.png'; ?>" width="101" height="40" alt="Facebook Like" />459 <img src="<?php echo $A2A_SHARE_SAVE_plugin_url.'/icons/facebook_like_2x.png'; ?>" width="101" height="40" alt="Facebook Like" /> 466 460 </li> 467 461 <li id="a2a_wp_twitter_tweet" class="addtoany_special_service addtoany_3p_button" title="Twitter Tweet button"> 468 <img src="<?php echo $A2A_SHARE_SAVE_plugin_url _path.'/icons/twitter_tweet_2x.png'; ?>" width="122" height="40" alt="Twitter Tweet" />462 <img src="<?php echo $A2A_SHARE_SAVE_plugin_url.'/icons/twitter_tweet_2x.png'; ?>" width="122" height="40" alt="Twitter Tweet" /> 469 463 </li> 470 464 <li id="a2a_wp_google_plusone" class="addtoany_special_service addtoany_3p_button" title="Google +1 button"> 471 <img src="<?php echo $A2A_SHARE_SAVE_plugin_url _path.'/icons/google_plusone_2x.png'; ?>" width="64" height="40" alt="Google +1" />465 <img src="<?php echo $A2A_SHARE_SAVE_plugin_url.'/icons/google_plusone_2x.png'; ?>" width="64" height="40" alt="Google +1" /> 472 466 </li> 473 467 <li id="a2a_wp_google_plus_share" class="addtoany_special_service addtoany_3p_button" title="Google+ Share button"> 474 <img src="<?php echo $A2A_SHARE_SAVE_plugin_url _path.'/icons/google_plus_share_2x.png'; ?>" width="113" height="40" alt="Google+ Share" />468 <img src="<?php echo $A2A_SHARE_SAVE_plugin_url.'/icons/google_plus_share_2x.png'; ?>" width="113" height="40" alt="Google+ Share" /> 475 469 </li> 476 470 <li id="a2a_wp_pinterest_pin" class="addtoany_special_service addtoany_3p_button" title="Pinterest Pin It button"> 477 <img src="<?php echo $A2A_SHARE_SAVE_plugin_url _path.'/icons/pinterest_pin_2x.png'; ?>" width="80" height="40" alt="Pinterest Pin It" />471 <img src="<?php echo $A2A_SHARE_SAVE_plugin_url.'/icons/pinterest_pin_2x.png'; ?>" width="80" height="40" alt="Pinterest Pin It" /> 478 472 </li> 479 473 </ul> 480 474 <div id="addtoany_services_tip"> 481 475 <p style="line-height:0"> 482 <img src="<?php echo $A2A_SHARE_SAVE_plugin_url _path; ?>/icons/instagram.svg" width="24" height="24" style="margin-right:8px">483 <img src="<?php echo $A2A_SHARE_SAVE_plugin_url _path; ?>/icons/youtube.svg" width="24" height="24" style="margin-right:8px">484 <img src="<?php echo $A2A_SHARE_SAVE_plugin_url _path; ?>/icons/snapchat.svg" width="24" height="24">476 <img src="<?php echo $A2A_SHARE_SAVE_plugin_url; ?>/icons/instagram.svg" width="24" height="24" style="margin-right:8px"> 477 <img src="<?php echo $A2A_SHARE_SAVE_plugin_url; ?>/icons/youtube.svg" width="24" height="24" style="margin-right:8px"> 478 <img src="<?php echo $A2A_SHARE_SAVE_plugin_url; ?>/icons/snapchat.svg" width="24" height="24"> 485 479 </p> 486 480 <p>You can setup Instagram, YouTube, Snapchat, and other buttons in an AddToAny Follow widget.</p><p>Add the "AddToAny Follow" widget in <a href="customize.php?autofocus[panel]=widgets&return=options-general.php%3Fpage%3Daddtoany">Customize</a> or <a href="widgets.php">Widgets</a>.</p> … … 495 489 <label class="addtoany_override a2a_kit_size_32"> 496 490 <input name="A2A_SHARE_SAVE_button" value="A2A_SVG_32" type="radio"<?php if ( ! isset( $options['button'] ) || 'A2A_SVG_32' == $options['button'] ) echo ' checked="checked"'; ?> style="margin:9px 0;vertical-align:middle"> 497 <img src="<?php echo $A2A_SHARE_SAVE_plugin_url _path.'/icons/a2a.svg'; ?>" width="32" height="32" alt="AddToAny" onclick="this.parentNode.firstChild.checked=true" />491 <img src="<?php echo $A2A_SHARE_SAVE_plugin_url.'/icons/a2a.svg'; ?>" width="32" height="32" alt="AddToAny" onclick="this.parentNode.firstChild.checked=true" /> 498 492 </label> 499 493 <br> … … 879 873 // Special service options? 880 874 service_name = services_array[i].substr(7); 881 if (service_name == 'facebook_like' || service_name == 'twitter_tweet' || service_name == ' google_plusone' || service_name == 'google_plus_share' || service_name == 'pinterest_pin') {882 if (service_name == ' google_plusone' || service_name == 'google_plus_share' || service_name == 'pinterest_pin') {875 if (service_name == 'facebook_like' || service_name == 'twitter_tweet' || service_name == 'pinterest_pin') { 876 if (service_name == 'pinterest_pin') { 883 877 show_count_value = (jQuery('#' + services_array[i] + '_show_count').is(':checked')) ? '1' : '-1' ; 884 878 jQuery('#addtoany_admin_form').append('<input class="addtoany_hidden_options" name="addtoany_' + service_name + '_show_count" type="hidden" value="' + show_count_value + '"/>'); … … 928 922 + '<option' + checked + ' value="recommend">Recommend</option>' 929 923 + '</select>'; 930 } else if ('twitter_tweet' == this_service_name) { 931 // twitter_tweet doesn't provide counts anymore 932 } else { 933 // google_plusone & google_plus_share & pinterest_pin 924 } else if ('pinterest_pin' == this_service_name) { 934 925 if (service_options[this_service_name] && service_options[this_service_name].show_count) { 935 926 checked = ' checked="checked"'; … … 1034 1025 && isset( $options['special_facebook_like_options'] ) && $options['special_facebook_like_options']['verb'] == 'recommend' ) { 1035 1026 ?>service_options.facebook_like = {verb: 'recommend'};<?php 1036 }1037 if ( isset( $_POST['addtoany_google_plusone_show_count'] ) && $_POST['addtoany_google_plusone_show_count'] == '1'1038 || ! isset( $_POST['addtoany_google_plusone_show_count'] )1039 && isset( $options['special_google_plusone_options'] ) && $options['special_google_plusone_options']['show_count'] == '1' ) {1040 ?>service_options.google_plusone = {show_count: 1};<?php1041 }1042 if ( isset( $_POST['addtoany_google_plus_share_show_count'] ) && $_POST['addtoany_google_plus_share_show_count'] == '1'1043 || ! isset( $_POST['addtoany_google_plus_share_show_count'] )1044 && isset( $options['special_google_plus_share_options'] ) && $options['special_google_plus_share_options']['show_count'] == '1' ) {1045 ?>service_options.google_plus_share = {show_count: 1};<?php1046 1027 } 1047 1028 if ( isset( $_POST['addtoany_pinterest_pin_show_count'] ) && $_POST['addtoany_pinterest_pin_show_count'] == '1' -
add-to-any/trunk/addtoany.services.php
r1793931 r1822395 48 48 "color" => "12AF0A", 49 49 ), 50 "aim" => array(51 "name" => "AIM",52 "icon" => "aim",53 "color" => "00C2FF",54 ),55 50 "amazon_wish_list" => array( 56 51 "name" => "Amazon Wish List", … … 103 98 "color" => "1A74B0", 104 99 ), 105 "buddymarks" => array(106 "name" => "BuddyMarks",107 "icon" => "buddymarks",108 "color" => "96C044",109 ),110 100 "buffer" => array( 111 101 "name" => "Buffer", … … 153 143 "color" => "2A2A2A", 154 144 ), 155 "dihitt" => array(156 "name" => "diHITT",157 "icon" => "dihitt",158 "color" => "FF6300",159 ),160 145 "diigo" => array( 161 146 "name" => "Diigo", … … 238 223 "color" => "2A2A2A", 239 224 ), 240 "jamespot" => array(241 "name" => "Jamespot",242 "icon" => "jamespot",243 "color" => "FF9E2C",244 ),245 225 "kakao" => array( 246 226 "name" => "Kakao", … … 298 278 "color" => "2A2A2A", 299 279 ), 300 "netlog" => array(301 "name" => "Netlog",302 "icon" => "netlog",303 "color" => "2A2A2A",304 ),305 280 "netvouz" => array( 306 281 "name" => "Netvouz", … … 308 283 "color" => "6C3", 309 284 ), 310 "newsvine" => array(311 "name" => "NewsVine",312 "icon" => "newsvine",313 "color" => "055D00",314 ),315 "nujij" => array(316 "name" => "NUjij",317 "icon" => "nujij",318 "color" => "D40000",319 ),320 285 "odnoklassniki" => array( 321 286 "name" => "Odnoklassniki", … … 398 363 "color" => "005EAC", 399 364 ), 400 "segnalo" => array(401 "name" => "Segnalo",402 "icon" => "segnalo",403 "color" => "FF6500",404 ),405 365 "sina_weibo" => array( 406 366 "name" => "Sina Weibo", … … 438 398 "color" => "EF4E23", 439 399 ), 440 "stumpedia" => array(441 "name" => "Stumpedia",442 "icon" => "stumpedia",443 "color" => "FFC808",444 ),445 400 "svejo" => array( 446 401 "name" => "Svejo", … … 542 497 "icon" => "yoolink", 543 498 "color" => "A2C538", 544 ),545 "youmob" => array(546 "name" => "YouMob",547 "icon" => "youmob",548 "color" => "3B599D",549 499 ), 550 500 "yummly" => array( -
add-to-any/trunk/addtoany.widgets.php
r1750180 r1822395 41 41 */ 42 42 public function widget( $args = array(), $instance ) { 43 44 global $A2A_SHARE_SAVE_plugin_url_path;45 46 43 $defaults = array( 47 44 'before_widget' => '', … … 131 128 */ 132 129 public function widget( $args = array(), $instance ) { 133 global $A2A_SHARE_SAVE_plugin_url_path;134 135 130 $defaults = array( 136 131 'before_widget' => '',
Note: See TracChangeset
for help on using the changeset viewer.