load_textdomain_mofile
Filters MO file path for loading translations for a specific text domain.
Usage
add_filter( 'load_textdomain_mofile', 'wp_kama_load_textdomain_mofile_filter', 10, 2 ); /** * Function for `load_textdomain_mofile` filter-hook. * * @param string $mofile Path to the MO file. * @param string $domain Text domain. Unique identifier for retrieving translated strings. * * @return string */ function wp_kama_load_textdomain_mofile_filter( $mofile, $domain ){ // filter... return $mofile; }
- $mofile(string)
- Path to the MO file.
- $domain(string)
- Text domain. Unique identifier for retrieving translated strings.
Changelog
Since 2.9.0 | Introduced. |
Where the hook is called
load_textdomain_mofile
wp-includes/l10n.php 794
$mofile = apply_filters( 'load_textdomain_mofile', $mofile, $domain );