Changeset 1965
- Timestamp:
- 12/16/2004 03:08:07 AM (21 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
-
comment-functions.php (modified) (5 diffs)
-
vars.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/comment-functions.php
r1964 r1965 62 62 63 63 function comments_link( $file = '', $echo = true ) { 64 if (!$echo) return get_permalink() . '#comments'; 65 else echo ; 64 echo get_comments_link(); 65 } 66 67 function comment_link_rss() { 68 echo get_comments_link(); 66 69 } 67 70 … … 149 152 } 150 153 154 function comment_author_rss() { 155 $author = apply_filters('comment_author_rss', get_comment_author() ); 156 echo $author; 157 } 158 151 159 function get_comment_author_email() { 152 160 global $comment; … … 245 253 } 246 254 255 function comment_text_rss() { 256 $comment_text = get_comment_text(); 257 $comment_text = apply_filters('comment_text_rss', $comment_text); 258 echo $comment_text; 259 } 260 247 261 function get_comment_excerpt() { 248 262 global $comment; … … 313 327 } 314 328 315 function comment_author_rss() { 316 global $comment; 317 if (empty($comment->comment_author)) { 318 echo 'Anonymous'; 319 } else { 320 echo wp_specialchars(apply_filters('comment_author', $comment->comment_author)); 321 } 322 } 323 324 function comment_text_rss() { 325 global $comment; 326 $comment_text = str_replace('<trackback />', '', $comment->comment_content); 327 $comment_text = str_replace('<pingback />', '', $comment_text); 328 $comment_text = apply_filters('comment_text', $comment_text); 329 $comment_text = strip_tags($comment_text); 330 $comment_text = wp_specialchars($comment_text); 331 echo $comment_text; 332 } 333 334 function comment_link_rss() { 335 global $comment; 336 echo get_permalink($comment->comment_post_ID).'#comments'; 337 } 338 339 function permalink_comments_rss() { 340 global $comment; 341 echo get_permalink($comment->comment_post_ID); 342 } 343 344 function trackback_url($display = true) { 329 function get_trackback_url() { 345 330 global $id; 346 331 $tb_url = get_settings('siteurl') . '/wp-trackback.php/' . $id; 347 348 if ( '' != get_settings('permalink_structure')) {332 333 if ( '' != get_settings('permalink_structure') ) 349 334 $tb_url = trailingslashit(get_permalink()) . 'trackback/'; 350 } 351 352 if ($display) { 353 echo $tb_url; 354 } else {355 return $tb_url;356 }357 } 358 335 336 return $tb_url; 337 } 338 function trackback_url( $display = true ) { 339 if ( $display) 340 echo get_trackback_url(); 341 else 342 return get_trackback_url(); 343 } 359 344 360 345 function trackback_rdf($timezone = 0) { … … 378 363 function comments_open() { 379 364 global $post; 380 if ('open' == $post->comment_status) return true; 381 else return false; 365 if ( 'open' == $post->comment_status ) 366 return true; 367 else 368 return false; 382 369 } 383 370 384 371 function pings_open() { 385 372 global $post; 386 if ('open' == $post->ping_status) return true; 387 else return false; 373 if ( 'open' == $post->ping_status ) 374 return true; 375 else 376 return false; 388 377 } 389 378 -
trunk/wp-includes/vars.php
r1964 r1965 213 213 add_filter('comment_author', 'wptexturize'); 214 214 add_filter('comment_author', 'convert_chars'); 215 add_filter('comment_author', 'wp_specialchars'); 215 216 216 217 add_filter('comment_email', 'antispambot'); … … 223 224 add_filter('comment_text', 'convert_smilies', 20); 224 225 226 add_filter('comment_text_rss', 'htmlspecialchars'); 227 225 228 add_filter('comment_excerpt', 'convert_chars'); 226 229
Note: See TracChangeset
for help on using the changeset viewer.