钩子文档

customize_controls_print_styles

💡 云策文档标注

概述

customize_controls_print_styles 是一个 WordPress 动作钩子,在主题定制器屏幕的 部分触发,用于打印控制样式。它类似于 wp_head 钩子,但仅适用于主题定制器屏幕。

关键要点

  • 触发时机:在主题定制器屏幕的 部分打印控制样式时触发
  • 作用范围:仅影响主题定制器屏幕,不适用于其他页面
  • 使用建议:通常在使用主题定制 API 时,更推荐钩入 wp_head 而非此钩子
  • 引入版本:WordPress 3.4.0

📄 原文内容

Fires when Customizer control styles are printed.

More Information

The customize_controls_print_styles action hook is triggered within the section of the theme customizer screen.

This hook functions similarly to the wp_head action hook, but only affects the theme customizer screen. Generally, when using the Theme Customization API, you are better off hooking into wp_head instead.

Source

do_action( 'customize_controls_print_styles' );

Changelog

Version Description
3.4.0 Introduced.