钩子文档

delete_site_email_content

💡 云策文档标注

概述

delete_site_email_content 是一个 WordPress 过滤器,用于修改在 Multisite 网络中提交站点删除请求时发送给站点管理员的电子邮件文本内容。它允许开发者自定义邮件内容,并支持动态替换特定占位符。

关键要点

  • 这是一个过滤器 Hook,用于修改站点删除请求邮件的文本内容。
  • 邮件文本中可以使用特殊占位符(如 ###USERNAME###、###URL_DELETE###、###SITENAME###、###SITEURL###),这些占位符会在发送时被动态替换为实际值。
  • 过滤器接受一个字符串参数 $content,代表原始的邮件文本。
  • 该过滤器在 WordPress 3.0.0 版本中引入。

代码示例

$content = apply_filters( 'delete_site_email_content', $content );

📄 原文内容

Filters the text for the email sent to the site admin when a request to delete a site in a Multisite network is submitted.

Description

The following strings have a special meaning and will get replaced dynamically:

  • ###USERNAME### The current user’s username.
  • ###URL_DELETE### The link to click on to confirm the site deletion.
  • ###SITENAME### The name of the site.
  • ###SITEURL### The URL to the site.

Parameters

$contentstring
The email text.

Source

$content = apply_filters( 'delete_site_email_content', $content );

Changelog

Version Description
3.0.0 Introduced.