WP_Textdomain_Registry::set_cached_mo_files()
Reads and caches all available MO files from a given directory.
Method of the class: WP_Textdomain_Registry{}
No Hooks.
Return
null
. Nothing.
Usage
// private - for code of main (parent) class only $result = $this->set_cached_mo_files( $path );
- $path(string) (required)
- Language directory path.
Changelog
Since 6.1.0 | Introduced. |
WP_Textdomain_Registry::set_cached_mo_files() WP Textdomain Registry::set cached mo files code WP 6.1.1
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; } }