钩子文档

update_welcome_subject

💡 云策文档标注

概述

update_welcome_subject 是一个 WordPress 过滤器钩子,用于修改站点激活后发送给管理员的欢迎邮件的主题。它允许开发者自定义邮件主题内容。

关键要点

  • update_welcome_subject 是一个过滤器钩子,用于过滤欢迎邮件的主题字符串。
  • 参数 $subject 是邮件的原始主题字符串,开发者可以修改它。
  • 该钩子在 wpmu_welcome_notification() 函数中被调用,用于通知管理员站点激活成功。
  • 自 WordPress MU 3.0.0 版本引入,属于多站点功能的一部分。

代码示例

$subject = apply_filters( 'update_welcome_subject', sprintf( $subject, $current_network->site_name, wp_unslash( $title ) ) );

📄 原文内容

Filters the subject of the welcome email sent to the site administrator after site activation.

Parameters

$subjectstring
Subject of the email.

Source

$subject = apply_filters( 'update_welcome_subject', sprintf( $subject, $current_network->site_name, wp_unslash( $title ) ) );

Changelog

Version Description
MU (3.0.0) Introduced.