diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index fa73fc8c84..b7a198b3de 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -5477,9 +5477,10 @@ function _print_emoji_detection_script() { */ function wp_encode_emoji( $content ) { $emoji = _wp_emoji_list( 'partials' ); + $compat = version_compare( phpversion(), '5.4', '<' ); foreach ( $emoji as $emojum ) { - if ( version_compare( phpversion(), '5.4', '<' ) ) { + if ( $compat ) { $emoji_char = html_entity_decode( $emojum, ENT_COMPAT, 'UTF-8' ); } else { $emoji_char = html_entity_decode( $emojum ); @@ -5519,9 +5520,10 @@ function wp_staticize_emoji( $text ) { // Quickly narrow down the list of emoji that might be in the text and need replacing. $possible_emoji = array(); + $compat = version_compare( phpversion(), '5.4', '<' ); foreach ( $emoji as $emojum ) { if ( false !== strpos( $text, $emojum ) ) { - if ( version_compare( phpversion(), '5.4', '<' ) ) { + if ( $compat ) { $possible_emoji[ $emojum ] = html_entity_decode( $emojum, ENT_COMPAT, 'UTF-8' ); } else { $possible_emoji[ $emojum ] = html_entity_decode( $emojum ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 8a58630a8e..fe88ba30f5 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.1-alpha-44553'; +$wp_version = '5.1-alpha-44554'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.