钩子文档

embed_footer

💡 云策文档标注

概述

embed_footer 是一个 WordPress 动作钩子,用于在嵌入模板的闭合 body 标签前输出脚本或数据。它从 WordPress 4.4.0 版本开始引入。

关键要点

  • embed_footer 是一个 do_action 钩子,允许开发者在嵌入模板的特定位置添加自定义脚本或数据。
  • 它位于嵌入模板的闭合 body 标签前,适用于需要在此位置执行代码的场景。
  • 该钩子从 WordPress 4.4.0 版本开始可用,开发者需确保兼容性。

📄 原文内容

Prints scripts or data before the closing body tag in the embed template.

Source

do_action( 'embed_footer' );

Changelog

Version Description
4.4.0 Introduced.