diff --git src/wp-includes/formatting.php src/wp-includes/formatting.php
index f858d7b9ab..16bfd18823 100644
|
|
|
function _print_emoji_detection_script() { |
| 5477 | 5477 | */ |
| 5478 | 5478 | function wp_encode_emoji( $content ) { |
| 5479 | 5479 | $emoji = _wp_emoji_list( 'partials' ); |
| | 5480 | $compat = version_compare( phpversion(), '5.4', '<' ); |
| 5480 | 5481 | |
| 5481 | 5482 | foreach ( $emoji as $emojum ) { |
| 5482 | | if ( version_compare( phpversion(), '5.4', '<' ) ) { |
| | 5483 | if ( $compat ) { |
| 5483 | 5484 | $emoji_char = html_entity_decode( $emojum, ENT_COMPAT, 'UTF-8' ); |
| 5484 | 5485 | } else { |
| 5485 | 5486 | $emoji_char = html_entity_decode( $emojum ); |
| … |
… |
function wp_staticize_emoji( $text ) { |
| 5519 | 5520 | |
| 5520 | 5521 | // Quickly narrow down the list of emoji that might be in the text and need replacing. |
| 5521 | 5522 | $possible_emoji = array(); |
| | 5523 | $compat = version_compare( phpversion(), '5.4', '<' ); |
| 5522 | 5524 | foreach ( $emoji as $emojum ) { |
| 5523 | 5525 | if ( false !== strpos( $text, $emojum ) ) { |
| 5524 | | if ( version_compare( phpversion(), '5.4', '<' ) ) { |
| | 5526 | if ( $compat ) { |
| 5525 | 5527 | $possible_emoji[ $emojum ] = html_entity_decode( $emojum, ENT_COMPAT, 'UTF-8' ); |
| 5526 | 5528 | } else { |
| 5527 | 5529 | $possible_emoji[ $emojum ] = html_entity_decode( $emojum ); |