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 |
|---|---|
| 833 | * the file path could be for an MO or PHP file. |
| 834 | * |
| 835 | * @since 6.5.0 |
| 836 | * @since 6.6.0 Added the `$locale` parameter. |
| 837 | * |
| 838 | * @param string $file Path to the translation file to load. |
| 839 | * @param string $domain The text domain. |
| 840 | * @param string $locale The locale. |
| 841 | */ |
| 842 | $file = (string) apply_filters( 'load_translation_file', $file, $domain, $locale ); |
| 843 | |
| 844 | $success = $i18n_controller->load_file( $file, $domain, $locale ); |
| 845 | |
| 846 | if ( $success ) { |
| 847 | if ( isset( $l10n[ $domain ] ) && $l10n[ $domain ] instanceof MO ) { |
| 848 | $i18n_controller->load_file( $l10n[ $domain ]->get_filename(), $domain, $locale ); |
| 849 | } |
| 850 | |
| 851 | // Unset NOOP_Translations reference in get_translations_for_domain(). |