Namespace: emoji

wp. emoji

Methods


<static> parse(object, args)

Parses any emoji characters into Twemoji images. - When passed an element the emoji characters are replaced inline. - When passed a string the emoji characters are replaced and the result is returned.
Parameters:
Name Type Description
object HTMLElement | string The element or string to parse.
args Object Additional options for Twemoji.
Since:
  • 4.2.0
Source:
Returns:
A string where all emoji are now image tags of emoji. Or the element that was passed as the first argument.
Type
HTMLElement | string

<static> test(text)

Tests if a text string contains emoji characters.
Parameters:
Name Type Description
text string The string to test.
Since:
  • 4.3.0
Source:
Returns:
Whether the string contains emoji characters.
Type
boolean