Changeset 2649883
- Timestamp:
- 12/28/2021 09:42:24 AM (4 years ago)
- Location:
- add-to-any/trunk
- Files:
-
- 1 added
- 3 edited
-
README.txt (modified) (2 diffs)
-
add-to-any.php (modified) (9 diffs)
-
addtoany.amp.css (added)
-
addtoany.compat.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
add-to-any/trunk/README.txt
r2631805 r2649883 5 5 Tested up to: 5.8 6 6 Requires PHP: 5.6 7 Stable tag: 1.8. 27 Stable tag: 1.8. 8 8 9 9 Share buttons for WordPress including the AddToAny sharing button, Facebook, Twitter, WhatsApp, Pinterest, Reddit, many more, and follow icons too. … … 346 346 347 347 == Changelog == 348 349 350 351 352 353 354 355 356 348 357 349 358 = 1.8.2 = -
add-to-any/trunk/add-to-any.php
r2631805 r2649883 4 4 * Plugin URI: https://www.addtoany.com/ 5 5 * Description: Share buttons for your pages including AddToAny's universal sharing button, Facebook, Twitter, LinkedIn, Pinterest, WhatsApp and many more. 6 * Version: 1.8. 26 * Version: 1.8. 7 7 * Author: AddToAny 8 8 * Author URI: https://www.addtoany.com/ … … 359 359 // Use AMP's "print" action. 360 360 if ( $is_amp && 'print' === $code_name ) { 361 $amp_on_attr = 'on="tap:AMP.print()"'; 362 $href_attr = '#'; 361 $amp_on_attr = ' on="tap:AMP.print()"'; 362 $href_attr = ' href="#print"'; 363 $target_attr = ''; 363 364 } else { 364 365 $amp_on_attr = ''; … … 366 367 367 368 // Set dimension attributes if using custom icons and dimension is specified. 368 if ( isset( $custom_icons ) ) {369 if ( isset( $custom_icons ) ) { 369 370 $width_attr = ! empty( $icons_width ) ? ' width="' . $icons_width . '"' : ''; 370 371 $height_attr = ! empty( $icons_height ) ? ' height="' . $icons_height . '"' : ''; … … 756 757 } 757 758 else { 758 // Output escaped HTML without stripping out positional styles as wp_kses* does.759 // Output escaped HTML without stripping out positional styles as wp_kses* does. 759 760 echo addtoany_kses( $floating_html ); 760 761 } … … 767 768 $floating_html = ADDTOANY_SHARE_SAVE_FLOATING( array( 'output_later' => true ) ); 768 769 769 // Output escaped HTML without stripping out positional styles as wp_kses* does.770 // Output escaped HTML without stripping out positional styles as wp_kses* does. 770 771 echo addtoany_kses( $floating_html ); 771 772 } … … 923 924 924 925 if ( ! is_admin() ) { 925 wp_enqueue_style( 'addtoany', plugins_url('/addtoany.min.css', __FILE__ ), false, '1.15' );926 927 926 // Prepare inline CSS. 928 927 $inline_css = ''; 928 929 930 931 932 933 934 935 936 937 929 938 930 939 $vertical_type = ( isset( $options['floating_vertical'] ) && 'none' != $options['floating_vertical'] ) ? $options['floating_vertical'] : false; … … 944 953 // Set media query. 945 954 $inline_css .= '@media screen and (max-width:' . $vertical_max_width . 'px){' . "\n" 946 . '.a2a_floating_style.a2a_vertical_style{display:none;}' . "\n"955 . '.a2a_floating_style.a2a_vertical_style{display:none;}' . "\n" 947 956 . '}'; 948 957 } … … 964 973 // Set media query. 965 974 $inline_css .= '@media screen and (min-width:' . $horizontal_min_width . 'px){' . "\n" 966 . '.a2a_floating_style.a2a_default_style{display:none;}' . "\n"975 . '.a2a_floating_style.a2a_default_style{display:none;}' . "\n" 967 976 . '}'; 968 977 } … … 994 1003 // Example: add_filter( 'addtoany_script_disabled', '__return_true' ); 995 1004 $script_disabled = apply_filters( 'addtoany_script_disabled', false ); 996 997 if ( is_admin() || is_feed() || $script_disabled ) 1005 1006 $is_amp = function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() ? true : false; 1007 1008 if ( is_admin() || is_feed() || $script_disabled || $is_amp ) 998 1009 return; 999 1010 -
add-to-any/trunk/addtoany.compat.php
r2623086 r2649883 2 2 3 3 /** 4 * Strips out disallowed HTML using wp_kses_post() while temporarily allowing some additional CSS in a style attribute. 4 * Strips out disallowed HTML using wp_kses_post() while temporarily allowing 5 * some additional HTML attributes and CSS in a style attribute. 5 6 */ 6 7 function addtoany_kses( $string ) { … … 18 19 19 20 // Strip out any disallowed HTML. 20 $string = wp_kses _post( $string);21 $string = wp_kses ); 21 22 22 23 // Revert kses filters to originals. 23 remove_filter( 'safe_style_css', 'a llow_css_properties' );24 remove_filter( 'safe_style_css', 'allow_css_properties' ); 24 25 remove_filter( 'safecss_filter_attr_allow_css', 'addtoany_kses_allow_css_declarations', 10, 2 ); 25 26 26 27 return $string; 28 29 30 31 32 33 34 35 36 37 27 38 } 28 39 … … 71 82 } 72 83 } 73 }74 75 /**76 * Load AMP (Accelerated Mobile Pages) compatibility functions.77 */78 79 add_action( 'amp_post_template_css', 'addtoany_amp_additional_css_styles' );80 81 function addtoany_amp_additional_css_styles( $amp_template ) {82 // CSS only.83 ?>84 .addtoany_list a {85 padding: 0 4px;86 }87 .addtoany_list a amp-img {88 display: inline-block;89 }90 <?php91 84 } 92 85
Note: See TracChangeset
for help on using the changeset viewer.