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.
This hook occurs 3 times in this file.
Line | Code |
---|---|
96 | } |
97 |
|
98 | function comment_ID() { |
99 | global $comment; |
100 | echo $comment->comment_ID; |
101 | } |
102 |
|
103 | function comment_author() { |
104 | global $comment; |
105 | $author = apply_filters('comment_author', $comment->comment_author); |
106 | if (empty($author)) { |
107 | echo 'Anonymous'; |
108 | } else { |
109 | echo $author; |
110 | } |
111 | } |
112 |
|
113 | function comment_author_email() { |
114 | global $comment; |
115 | echo apply_filters('author_email', $comment->comment_author_email); |
116 | } |
117 |
|
118 | function comment_author_link() { |
119 | global $comment; |
120 | $url = apply_filters('comment_url', $comment->comment_author_url); |
121 | $author = apply_filters('comment_author', $comment->comment_author); |
122 | if (!$author) $author = 'Anonymous'; |
123 |
|
124 | if (empty($url)) : |
125 | echo $author; |
126 | else: |
127 | echo "<a href='$url' rel='external'>$author</a>"; |
128 | endif; |
129 | } |
130 |
|
Line | Code |
231 | } |
232 | return $url; |
233 | } |
234 |
|
235 | function comment_author_rss() { |
236 | global $comment; |
237 | if (empty($comment->comment_author)) { |
238 | echo 'Anonymous'; |
239 | } else { |
240 | echo htmlspecialchars(apply_filters('comment_author', $comment->comment_author)); |
241 | } |
242 | } |
243 |
|
244 | function comment_text_rss() { |
245 | global $comment; |
246 | $comment_text = str_replace('<trackback />', '', $comment->comment_content); |
247 | $comment_text = str_replace('<pingback />', '', $comment_text); |
248 | $comment_text = apply_filters('comment_text', $comment_text); |
249 | $comment_text = strip_tags($comment_text); |