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 |
|---|---|
| 380 | * |
| 381 | * @since 1.5.0 |
| 382 | * |
| 383 | * @param string $domain Unique identifier for retrieving translated strings |
| 384 | * @param string $abs_rel_path Optional. Relative path to ABSPATH of a folder, |
| 385 | * where the .mo file resides. Deprecated, but still functional until 2.7 |
| 386 | * @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 |
| 387 | */ |
| 388 | function load_plugin_textdomain( $domain, $abs_rel_path = false, $plugin_rel_path = false ) { |
| 389 | $locale = apply_filters( 'plugin_locale', get_locale(), $domain ); |
| 390 | |
| 391 | if ( false !== $plugin_rel_path ) { |
| 392 | $path = WP_PLUGIN_DIR . '/' . trim( $plugin_rel_path, '/' ); |
| 393 | } else if ( false !== $abs_rel_path ) { |
| 394 | _deprecated_argument( __FUNCTION__, '2.7' ); |
| 395 | $path = ABSPATH . trim( $abs_rel_path, '/' ); |
| 396 | } else { |
| 397 | $path = WP_PLUGIN_DIR; |
| 398 | } |
| Line | Code |
| 405 | * Load the translated strings for a plugin residing in the mu-plugins dir. |
| 406 | * |
| 407 | * @since 3.0.0 |
| 408 | * |
| 409 | * @param string $domain Unique identifier for retrieving translated strings |
| 410 | * @param strings $mu_plugin_rel_path Relative to WPMU_PLUGIN_DIR directory in which |
| 411 | * the MO file resides. Defaults is empty string. |
| 412 | */ |
| 413 | function load_muplugin_textdomain( $domain, $mu_plugin_rel_path = '' ) { |
| 414 | $locale = apply_filters( 'plugin_locale', get_locale(), $domain ); |
| 415 | $path = WPMU_PLUGIN_DIR . '/' . ltrim( $mu_plugin_rel_path, '/' ); |
| 416 | load_textdomain( $domain, trailingslashit( $path ) . "$domain-$locale.mo" ); |
| 417 | } |
| 418 | |
| 419 | /** |
| 420 | * Loads the theme's translated strings. |
| 421 | * |
| 422 | * If the current locale exists as a .mo file in the theme's root directory, it |
| 423 | * will be included in the translated strings by the $domain. |