wp_new_comment_via_rest_notify_postauthor() │ WP 6.9.0

Send a notification to the post author when a new note is added via the REST API.

Хуков нет.

Возвращает

null. Ничего (null).

Использование

wp_new_comment_via_rest_notify_postauthor( $comment );
$comment(WP_Comment) (обязательный)
The comment object.

Список изменений

С версии 6.9.0 Введена.

Код wp_new_comment_via_rest_notify_postauthor() WP 7.1.3

function wp_new_comment_via_rest_notify_postauthor( $comment ) {
	if ( $comment instanceof WP_Comment && 'note' === $comment->comment_type ) {
		wp_new_comment_notify_postauthor( (int) $comment->comment_ID );
	}
}