钩子文档

delete_site_transient_{$transient}

💡 云策文档标注

概述

delete_site_transient_{$transient} 是一个 WordPress 动态 Hook,在删除特定站点瞬态数据之前立即触发。它允许开发者在删除操作前执行自定义代码。

关键要点

  • 这是一个动态 Hook,名称中的 $transient 部分对应瞬态名称。
  • Hook 参数为 $transient,类型为字符串,表示要删除的瞬态名称。
  • 相关函数 delete_site_transient() 用于删除站点瞬态。
  • 自 WordPress 3.0.0 版本引入。

📄 原文内容

Fires immediately before a specific site transient is deleted.

Description

The dynamic portion of the hook name, $transient, refers to the transient name.

Parameters

$transientstring
Transient name.

Source

do_action( "delete_site_transient_{$transient}", $transient );

Changelog

Version Description
3.0.0 Introduced.