pre_determine_locale
apply_filters( ‘pre_determine_locale’, string|null $locale )
过滤器::在默认确定过程之前筛选当前请求的区域设置。
Filter Hook: Filters the locale for the current request prior to the default determination process.
说明(Description)
使用这个过滤器可以覆盖默认逻辑,有效地使函数短路。
参数(Parameters)
参数 | 类型 | 说明 |
---|---|---|
$locale | (string | null) | 要返回和短路的区域设置。默认为空。 |
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
5.0.0 | wp-includes/l10n.php:131 | 1 | 0 |
pre_determine_locale 为WP2原创文章,链接:https://www.wp2.cn/hook/pre_determine_locale/