summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'themes/twentyfifteen')
-rw-r--r--themes/twentyfifteen/archive.php19
-rw-r--r--themes/twentyfifteen/comments.php50
-rw-r--r--themes/twentyfifteen/content-link.php36
-rw-r--r--themes/twentyfifteen/content-page.php18
-rw-r--r--themes/twentyfifteen/content.php36
-rw-r--r--themes/twentyfifteen/css/blocks.css650
-rw-r--r--themes/twentyfifteen/css/editor-blocks.css866
-rw-r--r--themes/twentyfifteen/functions.php460
-rw-r--r--themes/twentyfifteen/header.php12
-rw-r--r--themes/twentyfifteen/image.php77
-rw-r--r--themes/twentyfifteen/inc/back-compat.php8
-rw-r--r--themes/twentyfifteen/inc/custom-header.php70
-rw-r--r--themes/twentyfifteen/inc/customizer.php358
-rw-r--r--themes/twentyfifteen/inc/template-tags.php319
-rw-r--r--themes/twentyfifteen/index.php19
-rw-r--r--themes/twentyfifteen/js/functions.js3
-rw-r--r--themes/twentyfifteen/page.php5
-rw-r--r--themes/twentyfifteen/readme.txt14
-rw-r--r--themes/twentyfifteen/search.php22
-rw-r--r--themes/twentyfifteen/sidebar.php26
-rw-r--r--themes/twentyfifteen/single.php25
-rw-r--r--themes/twentyfifteen/style.css2
22 files changed, 2298 insertions, 797 deletions
diff --git a/themes/twentyfifteen/archive.php b/themes/twentyfifteen/archive.php
index 7d100c50..bb6021e3 100644
--- a/themes/twentyfifteen/archive.php
+++ b/themes/twentyfifteen/archive.php
@@ -32,8 +32,7 @@ get_header(); ?>
<?php
// Start the Loop.
- while ( have_posts() ) :
- the_post();
+ while ( have_posts() ) : the_post();
/*
* Include the Post-Format-specific template for the content.
@@ -42,19 +41,17 @@ get_header(); ?>
*/
get_template_part( 'content', get_post_format() );
- // End the loop.
+ // End the loop.
endwhile;
// Previous/next page navigation.
- the_posts_pagination(
- array(
- 'prev_text' => __( 'Previous page', 'twentyfifteen' ),
- 'next_text' => __( 'Next page', 'twentyfifteen' ),
- 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>',
- )
- );
+ the_posts_pagination( array(
+ 'prev_text' => __( 'Previous page', 'twentyfifteen' ),
+ 'next_text' => __( 'Next page', 'twentyfifteen' ),
+ 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>',
+ ) );
- // If no content, include the "No posts found" template.
+ // If no content, include the "No posts found" template.
else :
get_template_part( 'content', 'none' );
diff --git a/themes/twentyfifteen/comments.php b/themes/twentyfifteen/comments.php
index 1c1b5a49..6b97ec39 100644
--- a/themes/twentyfifteen/comments.php
+++ b/themes/twentyfifteen/comments.php
@@ -26,23 +26,23 @@ if ( post_password_required() ) {
<h2 class="comments-title">
<?php
$comments_number = get_comments_number();
- if ( '1' === $comments_number ) {
- /* translators: %s: post title */
- printf( _x( 'One thought on &ldquo;%s&rdquo;', 'comments title', 'twentyfifteen' ), get_the_title() );
- } else {
- printf(
- /* translators: 1: number of comments, 2: post title */
- _nx(
- '%1$s thought on &ldquo;%2$s&rdquo;',
- '%1$s thoughts on &ldquo;%2$s&rdquo;',
- $comments_number,
- 'comments title',
- 'twentyfifteen'
- ),
- number_format_i18n( $comments_number ),
- get_the_title()
- );
- }
+ if ( '1' === $comments_number ) {
+ /* translators: %s: post title */
+ printf( _x( 'One thought on &ldquo;%s&rdquo;', 'comments title', 'twentyfifteen' ), get_the_title() );
+ } else {
+ printf(
+ /* translators: 1: number of comments, 2: post title */
+ _nx(
+ '%1$s thought on &ldquo;%2$s&rdquo;',
+ '%1$s thoughts on &ldquo;%2$s&rdquo;',
+ $comments_number,
+ 'comments title',
+ 'twentyfifteen'
+ ),
+ number_format_i18n( $comments_number ),
+ get_the_title()
+ );
+ }
?>
</h2>
@@ -50,13 +50,11 @@ if ( post_password_required() ) {
<ol class="comment-list">
<?php
- wp_list_comments(
- array(
- 'style' => 'ol',
- 'short_ping' => true,
- 'avatar_size' => 56,
- )
- );
+ wp_list_comments( array(
+ 'style' => 'ol',
+ 'short_ping' => true,
+ 'avatar_size' => 56,
+ ) );
?>
</ol><!-- .comment-list -->
@@ -66,9 +64,9 @@ if ( post_password_required() ) {
<?php
// If comments are closed and there are comments, let's leave a little note, shall we?
- if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
+ if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
?>
- <p class="no-comments"><?php _e( 'Comments are closed.', 'twentyfifteen' ); ?></p>
+ <p class="no-comments"><?php _e( 'Comments are closed.', 'twentyfifteen' ); ?></p>
<?php endif; ?>
<?php comment_form(); ?>
diff --git a/themes/twentyfifteen/content-link.php b/themes/twentyfifteen/content-link.php
index 17aaf780..2beb1f78 100644
--- a/themes/twentyfifteen/content-link.php
+++ b/themes/twentyfifteen/content-link.php
@@ -15,8 +15,8 @@
<header class="entry-header">
<?php
- if ( is_single() ) :
- the_title( sprintf( '<h1 class="entry-title"><a href="%s">', esc_url( twentyfifteen_get_link_url() ) ), '</a></h1>' );
+ if ( is_single() ) :
+ the_title( sprintf( '<h1 class="entry-title"><a href="%s">', esc_url( twentyfifteen_get_link_url() ) ), '</a></h1>' );
else :
the_title( sprintf( '<h2 class="entry-title"><a href="%s">', esc_url( twentyfifteen_get_link_url() ) ), '</a></h2>' );
endif;
@@ -27,31 +27,27 @@
<div class="entry-content">
<?php
/* translators: %s: Name of current post */
- the_content(
- sprintf(
- __( 'Continue reading %s', 'twentyfifteen' ),
- the_title( '<span class="screen-reader-text">', '</span>', false )
- )
- );
+ the_content( sprintf(
+ __( 'Continue reading %s', 'twentyfifteen' ),
+ the_title( '<span class="screen-reader-text">', '</span>', false )
+ ) );
- wp_link_pages(
- array(
- 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfifteen' ) . '</span>',
- 'after' => '</div>',
- 'link_before' => '<span>',
- 'link_after' => '</span>',
- 'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>%',
- 'separator' => '<span class="screen-reader-text">, </span>',
- )
- );
+ wp_link_pages( array(
+ 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfifteen' ) . '</span>',
+ 'after' => '</div>',
+ 'link_before' => '<span>',
+ 'link_after' => '</span>',
+ 'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>%',
+ 'separator' => '<span class="screen-reader-text">, </span>',
+ ) );
?>
</div>
<!-- .entry-content -->
<?php
// Author bio.
- if ( is_single() && get_the_author_meta( 'description' ) ) :
- get_template_part( 'author-bio' );
+ if ( is_single() && get_the_author_meta( 'description' ) ) :
+ get_template_part( 'author-bio' );
endif;
?>
diff --git a/themes/twentyfifteen/content-page.php b/themes/twentyfifteen/content-page.php
index 225eaff3..7d37daa7 100644
--- a/themes/twentyfifteen/content-page.php
+++ b/themes/twentyfifteen/content-page.php
@@ -21,16 +21,14 @@
<div class="entry-content">
<?php the_content(); ?>
<?php
- wp_link_pages(
- array(
- 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfifteen' ) . '</span>',
- 'after' => '</div>',
- 'link_before' => '<span>',
- 'link_after' => '</span>',
- 'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>%',
- 'separator' => '<span class="screen-reader-text">, </span>',
- )
- );
+ wp_link_pages( array(
+ 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfifteen' ) . '</span>',
+ 'after' => '</div>',
+ 'link_before' => '<span>',
+ 'link_after' => '</span>',
+ 'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>%',
+ 'separator' => '<span class="screen-reader-text">, </span>',
+ ) );
?>
</div><!-- .entry-content -->
diff --git a/themes/twentyfifteen/content.php b/themes/twentyfifteen/content.php
index 5ad15805..24756007 100644
--- a/themes/twentyfifteen/content.php
+++ b/themes/twentyfifteen/content.php
@@ -18,8 +18,8 @@
<header class="entry-header">
<?php
- if ( is_single() ) :
- the_title( '<h1 class="entry-title">', '</h1>' );
+ if ( is_single() ) :
+ the_title( '<h1 class="entry-title">', '</h1>' );
else :
the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' );
endif;
@@ -29,30 +29,26 @@
<div class="entry-content">
<?php
/* translators: %s: Name of current post */
- the_content(
- sprintf(
- __( 'Continue reading %s', 'twentyfifteen' ),
- the_title( '<span class="screen-reader-text">', '</span>', false )
- )
- );
+ the_content( sprintf(
+ __( 'Continue reading %s', 'twentyfifteen' ),
+ the_title( '<span class="screen-reader-text">', '</span>', false )
+ ) );
- wp_link_pages(
- array(
- 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfifteen' ) . '</span>',
- 'after' => '</div>',
- 'link_before' => '<span>',
- 'link_after' => '</span>',
- 'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>%',
- 'separator' => '<span class="screen-reader-text">, </span>',
- )
- );
+ wp_link_pages( array(
+ 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfifteen' ) . '</span>',
+ 'after' => '</div>',
+ 'link_before' => '<span>',
+ 'link_after' => '</span>',
+ 'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>%',
+ 'separator' => '<span class="screen-reader-text">, </span>',
+ ) );
?>
</div><!-- .entry-content -->
<?php
// Author bio.
- if ( is_single() && get_the_author_meta( 'description' ) ) :
- get_template_part( 'author-bio' );
+ if ( is_single() && get_the_author_meta( 'description' ) ) :
+ get_template_part( 'author-bio' );
endif;
?>
diff --git a/themes/twentyfifteen/css/blocks.css b/themes/twentyfifteen/css/blocks.css
new file mode 100644
index 00000000..82563902
--- /dev/null
+++ b/themes/twentyfifteen/css/blocks.css
@@ -0,0 +1,650 @@
+/*
+Theme Name: Twenty Fifteen
+Description: Used to style 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
+--------------------------------------------------------------*/
+
+/* Captions */
+
+[class^="wp-block-"] figcaption {
+ color: #707070;
+ font-family: "Noto Sans", sans-serif;
+ font-size: 12px;
+ line-height: 1.5;
+ margin-bottom: 0;
+ padding: 0.5em 0;
+}
+
+@media screen and (min-width: 46.25em) {
+ [class^="wp-block-"] figcaption {
+ font-size: 14px;
+ }
+}
+
+@media screen and (min-width: 55em) {
+ [class^="wp-block-"] figcaption {
+ font-size: 16px;
+ }
+}
+
+@media screen and (min-width: 59.6875em) {
+ [class^="wp-block-"] figcaption {
+ font-size: 12px;
+ }
+}
+
+@media screen and (min-width: 68.75em) {
+ [class^="wp-block-"] figcaption {
+ font-size: 14px;
+ }
+}
+
+@media screen and (min-width: 77.5em) {
+ [class^="wp-block-"] figcaption {
+ font-size: 16px;
+ }
+}
+
+/* Alignments */
+
+[class^="wp-block-"].alignleft,
+[class^="wp-block-"] .alignleft {
+ margin-right: 1em;
+}
+
+[class^="wp-block-"].alignright,
+[class^="wp-block-"] .alignright {
+ margin-left: 1em;
+}
+
+
+/*--------------------------------------------------------------
+2.0 Blocks - Common Blocks
+--------------------------------------------------------------*/
+
+/* Paragraph */
+
+p.has-drop-cap:not(:focus)::first-letter {
+ font-size: 5em;
+}
+
+/* Gallery */
+
+.wp-block-gallery {
+ margin-bottom: 1.6em;
+}
+
+/* Audio */
+
+.wp-block-audio audio {
+ display: block;
+ width: 100%;
+}
+
+/* Cover */
+
+.wp-block-cover-image .wp-block-cover-image-text,
+.wp-block-cover .wp-block-cover-text,
+.wp-block-cover-image h2,
+.wp-block-cover h2 {
+ font-size: 29px;
+ line-height: 1.2069;
+}
+
+/* Quote */
+
+.wp-block-quote,
+.wp-block-quote:not(.is-large):not(.is-style-large),
+[class^="wp-block-"] blockquote {
+ border-color: #707070;
+}
+
+.wp-block-quote cite,
+.wp-block-quote__citation {
+ color: #333;
+ font-family: "Noto Sans", sans-serif;
+ font-size: 15px;
+ font-style: normal;
+ line-height: 1.6;
+ text-transform: none;
+}
+
+.wp-block-quote em,
+.wp-block-quote i {
+ font-style: normal;
+}
+
+.wp-block-quote strong,
+.wp-block-quote b {
+ font-weight: 400;
+}
+
+
+@media screen and (min-width: 46.25em) {
+ .edit-post-visual-editor .wp-block-quote p {
+ font-size: 20px;
+ line-height: 1.75;
+ }
+
+ .wp-block-quote cite,
+ .wp-block-quote__citation {
+ font-size: 17px;
+ line-height: 1.6471;
+ }
+}
+
+@media screen and (min-width: 55em) {
+ .edit-post-visual-editor .wp-block-quote p {
+ font-size: 22px;
+ line-height: 1.8182;
+ }
+
+ .wp-block-quote cite,
+ .wp-block-quote__citation {
+ font-size: 19px;
+ line-height: 1.6842;
+ }
+}
+
+@media screen and (min-width: 59.6875em) {
+ .edit-post-visual-editor .wp-block-quote p {
+ font-size: 18px;
+ line-height: 1.6667;
+ }
+
+ .wp-block-quote cite,
+ .wp-block-quote__citation {
+ font-size: 15px;
+ line-height: 1.6;
+ }
+}
+
+@media screen and (min-width: 68.75em) {
+ .edit-post-visual-editor .wp-block-quote p {
+ font-size: 20px;
+ line-height: 1.75;
+ }
+
+ .wp-block-quote cite,
+ .wp-block-quote__citation {
+ font-size: 17px;
+ line-height: 1.6471;
+ }
+}
+
+@media screen and (min-width: 77.5em) {
+ .edit-post-visual-editor .wp-block-quote p {
+ font-size: 22px;
+ line-height: 1.8182;
+ }
+
+ .wp-block-quote cite,
+ .wp-block-quote__citation {
+ font-size: 19px;
+ line-height: 1.6842;
+ }
+}
+
+/* Cover Image */
+
+.wp-block-cover-image.aligncenter,
+.wp-block-cover.aligncenter,
+.wp-block-cover-image.alignleft,
+.wp-block-cover.alignleft,
+.wp-block-cover-image.alignright,
+.wp-block-cover.alignright {
+ display: flex;
+}
+
+/* File */
+
+.wp-block-file a.wp-block-file__button {
+ background-color: #333;
+ border: 0;
+ border-radius: 0;
+ color: #fff;
+ cursor: pointer;
+ font-family: "Noto Sans", sans-serif;
+ font-size: 12px;
+ font-weight: 700;
+ line-height: 1.5;
+ padding: 0.7917em 1.5em;
+ text-transform: uppercase;
+ vertical-align: baseline;
+}
+
+.wp-block-file a.wp-block-file__button:hover,
+.wp-block-file a.wp-block-file__button:focus {
+ background-color: #707070;
+ background-color: rgba(51, 51, 51, 0.7);
+ outline: 0;
+}
+
+.rtl .wp-block-file * + .wp-block-file__button {
+ margin-left: 0.75em;
+ margin-right: 0;
+}
+
+@media screen and (min-width: 46.25em) {
+ .wp-block-file a.wp-block-file__button {
+ font-size: 14px;
+ font-size: 1.4rem;
+ padding: 0.8214em 1.6429em;
+ }
+}
+
+@media screen and (min-width: 55em) {
+ .wp-block-file a.wp-block-file__button {
+ font-size: 16px;
+ font-size: 1.6rem;
+ padding: 0.8125em 1.625em;
+ }
+}
+
+@media screen and (min-width: 59.6875em) {
+ .wp-block-file a.wp-block-file__button {
+ font-size: 12px;
+ font-size: 1.2rem;
+ padding: 0.7917em 1.5833em;
+ }
+}
+
+@media screen and (min-width: 68.75em) {
+ .wp-block-file a.wp-block-file__button {
+ font-size: 14px;
+ font-size: 1.4rem;
+ padding: 0.8214em 1.5714em;
+ }
+}
+
+@media screen and (min-width: 77.5em) {
+ .wp-block-file a.wp-block-file__button {
+ font-size: 16px;
+ font-size: 1.6rem;
+ padding: 0.8125em 1.625em;
+ }
+}
+
+/*--------------------------------------------------------------
+3.0 Blocks - Formatting
+--------------------------------------------------------------*/
+
+/* Code */
+
+.wp-block-code {
+ background-color: transparent;
+ border: 0;
+ padding: 0;
+}
+
+.wp-block-code code {
+ font-family: Inconsolata, monospace;
+ font-size: inherit;
+}
+
+/* Preformatted */
+
+.wp-block-preformatted {
+ background-color: rgba(0, 0, 0, 0.01);
+ border: 1px solid #eaeaea;
+ line-height: 1.2;
+ margin-bottom: 1.6em;
+ max-width: 100%;
+ overflow: auto;
+ padding: 0.8em;
+ white-space: pre;
+ white-space: pre-wrap;
+ word-wrap: break-word;
+}
+
+/* Pullquote */
+
+.wp-block-pullquote {
+ border: 0;
+}
+
+.wp-block-pullquote blockquote {
+ border: 0;
+ margin-left: 0;
+ margin-right: 0;
+ padding-left: 0;
+ padding-right: 0;
+}
+
+.wp-block-pullquote cite {
+ color: #333;
+ font-family: "Noto Sans", sans-serif;
+ font-size: 15px;
+ font-style: normal;
+ line-height: 1.6;
+ text-transform: none;
+}
+
+@media screen and (min-width: 46.25em) {
+ .wp-block-pullquote cite {
+ font-size: 17px;
+ line-height: 1.6471;
+ }
+}
+
+@media screen and (min-width: 55em) {
+ .wp-block-pullquote cite {
+ font-size: 19px;
+ line-height: 1.6842;
+ }
+}
+
+@media screen and (min-width: 59.6875em) {
+ .wp-block-pullquote cite {
+ font-size: 15px;
+ line-height: 1.6;
+ }
+}
+
+@media screen and (min-width: 68.75em) {
+ .wp-block-pullquote cite {
+ font-size: 17px;
+ line-height: 1.6471;
+ }
+}
+
+@media screen and (min-width: 77.5em) {
+ .wp-block-pullquote cite {
+ font-size: 19px;
+ line-height: 1.6842;
+ }
+}
+
+/* Table */
+
+.wp-block-table th,
+.wp-block-table td {
+ border-color: #eaeaea;
+ border-width: 0 1px 1px 0;
+}
+
+/*--------------------------------------------------------------
+4.0 Blocks - Layout Elements
+--------------------------------------------------------------*/
+
+/* Button */
+
+.wp-block-button .wp-block-button__link {
+ border: 0;
+ border-radius: 0;
+ cursor: pointer;
+ font-family: "Noto Sans", sans-serif;
+ font-size: 12px;
+ font-size: 1.2rem;
+ font-weight: 700;
+ line-height: 1.5;
+ padding: 0.7917em 1.5em;
+ text-transform: uppercase;
+ vertical-align: baseline;
+}
+
+.wp-block-button__link {
+ background-color: #333;
+ color: #fff;
+}
+
+.wp-block-button__link:hover,
+.wp-block-button__link:focus {
+ background-color: #707070;
+ background-color: rgba(51, 51, 51, 0.7);
+ color: #fff;
+}
+
+@media screen and (min-width: 46.25em) {
+ .wp-block-button .wp-block-button__link {
+ font-size: 14px;
+ font-size: 1.4rem;
+ padding: 0.8214em 1.6429em;
+ }
+}
+
+@media screen and (min-width: 55em) {
+ .wp-block-button .wp-block-button__link {
+ font-size: 16px;
+ font-size: 1.6rem;
+ padding: 0.8125em 1.625em;
+ }
+}
+
+@media screen and (min-width: 59.6875em) {
+ .wp-block-button .wp-block-button__link {
+ font-size: 12px;
+ font-size: 1.2rem;
+ padding: 0.7917em 1.5833em;
+ }
+}
+
+@media screen and (min-width: 68.75em) {
+ .wp-block-button .wp-block-button__link {
+ font-size: 14px;
+ font-size: 1.4rem;
+ padding: 0.8214em 1.5714em;
+ }
+}
+
+@media screen and (min-width: 77.5em) {
+ .wp-block-button .wp-block-button__link {
+ font-size: 16px;
+ font-size: 1.6rem;
+ padding: 0.8125em 1.625em;
+ }
+}
+
+/* Seperators */
+
+.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.6em;
+}
+
+.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;
+ text-align: center;
+}
+
+/* Latest Comments */
+
+.wp-block-latest-comments {
+ margin: 0;
+}
+
+.wp-block-latest-comments__comment,
+.wp-block-latest-comments__comment-excerpt,
+.wp-block-latest-comments__comment-excerpt p {
+ font-size: inherit;
+}
+
+.wp-block-latest-comments__comment-meta a {
+ border-bottom-color: transparent;
+ font-weight: 700;
+}
+
+.wp-block-latest-comments__comment-excerpt p:last-child {
+ margin-bottom: 0;
+}
+
+.wp-block-latest-comments__comment-date {
+ color: #707070;
+ font-family: "Noto Sans", sans-serif;
+ font-size: 12px;
+ line-height: 1.5;
+ margin-bottom: 1.6em;
+}
+
+@media screen and (min-width: 46.25em) {
+ .wp-block-latest-comments__comment-date {
+ font-size: 14px;
+ }
+}
+
+@media screen and (min-width: 55em) {
+ .wp-block-latest-comments__comment-date {
+ font-size: 16px;
+ }
+}
+
+@media screen and (min-width: 59.6875em) {
+ .wp-block-latest-comments__comment-date {
+ font-size: 12px;
+ }
+}
+
+@media screen and (min-width: 68.75em) {
+ .wp-block-latest-comments__comment-date {
+ font-size: 14px;
+ }
+}
+
+@media screen and (min-width: 77.5em) {
+ .wp-block-latest-comments__comment-date {
+ font-size: 16px;
+ }
+}
+
+.wp-block-latest-comments .wp-block-latest-comments__comment {
+ border-top: 1px solid #eaeaea;
+ border-top: 1px solid rgba(51, 51, 51, 0.1);
+ margin-bottom: 0;
+ padding: 1.6em 0;
+}
+
+/*--------------------------------------------------------------
+6.0 Blocks - Colors
+--------------------------------------------------------------*/
+
+.has-dark-gray-color {
+ color: #111;
+}
+
+.has-dark-gray-background-color {
+ background-color: #111;
+}
+
+.has-light-gray-color {
+ color: #f1f1f1;
+}
+
+.has-light-gray-background-color {
+ background-color: #f1f1f1;
+}
+
+.has-white-color {
+ color: #fff;
+}
+
+.has-white-background-color {
+ background-color: #fff;
+}
+
+.has-yellow-color {
+ color: #f4ca16;
+}
+
+.has-yellow-background-color {
+ background-color: #f4ca16;
+}
+
+.has-dark-brown-color {
+ color: #352712;
+}
+
+.has-dark-brown-background-color {
+ background-color: #352712;
+}
+
+.has-medium-pink-color {
+ color: #e53b51;
+}
+
+.has-medium-pink-background-color {
+ background-color: #e53b51;
+}
+
+.has-light-pink-color {
+ color: #ffe5d1;
+}
+
+.has-light-pink-background-color {
+ background-color: #ffe5d1;
+}
+
+.has-dark-purple-color {
+ color: #2e2256;
+}
+
+.has-dark-purple-background-color {
+ background-color: #2e2256;
+}
+
+.has-purple-color {
+ color: #674970;
+}
+
+.has-purple-background-color {
+ background-color: #674970;
+}
+
+.has-blue-gray-color {
+ color: #22313f;
+}
+
+.has-blue-gray-background-color {
+ background-color: #22313f;
+}
+
+.has-bright-blue-color {
+ color: #55c3dc;
+}
+
+.has-bright-blue-background-color {
+ background-color: #55c3dc;
+}
+
+.has-light-blue-color {
+ color: #e9f2f9;
+}
+
+.has-light-blue-background-color {
+ background-color: #e9f2f9;
+}
diff --git a/themes/twentyfifteen/css/editor-blocks.css b/themes/twentyfifteen/css/editor-blocks.css
new file mode 100644
index 00000000..6076cab6
--- /dev/null
+++ b/themes/twentyfifteen/css/editor-blocks.css
@@ -0,0 +1,866 @@
+/*
+Theme Name: Twenty Fifteen
+Description: Used to style 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 textarea.editor-default-block-appender__content {
+ font-size: 15px;
+ line-height: 1.6;
+}
+
+.edit-post-visual-editor .editor-block-list__block {
+ color: #333;
+}
+
+.editor-post-title__block .editor-post-title__input {
+ color: #333;
+ font-size: 26px;
+ line-height: 1.1538;
+}
+
+.edit-post-visual-editor h1,
+.edit-post-visual-editor h2,
+.edit-post-visual-editor h3,
+.edit-post-visual-editor h4,
+.edit-post-visual-editor h5,
+.edit-post-visual-editor h6 {
+ clear: both;
+ font-weight: 700;
+}
+
+.edit-post-visual-editor .editor-block-list__block h1 {
+ font-size: 26px;
+ line-height: 1.1538;
+ padding: 0.9em 0 0.45em;
+}
+
+.edit-post-visual-editor .editor-block-list__block h2 {
+ font-size: 22px;
+ line-height: 1.3636;
+ padding: 1em 0 0.5em;
+}
+
+.edit-post-visual-editor .editor-block-list__block h3 {
+ font-size: 18px;
+ line-height: 1.3333;
+ padding: 1.3em 0 0.65em;
+}
+
+.edit-post-visual-editor .editor-block-list__block h4,
+.edit-post-visual-editor .editor-block-list__block h5,
+.edit-post-visual-editor .editor-block-list__block h6 {
+ font-size: 15px;
+ line-height: 1.2;
+ padding: 0.8em 0 0.4em;
+}
+
+.edit-post-visual-editor .editor-block-list__block h5,
+.edit-post-visual-editor .editor-block-list__block h6 {
+ letter-spacing: 0.1em;
+ text-transform: uppercase;
+}
+
+.edit-post-visual-editor > h1:first-child,
+.edit-post-visual-editor > h2:first-child,
+.edit-post-visual-editor > h3:first-child,
+.edit-post-visual-editor > h4:first-child,
+.edit-post-visual-editor > h5:first-child,
+.edit-post-visual-editor > h6:first-child {
+ padding-top: 0;
+}
+
+@media screen and (min-width: 46.25em) {
+ .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-size: 17px;
+ line-height: 1.6471;
+ }
+
+ .editor-post-title__block .editor-post-title__input {
+ font-size: 35px;
+ line-height: 1.2;
+ }
+
+ .edit-post-visual-editor .editor-block-list__block h1 {
+ font-size: 35px;
+ line-height: 1.2;
+ padding: 0.8em 0 0.4em;
+ }
+
+ .edit-post-visual-editor .editor-block-list__block h2 {
+ font-size: 29px;
+ line-height: 1.2069;
+ padding: 1.0em 0 0.5em;
+ }
+
+ .edit-post-visual-editor .editor-block-list__block h3 {
+ font-size: 24px;
+ line-height: 1.1667;
+ padding: 1.15em 0 0.6em;
+ }
+
+ .edit-post-visual-editor .editor-block-list__block h4 {
+ font-size: 20px;
+ line-height: 1.4;
+ padding: .7em 0 0.35em;
+ }
+
+ .edit-post-visual-editor .editor-block-list__block h5,
+ .edit-post-visual-editor .editor-block-list__block h6 {
+ font-size: 17px;
+ line-height: 1.2353;
+ padding: 0.8em 0 0.4em;
+ }
+}
+
+@media screen and (min-width: 55em) {
+ .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-size: 19px;
+ line-height: 1.6842;
+ }
+
+ .editor-post-title__block .editor-post-title__input {
+ font-size: 39px;
+ line-height: 1.2308;
+ }
+
+ .edit-post-visual-editor .editor-block-list__block h1 {
+ font-size: 39px;
+ line-height: 1.2308;
+ padding: 0.8em 0 0.4em;
+ }
+
+ .edit-post-visual-editor .editor-block-list__block h2 {
+ font-size: 32px;
+ line-height: 1.25;
+ padding: 1em 0 0.5em;
+ }
+
+ .edit-post-visual-editor .editor-block-list__block h3 {
+ font-size: 27px;
+ line-height: 1.1852;
+ padding: 1.2em 0 0.6em;
+ }
+
+ .edit-post-visual-editor .editor-block-list__block h4 {
+ font-size: 22px;
+ line-height: 1.4545;
+ padding: 0.75em 0 0.35em;
+ }
+
+ .edit-post-visual-editor .editor-block-list__block h5,
+ .edit-post-visual-editor .editor-block-list__block h6 {
+ font-size: 19px;
+ line-height: 1.2632;
+ padding: 0.8em 0 0.4em;
+ }
+}
+
+@media screen and (min-width: 59.6875em) {
+ .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-size: 15px;
+ line-height: 1.6;
+ }
+
+ .editor-post-title__block .editor-post-title__input {
+ font-size: 31px;
+ line-height: 1.1613;
+ }
+
+ .edit-post-visual-editor .editor-block-list__block h1 {
+ font-size: 31px;
+ line-height: 1.1613;
+ padding: 0.8em 0 0.4em;
+ }
+
+ .edit-post-visual-editor .editor-block-list__block h2 {
+ font-size: 26px;
+ line-height: 1.3846;
+ padding: 0.9em 0 0.45em;
+ }
+
+ .edit-post-visual-editor .editor-block-list__block h3 {
+ font-size: 22px;
+ line-height: 1.3636;
+ padding: 1.1em 0 0.55em;
+ }
+
+ .edit-post-visual-editor .editor-block-list__block h4 {
+ font-size: 18px;
+ line-height: 1.3333;
+ padding: 0.65em 0 0.3em;
+ }
+
+ .edit-post-visual-editor .editor-block-list__block h5,
+ .edit-post-visual-editor .editor-block-list__block h6 {
+ font-size: 15px;
+ line-height: 1.2;
+ padding: 0.8em 0 0.4em;
+ }
+}
+
+@media screen and (min-width: 68.75em) {
+ .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-size: 17px;
+ line-height: 1.6471;
+ }
+
+ .editor-post-title__block .editor-post-title__input {
+ font-size: 35px;
+ line-height: 1.2;
+ }
+
+ .edit-post-visual-editor .editor-block-list__block h1 {
+ font-size: 35px;
+ line-height: 1.2;
+ padding: 0.8em 0 0.4em;
+ }
+
+ .edit-post-visual-editor .editor-block-list__block h2 {
+ font-size: 29px;
+ line-height: 1.2069;
+ padding: 1.0em 0 0.5em;
+ }
+
+ .edit-post-visual-editor .editor-block-list__block h3 {
+ font-size: 24px;
+ line-height: 1.1667;
+ padding: 1.2em 0 0.6em;
+ }
+
+ .edit-post-visual-editor .editor-block-list__block h4 {
+ font-size: 20px;
+ line-height: 1.4;
+ padding: 0.7em 0 0.35em;
+ }
+
+ .edit-post-visual-editor .editor-block-list__block h5,
+ .edit-post-visual-editor .editor-block-list__block h6 {
+ font-size: 17px;
+ line-height: 1.2353;
+ padding: 0.8em 0 0.4em;
+ }
+}
+
+@media screen and (min-width: 77.5em) {
+ .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-size: 19px;
+ line-height: 1.6842;
+ }
+
+ .editor-post-title__block .editor-post-title__input {
+ font-size: 39px;
+ line-height: 1.2308;
+ }
+
+ .edit-post-visual-editor .editor-block-list__block h3 {
+ font-size: 27px;
+ line-height: 1.1852;
+ padding: 1.2em 0 0.6em;
+ }
+
+ .edit-post-visual-editor .editor-block-list__block h4 {
+ font-size: 22px;
+ line-height: 1.4545;
+ padding: 0.75em 0 0.35em;
+ }
+
+ .edit-post-visual-editor .editor-block-list__block h5,
+ .edit-post-visual-editor .editor-block-list__block h6 {
+ font-size: 19px;
+ line-height: 1.2632;
+ padding: 0.85em 0 0.45em;
+ }
+}
+
+/*--------------------------------------------------------------
+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: 690px; /* 660px + 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 {
+ border-bottom: 1px solid #333;
+ color: #333;
+ text-decoration: none;
+}
+
+/* List styles */
+
+.edit-post-visual-editor ul:not(.wp-block-gallery),
+.editor-block-list__block ul:not(.wp-block-gallery),
+.block-library-list ul,
+.edit-post-visual-editor ol,
+.editor-block-list__block ol,
+.block-library-list ol {
+ margin: 0 0 1.6em 1.3333em;
+ padding: 0;
+}
+
+.block-library-list .editor-rich-text__tinymce {
+ padding: 0;
+}
+
+.edit-post-visual-editor ul:not(.wp-block-gallery),
+.editor-block-list__block ul:not(.wp-block-gallery),
+.block-library-list ul {
+ list-style: disc;
+}
+
+.edit-post-visual-editor ol,
+.editor-block-list__block ol,
+.block-library-list ol {
+ list-style: decimal;
+}
+
+.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 li > ul,
+.edit-post-visual-editor li > ol,
+.editor-block-list__block li > ol,
+.block-library-list li > ol {
+ margin-bottom: 0;
+}
+
+.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;
+}
+
+/* Quote */
+
+.rtl .editor-block-list__block blockquote {
+ border-left: 0;
+ padding-left: 0;
+}
+
+/* Captions */
+
+[class^="wp-block-"] figcaption {
+ color: #707070;
+ font-family: "Noto Sans", sans-serif;
+ font-size: 12px;
+ margin-bottom: 0;
+ padding: 0.5em 0;
+}
+
+.editor-block-list__block [class^="wp-block-"] figcaption {
+ line-height: 1.5;
+}
+
+@media screen and (min-width: 46.25em) {
+ [class^="wp-block-"] figcaption {
+ font-size: 14px;
+ }
+}
+
+@media screen and (min-width: 55em) {
+ [class^="wp-block-"] figcaption {
+ font-size: 16px;
+ }
+}
+
+@media screen and (min-width: 59.6875em) {
+ [class^="wp-block-"] figcaption {
+ font-size: 12px;
+ }
+}
+
+@media screen and (min-width: 68.75em) {
+ [class^="wp-block-"] figcaption {
+ font-size: 14px;
+ }
+}
+
+@media screen and (min-width: 77.5em) {
+ [class^="wp-block-"] figcaption {
+ font-size: 16px;
+ }
+}
+
+/* Pre */
+
+[class^="wp-block-"] pre {
+ font-size: inherit;
+}
+
+/* Alignments */
+
+.wp-block-quote.alignright,
+.wp-block-freeform.block-library-rich-text__tinymce .alignright {
+ margin: 0.4211em 0 1.6842em 1.6842em;
+}
+
+.wp-block-quote.alignleft,
+.wp-block-freeform.block-library-rich-text__tinymce .alignleft {
+ margin: 0.4211em 1.6842em 1.6842em 0;
+}
+
+/*--------------------------------------------------------------
+3.0 Blocks - Common Blocks
+--------------------------------------------------------------*/
+
+/* Paragraph */
+
+p.has-drop-cap:not(:focus)::first-letter {
+ font-size: 5em;
+}
+
+/* Quotes */
+
+.wp-block-quote,
+.wp-block-freeform.block-library-rich-text__tinymce blockquote {
+ color: #707070;
+ margin-bottom: 1.6667em;
+ padding-left: 0.7778em;
+}
+
+.wp-block-quote:not(.is-large):not(.is-style-large),
+.wp-block-freeform.block-library-rich-text__tinymce blockquote {
+ border-color: #707070;
+}
+
+.edit-post-visual-editor .wp-block-quote p {
+ font-size: 18px;
+ font-style: italic;
+ line-height: 1.6667;
+ margin-bottom: 1.6667em;
+}
+
+.edit-post-visual-editor .wp-block-quote > p:last-child {
+ margin-bottom: 0;
+}
+
+.wp-block-quote__citation {
+ color: #333;
+ font-family: "Noto Sans", sans-serif;
+ font-size: 15px;
+ font-style: normal;
+ line-height: 1.6;
+ text-transform: none;
+}
+
+.wp-block-quote em,
+.wp-block-quote i {
+ font-style: normal;
+}
+
+.wp-block-quote strong,
+.wp-block-quote b {
+ font-weight: 400;
+}
+
+@media screen and (min-width: 46.25em) {
+ .edit-post-visual-editor .wp-block-quote p {
+ font-size: 20px;
+ line-height: 1.75;
+ }
+
+ .wp-block-quote__citation {
+ font-size: 17px;
+ line-height: 1.6471;
+ }
+}
+
+@media screen and (min-width: 55em) {
+ .edit-post-visual-editor .wp-block-quote p {
+ font-size: 22px;
+ line-height: 1.8182;
+ }
+
+ .wp-block-quote__citation {
+ font-size: 19px;
+ line-height: 1.6842;
+ }
+}
+
+@media screen and (min-width: 59.6875em) {
+ .edit-post-visual-editor .wp-block-quote p {
+ font-size: 18px;
+ line-height: 1.6667;
+ }
+
+ .wp-block-quote__citation {
+ font-size: 15px;
+ line-height: 1.6;
+ }
+}
+
+@media screen and (min-width: 68.75em) {
+ .edit-post-visual-editor .wp-block-quote p {
+ font-size: 20px;
+ line-height: 1.75;
+ }
+
+ .wp-block-quote__citation {
+ font-size: 17px;
+ line-height: 1.6471;
+ }
+}
+
+@media screen and (min-width: 77.5em) {
+ .edit-post-visual-editor .wp-block-quote p {
+ font-size: 22px;
+ line-height: 1.8182;
+ }
+
+ .wp-block-quote__citation {
+ font-size: 19px;
+ line-height: 1.6842;
+ }
+}
+
+/* Cover */
+
+.edit-post-visual-editor .editor-block-list__block .wp-block-cover-image p,
+.edit-post-visual-editor .editor-block-list__block .wp-block-cover p,
+.wp-block-cover-image h2,
+.wp-block-cover h2 {
+ font-size: 29px;
+ line-height: 1.2069;
+}
+
+/* File */
+
+.wp-block-file .editor-rich-text__tinymce {
+ border-bottom: 1px solid #333;
+}
+
+.wp-block-file .wp-block-file__button {
+ background-color: #333;
+ border: 0;
+ border-radius: 0;
+ color: #fff;
+ cursor: pointer;
+ font-family: "Noto Sans", sans-serif;
+ font-size: 12px;
+ font-weight: 700;
+ line-height: 1.5;
+ padding: 0.7917em 1.5em;
+ text-transform: uppercase;
+ vertical-align: baseline;
+}
+
+@media screen and (min-width: 46.25em) {
+ .wp-block-file .wp-block-file__button {
+ font-size: 14px;
+ padding: 0.8214em 1.6429em;
+ }
+}
+
+@media screen and (min-width: 55em) {
+ .wp-block-file .wp-block-file__button {
+ font-size: 16px;
+ padding: 0.8125em 1.625em;
+ }
+}
+
+@media screen and (min-width: 59.6875em) {
+ .wp-block-file .wp-block-file__button {
+ font-size: 12px;
+ padding: 0.7917em 1.5833em;
+ }
+}
+
+@media screen and (min-width: 68.75em) {
+ .wp-block-file .wp-block-file__button {
+ font-size: 14px;
+ padding: 0.8214em 1.5714em;
+ }
+}
+
+@media screen and (min-width: 77.5em) {
+ .wp-block-file .wp-block-file__button {
+ font-size: 16px;
+ padding: 0.8125em 1.625em;
+ }
+}
+
+/*--------------------------------------------------------------
+4.0 Blocks - Formatting
+--------------------------------------------------------------*/
+
+/* Code */
+
+.wp-block-code,
+.wp-block-freeform.block-library-rich-text__tinymce code {
+ background: transparent;
+ border: 0;
+ padding: 0;
+}
+
+/* Pullquote */
+
+.wp-block-pullquote,
+.editor-block-list__block .wp-block-pullquote blockquote {
+ border: 0;
+ margin: 0;
+ padding-left: 0;
+}
+
+.wp-block-pullquote .wp-block-pullquote__citation {
+ color: #333;
+ font-family: "Noto Sans", sans-serif;
+ font-size: 15px;
+ font-style: normal;
+ line-height: 1.6;
+ text-transform: none;
+}
+
+@media screen and (min-width: 46.25em) {
+ .wp-block-pullquote .wp-block-pullquote__citation {
+ font-size: 17px;
+ line-height: 1.6471;
+ }
+}
+
+@media screen and (min-width: 55em) {
+ .wp-block-pullquote .wp-block-pullquote__citation {
+ font-size: 19px;
+ line-height: 1.6842;
+ }
+}
+
+@media screen and (min-width: 59.6875em) {
+ .wp-block-pullquote .wp-block-pullquote__citation {
+ font-size: 15px;
+ line-height: 1.6;
+ }
+}
+
+@media screen and (min-width: 68.75em) {
+ .wp-block-pullquote .wp-block-pullquote__citation {
+ font-size: 17px;
+ line-height: 1.6471;
+ }
+}
+
+@media screen and (min-width: 77.5em) {
+ .wp-block-pullquote .wp-block-pullquote__citation {
+ font-size: 19px;
+ line-height: 1.6842;
+ }
+}
+
+/* Tables */
+
+.editor-block-list__block .wp-block-table th,
+.editor-block-list__block .wp-block-table td {
+ padding: 0;
+}
+
+.rtl .editor-block-list__block .wp-block-table th {
+ text-align: right;
+}
+
+/*--------------------------------------------------------------
+5.0 Blocks - Layout Elements
+--------------------------------------------------------------*/
+
+/* Button */
+
+.wp-block-button .wp-block-button__link {
+ background-color: #333;
+ border: 0;
+ border-radius: 0;
+ color: #fff;
+ cursor: pointer;
+ font-family: "Noto Sans", sans-serif;
+ font-size: 12px;
+ font-weight: 700;
+ line-height: 1.5;
+ padding: 0.7917em 1.5em;
+ text-transform: uppercase;
+ vertical-align: baseline;
+}
+
+@media screen and (min-width: 46.25em) {
+ .wp-block-button .wp-block-button__link {
+ font-size: 14px;
+ padding: 0.8214em 1.6429em;
+ }
+}
+
+@media screen and (min-width: 55em) {
+ .wp-block-button .wp-block-button__link {
+ font-size: 16px;
+ padding: 0.8125em 1.625em;
+ }
+}
+
+@media screen and (min-width: 59.6875em) {
+ .wp-block-button .wp-block-button__link {
+ font-size: 12px;
+ padding: 0.7917em 1.5833em;
+ }
+}
+
+@media screen and (min-width: 68.75em) {
+ .wp-block-button .wp-block-button__link {
+ font-size: 14px;
+ padding: 0.8214em 1.5714em;
+ }
+}
+
+@media screen and (min-width: 77.5em) {
+ .wp-block-button .wp-block-button__link {
+ font-size: 16px;
+ padding: 0.8125em 1.625em;
+ }
+}
+
+/* Seperator */
+
+.wp-block-separator {
+ max-width: 100px;
+}
+
+.wp-block-separator.is-style-wide {
+ max-width: 100%;
+}
+
+/* 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;
+}
+
+
+/* Latest Comments */
+
+.wp-block-latest-comments {
+ margin: 0;
+}
+
+.wp-block-latest-comments__comment,
+.wp-block-latest-comments__comment-excerpt,
+.wp-block-latest-comments__comment-excerpt p {
+ font-size: inherit;
+}
+
+.wp-block-latest-comments__comment-meta a {
+ border-bottom-color: transparent;
+ font-weight: 700;
+}
+
+.wp-block-latest-comments__comment-excerpt p:last-child {
+ margin-bottom: 0;
+}
+
+.wp-block-latest-comments__comment-date {
+ color: #707070;
+ font-family: "Noto Sans", sans-serif;
+ font-size: 12px;
+ line-height: 1.5;
+ margin-bottom: 1.6em;
+}
+
+@media screen and (min-width: 46.25em) {
+ .wp-block-latest-comments__comment-date {
+ font-size: 14px;
+ }
+}
+
+@media screen and (min-width: 55em) {
+ .wp-block-latest-comments__comment-date {
+ font-size: 16px;
+ }
+}
+
+@media screen and (min-width: 59.6875em) {
+ .wp-block-latest-comments__comment-date {
+ font-size: 12px;
+ }
+}
+
+@media screen and (min-width: 68.75em) {
+ .wp-block-latest-comments__comment-date {
+ font-size: 14px;
+ }
+}
+
+@media screen and (min-width: 77.5em) {
+ .wp-block-latest-comments__comment-date {
+ font-size: 16px;
+ }
+}
+
+.wp-block-latest-comments .wp-block-latest-comments__comment {
+ border-top: 1px solid #eaeaea;
+ border-top: 1px solid rgba(51, 51, 51, 0.1);
+ margin-bottom: 0;
+ padding: 1.6em 0;
+}
+
+/* Latest Posts */
+
+.edit-post-visual-editor .wp-block-latest-posts.is-grid {
+ list-style: none;
+ margin-left: 0;
+ margin-right: 0;
+}
+
+.edit-post-visual-editor .wp-block-latest-posts.is-grid li {
+ margin-bottom: 16px;
+}
diff --git a/themes/twentyfifteen/functions.php b/themes/twentyfifteen/functions.php
index 3f678a9b..168bedd9 100644
--- a/themes/twentyfifteen/functions.php
+++ b/themes/twentyfifteen/functions.php
@@ -42,133 +42,182 @@ if ( version_compare( $GLOBALS['wp_version'], '4.1-alpha', '<' ) ) {
}
if ( ! function_exists( 'twentyfifteen_setup' ) ) :
- /**
- * Sets up theme defaults and registers support for various WordPress features.
+/**
+ * Sets 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 for post thumbnails.
+ *
+ * @since Twenty Fifteen 1.0
+ */
+function twentyfifteen_setup() {
+
+ /*
+ * Make theme available for translation.
+ * Translations can be filed at WordPress.org. See: https://translate.wordpress.org/projects/wp-themes/twentyfifteen
+ * If you're building a theme based on twentyfifteen, use a find and replace
+ * to change 'twentyfifteen' to the name of your theme in all the template files
+ */
+ load_theme_textdomain( 'twentyfifteen' );
+
+ // Add default posts and comments RSS feed links to head.
+ add_theme_support( 'automatic-feed-links' );
+
+ /*
+ * Let WordPress manage the document title.
+ * By adding theme support, we declare that this theme does not use a
+ * hard-coded <title> tag in the document head, and expect WordPress to
+ * provide it for us.
+ */
+ add_theme_support( 'title-tag' );
+
+ /*
+ * Enable support for Post Thumbnails on posts and pages.
+ *
+ * See: https://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
+ */
+ add_theme_support( 'post-thumbnails' );
+ set_post_thumbnail_size( 825, 510, true );
+
+ // This theme uses wp_nav_menu() in two locations.
+ register_nav_menus( array(
+ 'primary' => __( 'Primary Menu', 'twentyfifteen' ),
+ 'social' => __( 'Social Links Menu', 'twentyfifteen' ),
+ ) );
+
+ /*
+ * Switch default core markup for search form, comment form, and comments
+ * to output valid HTML5.
+ */
+ add_theme_support( 'html5', array(
+ 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption'
+ ) );
+
+ /*
+ * Enable support for Post Formats.
*
- * 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 for post thumbnails.
+ * See: https://codex.wordpress.org/Post_Formats
+ */
+ add_theme_support( 'post-formats', array(
+ 'aside', 'image', 'video', 'quote', 'link', 'gallery', 'status', 'audio', 'chat'
+ ) );
+
+ /*
+ * Enable support for custom logo.
+ *
+ * @since Twenty Fifteen 1.5
+ */
+ add_theme_support( 'custom-logo', array(
+ 'height' => 248,
+ 'width' => 248,
+ 'flex-height' => true,
+ ) );
+
+ $color_scheme = twentyfifteen_get_color_scheme();
+ $default_color = trim( $color_scheme[0], '#' );
+
+ // Setup the WordPress core custom background feature.
+
+ /**
+ * Filter Twenty Fifteen custom-header support arguments.
*
* @since Twenty Fifteen 1.0
+ *
+ * @param array $args {
+ * An array of custom-header support arguments.
+ *
+ * @type string $default-color Default color of the header.
+ * @type string $default-attachment Default attachment of the header.
+ * }
*/
- function twentyfifteen_setup() {
-
- /*
- * Make theme available for translation.
- * Translations can be filed at WordPress.org. See: https://translate.wordpress.org/projects/wp-themes/twentyfifteen
- * If you're building a theme based on twentyfifteen, use a find and replace
- * to change 'twentyfifteen' to the name of your theme in all the template files
- */
- load_theme_textdomain( 'twentyfifteen' );
-
- // Add default posts and comments RSS feed links to head.
- add_theme_support( 'automatic-feed-links' );
-
- /*
- * Let WordPress manage the document title.
- * By adding theme support, we declare that this theme does not use a
- * hard-coded <title> tag in the document head, and expect WordPress to
- * provide it for us.
- */
- add_theme_support( 'title-tag' );
-
- /*
- * Enable support for Post Thumbnails on posts and pages.
- *
- * See: https://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
- */
- add_theme_support( 'post-thumbnails' );
- set_post_thumbnail_size( 825, 510, true );
-
- // This theme uses wp_nav_menu() in two locations.
- register_nav_menus(
- array(
- 'primary' => __( 'Primary Menu', 'twentyfifteen' ),
- 'social' => __( 'Social Links Menu', 'twentyfifteen' ),
- )
- );
-
- /*
- * Switch default core markup for search form, comment form, and comments
- * to output valid HTML5.
- */
- add_theme_support(
- 'html5', array(
- 'search-form',
- 'comment-form',
- 'comment-list',
- 'gallery',
- 'caption',
- )
- );
-
- /*
- * Enable support for Post Formats.
- *
- * See: https://codex.wordpress.org/Post_Formats
- */
- add_theme_support(
- 'post-formats', array(
- 'aside',
- 'image',
- 'video',
- 'quote',
- 'link',
- 'gallery',
- 'status',
- 'audio',
- 'chat',
- )
- );
-
- /*
- * Enable support for custom logo.
- *
- * @since Twenty Fifteen 1.5
- */
- add_theme_support(
- 'custom-logo', array(
- 'height' => 248,
- 'width' => 248,
- 'flex-height' => true,
- )
- );
-
- $color_scheme = twentyfifteen_get_color_scheme();
- $default_color = trim( $color_scheme[0], '#' );
-
- // Setup the WordPress core custom background feature.
-
- /**
- * Filter Twenty Fifteen custom-header support arguments.
- *
- * @since Twenty Fifteen 1.0
- *
- * @param array $args {
- * An array of custom-header support arguments.
- *
- * @type string $default-color Default color of the header.
- * @type string $default-attachment Default attachment of the header.
- * }
- */
- add_theme_support(
- 'custom-background', apply_filters(
- 'twentyfifteen_custom_background_args', array(
- 'default-color' => $default_color,
- 'default-attachment' => 'fixed',
- )
- )
- );
-
- /*
- * This theme styles the visual editor to resemble the theme style,
- * specifically font, colors, icons, and column width.
- */
- add_editor_style( array( 'css/editor-style.css', 'genericons/genericons.css', twentyfifteen_fonts_url() ) );
-
- // Indicate widget sidebars can use selective refresh in the Customizer.
- add_theme_support( 'customize-selective-refresh-widgets' );
- }
+ add_theme_support( 'custom-background', apply_filters( 'twentyfifteen_custom_background_args', array(
+ 'default-color' => $default_color,
+ 'default-attachment' => 'fixed',
+ ) ) );
+
+ /*
+ * This theme styles the visual editor to resemble the theme style,
+ * specifically font, colors, icons, and column width.
+ */
+ add_editor_style( array( 'css/editor-style.css', 'genericons/genericons.css', twentyfifteen_fonts_url() ) );
+
+ // Load regular editor styles into the new block-based editor.
+ add_theme_support( 'editor-styles' );
+
+ // Load default block styles.
+ add_theme_support( 'wp-block-styles' );
+
+ // Add support for responsive embeds.
+ add_theme_support( 'responsive-embeds' );
+
+ // Add support for custom color scheme.
+ add_theme_support( 'editor-color-palette', array(
+ array(
+ 'name' => __( 'Dark Gray', 'twentyfifteen' ),
+ 'slug' => 'dark-gray',
+ 'color' => '#111',
+ ),
+ array(
+ 'name' => __( 'Light Gray', 'twentyfifteen' ),
+ 'slug' => 'light-gray',
+ 'color' => '#f1f1f1',
+ ),
+ array(
+ 'name' => __( 'White', 'twentyfifteen' ),
+ 'slug' => 'white',
+ 'color' => '#fff',
+ ),
+ array(
+ 'name' => __( 'Yellow', 'twentyfifteen' ),
+ 'slug' => 'yellow',
+ 'color' => '#f4ca16',
+ ),
+ array(
+ 'name' => __( 'Dark Brown', 'twentyfifteen' ),
+ 'slug' => 'dark-brown',
+ 'color' => '#352712',
+ ),
+ array(
+ 'name' => __( 'Medium Pink', 'twentyfifteen' ),
+ 'slug' => 'medium-pink',
+ 'color' => '#e53b51',
+ ),
+ array(
+ 'name' => __( 'Light Pink', 'twentyfifteen' ),
+ 'slug' => 'light-pink',
+ 'color' => '#ffe5d1',
+ ),
+ array(
+ 'name' => __( 'Dark Purple', 'twentyfifteen' ),
+ 'slug' => 'dark-purple',
+ 'color' => '#2e2256',
+ ),
+ array(
+ 'name' => __( 'Purple', 'twentyfifteen' ),
+ 'slug' => 'purple',
+ 'color' => '#674970',
+ ),
+ array(
+ 'name' => __( 'Blue Gray', 'twentyfifteen' ),
+ 'slug' => 'blue-gray',
+ 'color' => '#22313f',
+ ),
+ array(
+ 'name' => __( 'Bright Blue', 'twentyfifteen' ),
+ 'slug' => 'bright-blue',
+ 'color' => '#55c3dc',
+ ),
+ array(
+ 'name' => __( 'Light Blue', 'twentyfifteen' ),
+ 'slug' => 'light-blue',
+ 'color' => '#e9f2f9',
+ ),
+ ) );
+
+ // Indicate widget sidebars can use selective refresh in the Customizer.
+ add_theme_support( 'customize-selective-refresh-widgets' );
+}
endif; // twentyfifteen_setup
add_action( 'after_setup_theme', 'twentyfifteen_setup' );
@@ -180,84 +229,80 @@ add_action( 'after_setup_theme', 'twentyfifteen_setup' );
* @link https://codex.wordpress.org/Function_Reference/register_sidebar
*/
function twentyfifteen_widgets_init() {
- register_sidebar(
- array(
- 'name' => __( 'Widget Area', 'twentyfifteen' ),
- 'id' => 'sidebar-1',
- 'description' => __( 'Add widgets here to appear in your sidebar.', 'twentyfifteen' ),
- 'before_widget' => '<aside id="%1$s" class="widget %2$s">',
- 'after_widget' => '</aside>',
- 'before_title' => '<h2 class="widget-title">',
- 'after_title' => '</h2>',
- )
- );
+ register_sidebar( array(
+ 'name' => __( 'Widget Area', 'twentyfifteen' ),
+ 'id' => 'sidebar-1',
+ 'description' => __( 'Add widgets here to appear in your sidebar.', 'twentyfifteen' ),
+ 'before_widget' => '<aside id="%1$s" class="widget %2$s">',
+ 'after_widget' => '</aside>',
+ 'before_title' => '<h2 class="widget-title">',
+ 'after_title' => '</h2>',
+ ) );
}
add_action( 'widgets_init', 'twentyfifteen_widgets_init' );
if ( ! function_exists( 'twentyfifteen_fonts_url' ) ) :
- /**
- * Register Google fonts for Twenty Fifteen.
- *
- * @since Twenty Fifteen 1.0
- *
- * @return string Google fonts URL for the theme.
+/**
+ * Register Google fonts for Twenty Fifteen.
+ *
+ * @since Twenty Fifteen 1.0
+ *
+ * @return string Google fonts URL for the theme.
+ */
+function twentyfifteen_fonts_url() {
+ $fonts_url = '';
+ $fonts = array();
+ $subsets = 'latin,latin-ext';
+
+ /*
+ * Translators: If there are characters in your language that are not supported
+ * by Noto Sans, translate this to 'off'. Do not translate into your own language.
*/
- function twentyfifteen_fonts_url() {
- $fonts_url = '';
- $fonts = array();
- $subsets = 'latin,latin-ext';
-
- /*
- * Translators: If there are characters in your language that are not supported
- * by Noto Sans, translate this to 'off'. Do not translate into your own language.
- */
- if ( 'off' !== _x( 'on', 'Noto Sans font: on or off', 'twentyfifteen' ) ) {
- $fonts[] = 'Noto Sans:400italic,700italic,400,700';
- }
-
- /*
- * Translators: If there are characters in your language that are not supported
- * by Noto Serif, translate this to 'off'. Do not translate into your own language.
- */
- if ( 'off' !== _x( 'on', 'Noto Serif font: on or off', 'twentyfifteen' ) ) {
- $fonts[] = 'Noto Serif:400italic,700italic,400,700';
- }
+ if ( 'off' !== _x( 'on', 'Noto Sans font: on or off', 'twentyfifteen' ) ) {
+ $fonts[] = 'Noto Sans:400italic,700italic,400,700';
+ }
- /*
- * Translators: If there are characters in your language that are not supported
- * by Inconsolata, translate this to 'off'. Do not translate into your own language.
- */
- if ( 'off' !== _x( 'on', 'Inconsolata font: on or off', 'twentyfifteen' ) ) {
- $fonts[] = 'Inconsolata:400,700';
- }
+ /*
+ * Translators: If there are characters in your language that are not supported
+ * by Noto Serif, translate this to 'off'. Do not translate into your own language.
+ */
+ if ( 'off' !== _x( 'on', 'Noto Serif font: on or off', 'twentyfifteen' ) ) {
+ $fonts[] = 'Noto Serif:400italic,700italic,400,700';
+ }
- /*
- * Translators: To add an additional character subset specific to your language,
- * translate this to 'greek', 'cyrillic', 'devanagari' or 'vietnamese'. Do not translate into your own language.
- */
- $subset = _x( 'no-subset', 'Add new subset (greek, cyrillic, devanagari, vietnamese)', 'twentyfifteen' );
-
- if ( 'cyrillic' == $subset ) {
- $subsets .= ',cyrillic,cyrillic-ext';
- } elseif ( 'greek' == $subset ) {
- $subsets .= ',greek,greek-ext';
- } elseif ( 'devanagari' == $subset ) {
- $subsets .= ',devanagari';
- } elseif ( 'vietnamese' == $subset ) {
- $subsets .= ',vietnamese';
- }
+ /*
+ * Translators: If there are characters in your language that are not supported
+ * by Inconsolata, translate this to 'off'. Do not translate into your own language.
+ */
+ if ( 'off' !== _x( 'on', 'Inconsolata font: on or off', 'twentyfifteen' ) ) {
+ $fonts[] = 'Inconsolata:400,700';
+ }
- if ( $fonts ) {
- $fonts_url = add_query_arg(
- array(
- 'family' => urlencode( implode( '|', $fonts ) ),
- 'subset' => urlencode( $subsets ),
- ), 'https://fonts.googleapis.com/css'
- );
- }
+ /*
+ * Translators: To add an additional character subset specific to your language,
+ * translate this to 'greek', 'cyrillic', 'devanagari' or 'vietnamese'. Do not translate into your own language.
+ */
+ $subset = _x( 'no-subset', 'Add new subset (greek, cyrillic, devanagari, vietnamese)', 'twentyfifteen' );
+
+ if ( 'cyrillic' == $subset ) {
+ $subsets .= ',cyrillic,cyrillic-ext';
+ } elseif ( 'greek' == $subset ) {
+ $subsets .= ',greek,greek-ext';
+ } elseif ( 'devanagari' == $subset ) {
+ $subsets .= ',devanagari';
+ } elseif ( 'vietnamese' == $subset ) {
+ $subsets .= ',vietnamese';
+ }
- return $fonts_url;
+ if ( $fonts ) {
+ $fonts_url = add_query_arg( array(
+ 'family' => urlencode( implode( '|', $fonts ) ),
+ 'subset' => urlencode( $subsets ),
+ ), 'https://fonts.googleapis.com/css' );
}
+
+ return $fonts_url;
+}
endif;
/**
@@ -287,6 +332,9 @@ function twentyfifteen_scripts() {
// Load our main stylesheet.
wp_enqueue_style( 'twentyfifteen-style', get_stylesheet_uri() );
+ // Theme block stylesheet.
+ wp_enqueue_style( 'twentyfifteen-block-style', get_template_directory_uri() . '/css/blocks.css', array( 'twentyfifteen-style' ), '20181018' );
+
// Load the Internet Explorer specific stylesheet.
wp_enqueue_style( 'twentyfifteen-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentyfifteen-style' ), '20141010' );
wp_style_add_data( 'twentyfifteen-ie', 'conditional', 'lt IE 9' );
@@ -306,16 +354,28 @@ function twentyfifteen_scripts() {
}
wp_enqueue_script( 'twentyfifteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20150330', true );
- wp_localize_script(
- 'twentyfifteen-script', 'screenReaderText', array(
- 'expand' => '<span class="screen-reader-text">' . __( 'expand child menu', 'twentyfifteen' ) . '</span>',
- 'collapse' => '<span class="screen-reader-text">' . __( 'collapse child menu', 'twentyfifteen' ) . '</span>',
- )
- );
+ wp_localize_script( 'twentyfifteen-script', 'screenReaderText', array(
+ 'expand' => '<span class="screen-reader-text">' . __( 'expand child menu', 'twentyfifteen' ) . '</span>',
+ 'collapse' => '<span class="screen-reader-text">' . __( 'collapse child menu', 'twentyfifteen' ) . '</span>',
+ ) );
}
add_action( 'wp_enqueue_scripts', 'twentyfifteen_scripts' );
/**
+ * Enqueue styles for the block-based editor.
+ *
+ * @since Twenty Fifteen 2.1
+ */
+function twentyfifteen_block_editor_styles() {
+ // Block styles.
+ wp_enqueue_style( 'twentyfifteen-block-editor-style', get_template_directory_uri() . '/css/editor-blocks.css' );
+ // Add custom fonts.
+ wp_enqueue_style( 'twentyfifteen-fonts', twentyfifteen_fonts_url(), array(), null );
+}
+add_action( 'enqueue_block_editor_assets', 'twentyfifteen_block_editor_styles' );
+
+
+/**
* Add preconnect for Google Fonts.
*
* @since Twenty Fifteen 1.7
@@ -360,9 +420,9 @@ function twentyfifteen_post_nav_background() {
return;
}
- if ( $previous && has_post_thumbnail( $previous->ID ) ) {
+ if ( $previous && has_post_thumbnail( $previous->ID ) ) {
$prevthumb = wp_get_attachment_image_src( get_post_thumbnail_id( $previous->ID ), 'post-thumbnail' );
- $css .= '
+ $css .= '
.post-navigation .nav-previous { background-image: url(' . esc_url( $prevthumb[0] ) . '); }
.post-navigation .nav-previous .post-title, .post-navigation .nav-previous a:hover .post-title, .post-navigation .nav-previous .meta-nav { color: #fff; }
.post-navigation .nav-previous a:before { background-color: rgba(0, 0, 0, 0.4); }
@@ -371,7 +431,7 @@ function twentyfifteen_post_nav_background() {
if ( $next && has_post_thumbnail( $next->ID ) ) {
$nextthumb = wp_get_attachment_image_src( get_post_thumbnail_id( $next->ID ), 'post-thumbnail' );
- $css .= '
+ $css .= '
.post-navigation .nav-next { background-image: url(' . esc_url( $nextthumb[0] ) . '); border-top: 0; }
.post-navigation .nav-next .post-title, .post-navigation .nav-next a:hover .post-title, .post-navigation .nav-next .meta-nav { color: #fff; }
.post-navigation .nav-next a:before { background-color: rgba(0, 0, 0, 0.4); }
diff --git a/themes/twentyfifteen/header.php b/themes/twentyfifteen/header.php
index a088d85c..28de34ed 100644
--- a/themes/twentyfifteen/header.php
+++ b/themes/twentyfifteen/header.php
@@ -31,20 +31,16 @@
<?php
twentyfifteen_the_custom_logo();
- if ( is_front_page() && is_home() ) :
- ?>
+ if ( is_front_page() && is_home() ) : ?>
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
<?php else : ?>
<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
- <?php
- endif;
+ <?php endif;
$description = get_bloginfo( 'description', 'display' );
-if ( $description || is_customize_preview() ) :
- ?>
+ if ( $description || is_customize_preview() ) : ?>
<p class="site-description"><?php echo $description; ?></p>
- <?php
- endif;
+ <?php endif;
?>
<button class="secondary-toggle"><?php _e( 'Menu and widgets', 'twentyfifteen' ); ?></button>
</div><!-- .site-branding -->
diff --git a/themes/twentyfifteen/image.php b/themes/twentyfifteen/image.php
index ed07d05d..5a471d40 100644
--- a/themes/twentyfifteen/image.php
+++ b/themes/twentyfifteen/image.php
@@ -14,39 +14,38 @@ get_header(); ?>
<?php
// Start the loop.
- while ( have_posts() ) :
- the_post();
+ while ( have_posts() ) : the_post();
?>
- <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
+ <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
- <nav id="image-navigation" class="navigation image-navigation">
- <div class="nav-links">
- <div class="nav-previous"><?php previous_image_link( false, __( 'Previous Image', 'twentyfifteen' ) ); ?></div><div class="nav-next"><?php next_image_link( false, __( 'Next Image', 'twentyfifteen' ) ); ?></div>
- </div><!-- .nav-links -->
- </nav><!-- .image-navigation -->
+ <nav id="image-navigation" class="navigation image-navigation">
+ <div class="nav-links">
+ <div class="nav-previous"><?php previous_image_link( false, __( 'Previous Image', 'twentyfifteen' ) ); ?></div><div class="nav-next"><?php next_image_link( false, __( 'Next Image', 'twentyfifteen' ) ); ?></div>
+ </div><!-- .nav-links -->
+ </nav><!-- .image-navigation -->
- <header class="entry-header">
- <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
- </header><!-- .entry-header -->
+ <header class="entry-header">
+ <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
+ </header><!-- .entry-header -->
- <div class="entry-content">
+ <div class="entry-content">
- <div class="entry-attachment">
- <?php
- /**
- * Filter the default Twenty Fifteen image attachment size.
- *
- * @since Twenty Fifteen 1.0
- *
- * @param string $image_size Image size. Default 'large'.
- */
- $image_size = apply_filters( 'twentyfifteen_attachment_size', 'large' );
-
- echo wp_get_attachment_image( get_the_ID(), $image_size );
- ?>
+ <div class="entry-attachment">
+ <?php
+ /**
+ * Filter the default Twenty Fifteen image attachment size.
+ *
+ * @since Twenty Fifteen 1.0
+ *
+ * @param string $image_size Image size. Default 'large'.
+ */
+ $image_size = apply_filters( 'twentyfifteen_attachment_size', 'large' );
- <?php if ( has_excerpt() ) : ?>
+ echo wp_get_attachment_image( get_the_ID(), $image_size );
+ ?>
+
+ <?php if ( has_excerpt() ) : ?>
<div class="entry-caption">
<?php the_excerpt(); ?>
</div><!-- .entry-caption -->
@@ -55,39 +54,35 @@ get_header(); ?>
</div><!-- .entry-attachment -->
<?php
- the_content();
- wp_link_pages(
- array(
+ the_content();
+ wp_link_pages( array(
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfifteen' ) . '</span>',
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>',
'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>%',
'separator' => '<span class="screen-reader-text">, </span>',
- )
- );
- ?>
+ ) );
+ ?>
</div><!-- .entry-content -->
<footer class="entry-footer">
- <?php twentyfifteen_entry_meta(); ?>
+ <?php twentyfifteen_entry_meta(); ?>
<?php edit_post_link( __( 'Edit', 'twentyfifteen' ), '<span class="edit-link">', '</span>' ); ?>
</footer><!-- .entry-footer -->
</article><!-- #post-## -->
<?php
- // If comments are open or we have at least one comment, load up the comment template
- if ( comments_open() || get_comments_number() ) :
- comments_template();
+ // If comments are open or we have at least one comment, load up the comment template
+ if ( comments_open() || get_comments_number() ) :
+ comments_template();
endif;
- // Previous/next post navigation.
- the_post_navigation(
- array(
+ // Previous/next post navigation.
+ the_post_navigation( array(
'prev_text' => _x( '<span class="meta-nav">Published in</span><span class="post-title">%title</span>', 'Parent post link', 'twentyfifteen' ),
- )
- );
+ ) );
// End the loop.
endwhile;
diff --git a/themes/twentyfifteen/inc/back-compat.php b/themes/twentyfifteen/inc/back-compat.php
index 2f828d6e..73cd44d1 100644
--- a/themes/twentyfifteen/inc/back-compat.php
+++ b/themes/twentyfifteen/inc/back-compat.php
@@ -44,11 +44,9 @@ function twentyfifteen_upgrade_notice() {
* @since Twenty Fifteen 1.0
*/
function twentyfifteen_customize() {
- wp_die(
- sprintf( __( 'Twenty Fifteen requires at least WordPress version 4.1. You are running version %s. Please upgrade and try again.', 'twentyfifteen' ), $GLOBALS['wp_version'] ), '', array(
- 'back_link' => true,
- )
- );
+ wp_die( sprintf( __( 'Twenty Fifteen requires at least WordPress version 4.1. You are running version %s. Please upgrade and try again.', 'twentyfifteen' ), $GLOBALS['wp_version'] ), '', array(
+ 'back_link' => true,
+ ) );
}
add_action( 'load-customize.php', 'twentyfifteen_customize' );
diff --git a/themes/twentyfifteen/inc/custom-header.php b/themes/twentyfifteen/inc/custom-header.php
index 5f90789f..10d0ef1a 100644
--- a/themes/twentyfifteen/inc/custom-header.php
+++ b/themes/twentyfifteen/inc/custom-header.php
@@ -13,8 +13,8 @@
* @uses twentyfifteen_header_style()
*/
function twentyfifteen_custom_header_setup() {
- $color_scheme = twentyfifteen_get_color_scheme();
- $default_text_color = trim( $color_scheme[4], '#' );
+ $color_scheme = twentyfifteen_get_color_scheme();
+ $default_text_color = trim( $color_scheme[4], '#' );
/**
* Filter Twenty Fifteen custom-header support arguments.
@@ -31,16 +31,12 @@ function twentyfifteen_custom_header_setup() {
* displayed on the blog.
* }
*/
- add_theme_support(
- 'custom-header', apply_filters(
- 'twentyfifteen_custom_header_args', array(
- 'default-text-color' => $default_text_color,
- 'width' => 954,
- 'height' => 1300,
- 'wp-head-callback' => 'twentyfifteen_header_style',
- )
- )
- );
+ add_theme_support( 'custom-header', apply_filters( 'twentyfifteen_custom_header_args', array(
+ 'default-text-color' => $default_text_color,
+ 'width' => 954,
+ 'height' => 1300,
+ 'wp-head-callback' => 'twentyfifteen_header_style',
+ ) ) );
}
add_action( 'after_setup_theme', 'twentyfifteen_custom_header_setup' );
@@ -57,10 +53,10 @@ function twentyfifteen_hex2rgb( $color ) {
$color = trim( $color, '#' );
if ( strlen( $color ) == 3 ) {
- $r = hexdec( substr( $color, 0, 1 ) . substr( $color, 0, 1 ) );
- $g = hexdec( substr( $color, 1, 1 ) . substr( $color, 1, 1 ) );
- $b = hexdec( substr( $color, 2, 1 ) . substr( $color, 2, 1 ) );
- } elseif ( strlen( $color ) == 6 ) {
+ $r = hexdec( substr( $color, 0, 1 ).substr( $color, 0, 1 ) );
+ $g = hexdec( substr( $color, 1, 1 ).substr( $color, 1, 1 ) );
+ $b = hexdec( substr( $color, 2, 1 ).substr( $color, 2, 1 ) );
+ } else if ( strlen( $color ) == 6 ) {
$r = hexdec( substr( $color, 0, 2 ) );
$g = hexdec( substr( $color, 2, 2 ) );
$b = hexdec( substr( $color, 4, 2 ) );
@@ -68,33 +64,29 @@ function twentyfifteen_hex2rgb( $color ) {
return array();
}
- return array(
- 'red' => $r,
- 'green' => $g,
- 'blue' => $b,
- );
+ return array( 'red' => $r, 'green' => $g, 'blue' => $b );
}
if ( ! function_exists( 'twentyfifteen_header_style' ) ) :
- /**
- * Styles the header image and text displayed on the blog.
- *
- * @since Twenty Fifteen 1.0
- *
- * @see twentyfifteen_custom_header_setup()
- */
- function twentyfifteen_header_style() {
- $header_image = get_header_image();
+/**
+ * Styles the header image and text displayed on the blog.
+ *
+ * @since Twenty Fifteen 1.0
+ *
+ * @see twentyfifteen_custom_header_setup()
+ */
+function twentyfifteen_header_style() {
+ $header_image = get_header_image();
- // If no custom options for text are set, let's bail.
- if ( empty( $header_image ) && display_header_text() ) {
- return;
- }
+ // If no custom options for text are set, let's bail.
+ if ( empty( $header_image ) && display_header_text() ) {
+ return;
+ }
- // If we get this far, we have custom styles. Let's do this.
- ?>
- <style type="text/css" id="twentyfifteen-header-css">
- <?php
+ // If we get this far, we have custom styles. Let's do this.
+ ?>
+ <style type="text/css" id="twentyfifteen-header-css">
+ <?php
// Short header for when there is no Custom Header and Header Text is hidden.
if ( empty( $header_image ) && ! display_header_text() ) :
?>
@@ -190,7 +182,7 @@ if ( ! function_exists( 'twentyfifteen_header_style' ) ) :
<?php endif; ?>
</style>
<?php
- }
+}
endif; // twentyfifteen_header_style
/**
diff --git a/themes/twentyfifteen/inc/customizer.php b/themes/twentyfifteen/inc/customizer.php
index 9cc00a8a..c31c57e8 100644
--- a/themes/twentyfifteen/inc/customizer.php
+++ b/themes/twentyfifteen/inc/customizer.php
@@ -21,81 +21,61 @@ function twentyfifteen_customize_register( $wp_customize ) {
$wp_customize->get_setting( 'blogdescription' )->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' => 'twentyfifteen_customize_partial_blogname',
- )
- );
- $wp_customize->selective_refresh->add_partial(
- 'blogdescription', array(
- 'selector' => '.site-description',
- 'container_inclusive' => false,
- 'render_callback' => 'twentyfifteen_customize_partial_blogdescription',
- )
- );
+ $wp_customize->selective_refresh->add_partial( 'blogname', array(
+ 'selector' => '.site-title a',
+ 'container_inclusive' => false,
+ 'render_callback' => 'twentyfifteen_customize_partial_blogname',
+ ) );
+ $wp_customize->selective_refresh->add_partial( 'blogdescription', array(
+ 'selector' => '.site-description',
+ 'container_inclusive' => false,
+ 'render_callback' => 'twentyfifteen_customize_partial_blogdescription',
+ ) );
}
// Add color scheme setting and control.
- $wp_customize->add_setting(
- 'color_scheme', array(
- 'default' => 'default',
- 'sanitize_callback' => 'twentyfifteen_sanitize_color_scheme',
- 'transport' => 'postMessage',
- )
- );
-
- $wp_customize->add_control(
- 'color_scheme', array(
- 'label' => __( 'Base Color Scheme', 'twentyfifteen' ),
- 'section' => 'colors',
- 'type' => 'select',
- 'choices' => twentyfifteen_get_color_scheme_choices(),
- 'priority' => 1,
- )
- );
+ $wp_customize->add_setting( 'color_scheme', array(
+ 'default' => 'default',
+ 'sanitize_callback' => 'twentyfifteen_sanitize_color_scheme',
+ 'transport' => 'postMessage',
+ ) );
+
+ $wp_customize->add_control( 'color_scheme', array(
+ 'label' => __( 'Base Color Scheme', 'twentyfifteen' ),
+ 'section' => 'colors',
+ 'type' => 'select',
+ 'choices' => twentyfifteen_get_color_scheme_choices(),
+ 'priority' => 1,
+ ) );
// Add custom header and sidebar text color setting and control.
- $wp_customize->add_setting(
- 'sidebar_textcolor', array(
- 'default' => $color_scheme[4],
- 'sanitize_callback' => 'sanitize_hex_color',
- 'transport' => 'postMessage',
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Color_Control(
- $wp_customize, 'sidebar_textcolor', array(
- 'label' => __( 'Header and Sidebar Text Color', 'twentyfifteen' ),
- 'description' => __( 'Applied to the header on small screens and the sidebar on wide screens.', 'twentyfifteen' ),
- 'section' => 'colors',
- )
- )
- );
+ $wp_customize->add_setting( 'sidebar_textcolor', array(
+ 'default' => $color_scheme[4],
+ 'sanitize_callback' => 'sanitize_hex_color',
+ 'transport' => 'postMessage',
+ ) );
+
+ $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'sidebar_textcolor', array(
+ 'label' => __( 'Header and Sidebar Text Color', 'twentyfifteen' ),
+ 'description' => __( 'Applied to the header on small screens and the sidebar on wide screens.', 'twentyfifteen' ),
+ 'section' => 'colors',
+ ) ) );
// Remove the core header textcolor control, as it shares the sidebar text color.
$wp_customize->remove_control( 'header_textcolor' );
// Add custom header and sidebar background color setting and control.
- $wp_customize->add_setting(
- 'header_background_color', array(
- 'default' => $color_scheme[1],
- 'sanitize_callback' => 'sanitize_hex_color',
- 'transport' => 'postMessage',
- )
- );
-
- $wp_customize->add_control(
- new WP_Customize_Color_Control(
- $wp_customize, 'header_background_color', array(
- 'label' => __( 'Header and Sidebar Background Color', 'twentyfifteen' ),
- 'description' => __( 'Applied to the header on small screens and the sidebar on wide screens.', 'twentyfifteen' ),
- 'section' => 'colors',
- )
- )
- );
+ $wp_customize->add_setting( 'header_background_color', array(
+ 'default' => $color_scheme[1],
+ 'sanitize_callback' => 'sanitize_hex_color',
+ 'transport' => 'postMessage',
+ ) );
+
+ $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'header_background_color', array(
+ 'label' => __( 'Header and Sidebar Background Color', 'twentyfifteen' ),
+ 'description' => __( 'Applied to the header on small screens and the sidebar on wide screens.', 'twentyfifteen' ),
+ 'section' => 'colors',
+ ) ) );
// Add an additional description to the header image section.
$wp_customize->get_section( 'header_image' )->description = __( 'Applied to the header on small screens and the sidebar on wide screens.', 'twentyfifteen' );
@@ -165,136 +145,134 @@ function twentyfifteen_get_color_schemes() {
* }
* }
*/
- return apply_filters(
- 'twentyfifteen_color_schemes', array(
- 'default' => array(
- 'label' => __( 'Default', 'twentyfifteen' ),
- 'colors' => array(
- '#f1f1f1',
- '#ffffff',
- '#ffffff',
- '#333333',
- '#333333',
- '#f7f7f7',
- ),
+ return apply_filters( 'twentyfifteen_color_schemes', array(
+ 'default' => array(
+ 'label' => __( 'Default', 'twentyfifteen' ),
+ 'colors' => array(
+ '#f1f1f1',
+ '#ffffff',
+ '#ffffff',
+ '#333333',
+ '#333333',
+ '#f7f7f7',
),
- 'dark' => array(
- 'label' => __( 'Dark', 'twentyfifteen' ),
- 'colors' => array(
- '#111111',
- '#202020',
- '#202020',
- '#bebebe',
- '#bebebe',
- '#1b1b1b',
- ),
+ ),
+ 'dark' => array(
+ 'label' => __( 'Dark', 'twentyfifteen' ),
+ 'colors' => array(
+ '#111111',
+ '#202020',
+ '#202020',
+ '#bebebe',
+ '#bebebe',
+ '#1b1b1b',
),
- 'yellow' => array(
- 'label' => __( 'Yellow', 'twentyfifteen' ),
- 'colors' => array(
- '#f4ca16',
- '#ffdf00',
- '#ffffff',
- '#111111',
- '#111111',
- '#f1f1f1',
- ),
+ ),
+ 'yellow' => array(
+ 'label' => __( 'Yellow', 'twentyfifteen' ),
+ 'colors' => array(
+ '#f4ca16',
+ '#ffdf00',
+ '#ffffff',
+ '#111111',
+ '#111111',
+ '#f1f1f1',
),
- 'pink' => array(
- 'label' => __( 'Pink', 'twentyfifteen' ),
- 'colors' => array(
- '#ffe5d1',
- '#e53b51',
- '#ffffff',
- '#352712',
- '#ffffff',
- '#f1f1f1',
- ),
+ ),
+ 'pink' => array(
+ 'label' => __( 'Pink', 'twentyfifteen' ),
+ 'colors' => array(
+ '#ffe5d1',
+ '#e53b51',
+ '#ffffff',
+ '#352712',
+ '#ffffff',
+ '#f1f1f1',
),
- 'purple' => array(
- 'label' => __( 'Purple', 'twentyfifteen' ),
- 'colors' => array(
- '#674970',
- '#2e2256',
- '#ffffff',
- '#2e2256',
- '#ffffff',
- '#f1f1f1',
- ),
+ ),
+ 'purple' => array(
+ 'label' => __( 'Purple', 'twentyfifteen' ),
+ 'colors' => array(
+ '#674970',
+ '#2e2256',
+ '#ffffff',
+ '#2e2256',
+ '#ffffff',
+ '#f1f1f1',
),
- 'blue' => array(
- 'label' => __( 'Blue', 'twentyfifteen' ),
- 'colors' => array(
- '#e9f2f9',
- '#55c3dc',
- '#ffffff',
- '#22313f',
- '#ffffff',
- '#f1f1f1',
- ),
+ ),
+ 'blue' => array(
+ 'label' => __( 'Blue', 'twentyfifteen' ),
+ 'colors' => array(
+ '#e9f2f9',
+ '#55c3dc',
+ '#ffffff',
+ '#22313f',
+ '#ffffff',
+ '#f1f1f1',
),
- )
- );
+ ),
+ ) );
}
if ( ! function_exists( 'twentyfifteen_get_color_scheme' ) ) :
- /**
- * Get the current Twenty Fifteen color scheme.
- *
- * @since Twenty Fifteen 1.0
- *
- * @return array An associative array of either the current or default color scheme hex values.
- */
- function twentyfifteen_get_color_scheme() {
- $color_scheme_option = get_theme_mod( 'color_scheme', 'default' );
- $color_schemes = twentyfifteen_get_color_schemes();
-
- if ( array_key_exists( $color_scheme_option, $color_schemes ) ) {
- return $color_schemes[ $color_scheme_option ]['colors'];
- }
+/**
+ * Get the current Twenty Fifteen color scheme.
+ *
+ * @since Twenty Fifteen 1.0
+ *
+ * @return array An associative array of either the current or default color scheme hex values.
+ */
+function twentyfifteen_get_color_scheme() {
+ $color_scheme_option = get_theme_mod( 'color_scheme', 'default' );
+ $color_schemes = twentyfifteen_get_color_schemes();
- return $color_schemes['default']['colors'];
+ if ( array_key_exists( $color_scheme_option, $color_schemes ) ) {
+ return $color_schemes[ $color_scheme_option ]['colors'];
}
+
+ return $color_schemes['default']['colors'];
+}
endif; // twentyfifteen_get_color_scheme
if ( ! function_exists( 'twentyfifteen_get_color_scheme_choices' ) ) :
- /**
- * Returns an array of color scheme choices registered for Twenty Fifteen.
- *
- * @since Twenty Fifteen 1.0
- *
- * @return array Array of color schemes.
- */
- function twentyfifteen_get_color_scheme_choices() {
- $color_schemes = twentyfifteen_get_color_schemes();
- $color_scheme_control_options = array();
-
- foreach ( $color_schemes as $color_scheme => $value ) {
- $color_scheme_control_options[ $color_scheme ] = $value['label'];
- }
+/**
+ * Returns an array of color scheme choices registered for Twenty Fifteen.
+ *
+ * @since Twenty Fifteen 1.0
+ *
+ * @return array Array of color schemes.
+ */
+function twentyfifteen_get_color_scheme_choices() {
+ $color_schemes = twentyfifteen_get_color_schemes();
+ $color_scheme_control_options = array();
- return $color_scheme_control_options;
+ foreach ( $color_schemes as $color_scheme => $value ) {
+ $color_scheme_control_options[ $color_scheme ] = $value['label'];
}
+
+ return $color_scheme_control_options;
+}
endif; // twentyfifteen_get_color_scheme_choices
if ( ! function_exists( 'twentyfifteen_sanitize_color_scheme' ) ) :
- /**
- * Sanitization callback for color schemes.
- *
- * @since Twenty Fifteen 1.0
- *
- * @param string $value Color scheme name value.
- * @return string Color scheme name.
- */
- function twentyfifteen_sanitize_color_scheme( $value ) {
- $color_schemes = twentyfifteen_get_color_scheme_choices();
-
- if ( ! array_key_exists( $value, $color_schemes ) ) {
- $value = 'default';
- }
+/**
+ * Sanitization callback for color schemes.
+ *
+ * @since Twenty Fifteen 1.0
+ *
+ * @param string $value Color scheme name value.
+ * @return string Color scheme name.
+ */
+function twentyfifteen_sanitize_color_scheme( $value ) {
+ $color_schemes = twentyfifteen_get_color_scheme_choices();
- return $value;
+ if ( ! array_key_exists( $value, $color_schemes ) ) {
+ $value = 'default';
}
+
+ return $value;
+}
endif; // twentyfifteen_sanitize_color_scheme
/**
@@ -317,7 +295,7 @@ function twentyfifteen_color_scheme_css() {
// Convert main and sidebar text hex color to rgba.
$color_textcolor_rgb = twentyfifteen_hex2rgb( $color_scheme[3] );
$color_sidebar_textcolor_rgb = twentyfifteen_hex2rgb( $color_scheme[4] );
- $colors = array(
+ $colors = array(
'background_color' => $color_scheme[0],
'header_background_color' => $color_scheme[1],
'box_background_color' => $color_scheme[2],
@@ -370,22 +348,20 @@ add_action( 'customize_preview_init', 'twentyfifteen_customize_preview_js' );
* @return string Color scheme CSS.
*/
function twentyfifteen_get_color_scheme_css( $colors ) {
- $colors = wp_parse_args(
- $colors, array(
- 'background_color' => '',
- 'header_background_color' => '',
- 'box_background_color' => '',
- 'textcolor' => '',
- 'secondary_textcolor' => '',
- 'border_color' => '',
- 'border_focus_color' => '',
- 'sidebar_textcolor' => '',
- 'sidebar_border_color' => '',
- 'sidebar_border_focus_color' => '',
- 'secondary_sidebar_textcolor' => '',
- 'meta_box_background_color' => '',
- )
- );
+ $colors = wp_parse_args( $colors, array(
+ 'background_color' => '',
+ 'header_background_color' => '',
+ 'box_background_color' => '',
+ 'textcolor' => '',
+ 'secondary_textcolor' => '',
+ 'border_color' => '',
+ 'border_focus_color' => '',
+ 'sidebar_textcolor' => '',
+ 'sidebar_border_color' => '',
+ 'sidebar_border_focus_color' => '',
+ 'secondary_sidebar_textcolor' => '',
+ 'meta_box_background_color' => '',
+ ) );
$css = <<<CSS
/* Color Scheme */
diff --git a/themes/twentyfifteen/inc/template-tags.php b/themes/twentyfifteen/inc/template-tags.php
index baa98d21..7b4ffeb7 100644
--- a/themes/twentyfifteen/inc/template-tags.php
+++ b/themes/twentyfifteen/inc/template-tags.php
@@ -10,127 +10,120 @@
*/
if ( ! function_exists( 'twentyfifteen_comment_nav' ) ) :
- /**
- * Display navigation to next/previous comments when applicable.
- *
- * @since Twenty Fifteen 1.0
- */
- function twentyfifteen_comment_nav() {
- // Are there comments to navigate through?
- if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) :
- ?>
- <nav class="navigation comment-navigation" role="navigation">
+/**
+ * Display navigation to next/previous comments when applicable.
+ *
+ * @since Twenty Fifteen 1.0
+ */
+function twentyfifteen_comment_nav() {
+ // Are there comments to navigate through?
+ if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) :
+ ?>
+ <nav class="navigation comment-navigation" role="navigation">
<h2 class="screen-reader-text"><?php _e( 'Comment navigation', 'twentyfifteen' ); ?></h2>
<div class="nav-links">
<?php
- if ( $prev_link = get_previous_comments_link( __( 'Older Comments', 'twentyfifteen' ) ) ) :
- printf( '<div class="nav-previous">%s</div>', $prev_link );
+ if ( $prev_link = get_previous_comments_link( __( 'Older Comments', 'twentyfifteen' ) ) ) :
+ printf( '<div class="nav-previous">%s</div>', $prev_link );
endif;
- if ( $next_link = get_next_comments_link( __( 'Newer Comments', 'twentyfifteen' ) ) ) :
- printf( '<div class="nav-next">%s</div>', $next_link );
+ if ( $next_link = get_next_comments_link( __( 'Newer Comments', 'twentyfifteen' ) ) ) :
+ printf( '<div class="nav-next">%s</div>', $next_link );
endif;
?>
- </div><!-- .nav-links -->
- </nav><!-- .comment-navigation -->
- <?php
- endif;
- }
+ </div><!-- .nav-links -->
+ </nav><!-- .comment-navigation -->
+ <?php
+ endif;
+}
endif;
if ( ! function_exists( 'twentyfifteen_entry_meta' ) ) :
- /**
- * Prints HTML with meta information for the categories, tags.
- *
- * @since Twenty Fifteen 1.0
- */
- function twentyfifteen_entry_meta() {
- if ( is_sticky() && is_home() && ! is_paged() ) {
- printf( '<span class="sticky-post">%s</span>', __( 'Featured', 'twentyfifteen' ) );
- }
+/**
+ * Prints HTML with meta information for the categories, tags.
+ *
+ * @since Twenty Fifteen 1.0
+ */
+function twentyfifteen_entry_meta() {
+ if ( is_sticky() && is_home() && ! is_paged() ) {
+ printf( '<span class="sticky-post">%s</span>', __( 'Featured', 'twentyfifteen' ) );
+ }
- $format = get_post_format();
- if ( current_theme_supports( 'post-formats', $format ) ) {
- printf(
- '<span class="entry-format">%1$s<a href="%2$s">%3$s</a></span>',
- sprintf( '<span class="screen-reader-text">%s </span>', _x( 'Format', 'Used before post format.', 'twentyfifteen' ) ),
- esc_url( get_post_format_link( $format ) ),
- get_post_format_string( $format )
- );
+ $format = get_post_format();
+ if ( current_theme_supports( 'post-formats', $format ) ) {
+ printf( '<span class="entry-format">%1$s<a href="%2$s">%3$s</a></span>',
+ sprintf( '<span class="screen-reader-text">%s </span>', _x( 'Format', 'Used before post format.', 'twentyfifteen' ) ),
+ esc_url( get_post_format_link( $format ) ),
+ get_post_format_string( $format )
+ );
+ }
+
+ if ( in_array( get_post_type(), array( 'post', 'attachment' ) ) ) {
+ $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
+
+ if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
+ $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>';
}
- if ( in_array( get_post_type(), array( 'post', 'attachment' ) ) ) {
- $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
+ $time_string = sprintf( $time_string,
+ esc_attr( get_the_date( 'c' ) ),
+ get_the_date(),
+ esc_attr( get_the_modified_date( 'c' ) ),
+ get_the_modified_date()
+ );
- if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
- $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>';
- }
+ printf( '<span class="posted-on"><span class="screen-reader-text">%1$s </span><a href="%2$s" rel="bookmark">%3$s</a></span>',
+ _x( 'Posted on', 'Used before publish date.', 'twentyfifteen' ),
+ esc_url( get_permalink() ),
+ $time_string
+ );
+ }
- $time_string = sprintf(
- $time_string,
- esc_attr( get_the_date( 'c' ) ),
- get_the_date(),
- esc_attr( get_the_modified_date( 'c' ) ),
- get_the_modified_date()
+ if ( 'post' == get_post_type() ) {
+ if ( is_singular() || is_multi_author() ) {
+ printf( '<span class="byline"><span class="author vcard"><span class="screen-reader-text">%1$s </span><a class="url fn n" href="%2$s">%3$s</a></span></span>',
+ _x( 'Author', 'Used before post author name.', 'twentyfifteen' ),
+ esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
+ get_the_author()
);
+ }
- printf(
- '<span class="posted-on"><span class="screen-reader-text">%1$s </span><a href="%2$s" rel="bookmark">%3$s</a></span>',
- _x( 'Posted on', 'Used before publish date.', 'twentyfifteen' ),
- esc_url( get_permalink() ),
- $time_string
+ $categories_list = get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfifteen' ) );
+ if ( $categories_list && twentyfifteen_categorized_blog() ) {
+ printf( '<span class="cat-links"><span class="screen-reader-text">%1$s </span>%2$s</span>',
+ _x( 'Categories', 'Used before category names.', 'twentyfifteen' ),
+ $categories_list
);
}
- if ( 'post' == get_post_type() ) {
- if ( is_singular() || is_multi_author() ) {
- printf(
- '<span class="byline"><span class="author vcard"><span class="screen-reader-text">%1$s </span><a class="url fn n" href="%2$s">%3$s</a></span></span>',
- _x( 'Author', 'Used before post author name.', 'twentyfifteen' ),
- esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
- get_the_author()
- );
- }
-
- $categories_list = get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfifteen' ) );
- if ( $categories_list && twentyfifteen_categorized_blog() ) {
- printf(
- '<span class="cat-links"><span class="screen-reader-text">%1$s </span>%2$s</span>',
- _x( 'Categories', 'Used before category names.', 'twentyfifteen' ),
- $categories_list
- );
- }
-
- $tags_list = get_the_tag_list( '', _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfifteen' ) );
- if ( $tags_list && ! is_wp_error( $tags_list ) ) {
- printf(
- '<span class="tags-links"><span class="screen-reader-text">%1$s </span>%2$s</span>',
- _x( 'Tags', 'Used before tag names.', 'twentyfifteen' ),
- $tags_list
- );
- }
+ $tags_list = get_the_tag_list( '', _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfifteen' ) );
+ if ( $tags_list && ! is_wp_error( $tags_list ) ) {
+ printf( '<span class="tags-links"><span class="screen-reader-text">%1$s </span>%2$s</span>',
+ _x( 'Tags', 'Used before tag names.', 'twentyfifteen' ),
+ $tags_list
+ );
}
+ }
- if ( is_attachment() && wp_attachment_is_image() ) {
- // Retrieve attachment metadata.
- $metadata = wp_get_attachment_metadata();
+ if ( is_attachment() && wp_attachment_is_image() ) {
+ // Retrieve attachment metadata.
+ $metadata = wp_get_attachment_metadata();
- printf(
- '<span class="full-size-link"><span class="screen-reader-text">%1$s </span><a href="%2$s">%3$s &times; %4$s</a></span>',
- _x( 'Full size', 'Used before full size attachment link.', 'twentyfifteen' ),
- esc_url( wp_get_attachment_url() ),
- $metadata['width'],
- $metadata['height']
- );
- }
+ printf( '<span class="full-size-link"><span class="screen-reader-text">%1$s </span><a href="%2$s">%3$s &times; %4$s</a></span>',
+ _x( 'Full size', 'Used before full size attachment link.', 'twentyfifteen' ),
+ esc_url( wp_get_attachment_url() ),
+ $metadata['width'],
+ $metadata['height']
+ );
+ }
- if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
- echo '<span class="comments-link">';
- /* translators: %s: post title */
- comments_popup_link( sprintf( __( 'Leave a comment<span class="screen-reader-text"> on %s</span>', 'twentyfifteen' ), get_the_title() ) );
- echo '</span>';
- }
+ if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
+ echo '<span class="comments-link">';
+ /* translators: %s: post title */
+ comments_popup_link( sprintf( __( 'Leave a comment<span class="screen-reader-text"> on %s</span>', 'twentyfifteen' ), get_the_title() ) );
+ echo '</span>';
}
+}
endif;
/**
@@ -143,15 +136,13 @@ endif;
function twentyfifteen_categorized_blog() {
if ( false === ( $all_the_cool_cats = get_transient( 'twentyfifteen_categories' ) ) ) {
// Create an array of all the categories that are attached to posts.
- $all_the_cool_cats = get_categories(
- array(
- 'fields' => 'ids',
- 'hide_empty' => 1,
+ $all_the_cool_cats = get_categories( array(
+ 'fields' => 'ids',
+ 'hide_empty' => 1,
- // We only need to know if there is more than one category.
- 'number' => 2,
- )
- );
+ // We only need to know if there is more than one category.
+ 'number' => 2,
+ ) );
// Count the number of categories that are attached to the posts.
$all_the_cool_cats = count( $all_the_cool_cats );
@@ -178,26 +169,26 @@ function twentyfifteen_category_transient_flusher() {
delete_transient( 'twentyfifteen_categories' );
}
add_action( 'edit_category', 'twentyfifteen_category_transient_flusher' );
-add_action( 'save_post', 'twentyfifteen_category_transient_flusher' );
+add_action( 'save_post', 'twentyfifteen_category_transient_flusher' );
if ( ! function_exists( 'twentyfifteen_post_thumbnail' ) ) :
- /**
- * Display an optional post thumbnail.
- *
- * Wraps the post thumbnail in an anchor element on index views, or a div
- * element when on single views.
- *
- * @since Twenty Fifteen 1.0
- */
- function twentyfifteen_post_thumbnail() {
- if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) {
- return;
- }
+/**
+ * Display an optional post thumbnail.
+ *
+ * Wraps the post thumbnail in an anchor element on index views, or a div
+ * element when on single views.
+ *
+ * @since Twenty Fifteen 1.0
+ */
+function twentyfifteen_post_thumbnail() {
+ if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) {
+ return;
+ }
- if ( is_singular() ) :
- ?>
+ if ( is_singular() ) :
+ ?>
- <div class="post-thumbnail">
+ <div class="post-thumbnail">
<?php the_post_thumbnail(); ?>
</div><!-- .post-thumbnail -->
@@ -209,61 +200,59 @@ if ( ! function_exists( 'twentyfifteen_post_thumbnail' ) ) :
?>
</a>
- <?php
- endif; // End is_singular()
- }
+ <?php endif; // End is_singular()
+}
endif;
if ( ! function_exists( 'twentyfifteen_get_link_url' ) ) :
- /**
- * Return the post URL.
- *
- * Falls back to the post permalink if no URL is found in the post.
- *
- * @since Twenty Fifteen 1.0
- *
- * @see get_url_in_content()
- *
- * @return string The Link format URL.
- */
- function twentyfifteen_get_link_url() {
- $has_url = get_url_in_content( get_the_content() );
+/**
+ * Return the post URL.
+ *
+ * Falls back to the post permalink if no URL is found in the post.
+ *
+ * @since Twenty Fifteen 1.0
+ *
+ * @see get_url_in_content()
+ *
+ * @return string The Link format URL.
+ */
+function twentyfifteen_get_link_url() {
+ $has_url = get_url_in_content( get_the_content() );
- return $has_url ? $has_url : apply_filters( 'the_permalink', get_permalink() );
- }
+ return $has_url ? $has_url : apply_filters( 'the_permalink', get_permalink() );
+}
endif;
if ( ! function_exists( 'twentyfifteen_excerpt_more' ) && ! is_admin() ) :
- /**
- * Replaces "[...]" (appended to automatically generated excerpts) with ... and a 'Continue reading' link.
- *
- * @since Twenty Fifteen 1.0
- *
- * @return string 'Continue reading' link prepended with an ellipsis.
- */
- function twentyfifteen_excerpt_more( $more ) {
- $link = sprintf(
- '<a href="%1$s" class="more-link">%2$s</a>',
- esc_url( get_permalink( get_the_ID() ) ),
- /* translators: %s: Name of current post */
- sprintf( __( 'Continue reading %s', 'twentyfifteen' ), '<span class="screen-reader-text">' . get_the_title( get_the_ID() ) . '</span>' )
+/**
+ * Replaces "[...]" (appended to automatically generated excerpts) with ... and a 'Continue reading' link.
+ *
+ * @since Twenty Fifteen 1.0
+ *
+ * @return string 'Continue reading' link prepended with an ellipsis.
+ */
+function twentyfifteen_excerpt_more( $more ) {
+ $link = sprintf( '<a href="%1$s" class="more-link">%2$s</a>',
+ esc_url( get_permalink( get_the_ID() ) ),
+ /* translators: %s: Name of current post */
+ sprintf( __( 'Continue reading %s', 'twentyfifteen' ), '<span class="screen-reader-text">' . get_the_title( get_the_ID() ) . '</span>' )
);
- return ' &hellip; ' . $link;
- }
- add_filter( 'excerpt_more', 'twentyfifteen_excerpt_more' );
+ return ' &hellip; ' . $link;
+}
+add_filter( 'excerpt_more', 'twentyfifteen_excerpt_more' );
endif;
if ( ! function_exists( 'twentyfifteen_the_custom_logo' ) ) :
- /**
- * Displays the optional custom logo.
- *
- * Does nothing if the custom logo is not available.
- *
- * @since Twenty Fifteen 1.5
- */
- function twentyfifteen_the_custom_logo() {
- if ( function_exists( 'the_custom_logo' ) ) {
- the_custom_logo();
- }
+/**
+ * Displays the optional custom logo.
+ *
+ * Does nothing if the custom logo is not available.
+ *
+ * @since Twenty Fifteen 1.5
+ */
+function twentyfifteen_the_custom_logo() {
+ if ( function_exists( 'the_custom_logo' ) ) {
+ the_custom_logo();
}
+}
endif;
diff --git a/themes/twentyfifteen/index.php b/themes/twentyfifteen/index.php
index 4ad3d382..db77651e 100644
--- a/themes/twentyfifteen/index.php
+++ b/themes/twentyfifteen/index.php
@@ -29,8 +29,7 @@ get_header(); ?>
<?php
// Start the loop.
- while ( have_posts() ) :
- the_post();
+ while ( have_posts() ) : the_post();
/*
* Include the Post-Format-specific template for the content.
@@ -39,19 +38,17 @@ get_header(); ?>
*/
get_template_part( 'content', get_post_format() );
- // End the loop.
+ // End the loop.
endwhile;
// Previous/next page navigation.
- the_posts_pagination(
- array(
- 'prev_text' => __( 'Previous page', 'twentyfifteen' ),
- 'next_text' => __( 'Next page', 'twentyfifteen' ),
- 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>',
- )
- );
+ the_posts_pagination( array(
+ 'prev_text' => __( 'Previous page', 'twentyfifteen' ),
+ 'next_text' => __( 'Next page', 'twentyfifteen' ),
+ 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>',
+ ) );
- // If no content, include the "No posts found" template.
+ // If no content, include the "No posts found" template.
else :
get_template_part( 'content', 'none' );
diff --git a/themes/twentyfifteen/js/functions.js b/themes/twentyfifteen/js/functions.js
index b9dddc85..2da5cbc3 100644
--- a/themes/twentyfifteen/js/functions.js
+++ b/themes/twentyfifteen/js/functions.js
@@ -77,8 +77,7 @@
} )();
/**
- * Add or remove ARIA attributes.
- *
+ * @summary Add or remove ARIA attributes.
* Uses jQuery's width() function to determine the size of the window and add
* the default ARIA attributes for the menu toggle if it's visible.
* @since Twenty Fifteen 1.1
diff --git a/themes/twentyfifteen/page.php b/themes/twentyfifteen/page.php
index 50d0bf1c..5c7a0b07 100644
--- a/themes/twentyfifteen/page.php
+++ b/themes/twentyfifteen/page.php
@@ -18,8 +18,7 @@ get_header(); ?>
<?php
// Start the loop.
- while ( have_posts() ) :
- the_post();
+ while ( have_posts() ) : the_post();
// Include the page content template.
get_template_part( 'content', 'page' );
@@ -29,7 +28,7 @@ get_header(); ?>
comments_template();
endif;
- // End the loop.
+ // End the loop.
endwhile;
?>
diff --git a/themes/twentyfifteen/readme.txt b/themes/twentyfifteen/readme.txt
index 8231e099..7bc7d625 100644
--- a/themes/twentyfifteen/readme.txt
+++ b/themes/twentyfifteen/readme.txt
@@ -1,8 +1,8 @@
=== Twenty Fifteen ===
Contributors: the WordPress team
Requires at least: WordPress 4.1
-Tested up to: WordPress 5.0-trunk
-Version: 2.0
+Tested up to: WordPress 5.0
+Version: 2.2
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, two-columns, left-sidebar, accessibility-ready, custom-background, custom-colors, custom-header, custom-logo, custom-menu, editor-style, featured-images, microformats, post-formats, rtl-language-support, sticky-post, threaded-comments, translation-ready
@@ -55,6 +55,16 @@ Source: http://www.genericons.com
== Changelog ==
+= 2.2 =
+* Released: December 19, 2018
+
+https://codex.wordpress.org/Twenty_Fifteen_Theme_Changelog#Version_2.2
+
+= 2.1 =
+* Released: December 6, 2018
+
+https://codex.wordpress.org/Twenty_Fifteen_Theme_Changelog#Version_2.1
+
= 2.0 =
* Released: May 17, 2018
diff --git a/themes/twentyfifteen/search.php b/themes/twentyfifteen/search.php
index 174c9f6f..33528415 100644
--- a/themes/twentyfifteen/search.php
+++ b/themes/twentyfifteen/search.php
@@ -20,9 +20,7 @@ get_header(); ?>
<?php
// Start the loop.
- while ( have_posts() ) :
- the_post();
- ?>
+ while ( have_posts() ) : the_post(); ?>
<?php
/*
@@ -32,19 +30,17 @@ get_header(); ?>
*/
get_template_part( 'content', 'search' );
- // End the loop.
+ // End the loop.
endwhile;
// Previous/next page navigation.
- the_posts_pagination(
- array(
- 'prev_text' => __( 'Previous page', 'twentyfifteen' ),
- 'next_text' => __( 'Next page', 'twentyfifteen' ),
- 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>',
- )
- );
-
- // If no content, include the "No posts found" template.
+ the_posts_pagination( array(
+ 'prev_text' => __( 'Previous page', 'twentyfifteen' ),
+ 'next_text' => __( 'Next page', 'twentyfifteen' ),
+ 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>',
+ ) );
+
+ // If no content, include the "No posts found" template.
else :
get_template_part( 'content', 'none' );
diff --git a/themes/twentyfifteen/sidebar.php b/themes/twentyfifteen/sidebar.php
index f2326a8c..02308efc 100644
--- a/themes/twentyfifteen/sidebar.php
+++ b/themes/twentyfifteen/sidebar.php
@@ -7,19 +7,17 @@
* @since Twenty Fifteen 1.0
*/
-if ( has_nav_menu( 'primary' ) || has_nav_menu( 'social' ) || is_active_sidebar( 'sidebar-1' ) ) : ?>
+if ( has_nav_menu( 'primary' ) || has_nav_menu( 'social' ) || is_active_sidebar( 'sidebar-1' ) ) : ?>
<div id="secondary" class="secondary">
<?php if ( has_nav_menu( 'primary' ) ) : ?>
<nav id="site-navigation" class="main-navigation" role="navigation">
<?php
// Primary navigation menu.
- wp_nav_menu(
- array(
- 'menu_class' => 'nav-menu',
- 'theme_location' => 'primary',
- )
- );
+ wp_nav_menu( array(
+ 'menu_class' => 'nav-menu',
+ 'theme_location' => 'primary',
+ ) );
?>
</nav><!-- .main-navigation -->
<?php endif; ?>
@@ -28,14 +26,12 @@ if ( has_nav_menu( 'primary' ) || has_nav_menu( 'social' ) || is_active_sidebar(
<nav id="social-navigation" class="social-navigation" role="navigation">
<?php
// Social links navigation menu.
- wp_nav_menu(
- array(
- 'theme_location' => 'social',
- 'depth' => 1,
- 'link_before' => '<span class="screen-reader-text">',
- 'link_after' => '</span>',
- )
- );
+ wp_nav_menu( array(
+ 'theme_location' => 'social',
+ 'depth' => 1,
+ 'link_before' => '<span class="screen-reader-text">',
+ 'link_after' => '</span>',
+ ) );
?>
</nav><!-- .social-navigation -->
<?php endif; ?>
diff --git a/themes/twentyfifteen/single.php b/themes/twentyfifteen/single.php
index 4de3a493..fda8b5ec 100644
--- a/themes/twentyfifteen/single.php
+++ b/themes/twentyfifteen/single.php
@@ -14,8 +14,7 @@ get_header(); ?>
<?php
// Start the loop.
- while ( have_posts() ) :
- the_post();
+ while ( have_posts() ) : the_post();
/*
* Include the post format-specific template for the content. If you want to
@@ -30,18 +29,16 @@ get_header(); ?>
endif;
// Previous/next post navigation.
- the_post_navigation(
- array(
- 'next_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Next', 'twentyfifteen' ) . '</span> ' .
- '<span class="screen-reader-text">' . __( 'Next post:', 'twentyfifteen' ) . '</span> ' .
- '<span class="post-title">%title</span>',
- 'prev_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Previous', 'twentyfifteen' ) . '</span> ' .
- '<span class="screen-reader-text">' . __( 'Previous post:', 'twentyfifteen' ) . '</span> ' .
- '<span class="post-title">%title</span>',
- )
- );
-
- // End the loop.
+ the_post_navigation( array(
+ 'next_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Next', 'twentyfifteen' ) . '</span> ' .
+ '<span class="screen-reader-text">' . __( 'Next post:', 'twentyfifteen' ) . '</span> ' .
+ '<span class="post-title">%title</span>',
+ 'prev_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Previous', 'twentyfifteen' ) . '</span> ' .
+ '<span class="screen-reader-text">' . __( 'Previous post:', 'twentyfifteen' ) . '</span> ' .
+ '<span class="post-title">%title</span>',
+ ) );
+
+ // End the loop.
endwhile;
?>
diff --git a/themes/twentyfifteen/style.css b/themes/twentyfifteen/style.css
index e36ffa52..d53b3eb2 100644
--- a/themes/twentyfifteen/style.css
+++ b/themes/twentyfifteen/style.css
@@ -4,7 +4,7 @@ Theme URI: https://wordpress.org/themes/twentyfifteen/
Author: the WordPress team
Author URI: https://wordpress.org/
Description: Our 2015 default theme is clean, blog-focused, and designed for clarity. Twenty Fifteen's simple, straightforward typography is readable on a wide variety of screen sizes, and suitable for multiple languages. We designed it using a mobile-first approach, meaning your content takes center-stage, regardless of whether your visitors arrive by smartphone, tablet, laptop, or desktop computer.
-Version: 2.0
+Version: 2.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, two-columns, left-sidebar, accessibility-ready, custom-background, custom-colors, custom-header, custom-logo, custom-menu, editor-style, featured-images, microformats, post-formats, rtl-language-support, sticky-post, threaded-comments, translation-ready