I18N: Cache list of language file paths in WP_Textdomain_Registry.
Loading a list of language file paths using `glob()` can be expensive if involving thousands of files. Expands scope of `WP_Textdomain_Registry` to cache list of language file paths in object cache and provides a way to invalidate that cache upon translation updates. Plugins can clear the cache using calls such as `wp_cache_delete( 'cached_mo_files_' . md5( $path ), 'translations' );` Props mreishus, swissspidy Fixes #58919 Built from https://develop.svn.wordpress.org/trunk@57287 git-svn-id: http://core.svn.wordpress.org/trunk@56793 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -380,6 +380,7 @@ $GLOBALS['wp_embed'] = new WP_Embed();
|
||||
* @global WP_Textdomain_Registry $wp_textdomain_registry WordPress Textdomain Registry.
|
||||
*/
|
||||
$GLOBALS['wp_textdomain_registry'] = new WP_Textdomain_Registry();
|
||||
$GLOBALS['wp_textdomain_registry']->init();
|
||||
|
||||
// Load multisite-specific files.
|
||||
if ( is_multisite() ) {
|
||||
|
||||
Reference in New Issue
Block a user