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
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      $path = ( empty( $path ) ) ? get_template_directory() : $path;
463
464      $mofile = "$path/$locale.mo";
465      return load_textdomain($domain, $mofile);
466 }
467
468 /**
469  * Loads the child themes translated strings.
 
Line Code
472  * will be included in the translated strings by the $domain.
473  *
474  * The .mo files must be named based on the locale exactly.
475  *
476  * @since 2.9.0
477  *
478  * @param string $domain Unique identifier for retrieving translated strings
479  */
480 function load_child_theme_textdomain( $domain, $path = false ) {
481      $locale = apply_filters( 'theme_locale', get_locale(), $domain );
482
483      $path = ( empty( $path ) ) ? get_stylesheet_directory() : $path;
484
485      $mofile = "$path/$locale.mo";
486      return load_textdomain($domain, $mofile);
487 }
488
489 /**
490  * Returns the Translations instance for a domain. If there isn't one,