Changeset 46393
- Timestamp:
- 10/04/2019 11:28:22 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/wp/emoji.js
r45726 r46393 122 122 node = addedNodes[ ii ]; 123 123 124 // Don't replace emoji inside elements that don't support it. 125 if ( ! node || node.closest( '.wp-exclude-emoji' ) || node.closest( '.CodeMirror' ) ) { 126 continue; 127 } 128 124 129 // Node type 3 is a TEXT_NODE. 125 130 if ( node.nodeType === 3 ) { … … 146 151 } 147 152 148 /* 149 * If the class name of a non-element node contains 'wp-exclude-emoji' ignore it. 150 * 151 * Node type 1 is an ELEMENT_NODE. 152 */ 153 if ( ! node || node.nodeType !== 1 || 154 ( node.className && typeof node.className === 'string' && node.className.indexOf( 'wp-exclude-emoji' ) !== -1 ) ) { 155 153 // Only make replacements inside Element nodes. 154 if ( node.nodeType !== 1 ) { 156 155 continue; 157 156 }
Note: See TracChangeset
for help on using the changeset viewer.