钩子文档

wp_edit_form_attachment_display

💡 云策文档标注

概述

wp_edit_form_attachment_display 是一个 WordPress Hook,在编辑表单中无法渲染附件类型时触发。它允许开发者自定义处理或显示附件。

关键要点

  • 触发时机:当附件类型无法在编辑表单中渲染时
  • 参数:$post(WP_Post 对象,表示附件帖子)
  • 源调用:do_action( 'wp_edit_form_attachment_display', $post )
  • 引入版本:WordPress 4.6.0

📄 原文内容

Fires when an attachment type can’t be rendered in the edit form.

Parameters

$postWP_Post
A post object.

Source

do_action( 'wp_edit_form_attachment_display', $post );

Changelog

Version Description
4.6.0 Introduced.