钩子文档

wp_nav_menu_item_custom_fields_customize_template

💡 云策文档标注

概述

这是一个 WordPress 自定义器中导航菜单项表单字段模板末尾触发的 Hook。它允许开发者在自定义器界面为导航菜单项添加和管理自定义字段。

关键要点

  • Hook 名称:wp_nav_menu_item_custom_fields_customize_template
  • 触发时机:在自定义器中导航菜单项表单字段模板的末尾
  • 主要用途:渲染和管理导航菜单项的自定义字段,通过 JavaScript 实现交互
  • 相关类:WP_Customize_Nav_Menu_Item_Control::content_template()
  • 引入版本:WordPress 5.4.0

📄 原文内容

Fires at the end of the form field template for nav menu items in the customizer.

Description

Additional fields can be rendered here and managed in JavaScript.

Source

do_action( 'wp_nav_menu_item_custom_fields_customize_template' );

Changelog

Version Description
5.4.0 Introduced.