Files
Filename | Hook Type | Line Number | PHP Doc |
---|---|---|---|
wp-includes/comment-template.php | apply_filters | 1026 | /** * Filters the text of a comment to be displayed. * * @since 1.2.0 * * @see Walker_Comment::comment() * * @param string $comment_text Text of the current comment. * @param WP_Comment|null $comment The comment object. Null if not found. * @param array $args An array of arguments. */ |
wp-includes/comment.php | apply_filters | 48 | /** * Checks whether a comment passes internal checks to be allowed to add. * * If manual comment moderation is set in the administration, then all checks, * regardless of their type and substance, will fail and the function will * return false. * * If the number of links exceeds the amount in the administration, then the * check fails. If any of the parameter contents contain any disallowed words, * then the check fails. * * If the comment author was approved before, then the comment is automatically * approved. * * If all checks pass, the function will return true. * * @since 1.2.0 * * @global wpdb $wpdb WordPress database abstraction object. * * @param string $author Comment author name. * @param string $email Comment author email. * @param string $url Comment author URL. * @param string $comment Content of the comment. * @param string $user_ip Comment author IP address. * @param string $user_agent Comment author User-Agent. * @param string $comment_type Comment type, either user-submitted comment, * trackback, or pingback. * @return bool If all checks pass, true, otherwise false. */ |
wp-includes/blocks/comment-content.php | apply_filters | 35 | /** * Renders the `core/comment-content` block on the server. * * @param array $attributes Block attributes. * @param string $content Block default content. * @param WP_Block $block Block instance. * @return string Return the post comment's content. */ |
wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php | apply_filters | 1092 | /** * Prepares a single comment output for response. * * @since 4.7.0 * @since 5.9.0 Renamed `$comment` to `$item` to match parent class for PHP 8 named parameter support. * * @param WP_Comment $item Comment object. * @param WP_REST_Request $request Request object. * @return WP_REST_Response Response object. */ |
Hook Parameters
Parameter Type | Name | Description |
---|---|---|
string | $comment_text | Text of the current comment. |
WP_Comment|null | $comment | The comment object. Null if not found. |
array | $args | An array of arguments. |