| 1 | Index: wp-content/themes/twentyeleven/content-single.php |
|---|
| 2 | =================================================================== |
|---|
| 3 | --- wp-content/themes/twentyeleven/content-single.php (revision 18202) |
|---|
| 4 | +++ wp-content/themes/twentyeleven/content-single.php (working copy) |
|---|
| 5 | @@ -13,16 +13,7 @@ |
|---|
| 6 | <h1 class="entry-title"><?php the_title(); ?></h1> |
|---|
| 7 | |
|---|
| 8 | <div class="entry-meta"> |
|---|
| 9 | - <?php |
|---|
| 10 | - printf( __( '<span class="sep">Posted on </span><a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s" pubdate>%3$s</time></a> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s" rel="author">%6$s</a></span>', 'twentyeleven' ), |
|---|
| 11 | - get_permalink(), |
|---|
| 12 | - get_the_date( 'c' ), |
|---|
| 13 | - get_the_date(), |
|---|
| 14 | - get_author_posts_url( get_the_author_meta( 'ID' ) ), |
|---|
| 15 | - sprintf( esc_attr__( 'View all posts by %s', 'twentyeleven' ), get_the_author() ), |
|---|
| 16 | - get_the_author() |
|---|
| 17 | - ); |
|---|
| 18 | - ?> |
|---|
| 19 | + <?php twentyeleven_posted_on(); ?> |
|---|
| 20 | </div><!-- .entry-meta --> |
|---|
| 21 | </header><!-- .entry-header --> |
|---|
| 22 | |
|---|
| 23 | @@ -45,10 +36,10 @@ |
|---|
| 24 | /* translators: used between list items, there is a space after the comma */ |
|---|
| 25 | get_the_category_list( __( ', ', 'twentyeleven' ) ), |
|---|
| 26 | $tag_list, |
|---|
| 27 | - get_permalink(), |
|---|
| 28 | + esc_url( get_permalink() ), |
|---|
| 29 | the_title_attribute( 'echo=0' ), |
|---|
| 30 | get_the_author(), |
|---|
| 31 | - get_author_posts_url( get_the_author_meta( 'ID' ) ) |
|---|
| 32 | + esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) |
|---|
| 33 | ); |
|---|
| 34 | ?> |
|---|
| 35 | <?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?> |
|---|
| 36 | @@ -62,7 +53,7 @@ |
|---|
| 37 | <h2><?php printf( esc_attr__( 'About %s', 'twentyeleven' ), get_the_author() ); ?></h2> |
|---|
| 38 | <?php the_author_meta( 'description' ); ?> |
|---|
| 39 | <div id="author-link"> |
|---|
| 40 | - <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" rel="author"> |
|---|
| 41 | + <a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author"> |
|---|
| 42 | <?php printf( __( 'View all posts by %s <span class="meta-nav">→</span>', 'twentyeleven' ), get_the_author() ); ?> |
|---|
| 43 | </a> |
|---|
| 44 | </div><!-- #author-link --> |
|---|
| 45 | Index: wp-content/themes/twentyeleven/searchform.php |
|---|
| 46 | =================================================================== |
|---|
| 47 | --- wp-content/themes/twentyeleven/searchform.php (revision 18202) |
|---|
| 48 | +++ wp-content/themes/twentyeleven/searchform.php (working copy) |
|---|
| 49 | @@ -7,7 +7,7 @@ |
|---|
| 50 | * @since Twenty Eleven 1.0 |
|---|
| 51 | */ |
|---|
| 52 | ?> |
|---|
| 53 | - <form method="get" id="searchform" action="<?php echo home_url( '/' ); ?>"> |
|---|
| 54 | + <form method="get" id="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>"> |
|---|
| 55 | <label for="s" class="assistive-text"><?php _e( 'Search', 'twentyeleven' ); ?></label> |
|---|
| 56 | <input type="text" class="field" name="s" id="s" placeholder="<?php esc_attr_e( 'Search', 'twentyeleven' ); ?>" /> |
|---|
| 57 | <input type="submit" class="submit" name="submit" id="searchsubmit" value="<?php esc_attr_e( 'Search', 'twentyeleven' ); ?>" /> |
|---|
| 58 | Index: wp-content/themes/twentyeleven/content-aside.php |
|---|
| 59 | =================================================================== |
|---|
| 60 | --- wp-content/themes/twentyeleven/content-aside.php (revision 18202) |
|---|
| 61 | +++ wp-content/themes/twentyeleven/content-aside.php (working copy) |
|---|
| 62 | @@ -39,16 +39,7 @@ |
|---|
| 63 | <?php endif; ?> |
|---|
| 64 | |
|---|
| 65 | <footer class="entry-meta"> |
|---|
| 66 | - <?php |
|---|
| 67 | - printf( __( '<span class="sep">Posted on </span><a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s" pubdate>%3$s</time></a> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s" rel="author">%6$s</a></span>', 'twentyeleven' ), |
|---|
| 68 | - get_permalink(), |
|---|
| 69 | - get_the_date( 'c' ), |
|---|
| 70 | - get_the_date(), |
|---|
| 71 | - get_author_posts_url( get_the_author_meta( 'ID' ) ), |
|---|
| 72 | - sprintf( esc_attr__( 'View all posts by %s', 'twentyeleven' ), get_the_author() ), |
|---|
| 73 | - get_the_author() |
|---|
| 74 | - ); |
|---|
| 75 | - ?> |
|---|
| 76 | + <?php twentyeleven_posted_on(); ?> |
|---|
| 77 | <?php if ( comments_open() ) : ?> |
|---|
| 78 | <span class="sep"> | </span> |
|---|
| 79 | <span class="comments-link"><?php comments_popup_link( __( '<span class="leave-reply">Leave a reply</span>', 'twentyeleven' ), __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?></span> |
|---|
| 80 | Index: wp-content/themes/twentyeleven/style.css |
|---|
| 81 | =================================================================== |
|---|
| 82 | --- wp-content/themes/twentyeleven/style.css (revision 18202) |
|---|
| 83 | +++ wp-content/themes/twentyeleven/style.css (working copy) |
|---|
| 84 | @@ -738,6 +738,11 @@ |
|---|
| 85 | .entry-meta a { |
|---|
| 86 | font-weight: bold; |
|---|
| 87 | } |
|---|
| 88 | +.single-author .entry-meta .by-author { |
|---|
| 89 | + position: absolute !important; |
|---|
| 90 | + clip: rect(1px 1px 1px 1px); /* IE6, IE7 */ |
|---|
| 91 | + clip: rect(1px, 1px, 1px, 1px); |
|---|
| 92 | +} |
|---|
| 93 | .entry-content, |
|---|
| 94 | .entry-summary { |
|---|
| 95 | padding: 1.625em 0 0; |
|---|
| 96 | Index: wp-content/themes/twentyeleven/author.php |
|---|
| 97 | =================================================================== |
|---|
| 98 | --- wp-content/themes/twentyeleven/author.php (revision 18202) |
|---|
| 99 | +++ wp-content/themes/twentyeleven/author.php (working copy) |
|---|
| 100 | @@ -24,7 +24,7 @@ |
|---|
| 101 | ?> |
|---|
| 102 | |
|---|
| 103 | <header class="page-header"> |
|---|
| 104 | - <h1 class="page-title author"><?php printf( __( 'Author Archives: %s', 'twentyeleven' ), '<span class="vcard"><a class="url fn n" href="' . get_author_posts_url( get_the_author_meta( "ID" ) ) . '" title="' . esc_attr( get_the_author() ) . '" rel="me">' . get_the_author() . '</a></span>' ); ?></h1> |
|---|
| 105 | + <h1 class="page-title author"><?php printf( __( 'Author Archives: %s', 'twentyeleven' ), '<span class="vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( "ID" ) ) ) . '" title="' . esc_attr( get_the_author() ) . '" rel="me">' . get_the_author() . '</a></span>' ); ?></h1> |
|---|
| 106 | </header> |
|---|
| 107 | |
|---|
| 108 | <?php |
|---|
| 109 | Index: wp-content/themes/twentyeleven/content-link.php |
|---|
| 110 | =================================================================== |
|---|
| 111 | --- wp-content/themes/twentyeleven/content-link.php (revision 18202) |
|---|
| 112 | +++ wp-content/themes/twentyeleven/content-link.php (working copy) |
|---|
| 113 | @@ -39,16 +39,7 @@ |
|---|
| 114 | <?php endif; ?> |
|---|
| 115 | |
|---|
| 116 | <footer class="entry-meta"> |
|---|
| 117 | - <?php |
|---|
| 118 | - printf( __( '<span class="sep">Posted on </span><a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s" pubdate>%3$s</time></a> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s" rel="author">%6$s</a></span>', 'twentyeleven' ), |
|---|
| 119 | - get_permalink(), |
|---|
| 120 | - get_the_date( 'c' ), |
|---|
| 121 | - get_the_date(), |
|---|
| 122 | - get_author_posts_url( get_the_author_meta( 'ID' ) ), |
|---|
| 123 | - sprintf( esc_attr__( 'View all posts by %s', 'twentyeleven' ), get_the_author() ), |
|---|
| 124 | - get_the_author() |
|---|
| 125 | - ); |
|---|
| 126 | - ?> |
|---|
| 127 | + <?php twentyeleven_posted_on(); ?> |
|---|
| 128 | <?php if ( comments_open() ) : ?> |
|---|
| 129 | <span class="sep"> | </span> |
|---|
| 130 | <span class="comments-link"><?php comments_popup_link( __( '<span class="leave-reply">Leave a reply</span>', 'twentyeleven' ), __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?></span> |
|---|
| 131 | Index: wp-content/themes/twentyeleven/content-featured.php |
|---|
| 132 | =================================================================== |
|---|
| 133 | --- wp-content/themes/twentyeleven/content-featured.php (revision 18202) |
|---|
| 134 | +++ wp-content/themes/twentyeleven/content-featured.php (working copy) |
|---|
| 135 | @@ -14,16 +14,7 @@ |
|---|
| 136 | <h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1> |
|---|
| 137 | |
|---|
| 138 | <div class="entry-meta"> |
|---|
| 139 | - <?php |
|---|
| 140 | - printf( __( '<span class="sep">Posted on </span><a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s" pubdate>%3$s</time></a> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s" rel="author">%6$s</a></span>', 'twentyeleven' ), |
|---|
| 141 | - get_permalink(), |
|---|
| 142 | - get_the_date( 'c' ), |
|---|
| 143 | - get_the_date(), |
|---|
| 144 | - get_author_posts_url( get_the_author_meta( 'ID' ) ), |
|---|
| 145 | - sprintf( esc_attr__( 'View all posts by %s', 'twentyeleven' ), get_the_author() ), |
|---|
| 146 | - get_the_author() |
|---|
| 147 | - ); |
|---|
| 148 | - ?> |
|---|
| 149 | + <?php twentyeleven_posted_on(); ?> |
|---|
| 150 | </div><!-- .entry-meta --> |
|---|
| 151 | </header><!-- .entry-header --> |
|---|
| 152 | |
|---|
| 153 | @@ -46,7 +37,7 @@ |
|---|
| 154 | /* translators: used between list items, there is a space after the comma */ |
|---|
| 155 | get_the_category_list( __( ', ', 'twentyeleven' ) ), |
|---|
| 156 | $tag_list, |
|---|
| 157 | - get_permalink(), |
|---|
| 158 | + esc_url( get_permalink() ), |
|---|
| 159 | the_title_attribute( 'echo=0' ) |
|---|
| 160 | ); |
|---|
| 161 | ?> |
|---|
| 162 | Index: wp-content/themes/twentyeleven/content.php |
|---|
| 163 | =================================================================== |
|---|
| 164 | --- wp-content/themes/twentyeleven/content.php (revision 18202) |
|---|
| 165 | +++ wp-content/themes/twentyeleven/content.php (working copy) |
|---|
| 166 | @@ -21,16 +21,7 @@ |
|---|
| 167 | |
|---|
| 168 | <?php if ( 'post' == $post->post_type ) : ?> |
|---|
| 169 | <div class="entry-meta"> |
|---|
| 170 | - <?php |
|---|
| 171 | - printf( __( '<span class="sep">Posted on </span><a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s" pubdate>%3$s</time></a> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s" rel="author">%6$s</a></span>', 'twentyeleven' ), |
|---|
| 172 | - get_permalink(), |
|---|
| 173 | - get_the_date( 'c' ), |
|---|
| 174 | - get_the_date(), |
|---|
| 175 | - get_author_posts_url( get_the_author_meta( 'ID' ) ), |
|---|
| 176 | - sprintf( esc_attr__( 'View all posts by %s', 'twentyeleven' ), get_the_author() ), |
|---|
| 177 | - get_the_author() |
|---|
| 178 | - ); |
|---|
| 179 | - ?> |
|---|
| 180 | + <?php twentyeleven_posted_on(); ?> |
|---|
| 181 | </div><!-- .entry-meta --> |
|---|
| 182 | <?php endif; ?> |
|---|
| 183 | |
|---|
| 184 | Index: wp-content/themes/twentyeleven/header.php |
|---|
| 185 | =================================================================== |
|---|
| 186 | --- wp-content/themes/twentyeleven/header.php (revision 18202) |
|---|
| 187 | +++ wp-content/themes/twentyeleven/header.php (working copy) |
|---|
| 188 | @@ -71,7 +71,7 @@ |
|---|
| 189 | <div id="page" class="hfeed"> |
|---|
| 190 | <header id="branding" role="banner"> |
|---|
| 191 | <hgroup> |
|---|
| 192 | - <h1 id="site-title"><span><a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span></h1> |
|---|
| 193 | + <h1 id="site-title"><span><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span></h1> |
|---|
| 194 | <h2 id="site-description"><?php bloginfo( 'description' ); ?></h2> |
|---|
| 195 | </hgroup> |
|---|
| 196 | |
|---|
| 197 | @@ -80,7 +80,7 @@ |
|---|
| 198 | $header_image = get_header_image(); |
|---|
| 199 | if ( ! empty( $header_image ) ) : |
|---|
| 200 | ?> |
|---|
| 201 | - <a href="<?php echo home_url( '/' ); ?>"> |
|---|
| 202 | + <a href="<?php echo esc_url( home_url( '/' ) ); ?>"> |
|---|
| 203 | <?php |
|---|
| 204 | // The header image |
|---|
| 205 | // Check if this is a post or page, if it has a thumbnail, and if it's a big one |
|---|
| 206 | Index: wp-content/themes/twentyeleven/content-image.php |
|---|
| 207 | =================================================================== |
|---|
| 208 | --- wp-content/themes/twentyeleven/content-image.php (revision 18202) |
|---|
| 209 | +++ wp-content/themes/twentyeleven/content-image.php (working copy) |
|---|
| 210 | @@ -33,10 +33,10 @@ |
|---|
| 211 | <div class="entry-meta"> |
|---|
| 212 | <?php |
|---|
| 213 | printf( __( '<a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s" pubdate>%3$s</time></a> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s" rel="author">%6$s</a></span>', 'twentyeleven' ), |
|---|
| 214 | - get_permalink(), |
|---|
| 215 | + esc_url( get_permalink() ), |
|---|
| 216 | get_the_date( 'c' ), |
|---|
| 217 | get_the_date(), |
|---|
| 218 | - get_author_posts_url( get_the_author_meta( 'ID' ) ), |
|---|
| 219 | + esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), |
|---|
| 220 | sprintf( esc_attr__( 'View all posts by %s', 'twentyeleven' ), get_the_author() ), |
|---|
| 221 | get_the_author() |
|---|
| 222 | ); |
|---|
| 223 | Index: wp-content/themes/twentyeleven/content-status.php |
|---|
| 224 | =================================================================== |
|---|
| 225 | --- wp-content/themes/twentyeleven/content-status.php (revision 18202) |
|---|
| 226 | +++ wp-content/themes/twentyeleven/content-status.php (working copy) |
|---|
| 227 | @@ -40,16 +40,7 @@ |
|---|
| 228 | <?php endif; ?> |
|---|
| 229 | |
|---|
| 230 | <footer class="entry-meta"> |
|---|
| 231 | - <?php |
|---|
| 232 | - printf( __( '<span class="sep">Posted on </span><a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s" pubdate>%3$s</time></a> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s" rel="author">%6$s</a></span>', 'twentyeleven' ), |
|---|
| 233 | - get_permalink(), |
|---|
| 234 | - get_the_date( 'c' ), |
|---|
| 235 | - get_the_date(), |
|---|
| 236 | - get_author_posts_url( get_the_author_meta( 'ID' ) ), |
|---|
| 237 | - sprintf( esc_attr__( 'View all posts by %s', 'twentyeleven' ), get_the_author() ), |
|---|
| 238 | - get_the_author() |
|---|
| 239 | - ); |
|---|
| 240 | - ?> |
|---|
| 241 | + <?php twentyeleven_posted_on(); ?> |
|---|
| 242 | <?php if ( comments_open() ) : ?> |
|---|
| 243 | <span class="sep"> | </span> |
|---|
| 244 | <span class="comments-link"><?php comments_popup_link( __( '<span class="leave-reply">Leave a reply</span>', 'twentyeleven' ), __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?></span> |
|---|
| 245 | Index: wp-content/themes/twentyeleven/content-quote.php |
|---|
| 246 | =================================================================== |
|---|
| 247 | --- wp-content/themes/twentyeleven/content-quote.php (revision 18202) |
|---|
| 248 | +++ wp-content/themes/twentyeleven/content-quote.php (working copy) |
|---|
| 249 | @@ -17,16 +17,7 @@ |
|---|
| 250 | |
|---|
| 251 | <?php if ( 'post' == $post->post_type ) : ?> |
|---|
| 252 | <div class="entry-meta"> |
|---|
| 253 | - <?php |
|---|
| 254 | - printf( __( '<span class="sep">Posted on </span><a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s" pubdate>%3$s</time></a> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s" rel="author">%6$s</a></span>', 'twentyeleven' ), |
|---|
| 255 | - get_permalink(), |
|---|
| 256 | - get_the_date( 'c' ), |
|---|
| 257 | - get_the_date(), |
|---|
| 258 | - get_author_posts_url( get_the_author_meta( 'ID' ) ), |
|---|
| 259 | - sprintf( esc_attr__( 'View all posts by %s', 'twentyeleven' ), get_the_author() ), |
|---|
| 260 | - get_the_author() |
|---|
| 261 | - ); |
|---|
| 262 | - ?> |
|---|
| 263 | + <?php twentyeleven_posted_on(); ?> |
|---|
| 264 | </div><!-- .entry-meta --> |
|---|
| 265 | <?php endif; ?> |
|---|
| 266 | |
|---|
| 267 | Index: wp-content/themes/twentyeleven/content-gallery.php |
|---|
| 268 | =================================================================== |
|---|
| 269 | --- wp-content/themes/twentyeleven/content-gallery.php (revision 18202) |
|---|
| 270 | +++ wp-content/themes/twentyeleven/content-gallery.php (working copy) |
|---|
| 271 | @@ -18,16 +18,7 @@ |
|---|
| 272 | </hgroup> |
|---|
| 273 | |
|---|
| 274 | <div class="entry-meta"> |
|---|
| 275 | - <?php |
|---|
| 276 | - printf( __( '<span class="sep">Posted on </span><a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s" pubdate>%3$s</time></a> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s" rel="author">%6$s</a></span>', 'twentyeleven' ), |
|---|
| 277 | - get_permalink(), |
|---|
| 278 | - get_the_date( 'c' ), |
|---|
| 279 | - get_the_date(), |
|---|
| 280 | - get_author_posts_url( get_the_author_meta( 'ID' ) ), |
|---|
| 281 | - sprintf( esc_attr__( 'View all posts by %s', 'twentyeleven' ), get_the_author() ), |
|---|
| 282 | - get_the_author() |
|---|
| 283 | - ); |
|---|
| 284 | - ?> |
|---|
| 285 | + <?php twentyeleven_posted_on(); ?> |
|---|
| 286 | </div><!-- .entry-meta --> |
|---|
| 287 | </header><!-- .entry-header --> |
|---|
| 288 | |
|---|
| 289 | @@ -54,7 +45,7 @@ |
|---|
| 290 | </figure><!-- .gallery-thumb --> |
|---|
| 291 | |
|---|
| 292 | <p><em><?php printf( _n( 'This gallery contains <a %1$s>%2$s photo</a>.', 'This gallery contains <a %1$s>%2$s photos</a>.', $total_images, 'twentyeleven' ), |
|---|
| 293 | - 'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"', |
|---|
| 294 | + 'href="' . esc_url( get_permalink() ) . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"', |
|---|
| 295 | number_format_i18n( $total_images ) |
|---|
| 296 | ); ?></em></p> |
|---|
| 297 | <?php endif; ?> |
|---|
| 298 | Index: wp-content/themes/twentyeleven/functions.php |
|---|
| 299 | =================================================================== |
|---|
| 300 | --- wp-content/themes/twentyeleven/functions.php (revision 18202) |
|---|
| 301 | +++ wp-content/themes/twentyeleven/functions.php (working copy) |
|---|
| 302 | @@ -300,7 +300,7 @@ |
|---|
| 303 | else |
|---|
| 304 | $style = ' style="color:#' . get_theme_mod( 'header_textcolor', HEADER_TEXTCOLOR ) . ';"'; |
|---|
| 305 | ?> |
|---|
| 306 | - <h1><a id="name"<?php echo $style; ?> onclick="return false;" href="<?php echo home_url( '/' ); ?>"><?php bloginfo( 'name' ); ?></a></h1> |
|---|
| 307 | + <h1><a id="name"<?php echo $style; ?> onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a></h1> |
|---|
| 308 | <div id="desc"<?php echo $style; ?>><?php bloginfo( 'description' ); ?></div> |
|---|
| 309 | <?php $header_image = get_header_image(); |
|---|
| 310 | if ( ! empty( $header_image ) ) : ?> |
|---|
| 311 | @@ -325,7 +325,7 @@ |
|---|
| 312 | * Returns a "Continue Reading" link for excerpts |
|---|
| 313 | */ |
|---|
| 314 | function twentyeleven_continue_reading_link() { |
|---|
| 315 | - return ' <a href="'. get_permalink() . '">' . __( 'Continue reading <span class="meta-nav">→</span>', 'twentyeleven' ) . '</a>'; |
|---|
| 316 | + return ' <a href="'. esc_url( get_permalink() ) . '">' . __( 'Continue reading <span class="meta-nav">→</span>', 'twentyeleven' ) . '</a>'; |
|---|
| 317 | } |
|---|
| 318 | |
|---|
| 319 | /** |
|---|
| 320 | @@ -558,4 +558,38 @@ |
|---|
| 321 | break; |
|---|
| 322 | endswitch; |
|---|
| 323 | } |
|---|
| 324 | -endif; // ends check for twentyeleven_comment() |
|---|
| 325 | \ No newline at end of file |
|---|
| 326 | +endif; // ends check for twentyeleven_comment() |
|---|
| 327 | + |
|---|
| 328 | +if ( ! function_exists( 'twentyeleven_posted_on' ) ) : |
|---|
| 329 | +/** |
|---|
| 330 | + * Prints HTML with meta information for the current post-date/time and author. |
|---|
| 331 | + * |
|---|
| 332 | + * @since Twenty Eleven 1.0 |
|---|
| 333 | + */ |
|---|
| 334 | +function twentyeleven_posted_on() { |
|---|
| 335 | + printf( __( '<span class="sep">Posted on </span><a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s" pubdate>%4$s</time></a><span class="by-author"> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%5$s" title="%6$s">%7$s</a></span></span>', 'twentyeleven' ), |
|---|
| 336 | + esc_url( get_permalink() ), |
|---|
| 337 | + esc_attr( get_the_time() ), |
|---|
| 338 | + esc_attr( get_the_date( 'c' ) ), |
|---|
| 339 | + esc_html( get_the_date() ), |
|---|
| 340 | + esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), |
|---|
| 341 | + sprintf( esc_attr__( 'View all posts by %s', 'twentyeleven' ), get_the_author() ), |
|---|
| 342 | + esc_html( get_the_author() ) |
|---|
| 343 | + ); |
|---|
| 344 | +} |
|---|
| 345 | +endif; |
|---|
| 346 | + |
|---|
| 347 | +/** |
|---|
| 348 | + * Adds Twenty Eleven author class to the array of body classes. |
|---|
| 349 | + * |
|---|
| 350 | + * @since Twenty Eleven 1.0 |
|---|
| 351 | + */ |
|---|
| 352 | +function twentyeleven_author_class( $classes ) { |
|---|
| 353 | + |
|---|
| 354 | + if ( ! is_multi_author() ) { |
|---|
| 355 | + $classes[] = 'single-author'; |
|---|
| 356 | + } |
|---|
| 357 | + |
|---|
| 358 | + return $classes; |
|---|
| 359 | +} |
|---|
| 360 | +add_filter( 'body_class', 'twentyeleven_author_class' ); |
|---|
| 361 | Index: wp-content/themes/twentyeleven/image.php |
|---|
| 362 | =================================================================== |
|---|
| 363 | --- wp-content/themes/twentyeleven/image.php (revision 18202) |
|---|
| 364 | +++ wp-content/themes/twentyeleven/image.php (working copy) |
|---|
| 365 | @@ -29,10 +29,10 @@ |
|---|
| 366 | 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 × %5$s</a> in <a href="%6$s" title="Return to %7$s" rel="gallery">%7$s</a>', 'twentyeleven' ), |
|---|
| 367 | esc_attr( get_the_time() ), |
|---|
| 368 | get_the_date(), |
|---|
| 369 | - wp_get_attachment_url(), |
|---|
| 370 | + esc_url( wp_get_attachment_url() ), |
|---|
| 371 | $metadata['width'], |
|---|
| 372 | $metadata['height'], |
|---|
| 373 | - get_permalink( $post->post_parent ), |
|---|
| 374 | + esc_url( get_permalink( $post->post_parent ) ), |
|---|
| 375 | get_the_title( $post->post_parent ) |
|---|
| 376 | ); |
|---|
| 377 | ?> |
|---|
| 378 | @@ -69,7 +69,7 @@ |
|---|
| 379 | $next_attachment_url = wp_get_attachment_url(); |
|---|
| 380 | } |
|---|
| 381 | ?> |
|---|
| 382 | - <a href="<?php echo $next_attachment_url; ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php |
|---|
| 383 | + <a href="<?php echo esc_url( $next_attachment_url ); ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php |
|---|
| 384 | $attachment_size = apply_filters( 'twentyeleven_attachment_size', 848 ); |
|---|
| 385 | echo wp_get_attachment_image( $post->ID, array( $attachment_size, 1024 ) ); // filterable image width with 1024px limit for image height. |
|---|
| 386 | ?></a> |
|---|
| 387 | @@ -92,9 +92,9 @@ |
|---|
| 388 | |
|---|
| 389 | <footer class="entry-meta"> |
|---|
| 390 | <?php if ( comments_open() && pings_open() ) : // Comments and trackbacks open ?> |
|---|
| 391 | - <?php printf( __( '<a class="comment-link" href="#respond" title="Post a comment">Post a comment</a> or leave a trackback: <a class="trackback-link" href="%s" title="Trackback URL for your post" rel="trackback">Trackback URL</a>.', 'twentyeleven' ), get_trackback_url() ); ?> |
|---|
| 392 | + <?php printf( __( '<a class="comment-link" href="#respond" title="Post a comment">Post a comment</a> or leave a trackback: <a class="trackback-link" href="%s" title="Trackback URL for your post" rel="trackback">Trackback URL</a>.', 'twentyeleven' ), esc_url( get_trackback_url() ) ); ?> |
|---|
| 393 | <?php elseif ( ! comments_open() && pings_open() ) : // Only trackbacks open ?> |
|---|
| 394 | - <?php printf( __( 'Comments are closed, but you can leave a trackback: <a class="trackback-link" href="%s" title="Trackback URL for your post" rel="trackback">Trackback URL</a>.', 'twentyeleven' ), get_trackback_url() ); ?> |
|---|
| 395 | + <?php printf( __( 'Comments are closed, but you can leave a trackback: <a class="trackback-link" href="%s" title="Trackback URL for your post" rel="trackback">Trackback URL</a>.', 'twentyeleven' ), esc_url( get_trackback_url() ) ); ?> |
|---|
| 396 | <?php elseif ( comments_open() && ! pings_open() ) : // Only comments open ?> |
|---|
| 397 | <?php _e( 'Trackbacks are closed, but you can <a class="comment-link" href="#respond" title="Post a comment">post a comment</a>.', 'twentyeleven' ); ?> |
|---|
| 398 | <?php elseif ( ! comments_open() && ! pings_open() ) : // Comments and trackbacks closed ?> |
|---|