[ Index ] |
PHP Cross Reference of WordPress |
[Source view] [Print] [Project Stats]
wp-emoji.js is used to replace emoji with images in browsers when the browser doesn't support emoji natively.
File Size: | 302 lines (9 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
wpEmoji() X-Ref |
Replaces emoji with images when browsers don't support emoji. return: {Object} The wpEmoji parse and test functions. since: 4.2.0 |
browserSupportsSvgAsImage() X-Ref |
Detect if the browser supports SVG. return: {boolean} True if the browser supports svg, false if not. since: 4.6.0 |
load() X-Ref |
Runs when the document load event is fired, so we can do our first parse of the page. Listens to all the DOM mutations and checks for added nodes that contain emoji characters and replaces those with twitter emoji images. since: 4.2.0 |
test( text ) X-Ref |
Tests if a text string contains emoji characters. return: {boolean} Whether the string contains emoji characters. param: {string} text The string to test. since: 4.3.0 |
parse( object, args ) X-Ref |
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. return: {HTMLElement|string} A string where all emoji are now image tags of param: {HTMLElement|string} object The element or string to parse. param: {Object} args Additional options for Twemoji. since: 4.2.0 |
Generated: Thu Nov 21 01:00:03 2024 | Cross-referenced by PHPXref 0.7.1 |