diff options
Diffstat (limited to 'wp-includes/comment-template.php')
-rw-r--r-- | wp-includes/comment-template.php | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index 086c782..99fecfe 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -223,18 +223,17 @@ function comment_type($commenttxt = 'Comment', $trackbacktxt = 'Trackback', $pin function get_trackback_url() { global $id; - $tb_url = get_option('siteurl') . '/wp-trackback.php?p=' . $id; - - if ( '' != get_option('permalink_structure') ) + if ( '' != get_option('permalink_structure') ) { $tb_url = trailingslashit(get_permalink()) . user_trailingslashit('trackback', 'single_trackback'); - + } else { + $tb_url = get_option('siteurl') . '/wp-trackback.php?p=' . $id; + } return apply_filters('trackback_url', $tb_url); } -function trackback_url( $display = true ) { - if ( $display) - echo get_trackback_url(); - else - return get_trackback_url(); + +function trackback_url($deprecated = true) { // remove backwards compat in 2.4 + if ($deprecated) echo get_trackback_url(); + else return get_trackback_url(); } function trackback_rdf($timezone = 0) { @@ -250,7 +249,7 @@ function trackback_rdf($timezone = 0) { the_permalink(); echo '"'."\n"; echo ' dc:title="'.str_replace('--', '--', wptexturize(strip_tags(get_the_title()))).'"'."\n"; - echo ' trackback:ping="'.trackback_url(0).'"'." />\n"; + echo ' trackback:ping="'.get_trackback_url().'"'." />\n"; echo '</rdf:RDF>'; } } @@ -290,7 +289,7 @@ function comments_template( $file = '/comments.php' ) { // TODO: Use API instead of SELECTs. if ( $user_ID) { $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = '$post->ID' AND (comment_approved = '1' OR ( user_id = '$user_ID' AND comment_approved = '0' ) ) ORDER BY comment_date"); - } else if ( empty($comment_author) ) { + } else if ( empty($comment_author) ) { $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = '$post->ID' AND comment_approved = '1' ORDER BY comment_date"); } else { $author_db = $wpdb->escape($comment_author); @@ -301,6 +300,7 @@ function comments_template( $file = '/comments.php' ) { // keep $comments for legacy's sake (remember $table*? ;) ) $comments = $wp_query->comments = apply_filters( 'comments_array', $comments, $post->ID ); $wp_query->comment_count = count($wp_query->comments); + update_comment_cache($comments); define('COMMENTS_TEMPLATE', true); $include = apply_filters('comments_template', TEMPLATEPATH . $file ); @@ -363,7 +363,7 @@ function comments_popup_link($zero='No Comments', $one='1 Comment', $more='% Com if (!empty($CSSclass)) { echo ' class="'.$CSSclass.'"'; } - $title = attribute_escape(apply_filters('the_title', get_the_title())); + $title = attribute_escape(get_the_title()); echo ' title="' . sprintf( __('Comment on %s'), $title ) .'">'; comments_number($zero, $one, $more, $number); echo '</a>'; |