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 Built from https://develop.svn.wordpress.org/trunk@31733 git-svn-id: http://core.svn.wordpress.org/trunk@31714 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -2945,51 +2945,51 @@ function smilies_init() {
|
||||
|
||||
if ( !isset( $wpsmiliestrans ) ) {
|
||||
$wpsmiliestrans = array(
|
||||
':mrgreen:' => 'icon_mrgreen.gif',
|
||||
':neutral:' => 'icon_neutral.gif',
|
||||
':twisted:' => 'icon_twisted.gif',
|
||||
':arrow:' => 'icon_arrow.gif',
|
||||
':shock:' => 'icon_eek.gif',
|
||||
':smile:' => 'icon_smile.gif',
|
||||
':???:' => 'icon_confused.gif',
|
||||
':cool:' => 'icon_cool.gif',
|
||||
':evil:' => 'icon_evil.gif',
|
||||
':grin:' => 'icon_biggrin.gif',
|
||||
':idea:' => 'icon_idea.gif',
|
||||
':oops:' => 'icon_redface.gif',
|
||||
':razz:' => 'icon_razz.gif',
|
||||
':roll:' => 'icon_rolleyes.gif',
|
||||
':wink:' => 'icon_wink.gif',
|
||||
':cry:' => 'icon_cry.gif',
|
||||
':eek:' => 'icon_surprised.gif',
|
||||
':lol:' => 'icon_lol.gif',
|
||||
':mad:' => 'icon_mad.gif',
|
||||
':sad:' => 'icon_sad.gif',
|
||||
'8-)' => 'icon_cool.gif',
|
||||
'8-O' => 'icon_eek.gif',
|
||||
':-(' => 'icon_sad.gif',
|
||||
':-)' => 'icon_smile.gif',
|
||||
':-?' => 'icon_confused.gif',
|
||||
':-D' => 'icon_biggrin.gif',
|
||||
':-P' => 'icon_razz.gif',
|
||||
':-o' => 'icon_surprised.gif',
|
||||
':-x' => 'icon_mad.gif',
|
||||
':-|' => 'icon_neutral.gif',
|
||||
';-)' => 'icon_wink.gif',
|
||||
':mrgreen:' => 'mrgreen.png',
|
||||
':neutral:' => "\xf0\x9f\x98\x90",
|
||||
':twisted:' => "\xf0\x9f\x98\x88",
|
||||
':arrow:' => "\xe2\x9e\xa1",
|
||||
':shock:' => "\xf0\x9f\x98\xaf",
|
||||
':smile:' => 'simple-smile.png',
|
||||
':???:' => "\xf0\x9f\x98\xaf",
|
||||
':cool:' => "\xf0\x9f\x98\x8e",
|
||||
':evil:' => "\xf0\x9f\x91\xbf",
|
||||
':grin:' => "\xf0\x9f\x98\x84",
|
||||
':idea:' => "\xf0\x9f\x92\xa1",
|
||||
':oops:' => "\xf0\x9f\x98\xb3",
|
||||
':razz:' => "\xf0\x9f\x98\x9b",
|
||||
':roll:' => 'rolleyes.png',
|
||||
':wink:' => "\xf0\x9f\x98\x89",
|
||||
':cry:' => "\xf0\x9f\x98\xa5",
|
||||
':eek:' => "\xf0\x9f\x98\xaf",
|
||||
':lol:' => "\xf0\x9f\x98\x84",
|
||||
':mad:' => "\xf0\x9f\x98\xa1",
|
||||
':sad:' => "\xf0\x9f\x98\xa6",
|
||||
'8-)' => "\xf0\x9f\x98\x8e",
|
||||
'8-O' => "\xf0\x9f\x98\xaf",
|
||||
':-(' => "\xf0\x9f\x98\xa6",
|
||||
':-)' => 'simple-smile.png',
|
||||
':-?' => "\xf0\x9f\x98\xaf",
|
||||
':-D' => "\xf0\x9f\x98\x84",
|
||||
':-P' => "\xf0\x9f\x98\x9b",
|
||||
':-o' => "\xf0\x9f\x98\xaf",
|
||||
':-x' => "\xf0\x9f\x98\xa1",
|
||||
':-|' => "\xf0\x9f\x98\x90",
|
||||
';-)' => "\xf0\x9f\x98\x89",
|
||||
// This one transformation breaks regular text with frequency.
|
||||
// '8)' => 'icon_cool.gif',
|
||||
'8O' => 'icon_eek.gif',
|
||||
':(' => 'icon_sad.gif',
|
||||
':)' => 'icon_smile.gif',
|
||||
':?' => 'icon_confused.gif',
|
||||
':D' => 'icon_biggrin.gif',
|
||||
':P' => 'icon_razz.gif',
|
||||
':o' => 'icon_surprised.gif',
|
||||
':x' => 'icon_mad.gif',
|
||||
':|' => 'icon_neutral.gif',
|
||||
';)' => 'icon_wink.gif',
|
||||
':!:' => 'icon_exclaim.gif',
|
||||
':?:' => 'icon_question.gif',
|
||||
// '8)' => "\xf0\x9f\x98\x8e",
|
||||
'8O' => "\xf0\x9f\x98\xaf",
|
||||
':(' => "\xf0\x9f\x98\xa6",
|
||||
':)' => 'simple-smile.png',
|
||||
':?' => "\xf0\x9f\x98\xaf",
|
||||
':D' => "\xf0\x9f\x98\x84",
|
||||
':P' => "\xf0\x9f\x98\x9b",
|
||||
':o' => "\xf0\x9f\x98\xaf",
|
||||
':x' => "\xf0\x9f\x98\xa1",
|
||||
':|' => "\xf0\x9f\x98\x90",
|
||||
';)' => "\xf0\x9f\x98\x89",
|
||||
':!:' => "\xe2\x9d\x97",
|
||||
':?:' => "\xe2\x9d\x93",
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user