theme_locale

过滤钩子
apply_filters( 'theme_locale', determine_locale()
参数
  • (string) $locale The theme's current locale.
    Required:
  • (string) $domain Text domain. Unique identifier for retrieving translated strings.
    Required:
定义位置
相关勾子
change_localeswitch_localedetermine_localelocalethemes_api
相关方法
get_localedetermine_localeget_user_localethemes_apiswitch_to_localeadd_theme_page
引入
3.0.0
弃用
-

theme_locale是一个WordPress的过滤钩子,它允许开发者修改主题所使用的地域。这可以用来改变主题所使用的语言,或者为主题添加额外的语言。

过滤一个主题的地区设置。

$locale = apply_filters( 'theme_locale', determine_locale(), $domain );

常见问题

FAQs
查看更多 >