wpseek.com
WordPress开发者和主题制作者的搜索引擎



switch_theme › WordPress动作钩子

Since4.5.0
已弃用n/a
› do_action( 'switch_theme', $new_name, $new_theme, $old_theme )
参数: (3)
  • () new_name Name of the new theme.
    Required: Yes
  • () new_theme WP_Theme instance of the new theme.
    Required: Yes
  • () old_theme WP_Theme instance of the old theme.
    Required: Yes
定义在:
文档:

Fires after the theme is switched.

See {@see 'after_switch_theme'}.




源码

do_action( 'switch_theme', $new_name, $new_theme, $old_theme );