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

Line Code
451  * will be included in the translated strings by the $domain.
452  *
453  * The .mo files must be named based on the locale exactly.
454  *
455  * @since 1.5.0
456  *
457  * @param string $domain Unique identifier for retrieving translated strings
458  */
459 function load_theme_textdomain( $domain, $path = false ) {
460      $locale = apply_filters( 'theme_locale', get_locale(), $domain );
461
462      if ( ! $path )
463           $path = get_template_directory();
464
465      // Load the textdomain from the Theme provided location, or theme directory first
466      $mofile = "{$path}/{$locale}.mo";
467      if ( $loaded = load_textdomain($domain, $mofile) )
468           return $loaded;
469