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 |
|---|---|
| 408 | * |
| 409 | * @since 1.5.0 |
| 410 | * |
| 411 | * @param string $domain Unique identifier for retrieving translated strings |
| 412 | * @param string $abs_rel_path Optional. Relative path to ABSPATH of a folder, |
| 413 | * where the .mo file resides. Deprecated, but still functional until 2.7 |
| 414 | * @param string $plugin_rel_path Optional. Relative path to WP_PLUGIN_DIR. This is the preferred argument to use. It takes precedence over $abs_rel_path |
| 415 | */ |
| 416 | function load_plugin_textdomain( $domain, $abs_rel_path = false, $plugin_rel_path = false ) { |
| 417 | $locale = apply_filters( 'plugin_locale', get_locale(), $domain ); |
| 418 | |
| 419 | if ( false !== $plugin_rel_path ) { |
| 420 | $path = WP_PLUGIN_DIR . '/' . trim( $plugin_rel_path, '/' ); |
| 421 | } else if ( false !== $abs_rel_path ) { |
| 422 | _deprecated_argument( __FUNCTION__, '2.7' ); |
| 423 | $path = ABSPATH . trim( $abs_rel_path, '/' ); |
| 424 | } else { |
| 425 | $path = WP_PLUGIN_DIR; |
| 426 | } |
| Line | Code |
| 433 | * Load the translated strings for a plugin residing in the mu-plugins dir. |
| 434 | * |
| 435 | * @since 3.0.0 |
| 436 | * |
| 437 | * @param string $domain Unique identifier for retrieving translated strings |
| 438 | * @param string $mu_plugin_rel_path Relative to WPMU_PLUGIN_DIR directory in which |
| 439 | * the MO file resides. Defaults to empty string. |
| 440 | */ |
| 441 | function load_muplugin_textdomain( $domain, $mu_plugin_rel_path = '' ) { |
| 442 | $locale = apply_filters( 'plugin_locale', get_locale(), $domain ); |
| 443 | $path = WPMU_PLUGIN_DIR . '/' . ltrim( $mu_plugin_rel_path, '/' ); |
| 444 | load_textdomain( $domain, trailingslashit( $path ) . "$domain-$locale.mo" ); |
| 445 | } |
| 446 | |
| 447 | /** |
| 448 | * Loads the theme's translated strings. |
| 449 | * |
| 450 | * If the current locale exists as a .mo file in the theme's root directory, it |
| 451 | * will be included in the translated strings by the $domain. |