wpseek.com
WordPress开发者和主题制作者的搜索引擎



load_child_theme_textdomain › WordPress Function

Since2.9.0
已弃用n/a
load_child_theme_textdomain ( $domain, $path = false )
参数: (2)
  • (string) $domain Text domain. Unique identifier for retrieving translated strings.
    Required: Yes
  • (string|false) $path Optional. Path to the directory containing the .mo file. Default false.
    Required: No
    默认: false
返回:
  • (bool) True when the theme textdomain is successfully loaded, false otherwise.
定义在:
文档:

Loads the child theme's translated strings.

If the current locale exists as a .mo file in the child theme's root directory, it will be included in the translated strings by the $domain. The .mo files must be named based on the locale exactly.


源码

function load_child_theme_textdomain( $domain, $path = false ) {
	if ( ! $path ) {
		$path = get_stylesheet_directory();
	}
	return load_theme_textdomain( $domain, $path );
}