diff --git a/wp-content/themes/twentyeleven/404.php b/wp-content/themes/twentyeleven/404.php index d4fe3dd0296abafa297e5431dcdea5d1aa33b54e..63437b9ae13683fceecb7e474e57347a1785b024 100644 --- a/wp-content/themes/twentyeleven/404.php +++ b/wp-content/themes/twentyeleven/404.php @@ -27,29 +27,14 @@ 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' ); ?> @@ -60,4 +45,4 @@ get_header(); ?> </div><!-- #content --> </div><!-- #primary --> -<?php get_footer(); ?> +<?php get_footer(); ?> \ No newline at end of file diff --git a/wp-content/themes/twentyeleven/archive.php b/wp-content/themes/twentyeleven/archive.php index 605ac21ced82ffc09a93d5037da093fa86c7cb87..2f54972bd875dcfb81986cd9d89ea89b3d4384f5 100644 --- a/wp-content/themes/twentyeleven/archive.php +++ b/wp-content/themes/twentyeleven/archive.php @@ -36,10 +36,7 @@ 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 e25a72142ee5779966f1f495921cb89b2ac36c75..274d5b87a46d922f9eb8267516479ae667166721 100644 --- a/wp-content/themes/twentyeleven/author.php +++ b/wp-content/themes/twentyeleven/author.php @@ -42,8 +42,7 @@ 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 @@ -65,10 +64,7 @@ get_header(); ?> <?php endif; ?> <?php /* Start the Loop */ ?> - <?php - while ( have_posts() ) : - the_post(); -?> + <?php while ( have_posts() ) : the_post(); ?> <?php /* @@ -102,4 +98,4 @@ get_header(); ?> </section><!-- #primary --> <?php get_sidebar(); ?> -<?php get_footer(); ?> +<?php get_footer(); ?> \ No newline at end of file diff --git a/wp-content/themes/twentyeleven/blocks.css b/wp-content/themes/twentyeleven/blocks.css new file mode 100644 index 0000000000000000000000000000000000000000..c3b2089d9c08878f312561fd484abaac85091083 --- /dev/null +++ b/wp-content/themes/twentyeleven/blocks.css @@ -0,0 +1,398 @@ +/* +Theme Name: Twenty Eleven +Description: Used to style Gutenberg Blocks. +*/ + +/*-------------------------------------------------------------- +>>> TABLE OF CONTENTS: +---------------------------------------------------------------- +1.0 General Block Styles +2.0 Blocks - Common Blocks +3.0 Blocks - Formatting +4.0 Blocks - Layout Elements +5.0 Blocks - Widgets +6.0 Blocks - Colors +--------------------------------------------------------------*/ + +/*-------------------------------------------------------------- +1.0 General Block Styles +--------------------------------------------------------------*/ + +figure[class^="wp-block-"] { + margin-left: 0; + margin-right: 0; +} + +/* Captions */ + +[class^="wp-block-"] figcaption { + font-family: Georgia, serif; + font-size: 12px; +} + +[class^="wp-block-"]:not(.wp-block-gallery) figcaption { + color: #666; + margin-bottom: 1.625em; + max-width: 96%; + max-width: calc( 100% - 18px ); + padding: 3px 0 5px 40px; + position: relative; + text-align: left; +} + +[class^="wp-block-"]:not(.wp-block-gallery) figcaption:before { + color: #666; + content: '\2014'; + font-size: 14px; + font-style: normal; + font-weight: bold; + margin-right: 5px; + position: absolute; + left: 10px; + top: 0; +} + +.rtl [class^="wp-block-"]:not(.wp-block-gallery) figcaption { + padding-left: 0; + padding-right: 40px; + text-align: right; +} + +.rtl [class^="wp-block-"]:not(.wp-block-gallery) figcaption:before { + left: 0; + margin-left: 5px; + margin-right: 0; + right: 10px; +} + +/*-------------------------------------------------------------- +2.0 Blocks - Common Blocks +--------------------------------------------------------------*/ + +/* Paragraph */ + +p.has-drop-cap:not(:focus)::first-letter { + font-size: 5em; + margin-top: 0.1em; +} + +/* Gallery */ + +.wp-block-gallery { + margin: 0 0 1.625em; +} + +.wp-block-gallery .blocks-gallery-item figcaption { + margin-bottom: 0; + padding-left: 0; + padding-right: 0; +} + +.wp-block-gallery .blocks-gallery-item img { + border: 0; + padding: 0; +} + +/* Quote */ + +.wp-block-quote { + margin: 0 3em; +} + +.wp-block-quote:not(.is-large):not(.is-style-large) { + border: 0; + padding-left: 0; + padding-right: 0; +} + +.wp-block-quote.is-large p, +.wp-block-quote.is-style-large p { + font-size: 20px; +} + +.wp-block-quote cite { + color: #666; + font: 12px "Helvetica Neue", Helvetica, Arial, sans-serif; + font-weight: 300; + letter-spacing: 0.05em; + text-transform: uppercase; +} + +.wp-block-quote.is-large cite, +.wp-block-quote.is-style-large cite { + font-size: 16px; +} + +/* Audio */ + +.wp-block-audio audio { + display: block; + width: 100%; +} + +/* Cover */ + +.wp-block-cover-image.aligncenter, +.wp-block-cover.aligncenter { + clear: both; + display: flex; +} + +.wp-block-cover-image.alignleft, +.wp-block-cover.alignleft { + margin-right: 1.625em; +} + +.wp-block-cover-image.alignright, +.wp-block-cover.alignright { + margin-left: 1.625em; +} + +/* File */ + +.wp-block-file .wp-block-file__button { + background: #222; + border: none; + -moz-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: 0px 1px 2px rgba(0,0,0,0.3); + -moz-box-shadow: 0px 1px 2px rgba(0,0,0,0.3); + box-shadow: 0px 1px 2px rgba(0,0,0,0.3); + color: #eee; + cursor: pointer; + font-size: 15px; + padding: 5px 22px; + text-shadow: 0 -1px 0 rgba(0,0,0,0.3); +} + +.wp-block-file .wp-block-file__button:active { + background: #1982d1; + color: #bfddf3; +} + +.rtl .wp-block-file * + .wp-block-file__button { + margin-left: 0.75em; + margin-right: 0; +} + +/*-------------------------------------------------------------- +3.0 Blocks - Formatting +--------------------------------------------------------------*/ + +/* Code */ + +.wp-block-code { + background-color: transparent; + border: 0; + padding: 0; +} + +/* Pullquote */ + +.wp-block-pullquote__citation, +.wp-block-pullquote cite, +.wp-block-pullquote footer { + color: #141412; +} + +.wp-block-pullquote.alignleft { + margin-right: 1.625em; +} + +.wp-block-pullquote.alignright { + margin-left: 1.625em; +} + +/* Table */ + +.wp-block-table { + border-bottom: 1px solid #ddd; + border-collapse: collapse; + border-spacing: 0; + width: 100%; +} + +.wp-block-table th { + border: 0; + font-weight: bold; + padding: 6px 10px 6px 0; + text-transform: uppercase; +} + +.wp-block-table td { + border: 0; + border-top: 1px solid #ddd; + padding: 6px 10px 6px 0; +} + +/*-------------------------------------------------------------- +4.0 Blocks - Layout Elements +--------------------------------------------------------------*/ + +/* Buttons */ + +.wp-block-button .wp-block-button__link { + background: #222; + border: none; + -moz-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: 0px 1px 2px rgba(0,0,0,0.3); + -moz-box-shadow: 0px 1px 2px rgba(0,0,0,0.3); + box-shadow: 0px 1px 2px rgba(0,0,0,0.3); + color: #eee; + cursor: pointer; + font-size: 15px; + margin: 20px 0; + padding: 5px 22px; + text-shadow: 0 -1px 0 rgba(0,0,0,0.3); +} + +.wp-block-button .wp-block-button__link:active { + background: #1982d1; + color: #bfddf3; +} + +/* Separator */ + +.wp-block-separator { + border: 0; + max-width: 100px; +} + +.wp-block-separator.is-style-wide { + max-width: 100%; +} + +/* Media & Text */ + +.wp-block-media-text { + margin-bottom: 1.625em; +} + +.wp-block-media-text *:last-child { + margin-bottom: 0; +} + +/*-------------------------------------------------------------- +5.0 Blocks - Widgets +--------------------------------------------------------------*/ + +/* Archives, Categories & Latest Posts */ + +.wp-block-archives.aligncenter, +.wp-block-categories.aligncenter, +.wp-block-latest-posts.aligncenter { + list-style-position: inside; + margin-left: 2.5em; + text-align: center; +} + +.rtl .wp-block-archives.aligncenter, +.rtl .wp-block-categories.aligncenter, +.rtl .wp-block-latest-posts.aligncenter { + margin-left: 0; + margin-right: 2.5em; +} + +/* Latest Comments */ + +.wp-block-latest-comments { + margin: 0; + padding: 0; +} + +.wp-block-latest-comments .avatar, +.wp-block-latest-comments__comment-avatar { + -moz-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: 0 1px 2px #ccc; + -moz-box-shadow: 0 1px 2px #ccc; + box-shadow: 0 1px 2px #ccc; +} + +.wp-block-latest-comments__comment, +.wp-block-latest-comments__comment-excerpt, +.wp-block-latest-comments__comment-excerpt p { + font-size: 15px; +} + +.wp-block-latest-comments__comment-excerpt p:last-child { + margin-bottom: 0; +} + +.wp-block-latest-comments__comment-meta, +.wp-block-latest-comments__comment-date { + color: #666; + font-size: 12px; + line-height: 2.2em; +} + +.wp-block-latest-comments__comment-meta a { + font-weight: bold; +} + +.wp-block-latest-comments .wp-block-latest-comments__comment { + -moz-border-radius: 3px; + border-radius: 3px; + margin: 0 0 2.625em; + position: relative; +} + +/* Latest Posts */ + +.wp-block-latest-posts.is-grid { + margin-left: 0; + margin-right: 0; +} + +/*-------------------------------------------------------------- +6.0 Blocks - Colors +--------------------------------------------------------------*/ + +.has-blue-color { + color: #1982d1; +} + +.has-blue-background-color { + background-color: #1982d1; +} + +.has-black-color { + color: #000; +} + +.has-black-background-color { + background-color: #000; +} + +.has-dark-gray-color { + color: #373737; +} + +.has-dark-gray-background-color { + background-color: #373737; +} + +.has-medium-gray-color { + color: #666; +} + +.has-medium-gray-background-color { + background-color: #666; +} + +.has-light-gray-color { + color: #e2e2e2; +} + +.has-light-gray-background-color { + background-color: #e2e2e2; +} + +.has-white-color { + color: #fff; +} + +.has-white-background-color { + background-color: #fff; +} diff --git a/wp-content/themes/twentyeleven/category.php b/wp-content/themes/twentyeleven/category.php index fcd71a3789ae958c1f99c9c70bf183b75b420cfb..cd64f4490f0ebaec1df4adccab65f3b5ef0c3e50 100644 --- a/wp-content/themes/twentyeleven/category.php +++ b/wp-content/themes/twentyeleven/category.php @@ -15,34 +15,29 @@ 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 11f95e0329957cc854a56960db91c616bb7ea09b..e774e83647b4d0186a902291cdfac8db6f4c7341 100644 --- a/wp-content/themes/twentyeleven/comments.php +++ b/wp-content/themes/twentyeleven/comments.php @@ -31,10 +31,8 @@ <?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> @@ -72,9 +70,8 @@ * 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 aab63455a6a978e21a4cc6109b61557e1f9c49df..387403d62bcfb56f27119d7094c6571d49789bfb 100644 --- a/wp-content/themes/twentyeleven/content-aside.php +++ b/wp-content/themes/twentyeleven/content-aside.php @@ -33,14 +33,7 @@ <?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 9340f5f1be27d6931c7a47ed2390d90b9ac224dd..bd31b320098eb97bd1fa6e63d86e3c715d7a3089 100644 --- a/wp-content/themes/twentyeleven/content-featured.php +++ b/wp-content/themes/twentyeleven/content-featured.php @@ -20,25 +20,18 @@ 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 a35b9c039f8baaf8c12061c87dfbf00e5e063bfc..e88797811b9690bb8fd7b8d9475e89edfdb7297b 100644 --- a/wp-content/themes/twentyeleven/content-gallery.php +++ b/wp-content/themes/twentyeleven/content-gallery.php @@ -32,37 +32,24 @@ <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; ?> @@ -71,28 +58,23 @@ <?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 e28e8a0c9573efd730b79ce7ee78f772892dbf1d..24976908690f3efd97031b7a9119da56dfedfc6d 100644 --- a/wp-content/themes/twentyeleven/content-image.php +++ b/wp-content/themes/twentyeleven/content-image.php @@ -27,21 +27,13 @@ <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(), @@ -55,17 +47,16 @@ <?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 5fe87ffadbd6a1def4acc59d5d59f2826a817de9..6b9099cf820849ba919702604ee309db7a660f72 100644 --- a/wp-content/themes/twentyeleven/content-intro.php +++ b/wp-content/themes/twentyeleven/content-intro.php @@ -15,14 +15,7 @@ <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 88e710e86f46e0073f6d249eec4d90d016958b54..04e673016eea75eba894b2107f38e28f6f36b1d5 100644 --- a/wp-content/themes/twentyeleven/content-link.php +++ b/wp-content/themes/twentyeleven/content-link.php @@ -33,14 +33,7 @@ <?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 accf1e7a3bea5a95a1cd8bb62253b1f1f287a696..800a695090d2b113f86c674342a3c9f0034ab5a1 100644 --- a/wp-content/themes/twentyeleven/content-page.php +++ b/wp-content/themes/twentyeleven/content-page.php @@ -15,14 +15,7 @@ <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 3eb9409751d49d3b112aa76ae9cd5a16fb166dd7..2bf20cdf29ee9f193e2b64e89189138a70ec9f7a 100644 --- a/wp-content/themes/twentyeleven/content-quote.php +++ b/wp-content/themes/twentyeleven/content-quote.php @@ -33,14 +33,7 @@ <?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,28 +42,23 @@ <?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 be4915d6b5d845e583f10ae340ce8d30d6f65df1..11ac986b53ced32ff2ce2adbcd8890babfe23206 100644 --- a/wp-content/themes/twentyeleven/content-single.php +++ b/wp-content/themes/twentyeleven/content-single.php @@ -21,14 +21,7 @@ <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"> @@ -38,13 +31,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 7a0bf906475a8f0b0013183d00923b7ef00a4506..afcf823d896a4ee5a45c6b893361b1fc51674b30 100644 --- a/wp-content/themes/twentyeleven/content-status.php +++ b/wp-content/themes/twentyeleven/content-status.php @@ -46,14 +46,7 @@ </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 797726d7c568f1a248d3f19bc079b2277636adf6..1f5e50faee8a50e9981acdcc1aa92ee4a0e8351e 100644 --- a/wp-content/themes/twentyeleven/content.php +++ b/wp-content/themes/twentyeleven/content.php @@ -39,14 +39,7 @@ <?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; ?> @@ -56,13 +49,11 @@ <?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' ) ?> @@ -70,16 +61,13 @@ <?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/editor-blocks.css b/wp-content/themes/twentyeleven/editor-blocks.css new file mode 100644 index 0000000000000000000000000000000000000000..88935f1949567122f90640c101cc1ad9c41602f1 --- /dev/null +++ b/wp-content/themes/twentyeleven/editor-blocks.css @@ -0,0 +1,461 @@ +/* +Theme Name: Twenty Eleven +Description: Used to style Gutenberg Blocks in the editor. +*/ + +/*-------------------------------------------------------------- +>>> TABLE OF CONTENTS: +---------------------------------------------------------------- +1.0 General Typography +2.0 General Block Styles +3.0 Blocks - Common Blocks +4.0 Blocks - Formatting +5.0 Blocks - Layout Elements +6.0 Blocks - Widgets +--------------------------------------------------------------*/ + +/*-------------------------------------------------------------- +1.0 General Typography +--------------------------------------------------------------*/ + +.edit-post-visual-editor .editor-block-list__block, +.edit-post-visual-editor .editor-block-list__block p, +.editor-default-block-appender input[type="text"].editor-default-block-appender__content { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 15px; + font-size: 300; + line-height: 1.625; +} + +.edit-post-visual-editor .editor-block-list__block { + color: #333; +} + +.editor-post-title__block .editor-post-title__input { + color: #000; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 36px; + line-height: 48px; +} + +.edit-post-visual-editor h1, +.wp-block-freeform.block-library-rich-text__tinymce h1, +.edit-post-visual-editor h2, +.wp-block-freeform.block-library-rich-text__tinymce h2 { + font-size: 15px; + margin: 0 0 0.8125em; +} + +.edit-post-visual-editor h3, +.wp-block-freeform.block-library-rich-text__tinymce h3 { + font-size: 10px; + font-weight: 300; + letter-spacing: 0.1em; + line-height: 2.6em; + text-transform: uppercase; +} + +.edit-post-visual-editor h4, +.wp-block-freeform.block-library-rich-text__tinymce h4, +.edit-post-visual-editor h5, +.wp-block-freeform.block-library-rich-text__tinymce h5, +.edit-post-visual-editor h6, +.wp-block-freeform.block-library-rich-text__tinymce h6 { + font-size: 15px; + font-weight: 300; + line-height: 1.625; +} + +/*-------------------------------------------------------------- +2.0 General Block Styles +--------------------------------------------------------------*/ + +/* Main column width */ + +.editor-styles-wrapper { + max-width: 100% !important; /* Override where editor-style.css is affecting this. */ +} + +.wp-block { + max-width: 614px; /* 584px + 30px to account for padding */ +} + +/* Link styles */ + +.edit-post-visual-editor a, +.editor-block-list__block a, +.wp-block-freeform.block-library-rich-text__tinymce a { + color: #1982d1; +} + +/* List styles */ + +.edit-post-visual-editor ul:not(.wp-block-gallery), +.editor-block-list__block ul:not(.wp-block-gallery), +.block-library-list ul.editor-rich-text__tinymce, +.edit-post-visual-editor ol, +.editor-block-list__block ol, +.block-library-list ol.editor-rich-text__tinymce { + margin: 0 0 1.625em 2.5em; + padding: 0; +} + +.block-library-list .editor-rich-text__tinymce { + padding: 0; +} + +.edit-post-visual-editor ul:not(.wp-block-gallery), +.edit-post-visual-editor .editor-block-list__block ul:not(.wp-block-gallery), +.block-library-list ul { + list-style-type: square; +} + +.edit-post-visual-editor ol, +.editor-block-list__block ol, +.block-library-list ol { + list-style: decimal; +} + +.edit-post-visual-editor ol ol, +.editor-block-list__block ol ol, +.block-library-list ol ol { + list-style: upper-alpha; +} + +.edit-post-visual-editor ol ol ol, +.editor-block-list__block ol ol ol, +.block-library-list ol ol ol { + list-style: lower-roman; +} + +.edit-post-visual-editor ol ol ol ol, +.editor-block-list__block ol ol ol ol, +.block-library-list ol ol ol ol { + list-style: lower-alpha; +} + +.edit-post-visual-editor ul:not(.wp-block-gallery) li > ul, +.editor-block-list__block ul:not(.wp-block-gallery) li > ul, +.block-library-list .editor-rich-text__tinymce li > ul, +.edit-post-visual-editor li > ol, +.editor-block-list__block li > ol, +.block-library-list .editor-rich-text__tinymce li > ol, +.wp-block-freeform.block-library-rich-text__tinymce li, +.editor-block-list__block li { + margin-bottom: 0; +} + +.rtl .edit-post-visual-editor ul:not(.wp-block-gallery), +.rtl .editor-block-list__block ul:not(.wp-block-gallery), +.rtl .block-library-list ul, +.rtl .edit-post-visual-editor ol, +.rtl .editor-block-list__block ol, +.rtl .block-library-list ol { + margin-left: 0; + margin-right: 1.3333em; +} + +/* Captions */ + +[class^="wp-block-"] figcaption { + font-family: Georgia, serif; + font-size: 12px; +} + +[class^="wp-block-"]:not(.wp-block-gallery) figcaption { + color: #666; + margin-bottom: 1.625em; + max-width: 96%; + max-width: calc( 100% - 18px ); + padding: 3px 0 5px 40px; + position: relative; + text-align: left; +} + +[class^="wp-block-"]:not(.wp-block-gallery) figcaption:before { + color: #666; + content: '\2014'; + font-size: 14px; + font-style: normal; + font-weight: bold; + margin-right: 5px; + position: absolute; + left: 10px; + top: 0; +} + +.rtl [class^="wp-block-"]:not(.wp-block-gallery) figcaption { + padding-left: 0; + padding-right: 40px; + text-align: right; +} + +.rtl [class^="wp-block-"]:not(.wp-block-gallery) figcaption:before { + left: 0; + margin-left: 5px; + margin-right: 0; + right: 10px; +} + +/* Quote */ + +.wp-block-freeform.block-library-rich-text__tinymce blockquote { + border: 0; + font-style: italic; + margin: 0 3em; + padding: 0; +} + +.wp-block-freeform.block-library-rich-text__tinymce blockquote p { + font-family: Georgia, "Bitstream Charter", serif; + font-size: 15px; + font-weight: normal; +} + +.wp-block-freeform.block-library-rich-text__tinymce blockquote cite { + color: #666; + font: 12px "Helvetica Neue", Helvetica, Arial, sans-serif; + font-weight: 300; + letter-spacing: 0.05em; + text-transform: uppercase; +} + +/* Code */ + +.wp-block-freeform.block-library-rich-text__tinymce code { + background: transparent; +} + +/*-------------------------------------------------------------- +3.0 Blocks - Common Blocks +--------------------------------------------------------------*/ + +/* Paragraph */ + +p.has-drop-cap:not(:focus)::first-letter { + font-size: 5em; + margin-top: 0.1em; +} + +/* Gallery */ + +.editor-block-list__block .wp-block-gallery { + margin: 0 0 1.625em; +} + +.wp-block-gallery figcaption { + margin-bottom: 0; + max-width: 100%; +} + +.wp-block-gallery .blocks-gallery-item img { + border: 0; + padding: 0; +} + +/* Quote */ + +.wp-block-quote { + font-style: italic; + font-weight: normal; + margin: 0 3em; + padding: 0; +} + +.edit-post-visual-editor .editor-block-list__block .wp-block-quote p { + font-family: Georgia, "Bitstream Charter", serif; +} + +.wp-block-quote:not(.is-large):not(.is-style-large) { + border: 0; + padding-left: 0; + padding-right: 0; +} + +.wp-block-quote .wp-block-quote__citation.editor-rich-text__tinymce.mce-content-body { + color: #666; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-weight: 300; + letter-spacing: 0.05em; + text-transform: uppercase; +} + +.wp-block-quote.is-large p, +.wp-block-quote.is-style-large p { + font-size: 20px; +} + +.wp-block-quote.is-large .wp-block-quote__citation, +.wp-block-quote.is-style-large .wp-block-quote__citation { + font-size: 16px; +} + +/* Cover */ + +.edit-post-visual-editor .editor-block-list__block .wp-block-cover-image p.wp-block-cover-image-text, +.edit-post-visual-editor .editor-block-list__block .wp-block-cover p.wp-block-cover-text { + font-size: 30px; + line-height: 37.5px; +} + +/* File */ + +.wp-block-file .wp-block-file__textlink { + color: #1982d1; +} + +.wp-block-file .wp-block-file__button { + background: #222; + border: none; + -moz-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: 0px 1px 2px rgba(0,0,0,0.3); + -moz-box-shadow: 0px 1px 2px rgba(0,0,0,0.3); + box-shadow: 0px 1px 2px rgba(0,0,0,0.3); + color: #eee; + cursor: pointer; + font-size: 15px; + line-height: 24px; + padding: 5px 22px; + text-shadow: 0 -1px 0 rgba(0,0,0,0.3); +} + +/*-------------------------------------------------------------- +4.0 Blocks - Formatting +--------------------------------------------------------------*/ + +/* Code */ + +.wp-block-code { + background: transparent; + border: 0; + padding: 0; +} + +/* Pullquote */ + +.edit-post-visual-editor .editor-block-list__block .wp-block-pullquote p { + font-family: Georgia, "Bitstream Charter", serif; + font-style: italic; + font-weight: normal; +} + +.wp-block-pullquote.alignleft blockquote > .editor-rich-text p, +.wp-block-pullquote.alignright blockquote > .editor-rich-text p { + font-size: 20px; +} + +/* Table */ + +.editor-block-list__block .wp-block-table th, +.editor-block-list__block .wp-block-table td { + padding: 0; +} + +.wp-block-table__cell-content { + padding: 6px; +} + +.rtl .editor-block-list__block .wp-block-table th, +.rtl .editor-block-list__block .wp-block-table td, +.rtl .editor-block-list__block th, +.rtl .editor-block-list__block td { + text-align: right; +} + + +/*-------------------------------------------------------------- +5.0 Blocks - Layout Elements +--------------------------------------------------------------*/ + +/* Buttons */ + +.wp-block-button .wp-block-button__link { + background: #222; + border: none; + -moz-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: 0px 1px 2px rgba(0,0,0,0.3); + -moz-box-shadow: 0px 1px 2px rgba(0,0,0,0.3); + box-shadow: 0px 1px 2px rgba(0,0,0,0.3); + color: #eee; + cursor: pointer; + font-size: 15px; + line-height: 24px; + margin: 20px 0; + padding: 5px 22px; + text-shadow: 0 -1px 0 rgba(0,0,0,0.3); +} + +/* Media & Text */ + +.wp-block-media-text *:last-child { + margin-bottom: 0; +} + +/*-------------------------------------------------------------- +6.0 Blocks - Widgets +--------------------------------------------------------------*/ + +/* Archives, Categories & Latest Posts */ + +[data-align="center"] .wp-block-archives ul, +[data-align="center"] .wp-block-categories ul, +[data-align="center"] .wp-block-latest-posts ul { + list-style-position: inside; + margin-left: 2.5em; + text-align: center; +} + +/* Latest Comments */ + +.wp-block-latest-comments { + margin: 0; + padding: 0; +} + +.wp-block-latest-comments .avatar, +.wp-block-latest-comments__comment-avatar { + -moz-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: 0 1px 2px #ccc; + -moz-box-shadow: 0 1px 2px #ccc; + box-shadow: 0 1px 2px #ccc; + padding: 0; +} + +.wp-block-latest-comments__comment, +.wp-block-latest-comments__comment-excerpt, +.wp-block-latest-comments__comment-excerpt p { + font-size: 15px; +} + +.wp-block-latest-comments__comment-excerpt p:last-child { + margin-bottom: 0; +} + +.wp-block-latest-comments__comment-meta, +.wp-block-latest-comments__comment-date { + color: #666; + font-size: 12px; + line-height: 2.2em; +} + +.wp-block-latest-comments__comment-meta a { + font-weight: bold; +} + +.wp-block-latest-comments .wp-block-latest-comments__comment { + -moz-border-radius: 3px; + border-radius: 3px; + margin: 0 0 2.625em; + position: relative; +} + +/* Latest Posts */ + +.edit-post-visual-editor .editor-block-list__block .wp-block-latest-posts.is-grid { + list-style: none; + margin-left: 0; + margin-right: 0; +} diff --git a/wp-content/themes/twentyeleven/footer.php b/wp-content/themes/twentyeleven/footer.php index 53fa696ee4a9fb94981a6b0d4f485b8c31991bb5..446bc8106809a4e72f8479bcdf86e3dca5996650 100644 --- a/wp-content/themes/twentyeleven/footer.php +++ b/wp-content/themes/twentyeleven/footer.php @@ -19,9 +19,8 @@ * 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"> @@ -41,4 +40,4 @@ <?php wp_footer(); ?> </body> -</html> +</html> \ No newline at end of file diff --git a/wp-content/themes/twentyeleven/functions.php b/wp-content/themes/twentyeleven/functions.php index 0349823c2bb0f4d982ac6cd1c35da27ab51e3efe..069f19bf5dfdf0b90fb872ab18efa309bced64c7 100644 --- a/wp-content/themes/twentyeleven/functions.php +++ b/wp-content/themes/twentyeleven/functions.php @@ -39,223 +39,281 @@ */ // 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 +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. */ - function twentyeleven_setup() { + load_theme_textdomain( 'twentyeleven', get_template_directory() . '/languages' ); - /* - * 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 regular editor styles into the new block-based editor. + add_theme_support( 'editor-styles' ); - // Load up our theme options page and related code. - require( get_template_directory() . '/inc/theme-options.php' ); + // Load default block styles. + add_theme_support( 'wp-block-styles' ); - // Grab Twenty Eleven's Ephemera widget. - require( get_template_directory() . '/inc/widgets.php' ); + // Add support for responsive embeds. + add_theme_support( 'responsive-embeds' ); - // Add default posts and comments RSS feed links to <head>. - add_theme_support( 'automatic-feed-links' ); + // Add support for custom color scheme. + add_theme_support( 'editor-color-palette', array( + array( + 'name' => __( 'Blue', 'twentyeleven' ), + 'slug' => 'blue', + 'color' => '#1982d1', + ), + array( + 'name' => __( 'Black', 'twentyeleven' ), + 'slug' => 'black', + 'color' => '#000', + ), + array( + 'name' => __( 'Dark Gray', 'twentyeleven' ), + 'slug' => 'dark-gray', + 'color' => '#373737', + ), + array( + 'name' => __( 'Medium Gray', 'twentyeleven' ), + 'slug' => 'medium-gray', + 'color' => '#666', + ), + array( + 'name' => __( 'Light Gray', 'twentyeleven' ), + 'slug' => 'light-gray', + 'color' => '#e2e2e2', + ), + array( + 'name' => __( 'White', 'twentyeleven' ), + 'slug' => 'white', + 'color' => '#fff', + ) + ) ); - // This theme uses wp_nav_menu() in one location. - register_nav_menu( 'primary', __( 'Primary Menu', 'twentyeleven' ) ); + // Load up our theme options page and related code. + require( get_template_directory() . '/inc/theme-options.php' ); - // Add support for a variety of post formats - add_theme_support( 'post-formats', array( 'aside', 'link', 'gallery', 'status', 'quote', 'image' ) ); + // Grab Twenty Eleven's Ephemera widget. + require( get_template_directory() . '/inc/widgets.php' ); - $theme_options = twentyeleven_get_theme_options(); - if ( 'dark' == $theme_options['color_scheme'] ) { - $default_background_color = '1d1d1d'; - } else { - $default_background_color = 'e2e2e2'; - } + // Add default posts and comments RSS feed links to <head>. + add_theme_support( 'automatic-feed-links' ); - // 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(); - } + // This theme uses wp_nav_menu() in one location. + register_nav_menu( 'primary', __( 'Primary Menu', 'twentyeleven' ) ); - /* - * 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 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'; + + // Add support for custom backgrounds. + add_theme_support( 'custom-background', array( /* - * Add Twenty Eleven's custom image sizes. - * Used for large feature (header) images. + * 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. */ - 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' ); + '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(); } + + /* + * 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 +/** + * Enqueue scripts and styles for front end. + * + * @since Twenty Eleven 2.9 + */ +function twentyeleven_scripts_styles() { + // Theme block stylesheet. + wp_enqueue_style( 'twentyeleven-block-style', get_template_directory_uri() . '/blocks.css', array(), '20181018' ); +} +add_action( 'wp_enqueue_scripts', 'twentyeleven_scripts_styles' ); + +/** + * Enqueue editor styles for Gutenberg + * + * @since Twenty Eleven 2.9 + */ +function twentyeleven_block_editor_styles() { + // Block styles. + wp_enqueue_style( 'twentyeleven-block-editor-style', get_template_directory_uri() . '/editor-blocks.css' ); +} +add_action( 'enqueue_block_editor_assets', 'twentyeleven_block_editor_styles' ); + 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 ) : ?> @@ -276,19 +334,19 @@ if ( ! function_exists( '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; @@ -312,12 +370,12 @@ if ( ! function_exists( '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; @@ -325,38 +383,35 @@ if ( ! function_exists( '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 /** @@ -377,16 +432,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 /** @@ -438,9 +493,8 @@ 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' ); @@ -456,88 +510,76 @@ 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 /** @@ -554,9 +596,8 @@ 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() ); @@ -570,9 +611,8 @@ 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] ); } @@ -585,17 +625,14 @@ 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 = ''; @@ -611,117 +648,102 @@ 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; /** @@ -737,13 +759,11 @@ 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; } @@ -764,30 +784,26 @@ 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 df8f7eeef91854d718e0346fb08dd181505b327f..f9be4f52e0dd67dd1ead5d9215a4bd8873ccd2b3 100644 --- a/wp-content/themes/twentyeleven/header.php +++ b/wp-content/themes/twentyeleven/header.php @@ -24,8 +24,7 @@ <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; @@ -36,17 +35,14 @@ // 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' ); ?>" /> @@ -58,9 +54,8 @@ if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) { * 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> @@ -83,39 +78,39 @@ if ( is_singular() && get_option( 'thread_comments' ) ) { <?php // Check to see if the header image has been removed $header_image = get_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 : + if ( $header_image ) : // 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; + /* + * 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; - $header_image_height = HEADER_IMAGE_HEIGHT; + $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' ) ) { + $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> @@ -123,15 +118,11 @@ if ( is_singular() && get_option( 'thread_comments' ) ) { <?php // Has the text been hidden? - if ( 'blank' == get_header_textcolor() ) : - $header_image_class = ''; - if ( $header_image ) { - $header_image_class = ' with-image'; - } + if ( 'blank' == get_header_textcolor() ) : ?> - <div class="only-search<?php echo $header_image_class; ?>"> - <?php get_search_form(); ?> - </div> + <div class="only-search<?php if ( $header_image ) : ?> with-image<?php endif; ?>"> + <?php get_search_form(); ?> + </div> <?php else : ?> diff --git a/wp-content/themes/twentyeleven/image.php b/wp-content/themes/twentyeleven/image.php index ea209285424b96f05683ff29eeb5d23b462bf2f6..5c855904f67ac1cbbd9011e05b96b649521ff3cf 100644 --- a/wp-content/themes/twentyeleven/image.php +++ b/wp-content/themes/twentyeleven/image.php @@ -12,15 +12,12 @@ 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(); ?>> @@ -30,8 +27,7 @@ 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() ), @@ -56,51 +52,37 @@ 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 ); + 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(); } -} 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"> @@ -113,14 +95,7 @@ if ( count( $attachments ) > 1 ) { <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 --> @@ -134,4 +109,4 @@ if ( count( $attachments ) > 1 ) { </div><!-- #content --> </div><!-- #primary --> -<?php get_footer(); ?> +<?php get_footer(); ?> \ No newline at end of file diff --git a/wp-content/themes/twentyeleven/inc/theme-options.php b/wp-content/themes/twentyeleven/inc/theme-options.php index 8974b151e98d8ca447ead7ff144d45670d7f89db..e71ab9a1679b7e9763cdd0701a33e1ef2ace0b3b 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,9 +99,8 @@ 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' ); } @@ -125,11 +124,10 @@ 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, ) ); @@ -148,15 +146,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', ), ); @@ -179,18 +177,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', ), ); @@ -219,9 +217,8 @@ 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. @@ -241,17 +238,16 @@ 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']; } @@ -368,22 +364,19 @@ 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. @@ -403,12 +396,11 @@ 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. @@ -429,15 +421,14 @@ 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 */ @@ -478,22 +469,20 @@ 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. @@ -517,37 +506,31 @@ 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(); @@ -555,52 +538,40 @@ 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(); @@ -608,13 +579,11 @@ 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 08ab7f7bad89e8e949531d098a5b188411bd6b3c..9b007f4af28a36b9663899da6d6574fb63b18020 100644 --- a/wp-content/themes/twentyeleven/inc/widgets.php +++ b/wp-content/themes/twentyeleven/inc/widgets.php @@ -18,13 +18,11 @@ 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' ) ); @@ -48,17 +46,15 @@ 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'] ]; @@ -71,13 +67,11 @@ 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', @@ -94,7 +88,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']; @@ -103,10 +97,7 @@ 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() ) : ?> @@ -137,7 +128,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(); @@ -154,17 +145,16 @@ 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; } @@ -184,9 +174,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 a67445bfff6ce8bddbd0ecfb2560176d3cd6188e..1dd72c8f627614a481cd61edcd32e21d32bcde34 100644 --- a/wp-content/themes/twentyeleven/index.php +++ b/wp-content/themes/twentyeleven/index.php @@ -22,10 +22,7 @@ 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 19ddcc24bc60f3d38f2ad1d81c8dc53e0ece81bb..4c86ae35afd1675fd87be1cc93ebcb0c8477e923 100644 --- a/wp-content/themes/twentyeleven/languages/twentyeleven.pot +++ b/wp-content/themes/twentyeleven/languages/twentyeleven.pot @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: Twenty Eleven 2.8\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/theme/twentyeleven\n" -"POT-Creation-Date: 2018-05-17 16:16:30+00:00\n" +"POT-Creation-Date: 2018-11-06 15:33:02+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -26,7 +26,7 @@ msgstr "" #. translators: %1$s: smilie -#: 404.php:46 +#: 404.php:36 msgid "Try looking in the monthly archives. %1$s" msgstr "" @@ -56,12 +56,12 @@ msgstr "" msgid "Blog Archives" msgstr "" -#: archive.php:60 author.php:90 category.php:64 index.php:40 search.php:47 -#: tag.php:65 +#: archive.php:57 author.php:86 category.php:59 index.php:37 search.php:44 +#: tag.php:60 msgid "Nothing Found" msgstr "" -#: archive.php:64 author.php:94 category.php:68 index.php:44 tag.php:69 +#: archive.php:61 author.php:90 category.php:63 index.php:41 tag.php:64 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:61 content-single.php:70 +#: author.php:60 content-single.php:63 msgid "About %s" msgstr "" -#: category.php:20 +#: category.php:19 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:35 +#: comments.php:34 msgid "One thought on “%2$s”" msgid_plural "%1$s thoughts on “%2$s”" msgstr[0] "" msgstr[1] "" -#: comments.php:43 comments.php:64 +#: comments.php:41 comments.php:62 msgid "Comment navigation" msgstr "" -#: comments.php:44 comments.php:65 +#: comments.php:42 comments.php:63 msgid "← Older Comments" msgstr "" -#: comments.php:45 comments.php:66 +#: comments.php:43 comments.php:64 msgid "Newer Comments →" msgstr "" -#: comments.php:77 +#: comments.php:74 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:388 +#: content.php:41 functions.php:443 msgid "Continue reading <span class=\"meta-nav\">→</span>" msgstr "" -#: 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 +#: 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 msgid "Pages:" msgstr "" -#: 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 +#: 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 msgid "Leave a reply" msgstr "" -#: 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 +#: 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 msgid "<b>1</b> Reply" msgstr "" -#: 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 +#: 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 msgid "<b>%</b> Replies" msgstr "" -#: 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 +#: 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:677 functions.php:705 +#: image.php:41 msgid "Edit" msgstr "" #. translators: used between list items, there is a space after the comma -#: 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 +#: 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 msgid ", " msgstr "" -#: content-featured.php:38 +#: content-featured.php:31 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:40 +#: content-featured.php:33 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:49 +#: content-gallery.php:45 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:50 showcase.php:128 +#: content-gallery.php:46 showcase.php:121 msgid "Permalink to %s" msgstr "" -#: content-gallery.php:78 content-image.php:61 content-quote.php:56 -#: content.php:63 +#: content-gallery.php:64 content-image.php:53 content-quote.php:48 +#: content.php:55 msgid "<span class=\"%1$s\">Posted in</span> %2$s" msgstr "" -#: content-gallery.php:93 content-image.php:70 content-quote.php:71 -#: content.php:80 +#: content-gallery.php:76 content-image.php:61 content-quote.php:60 +#: content.php:69 msgid "<span class=\"%1$s\">Tagged</span> %2$s" msgstr "" @@ -208,11 +208,11 @@ msgstr "" msgid "Image" msgstr "" -#: content-image.php:44 +#: content-image.php:36 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:49 functions.php:721 +#: content-image.php:41 functions.php:743 msgid "View all posts by %s" msgstr "" @@ -224,19 +224,19 @@ msgstr "" msgid "Quote" msgstr "" -#: content-single.php:42 +#: content-single.php:35 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:44 +#: content-single.php:37 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:46 +#: content-single.php:39 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:74 +#: content-single.php:67 msgid "View all posts by %s <span class=\"meta-nav\">→</span>" msgstr "" @@ -248,175 +248,199 @@ msgstr "" msgid "Featured" msgstr "" -#: footer.php:34 +#: footer.php:33 msgid "https://wordpress.org/" msgstr "" -#: footer.php:34 +#: footer.php:33 msgid "Semantic Personal Publishing Platform" msgstr "" -#: footer.php:35 +#: footer.php:34 msgid "Proudly powered by %s" msgstr "" -#: functions.php:96 +#: functions.php:97 +msgid "Blue" +msgstr "" + +#: functions.php:102 +msgid "Black" +msgstr "" + +#: functions.php:107 +msgid "Dark Gray" +msgstr "" + +#: functions.php:112 +msgid "Medium Gray" +msgstr "" + +#: functions.php:117 +msgid "Light Gray" +msgstr "" + +#: functions.php:122 +msgid "White" +msgstr "" + +#: functions.php:138 msgid "Primary Menu" msgstr "" #. translators: header image description -#: functions.php:189 +#: functions.php:227 msgid "Wheel" msgstr "" #. translators: header image description -#: functions.php:195 +#: functions.php:233 msgid "Shore" msgstr "" #. translators: header image description -#: functions.php:201 +#: functions.php:239 msgid "Trolley" msgstr "" #. translators: header image description -#: functions.php:207 +#: functions.php:245 msgid "Pine Cone" msgstr "" #. translators: header image description -#: functions.php:213 +#: functions.php:251 msgid "Chessboard" msgstr "" #. translators: header image description -#: functions.php:219 +#: functions.php:257 msgid "Lanterns" msgstr "" #. translators: header image description -#: functions.php:225 +#: functions.php:263 msgid "Willow" msgstr "" #. translators: header image description -#: functions.php:231 +#: functions.php:269 msgid "Hanoi Plant" msgstr "" -#: functions.php:461 +#: functions.php:514 msgid "Main Sidebar" msgstr "" -#: functions.php:472 +#: functions.php:523 msgid "Showcase Sidebar" msgstr "" -#: functions.php:474 +#: functions.php:525 msgid "The sidebar for the optional Showcase Template" msgstr "" -#: functions.php:484 +#: functions.php:533 msgid "Footer Area One" msgstr "" -#: functions.php:486 functions.php:498 functions.php:510 +#: functions.php:535 functions.php:545 functions.php:555 msgid "An optional widget area for your site footer" msgstr "" -#: functions.php:496 +#: functions.php:543 msgid "Footer Area Two" msgstr "" -#: functions.php:508 +#: functions.php:553 msgid "Footer Area Three" msgstr "" -#: functions.php:534 single.php:21 +#: functions.php:577 single.php:18 msgid "Post navigation" msgstr "" -#: functions.php:535 +#: functions.php:578 msgid "<span class=\"meta-nav\">←</span> Older posts" msgstr "" -#: functions.php:536 +#: functions.php:579 msgid "Newer posts <span class=\"meta-nav\">→</span>" msgstr "" -#: functions.php:641 +#: functions.php:677 msgid "Pingback:" msgstr "" #. translators: 1: comment author, 2: date and time -#: functions.php:660 +#: functions.php:694 msgid "%1$s on %2$s <span class=\"says\">said:</span>" msgstr "" #. translators: 1: date, 2: time -#: functions.php:667 +#: functions.php:700 msgid "%1$s at %2$s" msgstr "" -#: functions.php:676 +#: functions.php:709 msgid "Your comment is awaiting moderation." msgstr "" -#: functions.php:689 +#: functions.php:718 msgid "Reply <span>↓</span>" msgstr "" -#: functions.php:715 +#: functions.php:737 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:45 +#: header.php:43 msgid "Page %s" msgstr "" -#: header.php:142 +#: header.php:133 msgid "Main menu" msgstr "" -#: header.php:144 +#: header.php:135 msgid "Skip to primary content" msgstr "" -#: header.php:146 +#: header.php:137 msgid "Skip to secondary content" msgstr "" -#: image.php:21 +#: image.php:18 msgid "Image navigation" msgstr "" -#: image.php:22 +#: image.php:19 msgid "← Previous" msgstr "" -#: image.php:23 +#: image.php:20 msgid "Next →" msgstr "" -#: image.php:34 +#: image.php:30 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:560 +#: inc/theme-options.php:56 inc/theme-options.php:542 msgid "Color Scheme" msgstr "" -#: inc/theme-options.php:62 inc/theme-options.php:582 +#: inc/theme-options.php:62 inc/theme-options.php:559 msgid "Link Color" msgstr "" @@ -428,107 +452,107 @@ msgstr "" msgid "Theme Options" msgstr "" -#: inc/theme-options.php:112 +#: inc/theme-options.php:111 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:114 +#: inc/theme-options.php:113 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:115 +#: inc/theme-options.php:114 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:116 +#: inc/theme-options.php:115 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:118 +#: inc/theme-options.php:117 msgid "Remember to click \"Save Changes\" to save any changes you have made to the theme options." msgstr "" -#: inc/theme-options.php:120 +#: inc/theme-options.php:119 msgid "For more information:" msgstr "" -#: inc/theme-options.php:121 +#: inc/theme-options.php:120 msgid "<a href=\"https://codex.wordpress.org/Appearance_Theme_Options_Screen\" target=\"_blank\">Documentation on Theme Options</a>" msgstr "" -#: inc/theme-options.php:122 +#: inc/theme-options.php:121 msgid "<a href=\"https://wordpress.org/support/\" target=\"_blank\">Support Forums</a>" msgstr "" -#: inc/theme-options.php:130 +#: inc/theme-options.php:128 msgid "Overview" msgstr "" -#: inc/theme-options.php:152 +#: inc/theme-options.php:150 msgid "Light" msgstr "" -#: inc/theme-options.php:158 +#: inc/theme-options.php:156 msgid "Dark" msgstr "" -#: inc/theme-options.php:183 +#: inc/theme-options.php:181 msgid "Content on left" msgstr "" -#: inc/theme-options.php:188 +#: inc/theme-options.php:186 msgid "Content on right" msgstr "" -#: inc/theme-options.php:193 +#: inc/theme-options.php:191 msgid "One-column, no sidebar" msgstr "" -#: inc/theme-options.php:302 +#: inc/theme-options.php:298 msgid "Select a Color" msgstr "" -#: inc/theme-options.php:305 +#: inc/theme-options.php:301 msgid "Default color: %s" msgstr "" -#: inc/theme-options.php:341 +#: inc/theme-options.php:337 msgid "%s Theme Options" msgstr "" -#: inc/theme-options.php:592 +#: inc/theme-options.php:566 msgid "Layout" msgstr "" -#: inc/widgets.php:22 +#: inc/widgets.php:21 msgid "Twenty Eleven Ephemera" msgstr "" -#: inc/widgets.php:24 +#: inc/widgets.php:23 msgid "Use this widget to list your recent Aside, Status, Quote, and Link posts" msgstr "" -#: inc/widgets.php:72 +#: inc/widgets.php:68 msgid "Ephemera" msgstr "" -#: inc/widgets.php:116 inc/widgets.php:125 +#: inc/widgets.php:107 inc/widgets.php:116 msgid "0 <span class=\"reply\">comments →</span>" msgstr "" -#: inc/widgets.php:116 inc/widgets.php:125 +#: inc/widgets.php:107 inc/widgets.php:116 msgid "1 <span class=\"reply\">comment →</span>" msgstr "" -#: inc/widgets.php:116 inc/widgets.php:125 +#: inc/widgets.php:107 inc/widgets.php:116 msgid "% <span class=\"reply\">comments →</span>" msgstr "" -#: inc/widgets.php:192 +#: inc/widgets.php:182 msgid "Title:" msgstr "" -#: inc/widgets.php:195 +#: inc/widgets.php:185 msgid "Number of posts to show:" msgstr "" @@ -536,7 +560,7 @@ msgstr "" msgid "Search Results for: %s" msgstr "" -#: search.php:51 +#: search.php:48 msgid "Sorry, but nothing matched your search criteria. Please try again with some different keywords." msgstr "" @@ -544,15 +568,15 @@ msgstr "" msgid "Search" msgstr "" -#: showcase.php:83 +#: showcase.php:78 msgid "Featured Post" msgstr "" -#: showcase.php:160 +#: showcase.php:151 msgid "Featuring: %s" msgstr "" -#: showcase.php:170 +#: showcase.php:161 msgid "Recent Posts" msgstr "" @@ -564,15 +588,15 @@ msgstr "" msgid "Meta" msgstr "" -#: single.php:22 +#: single.php:19 msgid "<span class=\"meta-nav\">←</span> Previous" msgstr "" -#: single.php:23 +#: single.php:20 msgid "Next <span class=\"meta-nav\">→</span>" msgstr "" -#: tag.php:20 +#: tag.php:19 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 166823479b2aea7607cc0e83ee94b8c36a982abd..349810704a5fa68b52a17e1bd4bf2cea87a0b6ad 100644 --- a/wp-content/themes/twentyeleven/page.php +++ b/wp-content/themes/twentyeleven/page.php @@ -17,10 +17,7 @@ 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' ); ?> @@ -31,4 +28,4 @@ get_header(); ?> </div><!-- #content --> </div><!-- #primary --> -<?php get_footer(); ?> +<?php get_footer(); ?> \ No newline at end of file diff --git a/wp-content/themes/twentyeleven/readme.txt b/wp-content/themes/twentyeleven/readme.txt index 55cd145594a3abbdf77d91d0abfc32a9e55db3c1..70929c5ed052c210cac260304c5a6c7c49186d85 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.8 +Stable tag: 2.9 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 @@ -43,6 +43,11 @@ Source: https://github.com/aFarkas/html5shiv == Changelog == += 2.9 = +* Released: December 6, 2018 + +https://codex.wordpress.org/Twenty_Eleven_Theme_Changelog#Version_2.9 + = 2.8 = * Released: May 17, 2018 diff --git a/wp-content/themes/twentyeleven/search.php b/wp-content/themes/twentyeleven/search.php index 81188fadf75adbcbdc02e210e0059ee63ad89720..0da1e4e57c51c2de7fb2cad683fb6a3ccf69c2c1 100644 --- a/wp-content/themes/twentyeleven/search.php +++ b/wp-content/themes/twentyeleven/search.php @@ -21,10 +21,7 @@ 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 /* @@ -59,4 +56,4 @@ get_header(); ?> </section><!-- #primary --> <?php get_sidebar(); ?> -<?php get_footer(); ?> +<?php get_footer(); ?> \ No newline at end of file diff --git a/wp-content/themes/twentyeleven/showcase.php b/wp-content/themes/twentyeleven/showcase.php index f869871b790f5345c11bbb34d3b8964af6a6f562..bc9e4c9ac950226797972edf9b1dca1d3edce61f 100644 --- a/wp-content/themes/twentyeleven/showcase.php +++ b/wp-content/themes/twentyeleven/showcase.php @@ -23,19 +23,15 @@ 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; ?> @@ -50,13 +46,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. @@ -65,35 +61,33 @@ 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() ) { @@ -113,57 +107,54 @@ 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; + // Reset the counter so that we end up with matching elements + $counter_slider = 0; - // 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; ?> + // 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"> @@ -173,13 +164,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', ), ), @@ -190,8 +181,7 @@ 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; @@ -204,9 +194,7 @@ 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> @@ -219,9 +207,8 @@ 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 --> @@ -229,12 +216,7 @@ 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 ?> @@ -243,4 +225,4 @@ get_header(); ?> </div><!-- #content --> </div><!-- #primary --> -<?php get_footer(); ?> +<?php get_footer(); ?> \ No newline at end of file diff --git a/wp-content/themes/twentyeleven/sidebar-footer.php b/wp-content/themes/twentyeleven/sidebar-footer.php index d7f0a00f8facb15fdcaee7ffc2a3883d2fdbada4..659469e659677b2fd7770b2009dbf655317640fb 100644 --- a/wp-content/themes/twentyeleven/sidebar-footer.php +++ b/wp-content/themes/twentyeleven/sidebar-footer.php @@ -15,12 +15,11 @@ * * 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(); ?>> @@ -41,4 +40,4 @@ if ( ! is_active_sidebar( 'sidebar-3' ) <?php dynamic_sidebar( 'sidebar-5' ); ?> </div><!-- #third .widget-area --> <?php endif; ?> -</div><!-- #supplementary --> +</div><!-- #supplementary --> \ No newline at end of file diff --git a/wp-content/themes/twentyeleven/sidebar-page.php b/wp-content/themes/twentyeleven/sidebar-page.php index 032bc06021eee5aceb9614fa9381e3ba268c4f99..6fc3b86fed78720cff970bd6b25f6ca27b57f045 100644 --- a/wp-content/themes/twentyeleven/sidebar-page.php +++ b/wp-content/themes/twentyeleven/sidebar-page.php @@ -14,10 +14,7 @@ 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' ); ?> @@ -29,4 +26,4 @@ get_header(); ?> </div><!-- #primary --> <?php get_sidebar(); ?> -<?php get_footer(); ?> +<?php get_footer(); ?> \ No newline at end of file diff --git a/wp-content/themes/twentyeleven/sidebar.php b/wp-content/themes/twentyeleven/sidebar.php index fb53e58b92df2355c4ee430d43aeba1235733003..c9afedcdfc412d4d78f54d22a3b9de6fc81d9445 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; ?> +<?php endif; ?> \ No newline at end of file diff --git a/wp-content/themes/twentyeleven/single.php b/wp-content/themes/twentyeleven/single.php index 0250e943f9d7b0504cdd4df7e3c3921c6f0fd864..861c50c43976264d1207ffc510966abc0ce9c1a8 100644 --- a/wp-content/themes/twentyeleven/single.php +++ b/wp-content/themes/twentyeleven/single.php @@ -12,10 +12,7 @@ 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> @@ -32,4 +29,4 @@ get_header(); ?> </div><!-- #content --> </div><!-- #primary --> -<?php get_footer(); ?> +<?php get_footer(); ?> \ No newline at end of file diff --git a/wp-content/themes/twentyeleven/style.css b/wp-content/themes/twentyeleven/style.css index b4ff98f48c9adc591e0e9177ed78b34608df726e..122d7c223a282e8e6d8a433faa9165d5daada1f7 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.8 +Version: 2.9 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 diff --git a/wp-content/themes/twentyeleven/tag.php b/wp-content/themes/twentyeleven/tag.php index 84bc48e9bc54f9e5af62b98609e82720492ea7aa..7c2fdf80b2ac10eff08fdb588064b580ef327168 100644 --- a/wp-content/themes/twentyeleven/tag.php +++ b/wp-content/themes/twentyeleven/tag.php @@ -15,34 +15,29 @@ 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 /*