mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Add emoji support, with Twemoji fallback.
Replace exisiting smilies with equivalent emoji, or with shiny new smiley images where no emoji existed. Props batmoo, joen and mkaz for the original plugin upon which this is based. Props pento, iseulde, kraftbj and peterwilsoncc for making the internet's dreams come true. See #31242 git-svn-id: https://develop.svn.wordpress.org/trunk@31733 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -424,6 +424,28 @@ function wp_default_scripts( &$scripts ) {
|
||||
$scripts->add( 'media-audiovideo', "/wp-includes/js/media/audio-video$suffix.js", array( 'media-editor' ), false, 1 );
|
||||
$scripts->add( 'mce-view', "/wp-includes/js/mce-view$suffix.js", array( 'shortcode', 'media-models', 'media-audiovideo', 'wp-playlist' ), false, 1 );
|
||||
|
||||
$scripts->add( 'twemoji', "/wp-includes/js/twemoji$suffix.js", array(), false, 1 );
|
||||
$scripts->add( 'emoji', "/wp-includes/js/emoji$suffix.js", array( 'twemoji' ), false, 1 );
|
||||
did_action( 'init' ) && $scripts->localize( 'emoji', 'EmojiSettings', array(
|
||||
/**
|
||||
* Filter the URL where emoji images are hosted.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*
|
||||
* @param string The emoji base URL.
|
||||
*/
|
||||
'base_url' => apply_filters( 'emoji_url', '//s0.wp.com/wp-content/mu-plugins/emoji/twemoji/72x72/' ),
|
||||
/**
|
||||
* Filter the extension of the emoji files.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*
|
||||
* @param string The emoji extension.
|
||||
*/
|
||||
'ext' => apply_filters( 'emoji_ext', '.png' ),
|
||||
) );
|
||||
$scripts->enqueue( 'emoji' );
|
||||
|
||||
if ( is_admin() ) {
|
||||
$scripts->add( 'admin-tags', "/wp-admin/js/tags$suffix.js", array('jquery', 'wp-ajax-response'), false, 1 );
|
||||
did_action( 'init' ) && $scripts->localize( 'admin-tags', 'tagsl10n', array(
|
||||
|
||||
Reference in New Issue
Block a user