1. 首页
  2. WordPress钩子手册

change_locale

do_action( ‘change_locale’, string $locale )

操作挂钩:在区域设置切换到或还原时激发。
Action Hook: Fires when the locale is switched to or restored.

目录锚点:#参数#源码


参数(Parameters)

参数 类型 说明
$locale (string) 新的地点。

源码(Source)


更新版本 源码位置 使用 被使用
4.7.0 wp-includes/class-wp-locale-switcher.php:235 1 0

change_locale 为WP2原创文章,链接:https://www.wp2.cn/hook/change_locale/