Skip to content

Commit 4dfcb3c

Browse files
committed
All Sites: Remove pingbacks and trackbacks
Fixes jquerygh-207 Closes jquerygh-297
1 parent cd1e271 commit 4dfcb3c

File tree

3 files changed

+41
-78
lines changed

3 files changed

+41
-78
lines changed

themes/jquery/comments.php

Lines changed: 40 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,40 @@
1-
<?php
2-
/**
3-
* The template for displaying Comments.
4-
*
5-
* The area of the page that contains both current comments
6-
* and the comment form. The actual display of comments is
7-
* handled by a callback to twentyeleven_comment() which is
8-
* located in the functions.php file.
9-
*/
10-
?>
11-
<div id="comments">
12-
<?php if ( post_password_required() ) : ?>
13-
<p class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'twentyeleven' ); ?></p>
14-
</div><!-- #comments -->
15-
<?php
16-
/* Stop the rest of comments.php from being processed,
17-
* but don't kill the script entirely -- we still have
18-
* to fully load the template.
19-
*/
20-
return;
21-
endif;
22-
?>
23-
24-
<?php // You can start editing here -- including this comment! ?>
25-
26-
<?php if ( have_comments() ) : ?>
27-
<h2 id="comments-title">
28-
<?php
29-
printf( _n( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'twentyeleven' ),
30-
number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' );
31-
?>
32-
</h2>
33-
34-
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
35-
<nav id="comment-nav-above">
36-
<h1 class="assistive-text"><?php _e( 'Comment navigation', 'twentyeleven' ); ?></h1>
37-
<div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'twentyeleven' ) ); ?></div>
38-
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'twentyeleven' ) ); ?></div>
39-
</nav>
40-
<?php endif; // check for comment navigation ?>
41-
42-
<ol class="commentlist">
43-
<?php
44-
/* Loop through and list the comments. Tell wp_list_comments()
45-
* to use twentyeleven_comment() to format the comments.
46-
* If you want to overload this in a child theme then you can
47-
* define twentyeleven_comment() and that will be used instead.
48-
* See twentyeleven_comment() in twentyeleven/functions.php for more.
49-
*/
50-
wp_list_comments( array( 'callback' => 'twentyeleven_comment' ) );
51-
?>
52-
</ol>
53-
54-
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
55-
<nav id="comment-nav-below">
56-
<h1 class="assistive-text"><?php _e( 'Comment navigation', 'twentyeleven' ); ?></h1>
57-
<div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'twentyeleven' ) ); ?></div>
58-
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'twentyeleven' ) ); ?></div>
59-
</nav>
60-
<?php endif; // check for comment navigation ?>
61-
62-
<?php
63-
/* If there are no comments and comments are closed, let's leave a little note, shall we?
64-
* But we don't want the note on pages or post types that do not support comments.
65-
*/
66-
elseif ( ! comments_open() && ! is_page() && post_type_supports( get_post_type(), 'comments' ) ) :
67-
?>
68-
<p class="nocomments"><?php _e( 'Comments are closed.', 'twentyeleven' ); ?></p>
69-
<?php endif; ?>
70-
71-
<?php comment_form(); ?>
72-
73-
</div><!-- #comments -->
1+
<div id="comments">
2+
<?php if ( have_comments() ) : ?>
3+
<h2 id="comments-title">
4+
<?php
5+
printf( _n( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'twentyeleven' ),
6+
number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' );
7+
?>
8+
</h2>
9+
10+
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
11+
<nav id="comment-nav-above">
12+
<h1 class="assistive-text"><?php _e( 'Comment navigation', 'twentyeleven' ); ?></h1>
13+
<div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'twentyeleven' ) ); ?></div>
14+
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'twentyeleven' ) ); ?></div>
15+
</nav>
16+
<?php endif; ?>
17+
18+
<ol class="commentlist">
19+
<?php wp_list_comments( array( 'callback' => 'twentyeleven_comment' ) ); ?>
20+
</ol>
21+
22+
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
23+
<nav id="comment-nav-below">
24+
<h1 class="assistive-text"><?php _e( 'Comment navigation', 'twentyeleven' ); ?></h1>
25+
<div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'twentyeleven' ) ); ?></div>
26+
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'twentyeleven' ) ); ?></div>
27+
</nav>
28+
<?php endif; // check for comment navigation ?>
29+
30+
<?php
31+
/* If there are no comments and comments are closed, let's leave a little note, shall we?
32+
* But we don't want the note on pages or post types that do not support comments.
33+
*/
34+
elseif ( ! comments_open() && ! is_page() && post_type_supports( get_post_type(), 'comments' ) ) :
35+
?>
36+
<p class="nocomments"><?php _e( 'Comments are closed.', 'twentyeleven' ); ?></p>
37+
<?php endif; ?>
38+
39+
<?php comment_form(); ?>
40+
</div>

themes/jquery/functions.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,7 @@ function twentyeleven_comment( $comment, $args, $depth ) {
193193
switch ( $comment->comment_type ) :
194194
case 'pingback' :
195195
case 'trackback' :
196-
?>
197-
<li class="post pingback">
198-
<p><?php _e( 'Pingback:', 'twentyeleven' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?></p>
199-
<?php
196+
// no pingbacks or trackbacks
200197
break;
201198
default :
202199
?>

themes/jquery/header.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

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

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

0 commit comments

Comments
 (0)