Ticket #51837: 51837.2.diff
File 51837.2.diff, 3.8 KB (added by , 4 years ago) |
---|
-
src/js/_enqueues/lib/emoji-loader.js
154 154 var script = document.createElement( 'script' ); 155 155 156 156 script.src = src; 157 script.defer = script.type = 'text/javascript'; 157 script.defer = true; 158 159 if ( settings.typeAttr ) { 160 script.type = settings.typeAttr; 161 } 162 158 163 document.getElementsByTagName( 'head' )[0].appendChild( script ); 159 164 } 160 165 -
src/js/_enqueues/lib/zxcvbn-async.js
16 16 var first, s; 17 17 s = document.createElement('script'); 18 18 s.src = _zxcvbnSettings.src; 19 s.type = 'text/javascript';19 s.type = _zxcvbnSettings.typeAttr; 20 20 s.async = true; 21 21 first = document.getElementsByTagName('script')[0]; 22 22 return first.parentNode.insertBefore(s, first); -
src/wp-includes/formatting.php
5664 5664 * @access private 5665 5665 */ 5666 5666 function _print_emoji_detection_script() { 5667 $type_attr = current_theme_supports( 'html5', 'script' ) ? '' : ' type="text/javascript"'; 5668 5667 5669 $settings = array( 5668 5670 /** 5669 5671 * Filters the URL where emoji png images are hosted. … … 5672 5674 * 5673 5675 * @param string $url The emoji base URL for png images. 5674 5676 */ 5675 'baseUrl' => apply_filters( 'emoji_url', 'https://s.w.org/images/core/emoji/13.0.1/72x72/' ),5677 'baseUrl' => apply_filters( 'emoji_url', 'https://s.w.org/images/core/emoji/13.0.1/72x72/' ), 5676 5678 5677 5679 /** 5678 5680 * Filters the extension of the emoji png files. … … 5681 5683 * 5682 5684 * @param string $extension The emoji extension for png files. Default .png. 5683 5685 */ 5684 'ext' => apply_filters( 'emoji_ext', '.png' ),5686 'ext' => apply_filters( 'emoji_ext', '.png' ), 5685 5687 5686 5688 /** 5687 5689 * Filters the URL where emoji SVG images are hosted. … … 5690 5692 * 5691 5693 * @param string $url The emoji base URL for svg images. 5692 5694 */ 5693 'svgUrl' => apply_filters( 'emoji_svg_url', 'https://s.w.org/images/core/emoji/13.0.1/svg/' ),5695 'svgUrl' => apply_filters( 'emoji_svg_url', 'https://s.w.org/images/core/emoji/13.0.1/svg/' ), 5694 5696 5695 5697 /** 5696 5698 * Filters the extension of the emoji SVG files. … … 5699 5701 * 5700 5702 * @param string $extension The emoji extension for svg files. Default .svg. 5701 5703 */ 5702 'svgExt' => apply_filters( 'emoji_svg_ext', '.svg' ), 5704 'svgExt' => apply_filters( 'emoji_svg_ext', '.svg' ), 5705 5706 /** 5707 * Filters the type attribute of the emoji script tag. 5708 * 5709 * @since x.y.z 5710 * 5711 * @param string $type_attr The emoji script tag type attribute. 5712 */ 5713 'typeAttr' => apply_filters( 'emoji_type_attr', $type_attr ), 5703 5714 ); 5704 5715 5705 5716 $version = 'ver=' . get_bloginfo( 'version' ); 5706 $type_attr = current_theme_supports( 'html5', 'style' ) ? '' : ' type="text/javascript"';5707 5717 5708 5718 if ( SCRIPT_DEBUG ) { 5709 5719 $settings['source'] = array( -
src/wp-includes/script-loader.php
1065 1065 'zxcvbn-async', 1066 1066 '_zxcvbnSettings', 1067 1067 array( 1068 'src' => empty( $guessed_url ) ? includes_url( '/js/zxcvbn.min.js' ) : $scripts->base_url . '/wp-includes/js/zxcvbn.min.js', 1068 'src' => empty( $guessed_url ) ? includes_url( '/js/zxcvbn.min.js' ) : $scripts->base_url . '/wp-includes/js/zxcvbn.min.js', 1069 'typeAttr' => current_theme_supports( 'html5', 'script' ) ? '' : ' type="text/javascript"', 1069 1070 ) 1070 1071 ); 1071 1072