Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: theme_locale

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

This hook occurs 2 times in this file.

Line Code
438  * will be included in the translated strings by the $domain.
439  *
440  * The .mo files must be named based on the locale exactly.
441  *
442  * @since 1.5.0
443  *
444  * @param string $domain Unique identifier for retrieving translated strings
445  */
446 function load_theme_textdomain( $domain, $path = false ) {
447      $locale = apply_filters( 'theme_locale', get_locale(), $domain );
448
449      $path = ( empty( $path ) ) ? get_template_directory() : $path;
450
451      $mofile = "$path/$locale.mo";
452      return load_textdomain($domain, $mofile);
453 }
454
455 /**
456  * Loads the child themes translated strings.
 
Line Code
459  * will be included in the translated strings by the $domain.
460  *
461  * The .mo files must be named based on the locale exactly.
462  *
463  * @since 2.9.0
464  *
465  * @param string $domain Unique identifier for retrieving translated strings
466  */
467 function load_child_theme_textdomain( $domain, $path = false ) {
468      $locale = apply_filters( 'theme_locale', get_locale(), $domain );
469
470      $path = ( empty( $path ) ) ? get_stylesheet_directory() : $path;
471
472      $mofile = "$path/$locale.mo";
473      return load_textdomain($domain, $mofile);
474 }
475
476 /**
477  * Returns the Translations instance for a domain. If there isn't one,