Changeset 52132 for trunk/src/wp-includes/formatting.php
- Timestamp:
- 11/11/2021 02:47:10 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/formatting.php
r52035 r52132 5757 5757 ); 5758 5758 5759 $version = 'ver=' . get_bloginfo( 'version' ); 5760 $type_attr = current_theme_supports( 'html5', 'style' ) ? '' : ' type="text/javascript"'; 5759 $version = 'ver=' . get_bloginfo( 'version' ); 5761 5760 5762 5761 if ( SCRIPT_DEBUG ) { … … 5767 5766 'twemoji' => apply_filters( 'script_loader_src', includes_url( "js/twemoji.js?$version" ), 'twemoji' ), 5768 5767 ); 5769 5770 ?>5771 <script<?php echo $type_attr; ?>>5772 window._wpemojiSettings = <?php echo wp_json_encode( $settings ); ?>;5773 <?php readfile( ABSPATH . WPINC . '/js/wp-emoji-loader.js' ); ?>5774 </script>5775 <?php5776 5768 } else { 5777 5769 $settings['source'] = array( … … 5779 5771 'concatemoji' => apply_filters( 'script_loader_src', includes_url( "js/wp-emoji-release.min.js?$version" ), 'concatemoji' ), 5780 5772 ); 5781 5782 /* 5783 * If you're looking at a src version of this file, you'll see an "include" 5784 * statement below. This is used by the `npm run build` process to directly 5785 * include a minified version of wp-emoji-loader.js, instead of using the 5786 * readfile() method from above. 5787 * 5788 * If you're looking at a build version of this file, you'll see a string of 5789 * minified JavaScript. If you need to debug it, please turn on SCRIPT_DEBUG 5790 * and edit wp-emoji-loader.js directly. 5791 */ 5792 ?> 5793 <script<?php echo $type_attr; ?>> 5794 window._wpemojiSettings = <?php echo wp_json_encode( $settings ); ?>; 5795 include "js/wp-emoji-loader.min.js" 5796 </script> 5797 <?php 5798 } 5773 } 5774 5775 wp_print_inline_script_tag( 5776 sprintf( 'window._wpemojiSettings = %s;', wp_json_encode( $settings ) ) . 5777 file_get_contents( sprintf( ABSPATH . WPINC . '/js/wp-emoji-loader' . wp_scripts_get_suffix() . '.js' ) ) 5778 ); 5799 5779 } 5800 5780
Note: See TracChangeset
for help on using the changeset viewer.