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.
This hook occurs 2 times in this file.
| Line | Code |
|---|---|
| 991 | |
| 992 | /** |
| 993 | * Filters a plugin's locale. |
| 994 | * |
| 995 | * @since 3.0.0 |
| 996 | * |
| 997 | * @param string $locale The plugin's current locale. |
| 998 | * @param string $domain Text domain. Unique identifier for retrieving translated strings. |
| 999 | */ |
| 1000 | $locale = apply_filters( 'plugin_locale', determine_locale(), $domain ); |
| 1001 | |
| 1002 | $mofile = $domain . '-' . $locale . '.mo'; |
| 1003 | |
| 1004 | // Try to load from the languages directory first. |
| 1005 | if ( load_textdomain( $domain, WP_LANG_DIR . '/plugins/' . $mofile, $locale ) ) { |
| 1006 | return true; |
| 1007 | } |
| 1008 | |
| 1009 | if ( false !== $plugin_rel_path ) { |
| Line | Code |
| 1032 | * @param string $mu_plugin_rel_path Optional. Relative to `WPMU_PLUGIN_DIR` directory in which the .mo |
| 1033 | * file resides. Default empty string. |
| 1034 | * @return bool True when textdomain is successfully loaded, false otherwise. |
| 1035 | */ |
| 1036 | function load_muplugin_textdomain( $domain, $mu_plugin_rel_path = '' ) { |
| 1037 | /** @var WP_Textdomain_Registry $wp_textdomain_registry */ |
| 1038 | global $wp_textdomain_registry; |
| 1039 | |
| 1040 | /** This filter is documented in wp-includes/l10n.php */ |
| 1041 | $locale = apply_filters( 'plugin_locale', determine_locale(), $domain ); |
| 1042 | |
| 1043 | $mofile = $domain . '-' . $locale . '.mo'; |
| 1044 | |
| 1045 | // Try to load from the languages directory first. |
| 1046 | if ( load_textdomain( $domain, WP_LANG_DIR . '/plugins/' . $mofile, $locale ) ) { |
| 1047 | return true; |
| 1048 | } |
| 1049 | |
| 1050 | $path = WPMU_PLUGIN_DIR . '/' . ltrim( $mu_plugin_rel_path, '/' ); |