wpseek.com
WordPress开发者和主题制作者的搜索引擎
load_script_textdomain › WordPress Function
Since5.0.0
已弃用n/a
› load_script_textdomain ( $handle, $domain = 'default', $path = '' )
| 参数: (3) |
|
| 查看: |
|
| 返回: |
|
| 定义在: |
|
| 文档: | |
| Change Log: |
|
Loads the script translated strings.
源码
function load_script_textdomain( $handle, $domain = 'default', $path = '' ) {
$wp_scripts = wp_scripts();
if ( ! isset( $wp_scripts->registered[ $handle ] ) ) {
return false;
}
$src = $wp_scripts->registered[ $handle ]->src;
if ( ! preg_match( '|^(https?:)?//|', $src ) && ! ( $wp_scripts->content_url && str_starts_with( $src, $wp_scripts->content_url ) ) ) {
$src = $wp_scripts->base_url . $src;
}
return _load_script_textdomain_from_src( $handle, $src, $domain, $path, false );
}