From b92227412ace04be04451e440bad8d4fb2536dff Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 29 Aug 2007 23:08:44 +0000 Subject: [PATCH] Trackback fxn cleanup from Otto42. fixes #4800 git-svn-id: http://svn.automattic.com/wordpress/trunk@5982 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-content/themes/default/attachment.php | 4 ++-- wp-content/themes/default/single.php | 4 ++-- wp-includes/comment-template.php | 19 +++++++++---------- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/wp-content/themes/default/attachment.php b/wp-content/themes/default/attachment.php index 7839b6ccca..eca92c8955 100644 --- a/wp-content/themes/default/attachment.php +++ b/wp-content/themes/default/attachment.php @@ -32,11 +32,11 @@ comment_status) && ('open' == $post->ping_status)) { // Both Comments and Pings are open ?> - You can leave a response, or trackback from your own site. + You can leave a response, or trackback from your own site. comment_status) && ('open' == $post->ping_status)) { // Only Pings are Open ?> - Responses are currently closed, but you can trackback from your own site. + Responses are currently closed, but you can trackback from your own site. comment_status) && !('open' == $post->ping_status)) { // Comments are open, Pings are not ?> diff --git a/wp-content/themes/default/single.php b/wp-content/themes/default/single.php index ce17785d98..00de6a3582 100644 --- a/wp-content/themes/default/single.php +++ b/wp-content/themes/default/single.php @@ -31,11 +31,11 @@ comment_status) && ('open' == $post->ping_status)) { // Both Comments and Pings are open ?> - You can leave a response, or trackback from your own site. + You can leave a response, or trackback from your own site. comment_status) && ('open' == $post->ping_status)) { // Only Pings are Open ?> - Responses are currently closed, but you can trackback from your own site. + Responses are currently closed, but you can trackback from your own site. comment_status) && !('open' == $post->ping_status)) { // Comments are open, Pings are not ?> diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index 9baea1ae5c..7525519ea7 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 ''; } }