Emoji: Improve performance when encoding or staticizing emoji.

Both `wp_encode_emoji()` and `wp_staticize_emoji()` perform a PHP version check when deciding how to apply their behaviour, but this check only needs to happen once, rather than every time in their internal looks.

Moving the check outside of the loop reduces processing time by 50%.

Props johnbillion.
Fixes #45930.


Built from https://develop.svn.wordpress.org/trunk@44554


git-svn-id: http://core.svn.wordpress.org/trunk@44385 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Gary Pendergast
2019-01-10 23:20:52 +00:00
parent 8e2f6a9923
commit 92146fe52b
2 changed files with 5 additions and 3 deletions

View File

@@ -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.