钩子文档

post-html-upload-ui

💡 云策文档标注

概述

post-html-upload-ui 是一个 WordPress 动作钩子,在媒体上传界面的上传按钮后触发,主要用于扩展或修改上传界面功能。

关键要点

  • 这是一个动作钩子,在媒体上传界面的上传按钮后触发
  • 钩子名称使用连字符,但 WordPress 命名规范建议使用下划线
  • 首次引入于 WordPress 2.6.0 版本
  • 与 media_upload_form() 函数相关,用于输出传统的媒体上传表单

代码示例

do_action( 'post-html-upload-ui' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores

注意事项

钩子名称 post-html-upload-ui 不符合 WordPress 命名规范(建议使用下划线),但代码中已添加忽略注释以通过编码标准检查。


📄 原文内容

Fires after the upload button in the media upload interface.

Source

do_action( 'post-html-upload-ui' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores

Changelog

Version Description
2.6.0 Introduced.