WP_REST_Comments_Controller::check_comment_author_email

SummerySummery

Checks a comment author email for validity.

Syntax

WP_REST_Comments_Controller::check_comment_author_email( string $value, WP_REST_Request $request, string $param )

DescriptionDescription

Accepts either a valid email address or empty string as a valid comment author email address. Setting the comment author email to an empty string is allowed when a comment is being updated.

ParametersParameters

$value

(string) (Required) Author email value submitted.

$request

(WP_REST_Request) (Required) Full details about the request.

$param

(string) (Required) The parameter name.

ReturnReturn

(string|WP_Error) The sanitized email address, if valid, otherwise an error.

SourceSource

File: wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php


			

ChangelogChangelog

Changelog
Version Description
4.7.0 Introduced.
Scroll to Top