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 |
---|---|
395 | * |
396 | * @since 1.5.0 |
397 | * |
398 | * @param string $domain Unique identifier for retrieving translated strings |
399 | * @param string $abs_rel_path Optional. Relative path to ABSPATH of a folder, |
400 | * where the .mo file resides. Deprecated, but still functional until 2.7 |
401 | * @param string $plugin_rel_path Optional. Relative path to WP_PLUGIN_DIR. This is the preferred argument to use. It takes precendence over $abs_rel_path |
402 | */ |
403 | function load_plugin_textdomain( $domain, $abs_rel_path = false, $plugin_rel_path = false ) { |
404 | $locale = apply_filters( 'plugin_locale', get_locale(), $domain ); |
405 |
|
406 | if ( false !== $plugin_rel_path ) { |
407 | $path = WP_PLUGIN_DIR . '/' . trim( $plugin_rel_path, '/' ); |
408 | } else if ( false !== $abs_rel_path ) { |
409 | _deprecated_argument( __FUNCTION__, '2.7' ); |
410 | $path = ABSPATH . trim( $abs_rel_path, '/' ); |
411 | } else { |
412 | $path = WP_PLUGIN_DIR; |
413 | } |
Line | Code |
420 | * Load the translated strings for a plugin residing in the mu-plugins dir. |
421 | * |
422 | * @since 3.0.0 |
423 | * |
424 | * @param string $domain Unique identifier for retrieving translated strings |
425 | * @param strings $mu_plugin_rel_path Relative to WPMU_PLUGIN_DIR directory in which |
426 | * the MO file resides. Defaults is empty string. |
427 | */ |
428 | function load_muplugin_textdomain( $domain, $mu_plugin_rel_path = '' ) { |
429 | $locale = apply_filters( 'plugin_locale', get_locale(), $domain ); |
430 | $path = WPMU_PLUGIN_DIR . '/' . ltrim( $mu_plugin_rel_path, '/' ); |
431 | load_textdomain( $domain, trailingslashit( $path ) . "$domain-$locale.mo" ); |
432 | } |
433 |
|
434 | /** |
435 | * Loads the theme's translated strings. |
436 | * |
437 | * If the current locale exists as a .mo file in the theme's root directory, it |
438 | * will be included in the translated strings by the $domain. |