From b1127ae802c03279d75c912c17994c972785226f Mon Sep 17 00:00:00 2001 From: lucha <lucha@paranoici.org> Date: Mon, 25 Jun 2018 21:48:03 +0200 Subject: [PATCH] [auto] theme: twentyeleven 2.8 --- wp-content/themes/twentyeleven/404.php | 21 +- wp-content/themes/twentyeleven/archive.php | 5 +- wp-content/themes/twentyeleven/author.php | 10 +- wp-content/themes/twentyeleven/category.php | 31 +- wp-content/themes/twentyeleven/comments.php | 11 +- .../themes/twentyeleven/content-aside.php | 9 +- .../themes/twentyeleven/content-featured.php | 19 +- .../themes/twentyeleven/content-gallery.php | 50 +- .../themes/twentyeleven/content-image.php | 19 +- .../themes/twentyeleven/content-intro.php | 9 +- .../themes/twentyeleven/content-link.php | 9 +- .../themes/twentyeleven/content-page.php | 9 +- .../themes/twentyeleven/content-quote.php | 28 +- .../themes/twentyeleven/content-single.php | 23 +- .../themes/twentyeleven/content-status.php | 9 +- wp-content/themes/twentyeleven/content.php | 28 +- wp-content/themes/twentyeleven/footer.php | 16 +- wp-content/themes/twentyeleven/functions.php | 809 ++++++++++-------- wp-content/themes/twentyeleven/header.php | 89 +- wp-content/themes/twentyeleven/image.php | 89 +- .../themes/twentyeleven/inc/theme-options.php | 209 +++-- .../themes/twentyeleven/inc/widgets.php | 48 +- wp-content/themes/twentyeleven/index.php | 5 +- .../twentyeleven/languages/twentyeleven.pot | 246 +++--- wp-content/themes/twentyeleven/page.php | 7 +- wp-content/themes/twentyeleven/readme.txt | 9 +- wp-content/themes/twentyeleven/rtl.css | 3 + wp-content/themes/twentyeleven/search.php | 7 +- wp-content/themes/twentyeleven/showcase.php | 160 ++-- .../themes/twentyeleven/sidebar-footer.php | 11 +- .../themes/twentyeleven/sidebar-page.php | 7 +- wp-content/themes/twentyeleven/sidebar.php | 4 +- wp-content/themes/twentyeleven/single.php | 7 +- wp-content/themes/twentyeleven/style.css | 11 +- wp-content/themes/twentyeleven/tag.php | 31 +- 35 files changed, 1188 insertions(+), 870 deletions(-) diff --git a/wp-content/themes/twentyeleven/404.php b/wp-content/themes/twentyeleven/404.php index 63437b9ae..d4fe3dd02 100644 --- a/wp-content/themes/twentyeleven/404.php +++ b/wp-content/themes/twentyeleven/404.php @@ -27,14 +27,29 @@ get_header(); ?> <div class="widget"> <h2 class="widgettitle"><?php _e( 'Most Used Categories', 'twentyeleven' ); ?></h2> <ul> - <?php wp_list_categories( array( 'orderby' => 'count', 'order' => 'DESC', 'show_count' => 1, 'title_li' => '', 'number' => 10 ) ); ?> + <?php + wp_list_categories( + array( + 'orderby' => 'count', + 'order' => 'DESC', + 'show_count' => 1, + 'title_li' => '', + 'number' => 10, + ) + ); +?> </ul> </div> <?php /* translators: %1$s: smilie */ $archive_content = '<p>' . sprintf( __( 'Try looking in the monthly archives. %1$s', 'twentyeleven' ), convert_smilies( ':)' ) ) . '</p>'; - the_widget( 'WP_Widget_Archives', array( 'count' => 0, 'dropdown' => 1 ), array( 'after_title' => '</h2>' . $archive_content ) ); + the_widget( + 'WP_Widget_Archives', array( + 'count' => 0, + 'dropdown' => 1, + ), array( 'after_title' => '</h2>' . $archive_content ) + ); ?> <?php the_widget( 'WP_Widget_Tag_Cloud' ); ?> @@ -45,4 +60,4 @@ get_header(); ?> </div><!-- #content --> </div><!-- #primary --> -<?php get_footer(); ?> \ No newline at end of file +<?php get_footer(); ?> diff --git a/wp-content/themes/twentyeleven/archive.php b/wp-content/themes/twentyeleven/archive.php index 2f54972bd..605ac21ce 100644 --- a/wp-content/themes/twentyeleven/archive.php +++ b/wp-content/themes/twentyeleven/archive.php @@ -36,7 +36,10 @@ get_header(); ?> <?php twentyeleven_content_nav( 'nav-above' ); ?> <?php /* Start the Loop */ ?> - <?php while ( have_posts() ) : the_post(); ?> + <?php + while ( have_posts() ) : + the_post(); +?> <?php /* Include the Post-Format-specific template for the content. diff --git a/wp-content/themes/twentyeleven/author.php b/wp-content/themes/twentyeleven/author.php index 274d5b87a..e25a72142 100644 --- a/wp-content/themes/twentyeleven/author.php +++ b/wp-content/themes/twentyeleven/author.php @@ -42,7 +42,8 @@ get_header(); ?> <?php // If a user has filled out their description, show a bio on their entries. - if ( get_the_author_meta( 'description' ) ) : ?> + if ( get_the_author_meta( 'description' ) ) : + ?> <div id="author-info"> <div id="author-avatar"> <?php @@ -64,7 +65,10 @@ get_header(); ?> <?php endif; ?> <?php /* Start the Loop */ ?> - <?php while ( have_posts() ) : the_post(); ?> + <?php + while ( have_posts() ) : + the_post(); +?> <?php /* @@ -98,4 +102,4 @@ get_header(); ?> </section><!-- #primary --> <?php get_sidebar(); ?> -<?php get_footer(); ?> \ No newline at end of file +<?php get_footer(); ?> diff --git a/wp-content/themes/twentyeleven/category.php b/wp-content/themes/twentyeleven/category.php index cd64f4490..fcd71a378 100644 --- a/wp-content/themes/twentyeleven/category.php +++ b/wp-content/themes/twentyeleven/category.php @@ -15,29 +15,34 @@ get_header(); ?> <?php if ( have_posts() ) : ?> <header class="page-header"> - <h1 class="page-title"><?php + <h1 class="page-title"> + <?php printf( __( 'Category Archives: %s', 'twentyeleven' ), '<span>' . single_cat_title( '', false ) . '</span>' ); - ?></h1> + ?> + </h1> <?php $category_description = category_description(); - if ( ! empty( $category_description ) ) { - /** - * Filter the default Twenty Eleven category description. - * - * @since Twenty Eleven 1.0 - * - * @param string The default category description HTML. - */ - echo apply_filters( 'category_archive_meta', '<div class="category-archive-meta">' . $category_description . '</div>' ); - } + if ( ! empty( $category_description ) ) { + /** + * Filter the default Twenty Eleven category description. + * + * @since Twenty Eleven 1.0 + * + * @param string The default category description HTML. + */ + echo apply_filters( 'category_archive_meta', '<div class="category-archive-meta">' . $category_description . '</div>' ); + } ?> </header> <?php twentyeleven_content_nav( 'nav-above' ); ?> <?php /* Start the Loop */ ?> - <?php while ( have_posts() ) : the_post(); ?> + <?php + while ( have_posts() ) : + the_post(); +?> <?php /* diff --git a/wp-content/themes/twentyeleven/comments.php b/wp-content/themes/twentyeleven/comments.php index e774e8364..11f95e032 100644 --- a/wp-content/themes/twentyeleven/comments.php +++ b/wp-content/themes/twentyeleven/comments.php @@ -31,8 +31,10 @@ <?php if ( have_comments() ) : ?> <h2 id="comments-title"> <?php - printf( _n( 'One thought on “%2$s”', '%1$s thoughts on “%2$s”', get_comments_number(), 'twentyeleven' ), - number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' ); + printf( + _n( 'One thought on “%2$s”', '%1$s thoughts on “%2$s”', get_comments_number(), 'twentyeleven' ), + number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' + ); ?> </h2> @@ -70,8 +72,9 @@ * If there are no comments and comments are closed, let's leave a little note, shall we? * But we only want the note on posts and pages that had comments in the first place. */ - if ( ! comments_open() && get_comments_number() ) : ?> - <p class="nocomments"><?php _e( 'Comments are closed.' , 'twentyeleven' ); ?></p> + if ( ! comments_open() && get_comments_number() ) : + ?> + <p class="nocomments"><?php _e( 'Comments are closed.', 'twentyeleven' ); ?></p> <?php endif; ?> <?php endif; // have_comments() ?> diff --git a/wp-content/themes/twentyeleven/content-aside.php b/wp-content/themes/twentyeleven/content-aside.php index 387403d62..aab63455a 100644 --- a/wp-content/themes/twentyeleven/content-aside.php +++ b/wp-content/themes/twentyeleven/content-aside.php @@ -33,7 +33,14 @@ <?php else : ?> <div class="entry-content"> <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?> - <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?> + <?php + wp_link_pages( + array( + 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', + 'after' => '</div>', + ) + ); +?> </div><!-- .entry-content --> <?php endif; ?> diff --git a/wp-content/themes/twentyeleven/content-featured.php b/wp-content/themes/twentyeleven/content-featured.php index bd31b3200..9340f5f1b 100644 --- a/wp-content/themes/twentyeleven/content-featured.php +++ b/wp-content/themes/twentyeleven/content-featured.php @@ -20,18 +20,25 @@ global $feature_class; <div class="entry-summary"> <?php the_excerpt(); ?> - <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?> + <?php + wp_link_pages( + array( + 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', + 'after' => '</div>', + ) + ); +?> </div><!-- .entry-content --> <footer class="entry-meta"> <?php /* translators: used between list items, there is a space after the comma */ $tag_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) ); - if ( '' != $tag_list ) { - $utility_text = __( 'This entry was posted in %1$s and tagged %2$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' ); - } else { - $utility_text = __( 'This entry was posted in %1$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' ); - } + if ( '' != $tag_list ) { + $utility_text = __( 'This entry was posted in %1$s and tagged %2$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' ); + } else { + $utility_text = __( 'This entry was posted in %1$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' ); + } printf( $utility_text, /* translators: used between list items, there is a space after the comma */ diff --git a/wp-content/themes/twentyeleven/content-gallery.php b/wp-content/themes/twentyeleven/content-gallery.php index e88797811..a35b9c039 100644 --- a/wp-content/themes/twentyeleven/content-gallery.php +++ b/wp-content/themes/twentyeleven/content-gallery.php @@ -32,24 +32,37 @@ <div class="entry-content"> <?php if ( post_password_required() ) : ?> <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?> - <?php else : + <?php + else : $images = twentyeleven_get_gallery_images(); if ( $images ) : $total_images = count( $images ); - $image = reset( $images ); + $image = reset( $images ); ?> <figure class="gallery-thumb"> <a href="<?php the_permalink(); ?>"><?php echo wp_get_attachment_image( $image, 'thumbnail' ); ?></a> - </figure><!-- .gallery-thumb --> + </figure><!-- .gallery-thumb --> - <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' ), - 'href="' . esc_url( get_permalink() ) . '" title="' . esc_attr( sprintf( __( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ) . '" rel="bookmark"', - number_format_i18n( $total_images ) - ); ?></em></p> - <?php endif; // end twentyeleven_get_gallery_images() check ?> + <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' ), + 'href="' . esc_url( get_permalink() ) . '" title="' . esc_attr( sprintf( __( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ) . '" rel="bookmark"', + number_format_i18n( $total_images ) + ); + ?> + </em></p> + <?php endif; // end twentyeleven_get_gallery_images() check ?> <?php the_excerpt(); ?> <?php endif; ?> - <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?> + <?php + wp_link_pages( + array( + 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', + 'after' => '</div>', + ) + ); +?> </div><!-- .entry-content --> <?php endif; ?> @@ -58,23 +71,28 @@ <?php /* translators: used between list items, there is a space after the comma */ $categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) ); - if ( $categories_list ): + if ( $categories_list ) : ?> <span class="cat-links"> - <?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list ); - $show_sep = true; ?> + <?php + printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list ); + $show_sep = true; + ?> </span> <?php endif; // End if categories ?> <?php /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) ); - if ( $tags_list ): - if ( $show_sep ) : ?> + if ( $tags_list ) : + if ( $show_sep ) : + ?> <span class="sep"> | </span> <?php endif; // End if $show_sep ?> <span class="tag-links"> - <?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); - $show_sep = true; ?> + <?php + printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); + $show_sep = true; + ?> </span> <?php endif; // End if $tags_list ?> diff --git a/wp-content/themes/twentyeleven/content-image.php b/wp-content/themes/twentyeleven/content-image.php index 249769086..e28e8a0c9 100644 --- a/wp-content/themes/twentyeleven/content-image.php +++ b/wp-content/themes/twentyeleven/content-image.php @@ -27,13 +27,21 @@ <div class="entry-content"> <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?> - <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?> + <?php + wp_link_pages( + array( + 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', + 'after' => '</div>', + ) + ); +?> </div><!-- .entry-content --> <footer class="entry-meta"> <div class="entry-meta"> <?php - printf( __( '<a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s">%3$s</time></a><span class="by-author"> <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></span>', 'twentyeleven' ), + printf( + __( '<a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s">%3$s</time></a><span class="by-author"> <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></span>', 'twentyeleven' ), esc_url( get_permalink() ), get_the_date( 'c' ), get_the_date(), @@ -47,16 +55,17 @@ <?php /* translators: used between list items, there is a space after the comma */ $categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) ); - if ( $categories_list ): + if ( $categories_list ) : ?> <span class="cat-links"> - <?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list ); ?> + <?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list ); ?> </span> <?php endif; // End if categories ?> <?php /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) ); - if ( $tags_list ): ?> + if ( $tags_list ) : + ?> <span class="tag-links"> <?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?> </span> diff --git a/wp-content/themes/twentyeleven/content-intro.php b/wp-content/themes/twentyeleven/content-intro.php index 6b9099cf8..5fe87ffad 100644 --- a/wp-content/themes/twentyeleven/content-intro.php +++ b/wp-content/themes/twentyeleven/content-intro.php @@ -15,7 +15,14 @@ <div class="entry-content"> <?php the_content(); ?> - <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?> + <?php + wp_link_pages( + array( + 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', + 'after' => '</div>', + ) + ); +?> <?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?> </div><!-- .entry-content --> </article><!-- #post-<?php the_ID(); ?> --> diff --git a/wp-content/themes/twentyeleven/content-link.php b/wp-content/themes/twentyeleven/content-link.php index 04e673016..88e710e86 100644 --- a/wp-content/themes/twentyeleven/content-link.php +++ b/wp-content/themes/twentyeleven/content-link.php @@ -33,7 +33,14 @@ <?php else : ?> <div class="entry-content"> <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?> - <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?> + <?php + wp_link_pages( + array( + 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', + 'after' => '</div>', + ) + ); +?> </div><!-- .entry-content --> <?php endif; ?> diff --git a/wp-content/themes/twentyeleven/content-page.php b/wp-content/themes/twentyeleven/content-page.php index 800a69509..accf1e7a3 100644 --- a/wp-content/themes/twentyeleven/content-page.php +++ b/wp-content/themes/twentyeleven/content-page.php @@ -15,7 +15,14 @@ <div class="entry-content"> <?php the_content(); ?> - <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?> + <?php + wp_link_pages( + array( + 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', + 'after' => '</div>', + ) + ); +?> </div><!-- .entry-content --> <footer class="entry-meta"> <?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?> diff --git a/wp-content/themes/twentyeleven/content-quote.php b/wp-content/themes/twentyeleven/content-quote.php index 2bf20cdf2..3eb940975 100644 --- a/wp-content/themes/twentyeleven/content-quote.php +++ b/wp-content/themes/twentyeleven/content-quote.php @@ -33,7 +33,14 @@ <?php else : ?> <div class="entry-content"> <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?> - <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?> + <?php + wp_link_pages( + array( + 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', + 'after' => '</div>', + ) + ); +?> </div><!-- .entry-content --> <?php endif; ?> @@ -42,23 +49,28 @@ <?php /* translators: used between list items, there is a space after the comma */ $categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) ); - if ( $categories_list ): + if ( $categories_list ) : ?> <span class="cat-links"> - <?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list ); - $show_sep = true; ?> + <?php + printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list ); + $show_sep = true; + ?> </span> <?php endif; // End if categories ?> <?php /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) ); - if ( $tags_list ): - if ( $show_sep ) : ?> + if ( $tags_list ) : + if ( $show_sep ) : + ?> <span class="sep"> | </span> <?php endif; // End if $show_sep ?> <span class="tag-links"> - <?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); - $show_sep = true; ?> + <?php + printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); + $show_sep = true; + ?> </span> <?php endif; // End if $tags_list ?> diff --git a/wp-content/themes/twentyeleven/content-single.php b/wp-content/themes/twentyeleven/content-single.php index 11ac986b5..be4915d6b 100644 --- a/wp-content/themes/twentyeleven/content-single.php +++ b/wp-content/themes/twentyeleven/content-single.php @@ -21,7 +21,14 @@ <div class="entry-content"> <?php the_content(); ?> - <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?> + <?php + wp_link_pages( + array( + 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', + 'after' => '</div>', + ) + ); +?> </div><!-- .entry-content --> <footer class="entry-meta"> @@ -31,13 +38,13 @@ /* translators: used between list items, there is a space after the comma */ $tag_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) ); - if ( '' != $tag_list ) { - $utility_text = __( 'This entry was posted in %1$s and tagged %2$s by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' ); - } elseif ( '' != $categories_list ) { - $utility_text = __( 'This entry was posted in %1$s by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' ); - } else { - $utility_text = __( 'This entry was posted by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' ); - } + if ( '' != $tag_list ) { + $utility_text = __( 'This entry was posted in %1$s and tagged %2$s by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' ); + } elseif ( '' != $categories_list ) { + $utility_text = __( 'This entry was posted in %1$s by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' ); + } else { + $utility_text = __( 'This entry was posted by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' ); + } printf( $utility_text, diff --git a/wp-content/themes/twentyeleven/content-status.php b/wp-content/themes/twentyeleven/content-status.php index afcf823d8..7a0bf9064 100644 --- a/wp-content/themes/twentyeleven/content-status.php +++ b/wp-content/themes/twentyeleven/content-status.php @@ -46,7 +46,14 @@ </div> <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?> - <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?> + <?php + wp_link_pages( + array( + 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', + 'after' => '</div>', + ) + ); +?> </div><!-- .entry-content --> <?php endif; ?> diff --git a/wp-content/themes/twentyeleven/content.php b/wp-content/themes/twentyeleven/content.php index 1f5e50fae..797726d7c 100644 --- a/wp-content/themes/twentyeleven/content.php +++ b/wp-content/themes/twentyeleven/content.php @@ -39,7 +39,14 @@ <?php else : ?> <div class="entry-content"> <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?> - <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?> + <?php + wp_link_pages( + array( + 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', + 'after' => '</div>', + ) + ); +?> </div><!-- .entry-content --> <?php endif; ?> @@ -49,11 +56,13 @@ <?php /* translators: used between list items, there is a space after the comma */ $categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) ); - if ( $categories_list ): + if ( $categories_list ) : ?> <span class="cat-links"> - <?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list ); - $show_sep = true; ?> + <?php + printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list ); + $show_sep = true; + ?> </span> <?php endif; // End if categories ?> <?php endif; // End if is_object_in_taxonomy( get_post_type(), 'category' ) ?> @@ -61,13 +70,16 @@ <?php /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) ); - if ( $tags_list ): - if ( $show_sep ) : ?> + if ( $tags_list ) : + if ( $show_sep ) : + ?> <span class="sep"> | </span> <?php endif; // End if $show_sep ?> <span class="tag-links"> - <?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); - $show_sep = true; ?> + <?php + printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); + $show_sep = true; + ?> </span> <?php endif; // End if $tags_list ?> <?php endif; // End if is_object_in_taxonomy( get_post_type(), 'post_tag' ) ?> diff --git a/wp-content/themes/twentyeleven/footer.php b/wp-content/themes/twentyeleven/footer.php index a0466770e..53fa696ee 100644 --- a/wp-content/themes/twentyeleven/footer.php +++ b/wp-content/themes/twentyeleven/footer.php @@ -19,13 +19,21 @@ * A sidebar in the footer? Yep. You can customize * your footer with three columns of widgets. */ - if ( ! is_404() ) - get_sidebar( 'footer' ); + if ( ! is_404() ) { + get_sidebar( 'footer' ); + } ?> <div id="site-generator"> <?php do_action( 'twentyeleven_credits' ); ?> - <a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentyeleven' ) ); ?>" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentyeleven' ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentyeleven' ), 'WordPress' ); ?></a> + <?php + if ( function_exists( 'the_privacy_policy_link' ) ) { + the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' ); + } + ?> + <a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentyeleven' ) ); ?>" class="imprint" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentyeleven' ); ?>"> + <?php printf( __( 'Proudly powered by %s', 'twentyeleven' ), 'WordPress' ); ?> + </a> </div> </footer><!-- #colophon --> </div><!-- #page --> @@ -33,4 +41,4 @@ <?php wp_footer(); ?> </body> -</html> \ No newline at end of file +</html> diff --git a/wp-content/themes/twentyeleven/functions.php b/wp-content/themes/twentyeleven/functions.php index 4d6ab74e9..0349823c2 100644 --- a/wp-content/themes/twentyeleven/functions.php +++ b/wp-content/themes/twentyeleven/functions.php @@ -39,216 +39,223 @@ */ // Set the content width based on the theme's design and stylesheet. -if ( ! isset( $content_width ) ) +if ( ! isset( $content_width ) ) { $content_width = 584; +} /* * Tell WordPress to run twentyeleven_setup() when the 'after_setup_theme' hook is run. */ add_action( 'after_setup_theme', 'twentyeleven_setup' ); -if ( ! function_exists( 'twentyeleven_setup' ) ): -/** - * Set up theme defaults and registers support for various WordPress features. - * - * Note that this function is hooked into the after_setup_theme hook, which runs - * before the init hook. The init hook is too late for some features, such as indicating - * support post thumbnails. - * - * To override twentyeleven_setup() in a child theme, add your own twentyeleven_setup to your child theme's - * functions.php file. - * - * @uses load_theme_textdomain() For translation/localization support. - * @uses add_editor_style() To style the visual editor. - * @uses add_theme_support() To add support for post thumbnails, automatic feed links, custom headers - * and backgrounds, and post formats. - * @uses register_nav_menus() To add support for navigation menus. - * @uses register_default_headers() To register the default custom header images provided with the theme. - * @uses set_post_thumbnail_size() To set a custom post thumbnail size. - * - * @since Twenty Eleven 1.0 - */ -function twentyeleven_setup() { - - /* - * Make Twenty Eleven available for translation. - * Translations can be added to the /languages/ directory. - * If you're building a theme based on Twenty Eleven, use - * a find and replace to change 'twentyeleven' to the name - * of your theme in all the template files. +if ( ! function_exists( 'twentyeleven_setup' ) ) : + /** + * Set up theme defaults and registers support for various WordPress features. + * + * Note that this function is hooked into the after_setup_theme hook, which runs + * before the init hook. The init hook is too late for some features, such as indicating + * support post thumbnails. + * + * To override twentyeleven_setup() in a child theme, add your own twentyeleven_setup to your child theme's + * functions.php file. + * + * @uses load_theme_textdomain() For translation/localization support. + * @uses add_editor_style() To style the visual editor. + * @uses add_theme_support() To add support for post thumbnails, automatic feed links, custom headers + * and backgrounds, and post formats. + * @uses register_nav_menus() To add support for navigation menus. + * @uses register_default_headers() To register the default custom header images provided with the theme. + * @uses set_post_thumbnail_size() To set a custom post thumbnail size. + * + * @since Twenty Eleven 1.0 */ - load_theme_textdomain( 'twentyeleven', get_template_directory() . '/languages' ); + function twentyeleven_setup() { + + /* + * Make Twenty Eleven available for translation. + * Translations can be added to the /languages/ directory. + * If you're building a theme based on Twenty Eleven, use + * a find and replace to change 'twentyeleven' to the name + * of your theme in all the template files. + */ + load_theme_textdomain( 'twentyeleven', get_template_directory() . '/languages' ); - // This theme styles the visual editor with editor-style.css to match the theme style. - add_editor_style(); + // This theme styles the visual editor with editor-style.css to match the theme style. + add_editor_style(); - // Load up our theme options page and related code. - require( get_template_directory() . '/inc/theme-options.php' ); + // Load up our theme options page and related code. + require( get_template_directory() . '/inc/theme-options.php' ); - // Grab Twenty Eleven's Ephemera widget. - require( get_template_directory() . '/inc/widgets.php' ); + // Grab Twenty Eleven's Ephemera widget. + require( get_template_directory() . '/inc/widgets.php' ); - // Add default posts and comments RSS feed links to <head>. - add_theme_support( 'automatic-feed-links' ); + // Add default posts and comments RSS feed links to <head>. + add_theme_support( 'automatic-feed-links' ); - // This theme uses wp_nav_menu() in one location. - register_nav_menu( 'primary', __( 'Primary Menu', 'twentyeleven' ) ); + // This theme uses wp_nav_menu() in one location. + register_nav_menu( 'primary', __( 'Primary Menu', 'twentyeleven' ) ); - // Add support for a variety of post formats - add_theme_support( 'post-formats', array( 'aside', 'link', 'gallery', 'status', 'quote', 'image' ) ); + // Add support for a variety of post formats + add_theme_support( 'post-formats', array( 'aside', 'link', 'gallery', 'status', 'quote', 'image' ) ); - $theme_options = twentyeleven_get_theme_options(); - if ( 'dark' == $theme_options['color_scheme'] ) - $default_background_color = '1d1d1d'; - else - $default_background_color = 'e2e2e2'; + $theme_options = twentyeleven_get_theme_options(); + if ( 'dark' == $theme_options['color_scheme'] ) { + $default_background_color = '1d1d1d'; + } else { + $default_background_color = 'e2e2e2'; + } + + // Add support for custom backgrounds. + add_theme_support( + 'custom-background', array( + /* + * Let WordPress know what our default background color is. + * This is dependent on our current color scheme. + */ + 'default-color' => $default_background_color, + ) + ); + + // This theme uses Featured Images (also known as post thumbnails) for per-post/per-page Custom Header images + add_theme_support( 'post-thumbnails' ); + + // Add support for custom headers. + $custom_header_support = array( + // The default header text color. + 'default-text-color' => '000', + // The height and width of our custom header. + /** + * Filter the Twenty Eleven default header image width. + * + * @since Twenty Eleven 1.0 + * + * @param int The default header image width in pixels. Default 1000. + */ + 'width' => apply_filters( 'twentyeleven_header_image_width', 1000 ), + /** + * Filter the Twenty Eleven default header image height. + * + * @since Twenty Eleven 1.0 + * + * @param int The default header image height in pixels. Default 288. + */ + 'height' => apply_filters( 'twentyeleven_header_image_height', 288 ), + // Support flexible heights. + 'flex-height' => true, + // Random image rotation by default. + 'random-default' => true, + // Callback for styling the header. + 'wp-head-callback' => 'twentyeleven_header_style', + // Callback for styling the header preview in the admin. + 'admin-head-callback' => 'twentyeleven_admin_header_style', + // Callback used to display the header preview in the admin. + 'admin-preview-callback' => 'twentyeleven_admin_header_image', + ); + + add_theme_support( 'custom-header', $custom_header_support ); + + if ( ! function_exists( 'get_custom_header' ) ) { + // This is all for compatibility with versions of WordPress prior to 3.4. + define( 'HEADER_TEXTCOLOR', $custom_header_support['default-text-color'] ); + define( 'HEADER_IMAGE', '' ); + define( 'HEADER_IMAGE_WIDTH', $custom_header_support['width'] ); + define( 'HEADER_IMAGE_HEIGHT', $custom_header_support['height'] ); + add_custom_image_header( $custom_header_support['wp-head-callback'], $custom_header_support['admin-head-callback'], $custom_header_support['admin-preview-callback'] ); + add_custom_background(); + } - // Add support for custom backgrounds. - add_theme_support( 'custom-background', array( /* - * Let WordPress know what our default background color is. - * This is dependent on our current color scheme. + * We'll be using post thumbnails for custom header images on posts and pages. + * We want them to be the size of the header image that we just defined. + * Larger images will be auto-cropped to fit, smaller ones will be ignored. See header.php. */ - 'default-color' => $default_background_color, - ) ); - - // This theme uses Featured Images (also known as post thumbnails) for per-post/per-page Custom Header images - add_theme_support( 'post-thumbnails' ); - - // Add support for custom headers. - $custom_header_support = array( - // The default header text color. - 'default-text-color' => '000', - // The height and width of our custom header. - /** - * Filter the Twenty Eleven default header image width. - * - * @since Twenty Eleven 1.0 - * - * @param int The default header image width in pixels. Default 1000. - */ - 'width' => apply_filters( 'twentyeleven_header_image_width', 1000 ), - /** - * Filter the Twenty Eleven default header image height. - * - * @since Twenty Eleven 1.0 - * - * @param int The default header image height in pixels. Default 288. - */ - 'height' => apply_filters( 'twentyeleven_header_image_height', 288 ), - // Support flexible heights. - 'flex-height' => true, - // Random image rotation by default. - 'random-default' => true, - // Callback for styling the header. - 'wp-head-callback' => 'twentyeleven_header_style', - // Callback for styling the header preview in the admin. - 'admin-head-callback' => 'twentyeleven_admin_header_style', - // Callback used to display the header preview in the admin. - 'admin-preview-callback' => 'twentyeleven_admin_header_image', - ); - - add_theme_support( 'custom-header', $custom_header_support ); + set_post_thumbnail_size( $custom_header_support['width'], $custom_header_support['height'], true ); - if ( ! function_exists( 'get_custom_header' ) ) { - // This is all for compatibility with versions of WordPress prior to 3.4. - define( 'HEADER_TEXTCOLOR', $custom_header_support['default-text-color'] ); - define( 'HEADER_IMAGE', '' ); - define( 'HEADER_IMAGE_WIDTH', $custom_header_support['width'] ); - define( 'HEADER_IMAGE_HEIGHT', $custom_header_support['height'] ); - add_custom_image_header( $custom_header_support['wp-head-callback'], $custom_header_support['admin-head-callback'], $custom_header_support['admin-preview-callback'] ); - add_custom_background(); + /* + * Add Twenty Eleven's custom image sizes. + * Used for large feature (header) images. + */ + add_image_size( 'large-feature', $custom_header_support['width'], $custom_header_support['height'], true ); + // Used for featured posts if a large-feature doesn't exist. + add_image_size( 'small-feature', 500, 300 ); + + // Default custom headers packaged with the theme. %s is a placeholder for the theme template directory URI. + register_default_headers( + array( + 'wheel' => array( + 'url' => '%s/images/headers/wheel.jpg', + 'thumbnail_url' => '%s/images/headers/wheel-thumbnail.jpg', + /* translators: header image description */ + 'description' => __( 'Wheel', 'twentyeleven' ), + ), + 'shore' => array( + 'url' => '%s/images/headers/shore.jpg', + 'thumbnail_url' => '%s/images/headers/shore-thumbnail.jpg', + /* translators: header image description */ + 'description' => __( 'Shore', 'twentyeleven' ), + ), + 'trolley' => array( + 'url' => '%s/images/headers/trolley.jpg', + 'thumbnail_url' => '%s/images/headers/trolley-thumbnail.jpg', + /* translators: header image description */ + 'description' => __( 'Trolley', 'twentyeleven' ), + ), + 'pine-cone' => array( + 'url' => '%s/images/headers/pine-cone.jpg', + 'thumbnail_url' => '%s/images/headers/pine-cone-thumbnail.jpg', + /* translators: header image description */ + 'description' => __( 'Pine Cone', 'twentyeleven' ), + ), + 'chessboard' => array( + 'url' => '%s/images/headers/chessboard.jpg', + 'thumbnail_url' => '%s/images/headers/chessboard-thumbnail.jpg', + /* translators: header image description */ + 'description' => __( 'Chessboard', 'twentyeleven' ), + ), + 'lanterns' => array( + 'url' => '%s/images/headers/lanterns.jpg', + 'thumbnail_url' => '%s/images/headers/lanterns-thumbnail.jpg', + /* translators: header image description */ + 'description' => __( 'Lanterns', 'twentyeleven' ), + ), + 'willow' => array( + 'url' => '%s/images/headers/willow.jpg', + 'thumbnail_url' => '%s/images/headers/willow-thumbnail.jpg', + /* translators: header image description */ + 'description' => __( 'Willow', 'twentyeleven' ), + ), + 'hanoi' => array( + 'url' => '%s/images/headers/hanoi.jpg', + 'thumbnail_url' => '%s/images/headers/hanoi-thumbnail.jpg', + /* translators: header image description */ + 'description' => __( 'Hanoi Plant', 'twentyeleven' ), + ), + ) + ); + + // Indicate widget sidebars can use selective refresh in the Customizer. + add_theme_support( 'customize-selective-refresh-widgets' ); } - - /* - * We'll be using post thumbnails for custom header images on posts and pages. - * We want them to be the size of the header image that we just defined. - * Larger images will be auto-cropped to fit, smaller ones will be ignored. See header.php. - */ - set_post_thumbnail_size( $custom_header_support['width'], $custom_header_support['height'], true ); - - /* - * Add Twenty Eleven's custom image sizes. - * Used for large feature (header) images. - */ - add_image_size( 'large-feature', $custom_header_support['width'], $custom_header_support['height'], true ); - // Used for featured posts if a large-feature doesn't exist. - add_image_size( 'small-feature', 500, 300 ); - - // Default custom headers packaged with the theme. %s is a placeholder for the theme template directory URI. - register_default_headers( array( - 'wheel' => array( - 'url' => '%s/images/headers/wheel.jpg', - 'thumbnail_url' => '%s/images/headers/wheel-thumbnail.jpg', - /* translators: header image description */ - 'description' => __( 'Wheel', 'twentyeleven' ) - ), - 'shore' => array( - 'url' => '%s/images/headers/shore.jpg', - 'thumbnail_url' => '%s/images/headers/shore-thumbnail.jpg', - /* translators: header image description */ - 'description' => __( 'Shore', 'twentyeleven' ) - ), - 'trolley' => array( - 'url' => '%s/images/headers/trolley.jpg', - 'thumbnail_url' => '%s/images/headers/trolley-thumbnail.jpg', - /* translators: header image description */ - 'description' => __( 'Trolley', 'twentyeleven' ) - ), - 'pine-cone' => array( - 'url' => '%s/images/headers/pine-cone.jpg', - 'thumbnail_url' => '%s/images/headers/pine-cone-thumbnail.jpg', - /* translators: header image description */ - 'description' => __( 'Pine Cone', 'twentyeleven' ) - ), - 'chessboard' => array( - 'url' => '%s/images/headers/chessboard.jpg', - 'thumbnail_url' => '%s/images/headers/chessboard-thumbnail.jpg', - /* translators: header image description */ - 'description' => __( 'Chessboard', 'twentyeleven' ) - ), - 'lanterns' => array( - 'url' => '%s/images/headers/lanterns.jpg', - 'thumbnail_url' => '%s/images/headers/lanterns-thumbnail.jpg', - /* translators: header image description */ - 'description' => __( 'Lanterns', 'twentyeleven' ) - ), - 'willow' => array( - 'url' => '%s/images/headers/willow.jpg', - 'thumbnail_url' => '%s/images/headers/willow-thumbnail.jpg', - /* translators: header image description */ - 'description' => __( 'Willow', 'twentyeleven' ) - ), - 'hanoi' => array( - 'url' => '%s/images/headers/hanoi.jpg', - 'thumbnail_url' => '%s/images/headers/hanoi-thumbnail.jpg', - /* translators: header image description */ - 'description' => __( 'Hanoi Plant', 'twentyeleven' ) - ) - ) ); - - // Indicate widget sidebars can use selective refresh in the Customizer. - add_theme_support( 'customize-selective-refresh-widgets' ); -} endif; // twentyeleven_setup if ( ! function_exists( 'twentyeleven_header_style' ) ) : -/** - * Styles the header image and text displayed on the blog. - * - * @since Twenty Eleven 1.0 - */ -function twentyeleven_header_style() { - $text_color = get_header_textcolor(); + /** + * Styles the header image and text displayed on the blog. + * + * @since Twenty Eleven 1.0 + */ + function twentyeleven_header_style() { + $text_color = get_header_textcolor(); - // If no custom options for text are set, let's bail. - if ( $text_color == HEADER_TEXTCOLOR ) - return; + // If no custom options for text are set, let's bail. + if ( $text_color == HEADER_TEXTCOLOR ) { + return; + } - // If we get this far, we have custom styles. Let's do this. - ?> - <style type="text/css" id="twentyeleven-header-css"> - <?php + // If we get this far, we have custom styles. Let's do this. + ?> + <style type="text/css" id="twentyeleven-header-css"> + <?php // Has the text been hidden? if ( 'blank' == $text_color ) : ?> @@ -269,19 +276,19 @@ function twentyeleven_header_style() { <?php endif; ?> </style> <?php -} + } endif; // twentyeleven_header_style if ( ! function_exists( 'twentyeleven_admin_header_style' ) ) : -/** - * Styles the header image displayed on the Appearance > Header admin panel. - * - * Referenced via add_theme_support('custom-header') in twentyeleven_setup(). - * - * @since Twenty Eleven 1.0 - */ -function twentyeleven_admin_header_style() { -?> + /** + * Styles the header image displayed on the Appearance > Header admin panel. + * + * Referenced via add_theme_support('custom-header') in twentyeleven_setup(). + * + * @since Twenty Eleven 1.0 + */ + function twentyeleven_admin_header_style() { + ?> <style type="text/css" id="twentyeleven-admin-header-css"> .appearance_page_custom-header #headimg { border: none; @@ -305,12 +312,12 @@ function twentyeleven_admin_header_style() { } <?php // If the user has set a custom color for the text use that - if ( get_header_textcolor() != HEADER_TEXTCOLOR ) : + if ( get_header_textcolor() != HEADER_TEXTCOLOR ) : ?> - #site-title a, - #site-description { - color: #<?php echo get_header_textcolor(); ?>; - } + #site-title a, + #site-description { + color: #<?php echo get_header_textcolor(); ?>; + } <?php endif; ?> #headimg img { max-width: 1000px; @@ -318,35 +325,38 @@ function twentyeleven_admin_header_style() { width: 100%; } </style> -<?php -} + <?php + } endif; // twentyeleven_admin_header_style if ( ! function_exists( 'twentyeleven_admin_header_image' ) ) : -/** - * Custom header image markup displayed on the Appearance > Header admin panel. - * - * Referenced via add_theme_support('custom-header') in twentyeleven_setup(). - * - * @since Twenty Eleven 1.0 - */ -function twentyeleven_admin_header_image() { ?> - <div id="headimg"> - <?php - $color = get_header_textcolor(); - $image = get_header_image(); - $style = 'display: none;'; - if ( $color && $color != 'blank' ) { - $style = 'color: #' . $color . ';'; - } - ?> - <h1 class="displaying-header-text"><a id="name" style="<?php echo esc_attr( $style ); ?>" onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>" tabindex="-1"><?php bloginfo( 'name' ); ?></a></h1> + /** + * Custom header image markup displayed on the Appearance > Header admin panel. + * + * Referenced via add_theme_support('custom-header') in twentyeleven_setup(). + * + * @since Twenty Eleven 1.0 + */ + function twentyeleven_admin_header_image() { + +?> + <div id="headimg"> + <?php + $color = get_header_textcolor(); + $image = get_header_image(); + $style = 'display: none;'; + if ( $color && $color != 'blank' ) { + $style = 'color: #' . $color . ';'; + } + ?> + <h1 class="displaying-header-text"><a id="name" style="<?php echo esc_attr( $style ); ?>" onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>" tabindex="-1"><?php bloginfo( 'name' ); ?></a></h1> <div id="desc" class="displaying-header-text" style="<?php echo esc_attr( $style ); ?>"><?php bloginfo( 'description' ); ?></div> - <?php if ( $image ) : ?> + <?php if ( $image ) : ?> <img src="<?php echo esc_url( $image ); ?>" alt="" /> <?php endif; ?> - </div> -<?php } + </div> + <?php + } endif; // twentyeleven_admin_header_image /** @@ -367,16 +377,16 @@ function twentyeleven_excerpt_length( $length ) { add_filter( 'excerpt_length', 'twentyeleven_excerpt_length' ); if ( ! function_exists( 'twentyeleven_continue_reading_link' ) ) : -/** - * Return a "Continue Reading" link for excerpts - * - * @since Twenty Eleven 1.0 - * - * @return string The "Continue Reading" HTML link. - */ -function twentyeleven_continue_reading_link() { - return ' <a href="'. esc_url( get_permalink() ) . '">' . __( 'Continue reading <span class="meta-nav">→</span>', 'twentyeleven' ) . '</a>'; -} + /** + * Return a "Continue Reading" link for excerpts + * + * @since Twenty Eleven 1.0 + * + * @return string The "Continue Reading" HTML link. + */ + function twentyeleven_continue_reading_link() { + return ' <a href="' . esc_url( get_permalink() ) . '">' . __( 'Continue reading <span class="meta-nav">→</span>', 'twentyeleven' ) . '</a>'; + } endif; // twentyeleven_continue_reading_link /** @@ -428,8 +438,9 @@ add_filter( 'get_the_excerpt', 'twentyeleven_custom_excerpt_more' ); * @return array The filtered page menu arguments. */ function twentyeleven_page_menu_args( $args ) { - if ( ! isset( $args['show_home'] ) ) + if ( ! isset( $args['show_home'] ) ) { $args['show_home'] = true; + } return $args; } add_filter( 'wp_page_menu_args', 'twentyeleven_page_menu_args' ); @@ -445,76 +456,88 @@ function twentyeleven_widgets_init() { register_widget( 'Twenty_Eleven_Ephemera_Widget' ); - register_sidebar( array( - 'name' => __( 'Main Sidebar', 'twentyeleven' ), - 'id' => 'sidebar-1', - 'before_widget' => '<aside id="%1$s" class="widget %2$s">', - 'after_widget' => '</aside>', - 'before_title' => '<h3 class="widget-title">', - 'after_title' => '</h3>', - ) ); - - register_sidebar( array( - 'name' => __( 'Showcase Sidebar', 'twentyeleven' ), - 'id' => 'sidebar-2', - 'description' => __( 'The sidebar for the optional Showcase Template', 'twentyeleven' ), - 'before_widget' => '<aside id="%1$s" class="widget %2$s">', - 'after_widget' => '</aside>', - 'before_title' => '<h3 class="widget-title">', - 'after_title' => '</h3>', - ) ); - - register_sidebar( array( - 'name' => __( 'Footer Area One', 'twentyeleven' ), - 'id' => 'sidebar-3', - 'description' => __( 'An optional widget area for your site footer', 'twentyeleven' ), - 'before_widget' => '<aside id="%1$s" class="widget %2$s">', - 'after_widget' => '</aside>', - 'before_title' => '<h3 class="widget-title">', - 'after_title' => '</h3>', - ) ); - - register_sidebar( array( - 'name' => __( 'Footer Area Two', 'twentyeleven' ), - 'id' => 'sidebar-4', - 'description' => __( 'An optional widget area for your site footer', 'twentyeleven' ), - 'before_widget' => '<aside id="%1$s" class="widget %2$s">', - 'after_widget' => '</aside>', - 'before_title' => '<h3 class="widget-title">', - 'after_title' => '</h3>', - ) ); - - register_sidebar( array( - 'name' => __( 'Footer Area Three', 'twentyeleven' ), - 'id' => 'sidebar-5', - 'description' => __( 'An optional widget area for your site footer', 'twentyeleven' ), - 'before_widget' => '<aside id="%1$s" class="widget %2$s">', - 'after_widget' => '</aside>', - 'before_title' => '<h3 class="widget-title">', - 'after_title' => '</h3>', - ) ); + register_sidebar( + array( + 'name' => __( 'Main Sidebar', 'twentyeleven' ), + 'id' => 'sidebar-1', + 'before_widget' => '<aside id="%1$s" class="widget %2$s">', + 'after_widget' => '</aside>', + 'before_title' => '<h3 class="widget-title">', + 'after_title' => '</h3>', + ) + ); + + register_sidebar( + array( + 'name' => __( 'Showcase Sidebar', 'twentyeleven' ), + 'id' => 'sidebar-2', + 'description' => __( 'The sidebar for the optional Showcase Template', 'twentyeleven' ), + 'before_widget' => '<aside id="%1$s" class="widget %2$s">', + 'after_widget' => '</aside>', + 'before_title' => '<h3 class="widget-title">', + 'after_title' => '</h3>', + ) + ); + + register_sidebar( + array( + 'name' => __( 'Footer Area One', 'twentyeleven' ), + 'id' => 'sidebar-3', + 'description' => __( 'An optional widget area for your site footer', 'twentyeleven' ), + 'before_widget' => '<aside id="%1$s" class="widget %2$s">', + 'after_widget' => '</aside>', + 'before_title' => '<h3 class="widget-title">', + 'after_title' => '</h3>', + ) + ); + + register_sidebar( + array( + 'name' => __( 'Footer Area Two', 'twentyeleven' ), + 'id' => 'sidebar-4', + 'description' => __( 'An optional widget area for your site footer', 'twentyeleven' ), + 'before_widget' => '<aside id="%1$s" class="widget %2$s">', + 'after_widget' => '</aside>', + 'before_title' => '<h3 class="widget-title">', + 'after_title' => '</h3>', + ) + ); + + register_sidebar( + array( + 'name' => __( 'Footer Area Three', 'twentyeleven' ), + 'id' => 'sidebar-5', + 'description' => __( 'An optional widget area for your site footer', 'twentyeleven' ), + 'before_widget' => '<aside id="%1$s" class="widget %2$s">', + 'after_widget' => '</aside>', + 'before_title' => '<h3 class="widget-title">', + 'after_title' => '</h3>', + ) + ); } add_action( 'widgets_init', 'twentyeleven_widgets_init' ); if ( ! function_exists( 'twentyeleven_content_nav' ) ) : -/** - * Display navigation to next/previous pages when applicable. - * - * @since Twenty Eleven 1.0 - * - * @param string $html_id The HTML id attribute. - */ -function twentyeleven_content_nav( $html_id ) { - global $wp_query; - - if ( $wp_query->max_num_pages > 1 ) : ?> - <nav id="<?php echo esc_attr( $html_id ); ?>"> - <h3 class="assistive-text"><?php _e( 'Post navigation', 'twentyeleven' ); ?></h3> - <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', 'twentyeleven' ) ); ?></div> - <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?></div> - </nav><!-- #nav-above --> - <?php endif; -} + /** + * Display navigation to next/previous pages when applicable. + * + * @since Twenty Eleven 1.0 + * + * @param string $html_id The HTML id attribute. + */ + function twentyeleven_content_nav( $html_id ) { + global $wp_query; + + if ( $wp_query->max_num_pages > 1 ) : + ?> + <nav id="<?php echo esc_attr( $html_id ); ?>"> + <h3 class="assistive-text"><?php _e( 'Post navigation', 'twentyeleven' ); ?></h3> + <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', 'twentyeleven' ) ); ?></div> + <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?></div> + </nav><!-- #nav-above --> + <?php + endif; + } endif; // twentyeleven_content_nav /** @@ -531,8 +554,9 @@ function twentyeleven_get_first_url() { $content = get_the_content(); $has_url = function_exists( 'get_url_in_content' ) ? get_url_in_content( $content ) : false; - if ( ! $has_url ) + if ( ! $has_url ) { $has_url = twentyeleven_url_grabber(); + } /** This filter is documented in wp-includes/link-template.php */ return ( $has_url ) ? $has_url : apply_filters( 'the_permalink', get_permalink() ); @@ -546,8 +570,9 @@ function twentyeleven_get_first_url() { * @return string|bool URL or false when no link is present. */ function twentyeleven_url_grabber() { - if ( ! preg_match( '/<a\s[^>]*?href=[\'"](.+?)[\'"]/is', get_the_content(), $matches ) ) + if ( ! preg_match( '/<a\s[^>]*?href=[\'"](.+?)[\'"]/is', get_the_content(), $matches ) ) { return false; + } return esc_url_raw( $matches[1] ); } @@ -560,14 +585,17 @@ function twentyeleven_url_grabber() { function twentyeleven_footer_sidebar_class() { $count = 0; - if ( is_active_sidebar( 'sidebar-3' ) ) + if ( is_active_sidebar( 'sidebar-3' ) ) { $count++; + } - if ( is_active_sidebar( 'sidebar-4' ) ) + if ( is_active_sidebar( 'sidebar-4' ) ) { $count++; + } - if ( is_active_sidebar( 'sidebar-5' ) ) + if ( is_active_sidebar( 'sidebar-5' ) ) { $count++; + } $class = ''; @@ -583,102 +611,117 @@ function twentyeleven_footer_sidebar_class() { break; } - if ( $class ) + if ( $class ) { echo 'class="' . esc_attr( $class ) . '"'; + } } if ( ! function_exists( 'twentyeleven_comment' ) ) : -/** - * Template for comments and pingbacks. - * - * To override this walker in a child theme without modifying the comments template - * simply create your own twentyeleven_comment(), and that function will be used instead. - * - * Used as a callback by wp_list_comments() for displaying the comments. - * - * @since Twenty Eleven 1.0 - * - * @param object $comment The comment object. - * @param array $args An array of comment arguments. @see get_comment_reply_link() - * @param int $depth The depth of the comment. - */ -function twentyeleven_comment( $comment, $args, $depth ) { - $GLOBALS['comment'] = $comment; - switch ( $comment->comment_type ) : - case 'pingback' : - case 'trackback' : - ?> - <li class="post pingback"> + /** + * Template for comments and pingbacks. + * + * To override this walker in a child theme without modifying the comments template + * simply create your own twentyeleven_comment(), and that function will be used instead. + * + * Used as a callback by wp_list_comments() for displaying the comments. + * + * @since Twenty Eleven 1.0 + * + * @param object $comment The comment object. + * @param array $args An array of comment arguments. @see get_comment_reply_link() + * @param int $depth The depth of the comment. + */ + function twentyeleven_comment( $comment, $args, $depth ) { + $GLOBALS['comment'] = $comment; + 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 - break; - default : - ?> - <li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>"> + break; + default: + ?> + <li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>"> <article id="comment-<?php comment_ID(); ?>" class="comment"> <footer class="comment-meta"> <div class="comment-author vcard"> <?php $avatar_size = 68; - if ( '0' != $comment->comment_parent ) - $avatar_size = 39; + if ( '0' != $comment->comment_parent ) { + $avatar_size = 39; + } echo get_avatar( $comment, $avatar_size ); /* translators: 1: comment author, 2: date and time */ - printf( __( '%1$s on %2$s <span class="says">said:</span>', 'twentyeleven' ), + printf( + __( '%1$s on %2$s <span class="says">said:</span>', 'twentyeleven' ), sprintf( '<span class="fn">%s</span>', get_comment_author_link() ), - sprintf( '<a href="%1$s"><time datetime="%2$s">%3$s</time></a>', + sprintf( + '<a href="%1$s"><time datetime="%2$s">%3$s</time></a>', esc_url( get_comment_link( $comment->comment_ID ) ), get_comment_time( 'c' ), /* translators: 1: date, 2: time */ sprintf( __( '%1$s at %2$s', 'twentyeleven' ), get_comment_date(), get_comment_time() ) ) ); - ?> + ?> - <?php edit_comment_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?> - </div><!-- .comment-author .vcard --> + <?php edit_comment_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?> + </div><!-- .comment-author .vcard --> - <?php if ( $comment->comment_approved == '0' ) : ?> + <?php if ( $comment->comment_approved == '0' ) : ?> <em class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.', 'twentyeleven' ); ?></em> <br /> <?php endif; ?> - </footer> + </footer> - <div class="comment-content"><?php comment_text(); ?></div> + <div class="comment-content"><?php comment_text(); ?></div> - <div class="reply"> - <?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply <span>↓</span>', 'twentyeleven' ), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?> - </div><!-- .reply --> - </article><!-- #comment-## --> + <div class="reply"> + <?php + comment_reply_link( + array_merge( + $args, array( + 'reply_text' => __( 'Reply <span>↓</span>', 'twentyeleven' ), + 'depth' => $depth, + 'max_depth' => $args['max_depth'], + ) + ) + ); +?> + </div><!-- .reply --> + </article><!-- #comment-## --> - <?php - break; - endswitch; -} + <?php + break; + endswitch; + } endif; // ends check for twentyeleven_comment() if ( ! function_exists( 'twentyeleven_posted_on' ) ) : -/** - * Print HTML with meta information for the current post-date/time and author. - * - * Create your own twentyeleven_posted_on to override in a child theme - * - * @since Twenty Eleven 1.0 - */ -function twentyeleven_posted_on() { - printf( __( '<span class="sep">Posted on </span><a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s">%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" rel="author">%7$s</a></span></span>', 'twentyeleven' ), - esc_url( get_permalink() ), - esc_attr( get_the_time() ), - esc_attr( get_the_date( 'c' ) ), - esc_html( get_the_date() ), - esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), - esc_attr( sprintf( __( 'View all posts by %s', 'twentyeleven' ), get_the_author() ) ), - get_the_author() - ); -} + /** + * Print HTML with meta information for the current post-date/time and author. + * + * Create your own twentyeleven_posted_on to override in a child theme + * + * @since Twenty Eleven 1.0 + */ + function twentyeleven_posted_on() { + printf( + __( '<span class="sep">Posted on </span><a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s">%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" rel="author">%7$s</a></span></span>', 'twentyeleven' ), + esc_url( get_permalink() ), + esc_attr( get_the_time() ), + esc_attr( get_the_date( 'c' ) ), + esc_html( get_the_date() ), + esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), + esc_attr( sprintf( __( 'View all posts by %s', 'twentyeleven' ), get_the_author() ) ), + get_the_author() + ); + } endif; /** @@ -694,11 +737,13 @@ endif; */ function twentyeleven_body_classes( $classes ) { - if ( function_exists( 'is_multi_author' ) && ! is_multi_author() ) + if ( function_exists( 'is_multi_author' ) && ! is_multi_author() ) { $classes[] = 'single-author'; + } - if ( is_singular() && ! is_home() && ! is_page_template( 'showcase.php' ) && ! is_page_template( 'sidebar-page.php' ) ) + if ( is_singular() && ! is_home() && ! is_page_template( 'showcase.php' ) && ! is_page_template( 'sidebar-page.php' ) ) { $classes[] = 'singular'; + } return $classes; } @@ -719,26 +764,30 @@ function twentyeleven_get_gallery_images() { if ( function_exists( 'get_post_galleries' ) ) { $galleries = get_post_galleries( get_the_ID(), false ); - if ( isset( $galleries[0]['ids'] ) ) + if ( isset( $galleries[0]['ids'] ) ) { $images = explode( ',', $galleries[0]['ids'] ); + } } else { $pattern = get_shortcode_regex(); preg_match( "/$pattern/s", get_the_content(), $match ); $atts = shortcode_parse_atts( $match[3] ); - if ( isset( $atts['ids'] ) ) + if ( isset( $atts['ids'] ) ) { $images = explode( ',', $atts['ids'] ); + } } if ( ! $images ) { - $images = get_posts( array( - 'fields' => 'ids', - 'numberposts' => 999, - 'order' => 'ASC', - 'orderby' => 'menu_order', - 'post_mime_type' => 'image', - 'post_parent' => get_the_ID(), - 'post_type' => 'attachment', - ) ); + $images = get_posts( + array( + 'fields' => 'ids', + 'numberposts' => 999, + 'order' => 'ASC', + 'orderby' => 'menu_order', + 'post_mime_type' => 'image', + 'post_parent' => get_the_ID(), + 'post_type' => 'attachment', + ) + ); } return $images; diff --git a/wp-content/themes/twentyeleven/header.php b/wp-content/themes/twentyeleven/header.php index f9be4f52e..df8f7eeef 100644 --- a/wp-content/themes/twentyeleven/header.php +++ b/wp-content/themes/twentyeleven/header.php @@ -24,7 +24,8 @@ <head> <meta charset="<?php bloginfo( 'charset' ); ?>" /> <meta name="viewport" content="width=device-width" /> -<title><?php +<title> +<?php // Print the <title> tag based on what is being viewed. global $page, $paged; @@ -35,14 +36,17 @@ // Add the blog description for the home/front page. $site_description = get_bloginfo( 'description', 'display' ); - if ( $site_description && ( is_home() || is_front_page() ) ) - echo " | $site_description"; +if ( $site_description && ( is_home() || is_front_page() ) ) { + echo " | $site_description"; +} // Add a page number if necessary: - if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) - echo esc_html( ' | ' . sprintf( __( 'Page %s', 'twentyeleven' ), max( $paged, $page ) ) ); +if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) { + echo esc_html( ' | ' . sprintf( __( 'Page %s', 'twentyeleven' ), max( $paged, $page ) ) ); +} - ?></title> + ?> + </title> <link rel="profile" href="http://gmpg.org/xfn/11" /> <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" /> <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" /> @@ -54,8 +58,9 @@ * We add some JavaScript to pages with the comment form * to support sites with threaded comments (when in use). */ - if ( is_singular() && get_option( 'thread_comments' ) ) - wp_enqueue_script( 'comment-reply' ); +if ( is_singular() && get_option( 'thread_comments' ) ) { + wp_enqueue_script( 'comment-reply' ); +} /* * Always have wp_head() just before the closing </head> @@ -78,39 +83,39 @@ <?php // Check to see if the header image has been removed $header_image = get_header_image(); - if ( $header_image ) : + if ( $header_image ) : + // Compatibility with versions of WordPress prior to 3.4. + if ( function_exists( 'get_custom_header' ) ) { + /* + * We need to figure out what the minimum width should be for our featured image. + * This result would be the suggested width if the theme were to implement flexible widths. + */ + $header_image_width = get_theme_support( 'custom-header', 'width' ); + } else { + $header_image_width = HEADER_IMAGE_WIDTH; + } + ?> + <a href="<?php echo esc_url( home_url( '/' ) ); ?>"> + <?php + /* + * The header image. + * Check if this is a post or page, if it has a thumbnail, and if it's a big one + */ + if ( is_singular() && has_post_thumbnail( $post->ID ) && + ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( $header_image_width, $header_image_width ) ) ) && + $image[1] >= $header_image_width ) : + // Houston, we have a new header image! + echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' ); + else : // Compatibility with versions of WordPress prior to 3.4. if ( function_exists( 'get_custom_header' ) ) { - /* - * We need to figure out what the minimum width should be for our featured image. - * This result would be the suggested width if the theme were to implement flexible widths. - */ - $header_image_width = get_theme_support( 'custom-header', 'width' ); + $header_image_width = get_custom_header()->width; + $header_image_height = get_custom_header()->height; } else { - $header_image_width = HEADER_IMAGE_WIDTH; + $header_image_width = HEADER_IMAGE_WIDTH; + $header_image_height = HEADER_IMAGE_HEIGHT; } ?> - <a href="<?php echo esc_url( home_url( '/' ) ); ?>"> - <?php - /* - * The header image. - * Check if this is a post or page, if it has a thumbnail, and if it's a big one - */ - if ( is_singular() && has_post_thumbnail( $post->ID ) && - ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( $header_image_width, $header_image_width ) ) ) && - $image[1] >= $header_image_width ) : - // Houston, we have a new header image! - echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' ); - else : - // Compatibility with versions of WordPress prior to 3.4. - if ( function_exists( 'get_custom_header' ) ) { - $header_image_width = get_custom_header()->width; - $header_image_height = get_custom_header()->height; - } else { - $header_image_width = HEADER_IMAGE_WIDTH; - $header_image_height = HEADER_IMAGE_HEIGHT; - } - ?> <img src="<?php header_image(); ?>" width="<?php echo esc_attr( $header_image_width ); ?>" height="<?php echo esc_attr( $header_image_height ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" /> <?php endif; // end check for featured image or standard header ?> </a> @@ -118,11 +123,15 @@ <?php // Has the text been hidden? - if ( 'blank' == get_header_textcolor() ) : + if ( 'blank' == get_header_textcolor() ) : + $header_image_class = ''; + if ( $header_image ) { + $header_image_class = ' with-image'; + } ?> - <div class="only-search<?php if ( $header_image ) : ?> with-image<?php endif; ?>"> - <?php get_search_form(); ?> - </div> + <div class="only-search<?php echo $header_image_class; ?>"> + <?php get_search_form(); ?> + </div> <?php else : ?> diff --git a/wp-content/themes/twentyeleven/image.php b/wp-content/themes/twentyeleven/image.php index 5c855904f..ea2092854 100644 --- a/wp-content/themes/twentyeleven/image.php +++ b/wp-content/themes/twentyeleven/image.php @@ -12,12 +12,15 @@ get_header(); ?> <div id="primary" class="image-attachment"> <div id="content" role="main"> - <?php while ( have_posts() ) : the_post(); ?> + <?php + while ( have_posts() ) : + the_post(); + ?> <nav id="nav-single"> <h3 class="assistive-text"><?php _e( 'Image navigation', 'twentyeleven' ); ?></h3> - <span class="nav-previous"><?php previous_image_link( false, __( '← Previous' , 'twentyeleven' ) ); ?></span> - <span class="nav-next"><?php next_image_link( false, __( 'Next →' , 'twentyeleven' ) ); ?></span> + <span class="nav-previous"><?php previous_image_link( false, __( '← Previous', 'twentyeleven' ) ); ?></span> + <span class="nav-next"><?php next_image_link( false, __( 'Next →', 'twentyeleven' ) ); ?></span> </nav><!-- #nav-single --> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> @@ -27,7 +30,8 @@ get_header(); ?> <div class="entry-meta"> <?php $metadata = wp_get_attachment_metadata(); - 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">%8$s</a>', 'twentyeleven' ), + 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">%8$s</a>', 'twentyeleven' ), esc_attr( get_the_time() ), get_the_date(), esc_url( wp_get_attachment_url() ), @@ -52,37 +56,51 @@ get_header(); ?> * 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, * or the first image (if we're looking at the last image in a gallery), or, in a gallery of one, just the link to that image file */ - $attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) ); - foreach ( $attachments as $k => $attachment ) { - if ( $attachment->ID == $post->ID ) - break; + $attachments = array_values( + get_children( + array( + 'post_parent' => $post->post_parent, + 'post_status' => 'inherit', + 'post_type' => 'attachment', + 'post_mime_type' => 'image', + 'order' => 'ASC', + 'orderby' => 'menu_order ID', + ) + ) + ); +foreach ( $attachments as $k => $attachment ) { + if ( $attachment->ID == $post->ID ) { + break; } +} // If there is more than 1 attachment in a gallery - if ( count( $attachments ) > 1 ) { - $k++; - if ( isset( $attachments[ $k ] ) ) - // get the URL of the next image attachment - $next_attachment_url = get_attachment_link( $attachments[ $k ]->ID ); - else - // or get the URL of the first image attachment - $next_attachment_url = get_attachment_link( $attachments[0]->ID ); - } else { - // or, if there's only 1 image, get the URL of the image - $next_attachment_url = wp_get_attachment_url(); +if ( count( $attachments ) > 1 ) { + $k++; + if ( isset( $attachments[ $k ] ) ) { + // get the URL of the next image attachment + $next_attachment_url = get_attachment_link( $attachments[ $k ]->ID ); + } else { // or get the URL of the first image attachment + $next_attachment_url = get_attachment_link( $attachments[0]->ID ); } +} else { + // or, if there's only 1 image, get the URL of the image + $next_attachment_url = wp_get_attachment_url(); +} ?> - <a href="<?php echo esc_url( $next_attachment_url ); ?>" title="<?php the_title_attribute(); ?>" rel="attachment"><?php - /** - * Filter the Twenty Eleven default attachment size. - * - * @since Twenty Eleven 1.0 - * - * @param int The height and width attachment size dimensions in pixels. Default 848. - */ - $attachment_size = apply_filters( 'twentyeleven_attachment_size', 848 ); - echo wp_get_attachment_image( $post->ID, array( $attachment_size, 1024 ) ); // filterable image width with 1024px limit for image height. - ?></a> + <a href="<?php echo esc_url( $next_attachment_url ); ?>" title="<?php the_title_attribute(); ?>" rel="attachment"> + <?php + /** + * Filter the Twenty Eleven default attachment size. + * + * @since Twenty Eleven 1.0 + * + * @param int The height and width attachment size dimensions in pixels. Default 848. + */ + $attachment_size = apply_filters( 'twentyeleven_attachment_size', 848 ); + echo wp_get_attachment_image( $post->ID, array( $attachment_size, 1024 ) ); // filterable image width with 1024px limit for image height. + ?> + </a> <?php if ( ! empty( $post->post_excerpt ) ) : ?> <div class="entry-caption"> @@ -95,7 +113,14 @@ get_header(); ?> <div class="entry-description"> <?php the_content(); ?> - <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?> + <?php + wp_link_pages( + array( + 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', + 'after' => '</div>', + ) + ); +?> </div><!-- .entry-description --> </div><!-- .entry-content --> @@ -109,4 +134,4 @@ get_header(); ?> </div><!-- #content --> </div><!-- #primary --> -<?php get_footer(); ?> \ No newline at end of file +<?php get_footer(); ?> diff --git a/wp-content/themes/twentyeleven/inc/theme-options.php b/wp-content/themes/twentyeleven/inc/theme-options.php index e71ab9a16..8974b151e 100644 --- a/wp-content/themes/twentyeleven/inc/theme-options.php +++ b/wp-content/themes/twentyeleven/inc/theme-options.php @@ -59,8 +59,8 @@ function twentyeleven_theme_options_init() { 'general' // Settings section. Same as the first argument in the add_settings_section() above ); - add_settings_field( 'link_color', __( 'Link Color', 'twentyeleven' ), 'twentyeleven_settings_field_link_color', 'theme_options', 'general' ); - add_settings_field( 'layout', __( 'Default Layout', 'twentyeleven' ), 'twentyeleven_settings_field_layout', 'theme_options', 'general' ); + add_settings_field( 'link_color', __( 'Link Color', 'twentyeleven' ), 'twentyeleven_settings_field_link_color', 'theme_options', 'general' ); + add_settings_field( 'layout', __( 'Default Layout', 'twentyeleven' ), 'twentyeleven_settings_field_layout', 'theme_options', 'general' ); } add_action( 'admin_init', 'twentyeleven_theme_options_init' ); @@ -99,8 +99,9 @@ function twentyeleven_theme_options_add_page() { 'twentyeleven_theme_options_render_page' // Function that renders the options page ); - if ( ! $theme_page ) + if ( ! $theme_page ) { return; + } add_action( "load-$theme_page", 'twentyeleven_theme_options_help' ); } @@ -124,10 +125,11 @@ function twentyeleven_theme_options_help() { if ( method_exists( $screen, 'add_help_tab' ) ) { // WordPress 3.3.0 - $screen->add_help_tab( array( - 'title' => __( 'Overview', 'twentyeleven' ), - 'id' => 'theme-options-help', - 'content' => $help, + $screen->add_help_tab( + array( + 'title' => __( 'Overview', 'twentyeleven' ), + 'id' => 'theme-options-help', + 'content' => $help, ) ); @@ -146,15 +148,15 @@ function twentyeleven_theme_options_help() { function twentyeleven_color_schemes() { $color_scheme_options = array( 'light' => array( - 'value' => 'light', - 'label' => __( 'Light', 'twentyeleven' ), - 'thumbnail' => get_template_directory_uri() . '/inc/images/light.png', + 'value' => 'light', + 'label' => __( 'Light', 'twentyeleven' ), + 'thumbnail' => get_template_directory_uri() . '/inc/images/light.png', 'default_link_color' => '#1b8be0', ), - 'dark' => array( - 'value' => 'dark', - 'label' => __( 'Dark', 'twentyeleven' ), - 'thumbnail' => get_template_directory_uri() . '/inc/images/dark.png', + 'dark' => array( + 'value' => 'dark', + 'label' => __( 'Dark', 'twentyeleven' ), + 'thumbnail' => get_template_directory_uri() . '/inc/images/dark.png', 'default_link_color' => '#e4741f', ), ); @@ -177,18 +179,18 @@ function twentyeleven_color_schemes() { function twentyeleven_layouts() { $layout_options = array( 'content-sidebar' => array( - 'value' => 'content-sidebar', - 'label' => __( 'Content on left', 'twentyeleven' ), + 'value' => 'content-sidebar', + 'label' => __( 'Content on left', 'twentyeleven' ), 'thumbnail' => get_template_directory_uri() . '/inc/images/content-sidebar.png', ), 'sidebar-content' => array( - 'value' => 'sidebar-content', - 'label' => __( 'Content on right', 'twentyeleven' ), + 'value' => 'sidebar-content', + 'label' => __( 'Content on right', 'twentyeleven' ), 'thumbnail' => get_template_directory_uri() . '/inc/images/sidebar-content.png', ), - 'content' => array( - 'value' => 'content', - 'label' => __( 'One-column, no sidebar', 'twentyeleven' ), + 'content' => array( + 'value' => 'content', + 'label' => __( 'One-column, no sidebar', 'twentyeleven' ), 'thumbnail' => get_template_directory_uri() . '/inc/images/content.png', ), ); @@ -217,8 +219,9 @@ function twentyeleven_get_default_theme_options() { 'theme_layout' => 'content-sidebar', ); - if ( is_rtl() ) + if ( is_rtl() ) { $default_theme_options['theme_layout'] = 'sidebar-content'; + } /** * Filter the Twenty Eleven default options. @@ -238,16 +241,17 @@ function twentyeleven_get_default_theme_options() { * @param string $color_scheme Optional. Color scheme. * Default null (or the active color scheme). * @return string The default link color. -*/ + */ function twentyeleven_get_default_link_color( $color_scheme = null ) { if ( null === $color_scheme ) { - $options = twentyeleven_get_theme_options(); + $options = twentyeleven_get_theme_options(); $color_scheme = $options['color_scheme']; } $color_schemes = twentyeleven_color_schemes(); - if ( ! isset( $color_schemes[ $color_scheme ] ) ) + if ( ! isset( $color_schemes[ $color_scheme ] ) ) { return false; + } return $color_schemes[ $color_scheme ]['default_link_color']; } @@ -364,19 +368,22 @@ function twentyeleven_theme_options_validate( $input ) { $output = $defaults = twentyeleven_get_default_theme_options(); // Color scheme must be in our array of color scheme options - if ( isset( $input['color_scheme'] ) && array_key_exists( $input['color_scheme'], twentyeleven_color_schemes() ) ) + if ( isset( $input['color_scheme'] ) && array_key_exists( $input['color_scheme'], twentyeleven_color_schemes() ) ) { $output['color_scheme'] = $input['color_scheme']; + } // Our defaults for the link color may have changed, based on the color scheme. $output['link_color'] = $defaults['link_color'] = twentyeleven_get_default_link_color( $output['color_scheme'] ); // Link color must be 3 or 6 hexadecimal characters - if ( isset( $input['link_color'] ) && preg_match( '/^#?([a-f0-9]{3}){1,2}$/i', $input['link_color'] ) ) + if ( isset( $input['link_color'] ) && preg_match( '/^#?([a-f0-9]{3}){1,2}$/i', $input['link_color'] ) ) { $output['link_color'] = '#' . strtolower( ltrim( $input['link_color'], '#' ) ); + } // Theme layout must be in our array of theme layout options - if ( isset( $input['theme_layout'] ) && array_key_exists( $input['theme_layout'], twentyeleven_layouts() ) ) + if ( isset( $input['theme_layout'] ) && array_key_exists( $input['theme_layout'], twentyeleven_layouts() ) ) { $output['theme_layout'] = $input['theme_layout']; + } /** * Filter the Twenty Eleven sanitized form input array. @@ -396,11 +403,12 @@ function twentyeleven_theme_options_validate( $input ) { * @since Twenty Eleven 1.0 */ function twentyeleven_enqueue_color_scheme() { - $options = twentyeleven_get_theme_options(); + $options = twentyeleven_get_theme_options(); $color_scheme = $options['color_scheme']; - if ( 'dark' == $color_scheme ) + if ( 'dark' == $color_scheme ) { wp_enqueue_style( 'dark', get_template_directory_uri() . '/colors/dark.css', array(), null ); + } /** * Fires after the styles for the Twenty Eleven color scheme are enqueued. @@ -421,14 +429,15 @@ add_action( 'wp_enqueue_scripts', 'twentyeleven_enqueue_color_scheme' ); * @since Twenty Eleven 1.0 */ function twentyeleven_print_link_color_style() { - $options = twentyeleven_get_theme_options(); + $options = twentyeleven_get_theme_options(); $link_color = $options['link_color']; $default_options = twentyeleven_get_default_theme_options(); // Don't do anything if the current link color is the default. - if ( $default_options['link_color'] == $link_color ) + if ( $default_options['link_color'] == $link_color ) { return; + } ?> <style> /* Link color */ @@ -469,20 +478,22 @@ add_action( 'wp_head', 'twentyeleven_print_link_color_style' ); * @param array $existing_classes An array of existing body classes. */ function twentyeleven_layout_classes( $existing_classes ) { - $options = twentyeleven_get_theme_options(); + $options = twentyeleven_get_theme_options(); $current_layout = $options['theme_layout']; - if ( in_array( $current_layout, array( 'content-sidebar', 'sidebar-content' ) ) ) + if ( in_array( $current_layout, array( 'content-sidebar', 'sidebar-content' ) ) ) { $classes = array( 'two-column' ); - else + } else { $classes = array( 'one-column' ); + } - if ( 'content-sidebar' == $current_layout ) + if ( 'content-sidebar' == $current_layout ) { $classes[] = 'right-sidebar'; - elseif ( 'sidebar-content' == $current_layout ) + } elseif ( 'sidebar-content' == $current_layout ) { $classes[] = 'left-sidebar'; - else + } else { $classes[] = $current_layout; + } /** * Filter the Twenty Eleven layout body classes. @@ -506,31 +517,37 @@ add_filter( 'body_class', 'twentyeleven_layout_classes' ); * @param object $wp_customize Customizer object. */ function twentyeleven_customize_register( $wp_customize ) { - $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; - $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; + $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; + $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; if ( isset( $wp_customize->selective_refresh ) ) { - $wp_customize->selective_refresh->add_partial( 'blogname', array( - 'selector' => '#site-title a', - 'container_inclusive' => false, - 'render_callback' => 'twentyeleven_customize_partial_blogname', - ) ); - $wp_customize->selective_refresh->add_partial( 'blogdescription', array( - 'selector' => '#site-description', - 'container_inclusive' => false, - 'render_callback' => 'twentyeleven_customize_partial_blogdescription', - ) ); + $wp_customize->selective_refresh->add_partial( + 'blogname', array( + 'selector' => '#site-title a', + 'container_inclusive' => false, + 'render_callback' => 'twentyeleven_customize_partial_blogname', + ) + ); + $wp_customize->selective_refresh->add_partial( + 'blogdescription', array( + 'selector' => '#site-description', + 'container_inclusive' => false, + 'render_callback' => 'twentyeleven_customize_partial_blogdescription', + ) + ); } $options = twentyeleven_get_theme_options(); $defaults = twentyeleven_get_default_theme_options(); - $wp_customize->add_setting( 'twentyeleven_theme_options[color_scheme]', array( - 'default' => $defaults['color_scheme'], - 'type' => 'option', - 'capability' => 'edit_theme_options', - ) ); + $wp_customize->add_setting( + 'twentyeleven_theme_options[color_scheme]', array( + 'default' => $defaults['color_scheme'], + 'type' => 'option', + 'capability' => 'edit_theme_options', + ) + ); $schemes = twentyeleven_color_schemes(); $choices = array(); @@ -538,40 +555,52 @@ function twentyeleven_customize_register( $wp_customize ) { $choices[ $scheme['value'] ] = $scheme['label']; } - $wp_customize->add_control( 'twentyeleven_color_scheme', array( - 'label' => __( 'Color Scheme', 'twentyeleven' ), - 'section' => 'colors', - 'settings' => 'twentyeleven_theme_options[color_scheme]', - 'type' => 'radio', - 'choices' => $choices, - 'priority' => 5, - ) ); + $wp_customize->add_control( + 'twentyeleven_color_scheme', array( + 'label' => __( 'Color Scheme', 'twentyeleven' ), + 'section' => 'colors', + 'settings' => 'twentyeleven_theme_options[color_scheme]', + 'type' => 'radio', + 'choices' => $choices, + 'priority' => 5, + ) + ); // Link Color (added to Color Scheme section in Customizer) - $wp_customize->add_setting( 'twentyeleven_theme_options[link_color]', array( - 'default' => twentyeleven_get_default_link_color( $options['color_scheme'] ), - 'type' => 'option', - 'sanitize_callback' => 'sanitize_hex_color', - 'capability' => 'edit_theme_options', - ) ); - - $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'link_color', array( - 'label' => __( 'Link Color', 'twentyeleven' ), - 'section' => 'colors', - 'settings' => 'twentyeleven_theme_options[link_color]', - ) ) ); + $wp_customize->add_setting( + 'twentyeleven_theme_options[link_color]', array( + 'default' => twentyeleven_get_default_link_color( $options['color_scheme'] ), + 'type' => 'option', + 'sanitize_callback' => 'sanitize_hex_color', + 'capability' => 'edit_theme_options', + ) + ); + + $wp_customize->add_control( + new WP_Customize_Color_Control( + $wp_customize, 'link_color', array( + 'label' => __( 'Link Color', 'twentyeleven' ), + 'section' => 'colors', + 'settings' => 'twentyeleven_theme_options[link_color]', + ) + ) + ); // Default Layout - $wp_customize->add_section( 'twentyeleven_layout', array( - 'title' => __( 'Layout', 'twentyeleven' ), - 'priority' => 50, - ) ); + $wp_customize->add_section( + 'twentyeleven_layout', array( + 'title' => __( 'Layout', 'twentyeleven' ), + 'priority' => 50, + ) + ); - $wp_customize->add_setting( 'twentyeleven_theme_options[theme_layout]', array( - 'type' => 'option', - 'default' => $defaults['theme_layout'], - 'sanitize_callback' => 'sanitize_key', - ) ); + $wp_customize->add_setting( + 'twentyeleven_theme_options[theme_layout]', array( + 'type' => 'option', + 'default' => $defaults['theme_layout'], + 'sanitize_callback' => 'sanitize_key', + ) + ); $layouts = twentyeleven_layouts(); $choices = array(); @@ -579,11 +608,13 @@ function twentyeleven_customize_register( $wp_customize ) { $choices[ $layout['value'] ] = $layout['label']; } - $wp_customize->add_control( 'twentyeleven_theme_options[theme_layout]', array( - 'section' => 'twentyeleven_layout', - 'type' => 'radio', - 'choices' => $choices, - ) ); + $wp_customize->add_control( + 'twentyeleven_theme_options[theme_layout]', array( + 'section' => 'twentyeleven_layout', + 'type' => 'radio', + 'choices' => $choices, + ) + ); } add_action( 'customize_register', 'twentyeleven_customize_register' ); diff --git a/wp-content/themes/twentyeleven/inc/widgets.php b/wp-content/themes/twentyeleven/inc/widgets.php index 9b007f4af..08ab7f7ba 100644 --- a/wp-content/themes/twentyeleven/inc/widgets.php +++ b/wp-content/themes/twentyeleven/inc/widgets.php @@ -18,11 +18,13 @@ class Twenty_Eleven_Ephemera_Widget extends WP_Widget { * @since Twenty Eleven 2.2 */ function __construct() { - parent::__construct( 'widget_twentyeleven_ephemera', __( 'Twenty Eleven Ephemera', 'twentyeleven' ), array( - 'classname' => 'widget_twentyeleven_ephemera', - 'description' => __( 'Use this widget to list your recent Aside, Status, Quote, and Link posts', 'twentyeleven' ), - 'customize_selective_refresh' => true, - ) ); + parent::__construct( + 'widget_twentyeleven_ephemera', __( 'Twenty Eleven Ephemera', 'twentyeleven' ), array( + 'classname' => 'widget_twentyeleven_ephemera', + 'description' => __( 'Use this widget to list your recent Aside, Status, Quote, and Link posts', 'twentyeleven' ), + 'customize_selective_refresh' => true, + ) + ); $this->alt_option_name = 'widget_twentyeleven_ephemera'; add_action( 'save_post', array( &$this, 'flush_widget_cache' ) ); @@ -46,15 +48,17 @@ class Twenty_Eleven_Ephemera_Widget extends WP_Widget { * * @param array $args An array of standard parameters for widgets in this theme. * @param array $instance An array of settings for this widget instance. - **/ + */ function widget( $args, $instance ) { $cache = wp_cache_get( 'widget_twentyeleven_ephemera', 'widget' ); - if ( ! is_array( $cache ) ) + if ( ! is_array( $cache ) ) { $cache = array(); + } - if ( ! isset( $args['widget_id'] ) ) + if ( ! isset( $args['widget_id'] ) ) { $args['widget_id'] = null; + } if ( ! is_customize_preview() && isset( $cache[ $args['widget_id'] ] ) ) { echo $cache[ $args['widget_id'] ]; @@ -67,11 +71,13 @@ class Twenty_Eleven_Ephemera_Widget extends WP_Widget { /** This filter is documented in wp-includes/default-widgets.php */ $args['title'] = apply_filters( 'widget_title', empty( $instance['title'] ) ? __( 'Ephemera', 'twentyeleven' ) : $instance['title'], $instance, $this->id_base ); - if ( ! isset( $instance['number'] ) ) + if ( ! isset( $instance['number'] ) ) { $instance['number'] = '10'; + } - if ( ! $args['number'] = absint( $instance['number'] ) ) + if ( ! $args['number'] = absint( $instance['number'] ) ) { $args['number'] = 10; + } $ephemera_args = array( 'order' => 'DESC', @@ -88,7 +94,7 @@ class Twenty_Eleven_Ephemera_Widget extends WP_Widget { ), ), ); - $ephemera = new WP_Query( $ephemera_args ); + $ephemera = new WP_Query( $ephemera_args ); if ( $ephemera->have_posts() ) : echo $args['before_widget']; @@ -97,7 +103,10 @@ class Twenty_Eleven_Ephemera_Widget extends WP_Widget { echo $args['after_title']; ?> <ol> - <?php while ( $ephemera->have_posts() ) : $ephemera->the_post(); ?> + <?php + while ( $ephemera->have_posts() ) : + $ephemera->the_post(); +?> <?php if ( 'link' != get_post_format() ) : ?> @@ -128,7 +137,7 @@ class Twenty_Eleven_Ephemera_Widget extends WP_Widget { // Reset the post globals as this query will have stomped on it wp_reset_postdata(); - // end check for ephemeral posts + // end check for ephemeral posts endif; $cache[ $args['widget_id'] ] = ob_get_flush(); @@ -145,16 +154,17 @@ class Twenty_Eleven_Ephemera_Widget extends WP_Widget { * where any validation should be dealt with. * * @since Twenty Eleven 1.0 - **/ + */ function update( $new_instance, $old_instance ) { - $instance = $old_instance; - $instance['title'] = strip_tags( $new_instance['title'] ); + $instance = $old_instance; + $instance['title'] = strip_tags( $new_instance['title'] ); $instance['number'] = (int) $new_instance['number']; $this->flush_widget_cache(); $alloptions = wp_cache_get( 'alloptions', 'options' ); - if ( isset( $alloptions['widget_twentyeleven_ephemera'] ) ) + if ( isset( $alloptions['widget_twentyeleven_ephemera'] ) ) { delete_option( 'widget_twentyeleven_ephemera' ); + } return $instance; } @@ -174,9 +184,9 @@ class Twenty_Eleven_Ephemera_Widget extends WP_Widget { * Displays the form for this widget on the Widgets page of the WP Admin area. * * @since Twenty Eleven 1.0 - **/ + */ function form( $instance ) { - $title = isset( $instance['title']) ? esc_attr( $instance['title'] ) : ''; + $title = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : ''; $number = isset( $instance['number'] ) ? absint( $instance['number'] ) : 10; ?> <p><label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php _e( 'Title:', 'twentyeleven' ); ?></label> diff --git a/wp-content/themes/twentyeleven/index.php b/wp-content/themes/twentyeleven/index.php index 1dd72c8f6..a67445bff 100644 --- a/wp-content/themes/twentyeleven/index.php +++ b/wp-content/themes/twentyeleven/index.php @@ -22,7 +22,10 @@ get_header(); ?> <?php twentyeleven_content_nav( 'nav-above' ); ?> <?php /* Start the Loop */ ?> - <?php while ( have_posts() ) : the_post(); ?> + <?php + while ( have_posts() ) : + the_post(); +?> <?php get_template_part( 'content', get_post_format() ); ?> diff --git a/wp-content/themes/twentyeleven/languages/twentyeleven.pot b/wp-content/themes/twentyeleven/languages/twentyeleven.pot index b4396d243..19ddcc24b 100644 --- a/wp-content/themes/twentyeleven/languages/twentyeleven.pot +++ b/wp-content/themes/twentyeleven/languages/twentyeleven.pot @@ -1,14 +1,14 @@ -# Copyright (C) 2017 the WordPress team +# Copyright (C) 2018 the WordPress team # This file is distributed under the GNU General Public License v2 or later. msgid "" msgstr "" -"Project-Id-Version: Twenty Eleven 2.7\n" +"Project-Id-Version: Twenty Eleven 2.8\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/theme/twentyeleven\n" -"POT-Creation-Date: 2017-11-01 20:27:34+00:00\n" +"POT-Creation-Date: 2018-05-17 16:16:30+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"PO-Revision-Date: 2017-MO-DA HO:MI+ZONE\n" +"PO-Revision-Date: 2018-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -26,7 +26,7 @@ msgstr "" #. translators: %1$s: smilie -#: 404.php:36 +#: 404.php:46 msgid "Try looking in the monthly archives. %1$s" msgstr "" @@ -56,12 +56,12 @@ msgstr "" msgid "Blog Archives" msgstr "" -#: archive.php:57 author.php:86 category.php:59 index.php:37 search.php:44 -#: tag.php:60 +#: archive.php:60 author.php:90 category.php:64 index.php:40 search.php:47 +#: tag.php:65 msgid "Nothing Found" msgstr "" -#: archive.php:61 author.php:90 category.php:63 index.php:41 tag.php:64 +#: archive.php:64 author.php:94 category.php:68 index.php:44 tag.php:69 msgid "Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post." msgstr "" @@ -69,11 +69,11 @@ msgstr "" msgid "Author Archives: %s" msgstr "" -#: author.php:60 content-single.php:63 +#: author.php:61 content-single.php:70 msgid "About %s" msgstr "" -#: category.php:19 +#: category.php:20 msgid "Category Archives: %s" msgstr "" @@ -81,25 +81,25 @@ msgstr "" msgid "This post is password protected. Enter the password to view any comments." msgstr "" -#: comments.php:34 +#: comments.php:35 msgid "One thought on “%2$s”" msgid_plural "%1$s thoughts on “%2$s”" msgstr[0] "" msgstr[1] "" -#: comments.php:41 comments.php:62 +#: comments.php:43 comments.php:64 msgid "Comment navigation" msgstr "" -#: comments.php:42 comments.php:63 +#: comments.php:44 comments.php:65 msgid "← Older Comments" msgstr "" -#: comments.php:43 comments.php:64 +#: comments.php:45 comments.php:66 msgid "Newer Comments →" msgstr "" -#: comments.php:74 +#: comments.php:77 msgid "Comments are closed." msgstr "" @@ -126,57 +126,57 @@ msgstr "" #: content-aside.php:35 content-gallery.php:34 content-image.php:29 #: content-link.php:35 content-quote.php:35 content-status.php:48 -#: content.php:41 functions.php:378 +#: content.php:41 functions.php:388 msgid "Continue reading <span class=\"meta-nav\">→</span>" msgstr "" -#: content-aside.php:36 content-featured.php:23 content-gallery.php:52 -#: content-image.php:30 content-intro.php:18 content-link.php:36 -#: content-page.php:18 content-quote.php:36 content-single.php:24 -#: content-status.php:49 content.php:42 image.php:98 +#: content-aside.php:39 content-featured.php:26 content-gallery.php:61 +#: content-image.php:33 content-intro.php:21 content-link.php:39 +#: content-page.php:21 content-quote.php:39 content-single.php:27 +#: content-status.php:52 content.php:45 image.php:119 msgid "Pages:" msgstr "" -#: content-aside.php:44 content-gallery.php:85 content-image.php:66 -#: content-link.php:44 content-quote.php:69 content-status.php:57 -#: content.php:79 showcase.php:202 +#: content-aside.php:51 content-gallery.php:103 content-image.php:75 +#: content-link.php:51 content-quote.php:81 content-status.php:64 +#: content.php:91 showcase.php:214 msgid "Leave a reply" msgstr "" -#: content-aside.php:44 content-gallery.php:85 content-image.php:66 -#: content-link.php:44 content-quote.php:69 content-status.php:57 -#: content.php:79 showcase.php:202 +#: content-aside.php:51 content-gallery.php:103 content-image.php:75 +#: content-link.php:51 content-quote.php:81 content-status.php:64 +#: content.php:91 showcase.php:214 msgid "<b>1</b> Reply" msgstr "" -#: content-aside.php:44 content-gallery.php:85 content-image.php:66 -#: content-link.php:44 content-quote.php:69 content-status.php:57 -#: content.php:79 showcase.php:202 +#: content-aside.php:51 content-gallery.php:103 content-image.php:75 +#: content-link.php:51 content-quote.php:81 content-status.php:64 +#: content.php:91 showcase.php:214 msgid "<b>%</b> Replies" msgstr "" -#: content-aside.php:46 content-featured.php:45 content-gallery.php:88 -#: content-image.php:70 content-intro.php:19 content-link.php:46 -#: content-page.php:21 content-quote.php:72 content-single.php:52 -#: content-status.php:59 content.php:82 functions.php:612 functions.php:640 -#: image.php:41 +#: content-aside.php:53 content-featured.php:52 content-gallery.php:106 +#: content-image.php:79 content-intro.php:26 content-link.php:53 +#: content-page.php:28 content-quote.php:84 content-single.php:59 +#: content-status.php:66 content.php:94 functions.php:641 functions.php:672 +#: image.php:45 msgid "Edit" msgstr "" #. translators: used between list items, there is a space after the comma -#: content-featured.php:29 content-featured.php:38 content-gallery.php:60 -#: content-gallery.php:70 content-image.php:49 content-image.php:58 -#: content-quote.php:44 content-quote.php:54 content-single.php:30 -#: content-single.php:33 content.php:51 content.php:63 +#: content-featured.php:36 content-featured.php:45 content-gallery.php:73 +#: content-gallery.php:85 content-image.php:57 content-image.php:66 +#: content-quote.php:51 content-quote.php:63 content-single.php:37 +#: content-single.php:40 content.php:58 content.php:72 msgid ", " msgstr "" -#: content-featured.php:31 +#: content-featured.php:38 msgid "This entry was posted in %1$s and tagged %2$s. Bookmark the <a href=\"%3$s\" title=\"Permalink to %4$s\" rel=\"bookmark\">permalink</a>." msgstr "" -#: content-featured.php:33 +#: content-featured.php:40 msgid "This entry was posted in %1$s. Bookmark the <a href=\"%3$s\" title=\"Permalink to %4$s\" rel=\"bookmark\">permalink</a>." msgstr "" @@ -184,23 +184,23 @@ msgstr "" msgid "Gallery" msgstr "" -#: content-gallery.php:45 +#: content-gallery.php:49 msgid "This gallery contains <a %1$s>%2$s photo</a>." msgid_plural "This gallery contains <a %1$s>%2$s photos</a>." msgstr[0] "" msgstr[1] "" -#: content-gallery.php:46 showcase.php:121 +#: content-gallery.php:50 showcase.php:128 msgid "Permalink to %s" msgstr "" -#: content-gallery.php:64 content-image.php:53 content-quote.php:48 -#: content.php:55 +#: content-gallery.php:78 content-image.php:61 content-quote.php:56 +#: content.php:63 msgid "<span class=\"%1$s\">Posted in</span> %2$s" msgstr "" -#: content-gallery.php:76 content-image.php:61 content-quote.php:60 -#: content.php:69 +#: content-gallery.php:93 content-image.php:70 content-quote.php:71 +#: content.php:80 msgid "<span class=\"%1$s\">Tagged</span> %2$s" msgstr "" @@ -208,11 +208,11 @@ msgstr "" msgid "Image" msgstr "" -#: content-image.php:36 +#: content-image.php:44 msgid "<a href=\"%1$s\" rel=\"bookmark\"><time class=\"entry-date\" datetime=\"%2$s\">%3$s</time></a><span class=\"by-author\"> <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></span>" msgstr "" -#: content-image.php:41 functions.php:678 +#: content-image.php:49 functions.php:721 msgid "View all posts by %s" msgstr "" @@ -224,19 +224,19 @@ msgstr "" msgid "Quote" msgstr "" -#: content-single.php:35 +#: content-single.php:42 msgid "This entry was posted in %1$s and tagged %2$s by <a href=\"%6$s\">%5$s</a>. Bookmark the <a href=\"%3$s\" title=\"Permalink to %4$s\" rel=\"bookmark\">permalink</a>." msgstr "" -#: content-single.php:37 +#: content-single.php:44 msgid "This entry was posted in %1$s by <a href=\"%6$s\">%5$s</a>. Bookmark the <a href=\"%3$s\" title=\"Permalink to %4$s\" rel=\"bookmark\">permalink</a>." msgstr "" -#: content-single.php:39 +#: content-single.php:46 msgid "This entry was posted by <a href=\"%6$s\">%5$s</a>. Bookmark the <a href=\"%3$s\" title=\"Permalink to %4$s\" rel=\"bookmark\">permalink</a>." msgstr "" -#: content-single.php:67 +#: content-single.php:74 msgid "View all posts by %s <span class=\"meta-nav\">→</span>" msgstr "" @@ -248,175 +248,175 @@ msgstr "" msgid "Featured" msgstr "" -#: footer.php:28 +#: footer.php:34 msgid "https://wordpress.org/" msgstr "" -#: footer.php:28 +#: footer.php:34 msgid "Semantic Personal Publishing Platform" msgstr "" -#: footer.php:28 +#: footer.php:35 msgid "Proudly powered by %s" msgstr "" -#: functions.php:95 +#: functions.php:96 msgid "Primary Menu" msgstr "" #. translators: header image description -#: functions.php:184 +#: functions.php:189 msgid "Wheel" msgstr "" #. translators: header image description -#: functions.php:190 +#: functions.php:195 msgid "Shore" msgstr "" #. translators: header image description -#: functions.php:196 +#: functions.php:201 msgid "Trolley" msgstr "" #. translators: header image description -#: functions.php:202 +#: functions.php:207 msgid "Pine Cone" msgstr "" #. translators: header image description -#: functions.php:208 +#: functions.php:213 msgid "Chessboard" msgstr "" #. translators: header image description -#: functions.php:214 +#: functions.php:219 msgid "Lanterns" msgstr "" #. translators: header image description -#: functions.php:220 +#: functions.php:225 msgid "Willow" msgstr "" #. translators: header image description -#: functions.php:226 +#: functions.php:231 msgid "Hanoi Plant" msgstr "" -#: functions.php:449 +#: functions.php:461 msgid "Main Sidebar" msgstr "" -#: functions.php:458 +#: functions.php:472 msgid "Showcase Sidebar" msgstr "" -#: functions.php:460 +#: functions.php:474 msgid "The sidebar for the optional Showcase Template" msgstr "" -#: functions.php:468 +#: functions.php:484 msgid "Footer Area One" msgstr "" -#: functions.php:470 functions.php:480 functions.php:490 +#: functions.php:486 functions.php:498 functions.php:510 msgid "An optional widget area for your site footer" msgstr "" -#: functions.php:478 +#: functions.php:496 msgid "Footer Area Two" msgstr "" -#: functions.php:488 +#: functions.php:508 msgid "Footer Area Three" msgstr "" -#: functions.php:512 single.php:18 +#: functions.php:534 single.php:21 msgid "Post navigation" msgstr "" -#: functions.php:513 +#: functions.php:535 msgid "<span class=\"meta-nav\">←</span> Older posts" msgstr "" -#: functions.php:514 +#: functions.php:536 msgid "Newer posts <span class=\"meta-nav\">→</span>" msgstr "" -#: functions.php:612 +#: functions.php:641 msgid "Pingback:" msgstr "" #. translators: 1: comment author, 2: date and time -#: functions.php:629 +#: functions.php:660 msgid "%1$s on %2$s <span class=\"says\">said:</span>" msgstr "" #. translators: 1: date, 2: time -#: functions.php:635 +#: functions.php:667 msgid "%1$s at %2$s" msgstr "" -#: functions.php:644 +#: functions.php:676 msgid "Your comment is awaiting moderation." msgstr "" -#: functions.php:653 +#: functions.php:689 msgid "Reply <span>↓</span>" msgstr "" -#: functions.php:672 +#: functions.php:715 msgid "<span class=\"sep\">Posted on </span><a href=\"%1$s\" title=\"%2$s\" rel=\"bookmark\"><time class=\"entry-date\" datetime=\"%3$s\">%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\" rel=\"author\">%7$s</a></span></span>" msgstr "" -#: header.php:43 +#: header.php:45 msgid "Page %s" msgstr "" -#: header.php:133 +#: header.php:142 msgid "Main menu" msgstr "" -#: header.php:135 +#: header.php:144 msgid "Skip to primary content" msgstr "" -#: header.php:137 +#: header.php:146 msgid "Skip to secondary content" msgstr "" -#: image.php:18 +#: image.php:21 msgid "Image navigation" msgstr "" -#: image.php:19 +#: image.php:22 msgid "← Previous" msgstr "" -#: image.php:20 +#: image.php:23 msgid "Next →" msgstr "" -#: image.php:30 +#: image.php:34 msgid "<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\">%8$s</a>" msgstr "" -#: inc/theme-options.php:56 inc/theme-options.php:542 +#: inc/theme-options.php:56 inc/theme-options.php:560 msgid "Color Scheme" msgstr "" -#: inc/theme-options.php:62 inc/theme-options.php:559 +#: inc/theme-options.php:62 inc/theme-options.php:582 msgid "Link Color" msgstr "" @@ -428,107 +428,107 @@ msgstr "" msgid "Theme Options" msgstr "" -#: inc/theme-options.php:111 +#: inc/theme-options.php:112 msgid "Some themes provide customization options that are grouped together on a Theme Options screen. If you change themes, options may change or disappear, as they are theme-specific. Your current theme, Twenty Eleven, provides the following Theme Options:" msgstr "" -#: inc/theme-options.php:113 +#: inc/theme-options.php:114 msgid "<strong>Color Scheme</strong>: You can choose a color palette of \"Light\" (light background with dark text) or \"Dark\" (dark background with light text) for your site." msgstr "" -#: inc/theme-options.php:114 +#: inc/theme-options.php:115 msgid "<strong>Link Color</strong>: You can choose the color used for text links on your site. You can enter the HTML color or hex code, or you can choose visually by clicking the \"Select a Color\" button to pick from a color wheel." msgstr "" -#: inc/theme-options.php:115 +#: inc/theme-options.php:116 msgid "<strong>Default Layout</strong>: You can choose if you want your site’s default layout to have a sidebar on the left, the right, or not at all." msgstr "" -#: inc/theme-options.php:117 +#: inc/theme-options.php:118 msgid "Remember to click \"Save Changes\" to save any changes you have made to the theme options." msgstr "" -#: inc/theme-options.php:119 +#: inc/theme-options.php:120 msgid "For more information:" msgstr "" -#: inc/theme-options.php:120 +#: inc/theme-options.php:121 msgid "<a href=\"https://codex.wordpress.org/Appearance_Theme_Options_Screen\" target=\"_blank\">Documentation on Theme Options</a>" msgstr "" -#: inc/theme-options.php:121 +#: inc/theme-options.php:122 msgid "<a href=\"https://wordpress.org/support/\" target=\"_blank\">Support Forums</a>" msgstr "" -#: inc/theme-options.php:128 +#: inc/theme-options.php:130 msgid "Overview" msgstr "" -#: inc/theme-options.php:150 +#: inc/theme-options.php:152 msgid "Light" msgstr "" -#: inc/theme-options.php:156 +#: inc/theme-options.php:158 msgid "Dark" msgstr "" -#: inc/theme-options.php:181 +#: inc/theme-options.php:183 msgid "Content on left" msgstr "" -#: inc/theme-options.php:186 +#: inc/theme-options.php:188 msgid "Content on right" msgstr "" -#: inc/theme-options.php:191 +#: inc/theme-options.php:193 msgid "One-column, no sidebar" msgstr "" -#: inc/theme-options.php:298 +#: inc/theme-options.php:302 msgid "Select a Color" msgstr "" -#: inc/theme-options.php:301 +#: inc/theme-options.php:305 msgid "Default color: %s" msgstr "" -#: inc/theme-options.php:337 +#: inc/theme-options.php:341 msgid "%s Theme Options" msgstr "" -#: inc/theme-options.php:566 +#: inc/theme-options.php:592 msgid "Layout" msgstr "" -#: inc/widgets.php:21 +#: inc/widgets.php:22 msgid "Twenty Eleven Ephemera" msgstr "" -#: inc/widgets.php:23 +#: inc/widgets.php:24 msgid "Use this widget to list your recent Aside, Status, Quote, and Link posts" msgstr "" -#: inc/widgets.php:68 +#: inc/widgets.php:72 msgid "Ephemera" msgstr "" -#: inc/widgets.php:107 inc/widgets.php:116 +#: inc/widgets.php:116 inc/widgets.php:125 msgid "0 <span class=\"reply\">comments →</span>" msgstr "" -#: inc/widgets.php:107 inc/widgets.php:116 +#: inc/widgets.php:116 inc/widgets.php:125 msgid "1 <span class=\"reply\">comment →</span>" msgstr "" -#: inc/widgets.php:107 inc/widgets.php:116 +#: inc/widgets.php:116 inc/widgets.php:125 msgid "% <span class=\"reply\">comments →</span>" msgstr "" -#: inc/widgets.php:182 +#: inc/widgets.php:192 msgid "Title:" msgstr "" -#: inc/widgets.php:185 +#: inc/widgets.php:195 msgid "Number of posts to show:" msgstr "" @@ -536,7 +536,7 @@ msgstr "" msgid "Search Results for: %s" msgstr "" -#: search.php:48 +#: search.php:51 msgid "Sorry, but nothing matched your search criteria. Please try again with some different keywords." msgstr "" @@ -544,15 +544,15 @@ msgstr "" msgid "Search" msgstr "" -#: showcase.php:78 +#: showcase.php:83 msgid "Featured Post" msgstr "" -#: showcase.php:151 +#: showcase.php:160 msgid "Featuring: %s" msgstr "" -#: showcase.php:161 +#: showcase.php:170 msgid "Recent Posts" msgstr "" @@ -564,15 +564,15 @@ msgstr "" msgid "Meta" msgstr "" -#: single.php:19 +#: single.php:22 msgid "<span class=\"meta-nav\">←</span> Previous" msgstr "" -#: single.php:20 +#: single.php:23 msgid "Next <span class=\"meta-nav\">→</span>" msgstr "" -#: tag.php:19 +#: tag.php:20 msgid "Tag Archives: %s" msgstr "" #. Theme Name of the plugin/theme diff --git a/wp-content/themes/twentyeleven/page.php b/wp-content/themes/twentyeleven/page.php index 349810704..166823479 100644 --- a/wp-content/themes/twentyeleven/page.php +++ b/wp-content/themes/twentyeleven/page.php @@ -17,7 +17,10 @@ get_header(); ?> <div id="primary"> <div id="content" role="main"> - <?php while ( have_posts() ) : the_post(); ?> + <?php + while ( have_posts() ) : + the_post(); +?> <?php get_template_part( 'content', 'page' ); ?> @@ -28,4 +31,4 @@ get_header(); ?> </div><!-- #content --> </div><!-- #primary --> -<?php get_footer(); ?> \ No newline at end of file +<?php get_footer(); ?> diff --git a/wp-content/themes/twentyeleven/readme.txt b/wp-content/themes/twentyeleven/readme.txt index 8ad087d3a..55cd14559 100644 --- a/wp-content/themes/twentyeleven/readme.txt +++ b/wp-content/themes/twentyeleven/readme.txt @@ -2,7 +2,7 @@ Contributors: the WordPress team Requires at least: WordPress 3.2 Tested up to: WordPress 5.0-trunk -Stable tag: 2.7 +Stable tag: 2.8 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Tags: blog, one-column, two-columns, left-sidebar, right-sidebar, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-image-header, featured-images, flexible-header, footer-widgets, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready @@ -22,7 +22,7 @@ For more information about Twenty Eleven please go to https://codex.wordpress.or == Copyright == -Twenty Eleven WordPress Theme, Copyright 2011-2017 WordPress.org & Automattic.com +Twenty Eleven WordPress Theme, Copyright 2011-2018 WordPress.org & Automattic.com Twenty Eleven is Distributed under the terms of the GNU GPL This program is free software: you can redistribute it and/or modify @@ -43,6 +43,11 @@ Source: https://github.com/aFarkas/html5shiv == Changelog == += 2.8 = +* Released: May 17, 2018 + +https://codex.wordpress.org/Twenty_Eleven_Theme_Changelog#Version_2.8 + = 2.7 = * Released: November 14, 2017 diff --git a/wp-content/themes/twentyeleven/rtl.css b/wp-content/themes/twentyeleven/rtl.css index 3927e7f60..7aac91053 100644 --- a/wp-content/themes/twentyeleven/rtl.css +++ b/wp-content/themes/twentyeleven/rtl.css @@ -103,6 +103,9 @@ input#s { background-position: 97% 6px; padding: 4px 28px 4px 10px; } +#respond #wp-comment-cookies-consent { + margin: 0 0 0 10px; +} /* Assistive text */ #access a.assistive-text:focus { diff --git a/wp-content/themes/twentyeleven/search.php b/wp-content/themes/twentyeleven/search.php index 0da1e4e57..81188fadf 100644 --- a/wp-content/themes/twentyeleven/search.php +++ b/wp-content/themes/twentyeleven/search.php @@ -21,7 +21,10 @@ get_header(); ?> <?php twentyeleven_content_nav( 'nav-above' ); ?> <?php /* Start the Loop */ ?> - <?php while ( have_posts() ) : the_post(); ?> + <?php + while ( have_posts() ) : + the_post(); +?> <?php /* @@ -56,4 +59,4 @@ get_header(); ?> </section><!-- #primary --> <?php get_sidebar(); ?> -<?php get_footer(); ?> \ No newline at end of file +<?php get_footer(); ?> diff --git a/wp-content/themes/twentyeleven/showcase.php b/wp-content/themes/twentyeleven/showcase.php index bc9e4c9ac..f869871b7 100644 --- a/wp-content/themes/twentyeleven/showcase.php +++ b/wp-content/themes/twentyeleven/showcase.php @@ -23,15 +23,19 @@ get_header(); ?> <div id="primary" class="showcase"> <div id="content" role="main"> - <?php while ( have_posts() ) : the_post(); ?> + <?php + while ( have_posts() ) : + the_post(); + ?> <?php /* * We are using a heading by rendering the_content * If we have content for this page, let's display it. */ - if ( '' != get_the_content() ) - get_template_part( 'content', 'intro' ); + if ( '' != get_the_content() ) { + get_template_part( 'content', 'intro' ); + } ?> <?php endwhile; ?> @@ -46,13 +50,13 @@ get_header(); ?> $sticky = get_option( 'sticky_posts' ); // Proceed only if sticky posts exist. - if ( ! empty( $sticky ) ) : + if ( ! empty( $sticky ) ) : $featured_args = array( - 'post__in' => $sticky, - 'post_status' => 'publish', + 'post__in' => $sticky, + 'post_status' => 'publish', 'posts_per_page' => 10, - 'no_found_rows' => true, + 'no_found_rows' => true, ); // The Featured Posts query. @@ -61,33 +65,35 @@ get_header(); ?> // Proceed only if published posts exist if ( $featured->have_posts() ) : - /* - * We will need to count featured posts starting from zero - * to create the slider navigation. - */ - $counter_slider = 0; + /* + * We will need to count featured posts starting from zero + * to create the slider navigation. + */ + $counter_slider = 0; - // Compatibility with versions of WordPress prior to 3.4. - if ( function_exists( 'get_custom_header' ) ) - $header_image_width = get_theme_support( 'custom-header', 'width' ); - else - $header_image_width = HEADER_IMAGE_WIDTH; - ?> + // Compatibility with versions of WordPress prior to 3.4. + if ( function_exists( 'get_custom_header' ) ) { + $header_image_width = get_theme_support( 'custom-header', 'width' ); + } else { + $header_image_width = HEADER_IMAGE_WIDTH; + } + ?> - <div class="featured-posts"> + <div class="featured-posts"> <h1 class="showcase-heading"><?php _e( 'Featured Post', 'twentyeleven' ); ?></h1> <?php - // Let's roll. - while ( $featured->have_posts() ) : $featured->the_post(); + // Let's roll. + while ( $featured->have_posts() ) : + $featured->the_post(); // Increase the counter. $counter_slider++; /* - * We're going to add a class to our featured post for featured images - * by default it'll have the feature-text class. - */ + * We're going to add a class to our featured post for featured images + * by default it'll have the feature-text class. + */ $feature_class = 'feature-text'; if ( has_post_thumbnail() ) { @@ -107,54 +113,57 @@ get_header(); ?> <section class="featured-post <?php echo esc_attr( $feature_class ); ?>" id="featured-post-<?php echo esc_attr( $counter_slider ); ?>"> - <?php - /* - * If the thumbnail is as big as the header image - * make it a large featured post, otherwise render it small - */ - if ( has_post_thumbnail() ) { - if ( $image[1] >= $header_image_width ) - $thumbnail_size = 'large-feature'; - else - $thumbnail_size = 'small-feature'; - ?> - <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_post_thumbnail( $thumbnail_size ); ?></a> - <?php - } + <?php + /* + * If the thumbnail is as big as the header image + * make it a large featured post, otherwise render it small + */ + if ( has_post_thumbnail() ) { + if ( $image[1] >= $header_image_width ) { + $thumbnail_size = 'large-feature'; + } else { + $thumbnail_size = 'small-feature'; + } + ?> + <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_post_thumbnail( $thumbnail_size ); ?></a> + <?php + } ?> <?php get_template_part( 'content', 'featured' ); ?> </section> - <?php endwhile; ?> + <?php endwhile; ?> - <?php + <?php // Show slider only if we have more than one featured post. if ( $featured->post_count > 1 ) : - ?> - <nav class="feature-slider"> + ?> + <nav class="feature-slider"> <ul> <?php - // Reset the counter so that we end up with matching elements - $counter_slider = 0; - - // Begin from zero - rewind_posts(); + // Reset the counter so that we end up with matching elements + $counter_slider = 0; - // Let's roll again. - while ( $featured->have_posts() ) : $featured->the_post(); - $counter_slider++; - if ( 1 == $counter_slider ) - $class = ' class="active"'; - else - $class = ''; - ?> - <li><a href="#featured-post-<?php echo esc_attr( $counter_slider ); ?>" title="<?php echo esc_attr( sprintf( __( 'Featuring: %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>"<?php echo $class; ?>></a></li> - <?php endwhile; ?> + // Begin from zero + rewind_posts(); + + // Let's roll again. + while ( $featured->have_posts() ) : + $featured->the_post(); + $counter_slider++; + if ( 1 == $counter_slider ) { + $class = ' class="active"'; + } else { + $class = ''; + } + ?> + <li><a href="#featured-post-<?php echo esc_attr( $counter_slider ); ?>" title="<?php echo esc_attr( sprintf( __( 'Featuring: %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>"<?php echo $class; ?>></a></li> + <?php endwhile; ?> </ul> - </nav> - <?php endif; // End check for more than one sticky post. ?> - </div><!-- .featured-posts --> - <?php endif; // End check for published posts. ?> + </nav> + <?php endif; // End check for more than one sticky post. ?> + </div><!-- .featured-posts --> + <?php endif; // End check for published posts. ?> <?php endif; // End check for sticky posts. ?> <section class="recent-posts"> @@ -164,13 +173,13 @@ get_header(); ?> // Display our recent posts, showing full content for the very latest, ignoring Aside posts. $recent_args = array( - 'order' => 'DESC', - 'post__not_in' => get_option( 'sticky_posts' ), - 'tax_query' => array( + 'order' => 'DESC', + 'post__not_in' => get_option( 'sticky_posts' ), + 'tax_query' => array( array( 'taxonomy' => 'post_format', - 'terms' => array( 'post-format-aside', 'post-format-link', 'post-format-quote', 'post-format-status' ), - 'field' => 'slug', + 'terms' => array( 'post-format-aside', 'post-format-link', 'post-format-quote', 'post-format-status' ), + 'field' => 'slug', 'operator' => 'NOT IN', ), ), @@ -181,7 +190,8 @@ get_header(); ?> $recent = new WP_Query( $recent_args ); // The first Recent post is displayed normally - if ( $recent->have_posts() ) : $recent->the_post(); + if ( $recent->have_posts() ) : + $recent->the_post(); // Set $more to 0 in order to only get the first part of the post. global $more; @@ -194,7 +204,9 @@ get_header(); ?> endif; // For all other recent posts, just display the title and comment status. - while ( $recent->have_posts() ) : $recent->the_post(); ?> + while ( $recent->have_posts() ) : + $recent->the_post(); + ?> <li class="entry-title"> <a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a> @@ -207,8 +219,9 @@ get_header(); ?> endwhile; // If we had some posts, close the <ol> - if ( $recent->post_count > 0 ) + if ( $recent->post_count > 0 ) { echo '</ol>'; + } ?> </section><!-- .recent-posts --> @@ -216,7 +229,12 @@ get_header(); ?> <?php if ( ! dynamic_sidebar( 'sidebar-2' ) ) : ?> <?php - the_widget( 'Twenty_Eleven_Ephemera_Widget', '', array( 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>' ) ); + the_widget( + 'Twenty_Eleven_Ephemera_Widget', '', array( + 'before_title' => '<h3 class="widget-title">', + 'after_title' => '</h3>', + ) + ); ?> <?php endif; // end sidebar widget area ?> @@ -225,4 +243,4 @@ get_header(); ?> </div><!-- #content --> </div><!-- #primary --> -<?php get_footer(); ?> \ No newline at end of file +<?php get_footer(); ?> diff --git a/wp-content/themes/twentyeleven/sidebar-footer.php b/wp-content/themes/twentyeleven/sidebar-footer.php index 659469e65..d7f0a00f8 100644 --- a/wp-content/themes/twentyeleven/sidebar-footer.php +++ b/wp-content/themes/twentyeleven/sidebar-footer.php @@ -15,11 +15,12 @@ * * If none of the sidebars have widgets, then let's bail early. */ - if ( ! is_active_sidebar( 'sidebar-3' ) +if ( ! is_active_sidebar( 'sidebar-3' ) && ! is_active_sidebar( 'sidebar-4' ) - && ! is_active_sidebar( 'sidebar-5' ) - ) - return; + && ! is_active_sidebar( 'sidebar-5' ) + ) { + return; +} // If we get this far, we have widgets. Let do this. ?> <div id="supplementary" <?php twentyeleven_footer_sidebar_class(); ?>> @@ -40,4 +41,4 @@ <?php dynamic_sidebar( 'sidebar-5' ); ?> </div><!-- #third .widget-area --> <?php endif; ?> -</div><!-- #supplementary --> \ No newline at end of file +</div><!-- #supplementary --> diff --git a/wp-content/themes/twentyeleven/sidebar-page.php b/wp-content/themes/twentyeleven/sidebar-page.php index 6fc3b86fe..032bc0602 100644 --- a/wp-content/themes/twentyeleven/sidebar-page.php +++ b/wp-content/themes/twentyeleven/sidebar-page.php @@ -14,7 +14,10 @@ get_header(); ?> <div id="primary"> <div id="content" role="main"> - <?php while ( have_posts() ) : the_post(); ?> + <?php + while ( have_posts() ) : + the_post(); +?> <?php get_template_part( 'content', 'page' ); ?> @@ -26,4 +29,4 @@ get_header(); ?> </div><!-- #primary --> <?php get_sidebar(); ?> -<?php get_footer(); ?> \ No newline at end of file +<?php get_footer(); ?> diff --git a/wp-content/themes/twentyeleven/sidebar.php b/wp-content/themes/twentyeleven/sidebar.php index c9afedcdf..fb53e58b9 100644 --- a/wp-content/themes/twentyeleven/sidebar.php +++ b/wp-content/themes/twentyeleven/sidebar.php @@ -7,7 +7,7 @@ * @since Twenty Eleven 1.0 */ -$options = twentyeleven_get_theme_options(); +$options = twentyeleven_get_theme_options(); $current_layout = $options['theme_layout']; if ( 'content' != $current_layout ) : @@ -33,4 +33,4 @@ if ( 'content' != $current_layout ) : <?php endif; // end sidebar widget area ?> </div><!-- #secondary .widget-area --> -<?php endif; ?> \ No newline at end of file +<?php endif; ?> diff --git a/wp-content/themes/twentyeleven/single.php b/wp-content/themes/twentyeleven/single.php index 861c50c43..0250e943f 100644 --- a/wp-content/themes/twentyeleven/single.php +++ b/wp-content/themes/twentyeleven/single.php @@ -12,7 +12,10 @@ get_header(); ?> <div id="primary"> <div id="content" role="main"> - <?php while ( have_posts() ) : the_post(); ?> + <?php + while ( have_posts() ) : + the_post(); +?> <nav id="nav-single"> <h3 class="assistive-text"><?php _e( 'Post navigation', 'twentyeleven' ); ?></h3> @@ -29,4 +32,4 @@ get_header(); ?> </div><!-- #content --> </div><!-- #primary --> -<?php get_footer(); ?> \ No newline at end of file +<?php get_footer(); ?> diff --git a/wp-content/themes/twentyeleven/style.css b/wp-content/themes/twentyeleven/style.css index 83e6f7a52..b4ff98f48 100644 --- a/wp-content/themes/twentyeleven/style.css +++ b/wp-content/themes/twentyeleven/style.css @@ -4,7 +4,7 @@ Theme URI: https://wordpress.org/themes/twentyeleven/ Author: the WordPress team Author URI: https://wordpress.org/ Description: The 2011 theme for WordPress is sophisticated, lightweight, and adaptable. Make it yours with a custom menu, header image, and background -- then go further with available theme options for light or dark color scheme, custom link colors, and three layout choices. Twenty Eleven comes equipped with a Showcase page template that transforms your front page into a showcase to show off your best content, widget support galore (sidebar, three footer areas, and a Showcase page widget area), and a custom "Ephemera" widget to display your Aside, Link, Quote, or Status posts. Included are styles for print and for the admin editor, support for featured images (as custom header images on posts and pages and as large images on featured "sticky" posts), and special styles for six different post formats. -Version: 2.7 +Version: 2.8 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Tags: blog, one-column, two-columns, left-sidebar, right-sidebar, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-image-header, featured-images, flexible-header, footer-widgets, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready @@ -2298,6 +2298,9 @@ a.comment-reply-link > span { #respond p { font-size: 12px; } +#respond #wp-comment-cookies-consent { + margin: 0 10px 0 0; +} p.comment-form-comment { margin: 0; } @@ -2352,6 +2355,12 @@ p.comment-form-comment { color: #555; font-weight: bold; } +#site-generator span[role=separator] { + padding: 0 0.25em 0 0.5em +} +#site-generator span[role=separator]::before { + content: '\007c'; +} /* =Responsive Structure diff --git a/wp-content/themes/twentyeleven/tag.php b/wp-content/themes/twentyeleven/tag.php index 7c2fdf80b..84bc48e9b 100644 --- a/wp-content/themes/twentyeleven/tag.php +++ b/wp-content/themes/twentyeleven/tag.php @@ -15,29 +15,34 @@ get_header(); ?> <?php if ( have_posts() ) : ?> <header class="page-header"> - <h1 class="page-title"><?php + <h1 class="page-title"> + <?php printf( __( 'Tag Archives: %s', 'twentyeleven' ), '<span>' . single_tag_title( '', false ) . '</span>' ); - ?></h1> + ?> + </h1> <?php $tag_description = tag_description(); - if ( ! empty( $tag_description ) ) { - /** - * Filter the default Twenty Eleven tag description. - * - * @since Twenty Eleven 1.0 - * - * @param string The default tag description. - */ - echo apply_filters( 'tag_archive_meta', '<div class="tag-archive-meta">' . $tag_description . '</div>' ); - } + if ( ! empty( $tag_description ) ) { + /** + * Filter the default Twenty Eleven tag description. + * + * @since Twenty Eleven 1.0 + * + * @param string The default tag description. + */ + echo apply_filters( 'tag_archive_meta', '<div class="tag-archive-meta">' . $tag_description . '</div>' ); + } ?> </header> <?php twentyeleven_content_nav( 'nav-above' ); ?> <?php /* Start the Loop */ ?> - <?php while ( have_posts() ) : the_post(); ?> + <?php + while ( have_posts() ) : + the_post(); +?> <?php /* -- GitLab