WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
28 | } |
29 |
|
30 | $args = array(); |
31 | $comment_text = get_comment_text( $comment, $args ); |
32 | if ( ! $comment_text ) { |
33 | return ''; |
34 | } |
35 |
|
36 | /** This filter is documented in wp-includes/comment-template.php */ |
37 | $comment_text = apply_filters( 'comment_text', $comment_text, $comment, $args ); |
38 |
|
39 | $moderation_note = ''; |
40 | if ( '0' === $comment->comment_approved ) { |
41 | $commenter = wp_get_current_commenter(); |
42 |
|
43 | if ( $commenter['comment_author_email'] ) { |
44 | $moderation_note = __( 'Your comment is awaiting moderation.' ); |
45 | } else { |
46 | $moderation_note = __( 'Your comment is awaiting moderation. This is a preview; your comment will be visible after it has been approved.' ); |