Changeset 1965

Show
Ignore:
Timestamp:
12/16/04 03:08:07 (4 years ago)
Author:
saxmatt
Message:

Let's get_ down

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-includes/comment-functions.php

    r1964 r1965  
    6262 
    6363function comments_link( $file = '', $echo = true ) { 
    64     if (!$echo) return get_permalink() . '#comments'; 
    65     else echo ; 
     64    echo get_comments_link(); 
     65
     66 
     67function comment_link_rss() { 
     68    echo get_comments_link(); 
    6669} 
    6770 
     
    149152} 
    150153 
     154function comment_author_rss() { 
     155    $author = apply_filters('comment_author_rss', get_comment_author() ); 
     156    echo $author; 
     157} 
     158 
    151159function get_comment_author_email() { 
    152160    global $comment; 
     
    245253} 
    246254 
     255function 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 
    247261function get_comment_excerpt() { 
    248262    global $comment; 
     
    313327} 
    314328 
    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) { 
     329function get_trackback_url() { 
    345330    global $id; 
    346331    $tb_url = get_settings('siteurl') . '/wp-trackback.php/' . $id; 
    347      
    348     if ('' != get_settings('permalink_structure')) { 
     332 
     333    if ( '' != get_settings('permalink_structure') ) 
    349334        $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
     338function trackback_url( $display = true ) { 
     339    if ( $display) 
     340        echo get_trackback_url()
     341    else 
     342        return get_trackback_url(); 
     343
    359344 
    360345function trackback_rdf($timezone = 0) { 
     
    378363function comments_open() { 
    379364    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; 
    382369} 
    383370 
    384371function pings_open() { 
    385372    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; 
    388377} 
    389378 
  • trunk/wp-includes/vars.php

    r1964 r1965  
    213213add_filter('comment_author', 'wptexturize'); 
    214214add_filter('comment_author', 'convert_chars'); 
     215add_filter('comment_author', 'wp_specialchars'); 
    215216 
    216217add_filter('comment_email', 'antispambot'); 
     
    223224add_filter('comment_text', 'convert_smilies', 20); 
    224225 
     226add_filter('comment_text_rss', 'htmlspecialchars'); 
     227 
    225228add_filter('comment_excerpt', 'convert_chars'); 
    226229