Make WordPress Core

Changeset 5982


Ignore:
Timestamp:
08/29/2007 11:08:44 PM (17 years ago)
Author:
ryan
Message:

Trackback fxn cleanup from Otto42. fixes #4800

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/default/attachment.php

    r5388 r5982  
    3333                        <?php if (('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
    3434                            // Both Comments and Pings are open ?>
    35                             You can <a href="#respond">leave a response</a>, or <a href="<?php trackback_url(true); ?>" rel="trackback">trackback</a> from your own site.
     35                            You can <a href="#respond">leave a response</a>, or <a href="<?php trackback_url(); ?>" rel="trackback">trackback</a> from your own site.
    3636
    3737                        <?php } elseif (!('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
    3838                            // Only Pings are Open ?>
    39                             Responses are currently closed, but you can <a href="<?php trackback_url(true); ?> " rel="trackback">trackback</a> from your own site.
     39                            Responses are currently closed, but you can <a href="<?php trackback_url(); ?> " rel="trackback">trackback</a> from your own site.
    4040
    4141                        <?php } elseif (('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
  • trunk/wp-content/themes/default/single.php

    r5147 r5982  
    3232                        <?php if (('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
    3333                            // Both Comments and Pings are open ?>
    34                             You can <a href="#respond">leave a response</a>, or <a href="<?php trackback_url(true); ?>" rel="trackback">trackback</a> from your own site.
     34                            You can <a href="#respond">leave a response</a>, or <a href="<?php trackback_url(); ?>" rel="trackback">trackback</a> from your own site.
    3535
    3636                        <?php } elseif (!('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
    3737                            // Only Pings are Open ?>
    38                             Responses are currently closed, but you can <a href="<?php trackback_url(true); ?> " rel="trackback">trackback</a> from your own site.
     38                            Responses are currently closed, but you can <a href="<?php trackback_url(); ?> " rel="trackback">trackback</a> from your own site.
    3939
    4040                        <?php } elseif (('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
  • trunk/wp-includes/comment-template.php

    r5752 r5982  
    224224function get_trackback_url() {
    225225    global $id;
    226     $tb_url = get_option('siteurl') . '/wp-trackback.php?p=' . $id;
    227 
    228     if ( '' != get_option('permalink_structure') )
     226    if ( '' != get_option('permalink_structure') ) {
    229227        $tb_url = trailingslashit(get_permalink()) . user_trailingslashit('trackback', 'single_trackback');
    230 
     228    } else {
     229        $tb_url = get_option('siteurl') . '/wp-trackback.php?p=' . $id;
     230    }
    231231    return apply_filters('trackback_url', $tb_url);
    232232}
    233 function trackback_url( $display = true ) {
    234     if ( $display)
    235         echo get_trackback_url();
    236     else
    237         return get_trackback_url();
     233
     234function trackback_url($deprecated = true) { // remove backwards compat in 2.4
     235    if ($deprecated) echo get_trackback_url();
     236    else return get_trackback_url();
    238237}
    239238
     
    251250        echo '"'."\n";
    252251        echo '    dc:title="'.str_replace('--', '&#x2d;&#x2d;', wptexturize(strip_tags(get_the_title()))).'"'."\n";
    253         echo '    trackback:ping="'.trackback_url(0).'"'." />\n";
     252        echo '    trackback:ping="'.get_trackback_url().'"'." />\n";
    254253        echo '</rdf:RDF>';
    255254    }
Note: See TracChangeset for help on using the changeset viewer.