On this page
WP_Textdomain_Registry::set_cached_mo_files( string $path )
This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
Reads and caches all available MO files from a given directory.
Parameters
$pathstring Required-
Language directory path.
Source
File: wp-includes/class-wp-textdomain-registry.php. View all references
private function set_cached_mo_files( $path ) {
$this->cached_mo_files[ $path ] = array();
$mo_files = glob( $path . '/*.mo' );
if ( $mo_files ) {
$this->cached_mo_files[ $path ] = $mo_files;
}
}
Related
Used By
| Used By | Description |
|---|---|
| WP_Textdomain_Registry::get_path_from_lang_dir() wp-includes/class-wp-textdomain-registry.php | Gets the path to the language directory for the current locale. |
Changelog
| Version | Description |
|---|---|
| 6.1.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_textdomain_registry/set_cached_mo_files