Make WordPress Core

Changeset 46397


Ignore:
Timestamp:
10/05/2019 12:59:50 AM (5 years ago)
Author:
SergeyBiryukov
Message:

Emoji: Revert [46393] pending test failure investigation.

See #46537.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/_enqueues/wp/emoji.js

    r46393 r46397  
    122122                            node = addedNodes[ ii ];
    123123
    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 
    129124                            // Node type 3 is a TEXT_NODE.
    130125                            if ( node.nodeType === 3 ) {
     
    151146                            }
    152147
    153                             // Only make replacements inside Element nodes.
    154                             if ( node.nodeType !== 1 ) {
     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
    155156                                continue;
    156157                            }
Note: See TracChangeset for help on using the changeset viewer.