WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
827 | * |
828 | * Similar to the {@see 'load_textdomain_mofile'} filter with the difference that |
829 | * the file path could be for an MO or PHP file. |
830 | * |
831 | * @since 6.5.0 |
832 | * |
833 | * @param string $file Path to the translation file to load. |
834 | * @param string $domain The text domain. |
835 | */ |
836 | $file = (string) apply_filters( 'load_translation_file', $file, $domain ); |
837 |
|
838 | $success = $i18n_controller->load_file( $file, $domain, $locale ); |
839 |
|
840 | if ( $success ) { |
841 | if ( isset( $l10n[ $domain ] ) && $l10n[ $domain ] instanceof MO ) { |
842 | $i18n_controller->load_file( $l10n[ $domain ]->get_filename(), $domain, $locale ); |
843 | } |
844 |
|
845 | // Unset NOOP_Translations reference in get_translations_for_domain(). |