lang_dir_for_domain
云策文档标注
概述
lang_dir_for_domain 是一个 WordPress 过滤器,用于修改特定域名和区域设置的语言目录路径。它允许开发者在运行时自定义语言文件的存储位置。
关键要点
- 过滤器名称:lang_dir_for_domain
- 参数:$path(语言目录路径或 false)、$domain(文本域)、$locale(区域设置)
- 用途:在 WP_Textdomain_Registry::get() 中调用,返回指定域名和区域设置的语言目录路径
- 引入版本:WordPress 6.6.0
原文内容
Filters the determined languages directory path for a specific domain and locale.
Parameters
$pathstring|false-
Languages directory path for the given domain and locale.
$domainstring-
Text domain.
$localestring-
Locale.
Source
return apply_filters( 'lang_dir_for_domain', $path, $domain, $locale );
Changelog
| Version | Description |
|---|---|
| 6.6.0 | Introduced. |