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 |
---|---|
210 | $notify_message .= get_permalink($comment->comment_post_ID) . "#comments\r\n\r\n"; |
211 | $notify_message .= sprintf( __('To delete this comment, visit: %s'), get_settings('siteurl').'/wp-admin/post.php?action=confirmdeletecomment&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n"; |
212 |
|
213 | if ('' == $comment->comment_author_email || '' == $comment->comment_author) { |
214 | $from = "From: \"$blogname\" <wordpress@" . $_SERVER['SERVER_NAME'] . '>'; |
215 | } else { |
216 | $from = 'From: "' . $comment->comment_author . "\" <$comment->comment_author_email>"; |
217 | } |
218 |
|
219 | $notify_message = apply_filters('comment_notification_text', $notify_message); |
220 | $subject = apply_filters('comment_notification_subject', $subject); |
221 | $message_headers = apply_filters('comment_notification_headers', $message_headers); |
222 |
|
223 | $message_headers = "MIME-Version: 1.0\n" |
224 | . "$from\n" |
225 | . "Content-Type: text/plain; charset=\"" . get_settings('blog_charset') . "\"\n"; |
226 |
|
227 | @wp_mail($user->user_email, $subject, $notify_message, $message_headers); |
228 | |