钩子文档

email_exists

💡 云策文档标注

概述

email_exists 是一个 WordPress 过滤器钩子,用于在检查给定电子邮件是否存在时进行过滤。它允许开发者修改电子邮件存在性检查的结果。

关键要点

  • 这是一个过滤器钩子,用于过滤电子邮件存在性检查的结果。
  • 接收两个参数:$user_id(用户 ID 或 false)和 $email(要检查的电子邮件地址)。
  • 源代码中通过 apply_filters 调用,返回过滤后的用户 ID 或 false。
  • 与 email_exists() 函数相关,用于确定电子邮件是否存在。
  • 自 WordPress 5.6.0 版本引入。

📄 原文内容

Filters whether the given email exists.

Parameters

$user_idint|false
The user ID associated with the email, or false if the email does not exist.
$emailstring
The email to check for existence.

Source

return apply_filters( 'email_exists', $user_id, $email );

Changelog

Version Description
5.6.0 Introduced.