Filters the translation files retrieved from a specified path before the actual lookup.
Description
Returning a non-null value from the filter will effectively short-circuit the MO files lookup, returning that value instead. This can be useful in situations where the directory contains a large number of files and the default glob() function becomes expensive in terms of performance.
Parameters
$filesnull|array
List of translation files. Default null.
$pathstring
The path from which translation files are being fetched.
191*192* @since 6.5.0193*194* @param null|array$filesList of translation files.Defaultnull.195* @param string$path The path from which translation files are being fetched.196*/197$files=apply_filters('pre_get_language_files_from_path',null,$path);198199if(null!==$files){200return$files;201}202203$cache_key=md5($path);
History
Introduced in 6.5.0. Unchanged from 6.7.7 through 7.1.0.