Changeset 60902
- Timestamp:
- 10/06/2025 04:49:13 AM (6 days ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/lib/emoji-loader.js
r60899 r60902 2 2 * @output wp-includes/js/wp-emoji-loader.js 3 3 */ 4 5 /* eslint-env es6 */ 4 6 5 7 // Note: This is loaded as a script module, so there is no need for an IIFE to prevent pollution of the global scope. … … 13 15 * @property {?string} source.twemoji 14 16 * @property {?string} source.wpemoji 15 * @property {?boolean} DOMReady16 * @property {?Function} readyCallback17 17 */ 18 18 … … 21 21 ); 22 22 23 // For compatibility with other scripts that read from this global .23 // For compatibility with other scripts that read from this global, in particular wp-includes/js/wp-emoji.js (source file: js/_enqueues/wp/emoji.js). 24 24 window._wpemojiSettings = settings; 25 25 … … 423 423 ! settings.supports.flag; 424 424 425 // Sets DOMReady to false and assigns a ready function to settings.426 settings.DOMReady = false;427 settings.readyCallback = () => {428 settings.DOMReady = true;429 };430 } )431 .then( () => {432 425 // When the browser can not render everything we need to load a polyfill. 433 426 if ( ! settings.supports.everything ) { 434 settings.readyCallback();435 436 427 const src = settings.source || {}; 437 428 -
trunk/src/js/_enqueues/wp/emoji.js
r55186 r60902 278 278 } 279 279 280 /** 281 * Initialize our emoji support, and set up listeners. 282 */ 283 if ( settings ) { 284 if ( settings.DOMReady ) { 285 load(); 286 } else { 287 settings.readyCallback = load; 288 } 289 } 280 load(); 290 281 291 282 return { -
trunk/src/wp-includes/formatting.php
r60899 r60902 5913 5913 $printed = true; 5914 5914 5915 _print_emoji_detection_script(); 5915 if ( did_action( 'wp_print_footer_scripts' ) ) { 5916 _print_emoji_detection_script(); 5917 } else { 5918 add_action( 'wp_print_footer_scripts', '_print_emoji_detection_script' ); 5919 } 5916 5920 } 5917 5921
Note: See TracChangeset for help on using the changeset viewer.