Skip to content

Commit bd54ada

Browse files
committed
blog.jquery.com: Fixup 9131422
1 parent e99501d commit bd54ada

File tree

3 files changed

+61
-64
lines changed

3 files changed

+61
-64
lines changed

themes/blog.jquery.com/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ a,
6666
}
6767
#comments .commentlist > li.pingback {
6868
margin: 0 0 1em 60px;
69-
padding: 0 1.625em;
69+
padding: 0;
7070
}
7171
.comment-meta .fn {
7272
font-style: normal;

themes/jquery/functions.php

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ function jq_comment( $comment, $args, $depth ) {
162162
case 'pingback' :
163163
case 'trackback' :
164164
?>
165-
<li class="post pingback">
166-
<p>Pingback: <?php comment_author_link(); ?><?php edit_comment_link( 'Edit', ' &bull; <span class="edit-link">', '</span>' ); ?></p>
165+
<li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">
166+
<p><span class="icon-link"></span> Pingback: <?php comment_author_link(); ?><?php edit_comment_link( 'Edit', ' &bull; <span class="edit-link">', '</span>' ); ?></p>
167167
<?php
168168
break;
169169
default :
@@ -182,7 +182,7 @@ function jq_comment( $comment, $args, $depth ) {
182182
echo sprintf( '%1s on %2s:',
183183
sprintf( '<span class="fn">%s</span>', esc_html( get_comment_author() ) ),
184184
sprintf( '<a href="%1s"><time pubdate datetime="%2s">%3s</time></a>',
185-
esc_url( get_comment_link( $comment->comment_ID ) ),
185+
esc_url( get_comment_link() ),
186186
get_comment_time( 'c' ),
187187
sprintf( '%1s at %2s', get_comment_date(), get_comment_time() )
188188
)
@@ -222,6 +222,19 @@ function jq_posted_on() {
222222
);
223223
}
224224

225+
function jq_image_posted_on() {
226+
printf( __( '<span class="sep">Published in </span><a href="%1$s" title="Return to %2$s" rel="gallery">%2$s</a>' ),
227+
esc_url( get_permalink( wp_get_post_parent_id() ) ),
228+
get_the_title( wp_get_post_parent_id() )
229+
);
230+
$metadata = wp_get_attachment_metadata();
231+
printf( __( '<a href="%1$s" title="Link to full-size image">%2$s &times; %3$s</a>' ),
232+
esc_url( wp_get_attachment_url() ),
233+
$metadata['width'],
234+
$metadata['height'],
235+
);
236+
}
237+
225238
/**
226239
* Adds two classes to the array of body classes.
227240
* The first is if the site has only had one author with published posts.

themes/jquery/image.php

Lines changed: 44 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -5,43 +5,30 @@
55

66
get_header(); ?>
77

8-
<div id="primary" class="image-attachment">
9-
<div id="content" role="main">
10-
11-
<?php the_post(); ?>
12-
13-
<nav class="pagination">
14-
<h3 class="assistive-text"><?php _e( 'Image navigation', 'twentyeleven' ); ?></h3>
15-
<?php previous_image_link( false, __( '&larr; Previous' , 'twentyeleven' ) ); ?>
16-
<?php next_image_link( false, __( 'Next &rarr;' , 'twentyeleven' ) ); ?>
17-
</nav>
18-
19-
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
20-
<header class="entry-header">
21-
<h1 class="entry-title"><?php the_title(); ?></h1>
22-
23-
<div class="entry-meta">
24-
<?php
25-
$metadata = wp_get_attachment_metadata();
26-
printf( __( '<span class="meta-prep meta-prep-entry-date">Published </span> <span class="entry-date"><abbr class="published" title="%1$s">%2$s</abbr></span> at <a href="%3$s" title="Link to full-size image">%4$s &times; %5$s</a> in <a href="%6$s" title="Return to %7$s" rel="gallery">%7$s</a>', 'twentyeleven' ),
27-
esc_attr( get_the_time() ),
28-
get_the_date(),
29-
esc_url( wp_get_attachment_url() ),
30-
$metadata['width'],
31-
$metadata['height'],
32-
esc_url( get_permalink( $post->post_parent ) ),
33-
get_the_title( $post->post_parent )
34-
);
35-
?>
36-
<?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
37-
</div><!-- .entry-meta -->
38-
39-
</header><!-- .entry-header -->
40-
41-
<div class="entry-content">
42-
43-
<div class="entry-attachment">
44-
<div class="attachment">
8+
<?php the_post(); ?>
9+
10+
<div class="content-right twelve columns">
11+
<div id="content">
12+
<header class="entry-header">
13+
<h1 class="entry-title"><?php the_title(); ?></h1>
14+
<div class="entry-posted">
15+
<?php
16+
jq_posted_on();
17+
edit_post_link( __( 'Edit', 'twentyeleven' ), ' &bull; <span class="edit-link">', '</span>' );
18+
?>
19+
</div>
20+
</header><!-- .entry-header -->
21+
22+
<nav class="pagination">
23+
<h3 class="assistive-text"><?php _e( 'Image navigation', 'twentyeleven' ); ?></h3>
24+
<?php previous_image_link( false, __( '&larr; Previous' , 'twentyeleven' ) ); ?>
25+
<?php next_image_link( false, __( 'Next &rarr;' , 'twentyeleven' ) ); ?>
26+
</nav>
27+
28+
<div class="entry-content">
29+
30+
<div class="entry-attachment">
31+
<div class="attachment">
4532
<?php
4633
/**
4734
* Grab the IDs of all the image attachments in a gallery so we can get the URL of the next adjacent image in a gallery,
@@ -66,32 +53,29 @@
6653
$next_attachment_url = wp_get_attachment_url();
6754
}
6855
?>
69-
<a href="<?php echo esc_url( $next_attachment_url ); ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php
70-
$attachment_size = 848;
71-
echo wp_get_attachment_image( $post->ID, array( $attachment_size, 1024 ) ); // filterable image width with 1024px limit for image height.
72-
?></a>
73-
74-
<?php if ( ! empty( $post->post_excerpt ) ) : ?>
75-
<div class="entry-caption">
76-
<?php the_excerpt(); ?>
77-
</div>
78-
<?php endif; ?>
79-
</div><!-- .attachment -->
80-
81-
</div><!-- .entry-attachment -->
56+
<a href="<?php echo esc_url( $next_attachment_url ); ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php
57+
$attachment_size = 848;
58+
echo wp_get_attachment_image( $post->ID, array( $attachment_size, 1024 ) ); // filterable image width with 1024px limit for image height.
59+
?></a>
8260

83-
<div class="entry-description">
84-
<?php the_content(); ?>
85-
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
86-
</div><!-- .entry-description -->
61+
<?php if ( ! empty( $post->post_excerpt ) ) : ?>
62+
<div class="entry-caption">
63+
<?php the_excerpt(); ?>
64+
</div>
65+
<?php endif; ?>
66+
</div><!-- .attachment -->
8767

88-
</div><!-- .entry-content -->
68+
</div><!-- .entry-attachment -->
8969

90-
</article><!-- #post-<?php the_ID(); ?> -->
70+
<div class="entry-description">
71+
<?php the_content(); ?>
72+
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
73+
</div><!-- .entry-description -->
9174

92-
<?php comments_template(); ?>
75+
</div><!-- .entry-content -->
9376

94-
</div><!-- #content -->
95-
</div><!-- #primary -->
77+
</div><!-- #content -->
78+
<?php get_sidebar(); ?>
79+
</div>
9680

97-
<?php get_footer(); ?>
81+
<?php get_footer(); ?>

0 commit comments

Comments
 (0)