Changeset 887 for trunk/wp-includes/template-functions-comment.php
- Timestamp:
- 02/17/2004 08:35:04 AM (22 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/template-functions-comment.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/template-functions-comment.php
r885 r887 7 7 8 8 add_filter('comment_email', 'remove_slashes', 5); 9 add_filter('comment_email', 'antispambot' , 5);9 add_filter('comment_email', 'antispambot'); 10 10 11 11 add_filter('comment_url', 'clean_url'); 12 12 13 add_filter('comment_text', 'remove_slashes', 5); 13 14 add_filter('comment_text', 'convert_chars'); 14 15 add_filter('comment_text', 'make_clickable'); 15 add_filter('comment_text', 'wpautop' );16 add_filter('comment_text', 'wpautop', 30); 16 17 add_filter('comment_text', 'balanceTags'); 17 18 add_filter('comment_text', 'convert_smilies', 20); 18 19 20 add_filter('comment_excerpt', 'remove_slashes', 5); 21 add_filter('comment_excerpt', 'convert_chars'); 22 19 23 function clean_url($url) { 20 24 $url = str_replace('http://url', '', $url); … … 130 134 echo $url; 131 135 } else { 132 echo 'mailto:'.antispambot($email);136 echo "mailto:$email"; 133 137 } 134 138 echo '" rel="external">' . $author . '</a>'; … … 154 158 $email = apply_filters('comment_email', $comment->comment_author_email); 155 159 if ((!empty($email)) && ($email != '@')) { 156 $display = ($linktext != '') ? $linktext : antispambot(stripslashes($email));160 $display = ($linktext != '') ? $linktext : stripslashes($email); 157 161 echo $before; 158 162 echo "<a href='mailto:$email'>$display</a>"; … … 183 187 $comment_text = str_replace('<pingback />', '', $comment_text); 184 188 echo apply_filters('comment_text', $comment_text); 189 } 190 191 function comment_excerpt() { 192 global $comment; 193 $comment_text = str_replace('<trackback />', '', $comment->comment_content); 194 $comment_text = str_replace('<pingback />', '', $comment_text); 195 $comment_text = strip_tags($comment_text); 196 $blah = explode(' ', $comment_text); 197 if (count($blah) > 20) { 198 $k = 20; 199 $use_dotdotdot = 1; 200 } else { 201 $k = count($blah); 202 $use_dotdotdot = 0; 203 } 204 $excerpt = ''; 205 for ($i=0; $i<$k; $i++) { 206 $excerpt .= $blah[$i] . ' '; 207 } 208 $excerpt .= ($use_dotdotdot) ? '...' : ''; 209 echo apply_filters('comment_excerpt', $excerpt); 185 210 } 186 211
Note: See TracChangeset
for help on using the changeset viewer.