Skip to content

All Sites: Remove pingbacks and trackbacks #297

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 6 additions & 40 deletions themes/jquery/comments.php
Original file line number Diff line number Diff line change
@@ -1,28 +1,3 @@
<?php
/**
* The template for displaying Comments.
*
* The area of the page that contains both current comments
* and the comment form. The actual display of comments is
* handled by a callback to twentyeleven_comment() which is
* located in the functions.php file.
*/
?>
<div id="comments">
<?php if ( post_password_required() ) : ?>
<p class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'twentyeleven' ); ?></p>
</div><!-- #comments -->
<?php
/* Stop the rest of comments.php from being processed,
* but don't kill the script entirely -- we still have
* to fully load the template.
*/
return;
endif;
?>

<?php // You can start editing here -- including this comment! ?>

<?php if ( have_comments() ) : ?>
<h2 id="comments-title">
<?php
Expand All @@ -31,33 +6,25 @@
?>
</h2>

<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
<nav id="comment-nav-above">
<h1 class="assistive-text"><?php _e( 'Comment navigation', 'twentyeleven' ); ?></h1>
<div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'twentyeleven' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'twentyeleven' ) ); ?></div>
</nav>
<?php endif; // check for comment navigation ?>
<?php endif; ?>

<ol class="commentlist">
<?php
/* Loop through and list the comments. Tell wp_list_comments()
* to use twentyeleven_comment() to format the comments.
* If you want to overload this in a child theme then you can
* define twentyeleven_comment() and that will be used instead.
* See twentyeleven_comment() in twentyeleven/functions.php for more.
*/
wp_list_comments( array( 'callback' => 'twentyeleven_comment' ) );
?>
<?php wp_list_comments( array( 'callback' => 'twentyeleven_comment' ) ); ?>
</ol>

<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
<nav id="comment-nav-below">
<h1 class="assistive-text"><?php _e( 'Comment navigation', 'twentyeleven' ); ?></h1>
<div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'twentyeleven' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'twentyeleven' ) ); ?></div>
</nav>
<?php endif; // check for comment navigation ?>
<?php endif; ?>

<?php
/* If there are no comments and comments are closed, let's leave a little note, shall we?
Expand All @@ -69,5 +36,4 @@
<?php endif; ?>

<?php comment_form(); ?>

</div><!-- #comments -->
</div>
5 changes: 1 addition & 4 deletions themes/jquery/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,7 @@ function twentyeleven_comment( $comment, $args, $depth ) {
switch ( $comment->comment_type ) :
case 'pingback' :
case 'trackback' :
?>
<li class="post pingback">
<p><?php _e( 'Pingback:', 'twentyeleven' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?></p>
<?php
// no pingbacks or trackbacks
break;
default :
?>
Expand Down
1 change: 0 additions & 1 deletion themes/jquery/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/base.css?v=1">
<link rel="stylesheet" href="<?php bloginfo( 'stylesheet_url' ); ?>">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<!--[if lt IE 7]><link rel="stylesheet" href="css/font-awesome-ie7.min.css"><![endif]-->

<script src="<?php echo get_template_directory_uri(); ?>/js/modernizr.custom.2.6.2.min.js"></script>
Expand Down