钩子文档

customize_controls_init

💡 云策文档标注

概述

customize_controls_init 是一个 WordPress 动作钩子,在 Customizer 控件初始化时触发,用于在脚本排队前执行自定义代码。

关键要点

  • 触发时机:在 Customizer 控件初始化过程中,脚本排队之前
  • 主要用途:允许开发者在 Customizer 界面加载脚本前添加自定义功能或修改控件
  • 相关函数:通过 do_action('customize_controls_init') 调用
  • 版本历史:自 WordPress 3.4.0 版本引入

📄 原文内容

Fires when Customizer controls are initialized, before scripts are enqueued.

Source

do_action( 'customize_controls_init' );

Changelog

Version Description
3.4.0 Introduced.