Emoji: always export the methods in wp-emoji.js, even when dependencies are missing and we cannot initialize.
See #31242. git-svn-id: https://develop.svn.wordpress.org/trunk@31780 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
59b22c284d
commit
e94b808f3b
|
@ -154,21 +154,19 @@
|
|||
} );
|
||||
}
|
||||
|
||||
if ( ! twemoji || ! settings ) {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize our emoji support, and set up listeners.
|
||||
*/
|
||||
parseAllEmoji = ! browserSupportsEmoji();
|
||||
parseFlags = ! browserSupportsEmoji( 'flag' );
|
||||
parseEmoji = parseAllEmoji || parseFlags;
|
||||
|
||||
if ( window.addEventListener ) {
|
||||
window.addEventListener( 'load', load, false );
|
||||
} else if ( window.attachEvent ) {
|
||||
window.attachEvent( 'onload', load );
|
||||
if ( twemoji && settings ) {
|
||||
parseAllEmoji = ! browserSupportsEmoji();
|
||||
parseFlags = ! browserSupportsEmoji( 'flag' );
|
||||
parseEmoji = parseAllEmoji || parseFlags;
|
||||
|
||||
if ( window.addEventListener ) {
|
||||
window.addEventListener( 'load', load, false );
|
||||
} else if ( window.attachEvent ) {
|
||||
window.attachEvent( 'onload', load );
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
Loading…
Reference in New Issue