summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'themes/twentyfifteen')
-rw-r--r--themes/twentyfifteen/archive.php8
-rw-r--r--themes/twentyfifteen/assets/pier-seagull.jpgbin0 -> 329339 bytes
-rw-r--r--themes/twentyfifteen/assets/pier-seagulls.jpgbin0 -> 262409 bytes
-rw-r--r--themes/twentyfifteen/assets/pier-sunset.jpgbin0 -> 137086 bytes
-rw-r--r--themes/twentyfifteen/author-bio.php7
-rw-r--r--themes/twentyfifteen/comments.php6
-rw-r--r--themes/twentyfifteen/content-link.php4
-rw-r--r--themes/twentyfifteen/content-none.php7
-rw-r--r--themes/twentyfifteen/content-search.php2
-rw-r--r--themes/twentyfifteen/content.php4
-rw-r--r--themes/twentyfifteen/css/editor-blocks.css137
-rw-r--r--themes/twentyfifteen/css/editor-style.css3
-rw-r--r--themes/twentyfifteen/footer.php5
-rw-r--r--themes/twentyfifteen/functions.php117
-rw-r--r--themes/twentyfifteen/genericons/genericons.css2
-rw-r--r--themes/twentyfifteen/header.php4
-rw-r--r--themes/twentyfifteen/image.php6
-rw-r--r--themes/twentyfifteen/inc/back-compat.php24
-rw-r--r--themes/twentyfifteen/inc/block-patterns.php68
-rw-r--r--themes/twentyfifteen/inc/custom-header.php32
-rw-r--r--themes/twentyfifteen/inc/customizer.php10
-rw-r--r--themes/twentyfifteen/inc/template-tags.php29
-rw-r--r--themes/twentyfifteen/index.php6
-rw-r--r--themes/twentyfifteen/js/functions.js83
-rw-r--r--themes/twentyfifteen/readme.txt44
-rw-r--r--themes/twentyfifteen/search.php7
-rw-r--r--themes/twentyfifteen/single.php4
-rw-r--r--themes/twentyfifteen/style.css50
28 files changed, 466 insertions, 203 deletions
diff --git a/themes/twentyfifteen/archive.php b/themes/twentyfifteen/archive.php
index 26a9a4b4..425a74ac 100644
--- a/themes/twentyfifteen/archive.php
+++ b/themes/twentyfifteen/archive.php
@@ -31,14 +31,14 @@ get_header(); ?>
</header><!-- .page-header -->
<?php
- // Start the Loop.
+ // Start the loop.
while ( have_posts() ) :
the_post();
/*
- * Include the Post-Format-specific template for the content.
- * If you want to override this in a child theme, then include a file
- * called content-___.php (where ___ is the Post Format name) and that will be used instead.
+ * Include the post format-specific template for the content. If you want
+ * to use this in a child theme, then include a file called content-___.php
+ * (where ___ is the post format) and that will be used instead.
*/
get_template_part( 'content', get_post_format() );
diff --git a/themes/twentyfifteen/assets/pier-seagull.jpg b/themes/twentyfifteen/assets/pier-seagull.jpg
new file mode 100644
index 00000000..fad56465
--- /dev/null
+++ b/themes/twentyfifteen/assets/pier-seagull.jpg
Binary files differ
diff --git a/themes/twentyfifteen/assets/pier-seagulls.jpg b/themes/twentyfifteen/assets/pier-seagulls.jpg
new file mode 100644
index 00000000..01d52f1d
--- /dev/null
+++ b/themes/twentyfifteen/assets/pier-seagulls.jpg
Binary files differ
diff --git a/themes/twentyfifteen/assets/pier-sunset.jpg b/themes/twentyfifteen/assets/pier-sunset.jpg
new file mode 100644
index 00000000..75430630
--- /dev/null
+++ b/themes/twentyfifteen/assets/pier-sunset.jpg
Binary files differ
diff --git a/themes/twentyfifteen/author-bio.php b/themes/twentyfifteen/author-bio.php
index 839df911..995ad1a4 100644
--- a/themes/twentyfifteen/author-bio.php
+++ b/themes/twentyfifteen/author-bio.php
@@ -13,7 +13,7 @@
<div class="author-avatar">
<?php
/**
- * Filter the author bio avatar size.
+ * Filters the author bio avatar size.
*
* @since Twenty Fifteen 1.0
*
@@ -31,7 +31,10 @@
<p class="author-bio">
<?php the_author_meta( 'description' ); ?>
<a class="author-link" href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
- <?php printf( __( 'View all posts by %s', 'twentyfifteen' ), get_the_author() ); ?>
+ <?php
+ /* translators: %s: Author display name. */
+ printf( __( 'View all posts by %s', 'twentyfifteen' ), get_the_author() );
+ ?>
</a>
</p><!-- .author-bio -->
diff --git a/themes/twentyfifteen/comments.php b/themes/twentyfifteen/comments.php
index b7ab478a..355acecb 100644
--- a/themes/twentyfifteen/comments.php
+++ b/themes/twentyfifteen/comments.php
@@ -27,11 +27,11 @@ if ( post_password_required() ) {
<?php
$comments_number = get_comments_number();
if ( '1' === $comments_number ) {
- /* translators: %s: post title */
+ /* 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 */
+ /* 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;',
@@ -65,7 +65,7 @@ if ( post_password_required() ) {
<?php endif; // have_comments() ?>
<?php
- // If comments are closed and there are comments, let's leave a little note, shall we?
+ // 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' ) ) :
?>
<p class="no-comments"><?php _e( 'Comments are closed.', 'twentyfifteen' ); ?></p>
diff --git a/themes/twentyfifteen/content-link.php b/themes/twentyfifteen/content-link.php
index 023e0d6d..2d442a15 100644
--- a/themes/twentyfifteen/content-link.php
+++ b/themes/twentyfifteen/content-link.php
@@ -26,9 +26,9 @@
<div class="entry-content">
<?php
- /* translators: %s: Name of current post */
the_content(
sprintf(
+ /* translators: %s: Post title. */
__( 'Continue reading %s', 'twentyfifteen' ),
the_title( '<span class="screen-reader-text">', '</span>', false )
)
@@ -49,7 +49,7 @@
<!-- .entry-content -->
<?php
- // Author bio.
+ // Author bio.
if ( is_single() && get_the_author_meta( 'description' ) ) :
get_template_part( 'author-bio' );
endif;
diff --git a/themes/twentyfifteen/content-none.php b/themes/twentyfifteen/content-none.php
index cf118d21..055e50b2 100644
--- a/themes/twentyfifteen/content-none.php
+++ b/themes/twentyfifteen/content-none.php
@@ -19,7 +19,12 @@
<?php if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>
- <p><?php printf( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'twentyfifteen' ), esc_url( admin_url( 'post-new.php' ) ) ); ?></p>
+ <p>
+ <?php
+ /* translators: %s: Post editor URL. */
+ printf( __( 'Ready to publish your first post? <a href="%s">Get started here</a>.', 'twentyfifteen' ), esc_url( admin_url( 'post-new.php' ) ) );
+ ?>
+ </p>
<?php elseif ( is_search() ) : ?>
diff --git a/themes/twentyfifteen/content-search.php b/themes/twentyfifteen/content-search.php
index f8091ce6..59d8b327 100644
--- a/themes/twentyfifteen/content-search.php
+++ b/themes/twentyfifteen/content-search.php
@@ -21,7 +21,7 @@
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
- <?php if ( 'post' == get_post_type() ) : ?>
+ <?php if ( 'post' === get_post_type() ) : ?>
<footer class="entry-footer">
<?php twentyfifteen_entry_meta(); ?>
diff --git a/themes/twentyfifteen/content.php b/themes/twentyfifteen/content.php
index 13799fb0..3206ad6b 100644
--- a/themes/twentyfifteen/content.php
+++ b/themes/twentyfifteen/content.php
@@ -28,9 +28,9 @@
<div class="entry-content">
<?php
- /* translators: %s: Name of current post */
the_content(
sprintf(
+ /* translators: %s: Post title. */
__( 'Continue reading %s', 'twentyfifteen' ),
the_title( '<span class="screen-reader-text">', '</span>', false )
)
@@ -50,7 +50,7 @@
</div><!-- .entry-content -->
<?php
- // Author bio.
+ // Author bio.
if ( is_single() && get_the_author_meta( 'description' ) ) :
get_template_part( 'author-bio' );
endif;
diff --git a/themes/twentyfifteen/css/editor-blocks.css b/themes/twentyfifteen/css/editor-blocks.css
index 5b1e90c9..0fe10cae 100644
--- a/themes/twentyfifteen/css/editor-blocks.css
+++ b/themes/twentyfifteen/css/editor-blocks.css
@@ -12,6 +12,7 @@ Description: Used to style blocks in the editor.
4.0 Blocks - Formatting
5.0 Blocks - Layout Elements
6.0 Blocks - Widgets
+7.0 Blocks - Colors
--------------------------------------------------------------*/
/*--------------------------------------------------------------
@@ -330,11 +331,7 @@ Description: Used to style blocks in the editor.
.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 ol,
.block-library-list .editor-rich-text__tinymce {
padding: 0;
}
@@ -365,14 +362,22 @@ Description: Used to style blocks in the editor.
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 {
+.rtl .editor-styles-wrapper ul ul,
+.rtl .editor-styles-wrapper ol ol,
+.rtl .editor-styles-wrapper ul ol,
+.rtl .editor-styles-wrapper ol ul {
margin-left: 0;
- margin-right: 1.3333em;
+ margin-right: 23px;
+}
+
+.wp-block-freeform.block-library-rich-text__tinymce ul,
+.wp-block-freeform.block-library-rich-text__tinymce ol {
+ padding-left: 23px;
+}
+
+.rtl .wp-block-freeform.block-library-rich-text__tinymce ul,
+.rtl .wp-block-freeform.block-library-rich-text__tinymce ol {
+ padding: 0;
}
/* Quote */
@@ -630,7 +635,7 @@ p.has-drop-cap:not(:focus)::first-letter {
/* Code */
-.wp-block-code,
+.editor-styles-wrapper .wp-block-code,
.wp-block-freeform.block-library-rich-text__tinymce code {
background: transparent;
border: 0;
@@ -701,6 +706,12 @@ p.has-drop-cap:not(:focus)::first-letter {
text-align: right;
}
+/* Verse */
+
+.editor-styles-wrapper .wp-block-verse {
+ font-family: inherit;
+}
+
/*--------------------------------------------------------------
5.0 Blocks - Layout Elements
--------------------------------------------------------------*/
@@ -869,3 +880,103 @@ p.has-drop-cap:not(:focus)::first-letter {
.edit-post-visual-editor .wp-block-latest-posts.is-grid li {
margin-bottom: 16px;
}
+
+/*--------------------------------------------------------------
+7.0 Blocks - Colors
+--------------------------------------------------------------*/
+
+:root .editor-styles-wrapper .has-dark-gray-color {
+ color: #111;
+}
+
+:root .editor-styles-wrapper .has-dark-gray-background-color {
+ background-color: #111;
+}
+
+:root .editor-styles-wrapper .has-light-gray-color {
+ color: #f1f1f1;
+}
+
+:root .editor-styles-wrapper .has-light-gray-background-color {
+ background-color: #f1f1f1;
+}
+
+:root .editor-styles-wrapper .has-white-color {
+ color: #fff;
+}
+
+:root .editor-styles-wrapper .has-white-background-color {
+ background-color: #fff;
+}
+
+:root .editor-styles-wrapper .has-yellow-color {
+ color: #f4ca16;
+}
+
+:root .editor-styles-wrapper .has-yellow-background-color {
+ background-color: #f4ca16;
+}
+
+:root .editor-styles-wrapper .has-dark-brown-color {
+ color: #352712;
+}
+
+:root .editor-styles-wrapper .has-dark-brown-background-color {
+ background-color: #352712;
+}
+
+:root .editor-styles-wrapper .has-medium-pink-color {
+ color: #e53b51;
+}
+
+:root .editor-styles-wrapper .has-medium-pink-background-color {
+ background-color: #e53b51;
+}
+
+:root .editor-styles-wrapper .has-light-pink-color {
+ color: #ffe5d1;
+}
+
+:root .editor-styles-wrapper .has-light-pink-background-color {
+ background-color: #ffe5d1;
+}
+
+:root .editor-styles-wrapper .has-dark-purple-color {
+ color: #2e2256;
+}
+
+:root .editor-styles-wrapper .has-dark-purple-background-color {
+ background-color: #2e2256;
+}
+
+:root .editor-styles-wrapper .has-purple-color {
+ color: #674970;
+}
+
+:root .editor-styles-wrapper .has-purple-background-color {
+ background-color: #674970;
+}
+
+:root .editor-styles-wrapper .has-blue-gray-color {
+ color: #22313f;
+}
+
+:root .editor-styles-wrapper .has-blue-gray-background-color {
+ background-color: #22313f;
+}
+
+:root .editor-styles-wrapper .has-bright-blue-color {
+ color: #55c3dc;
+}
+
+:root .editor-styles-wrapper .has-bright-blue-background-color {
+ background-color: #55c3dc;
+}
+
+:root .editor-styles-wrapper .has-light-blue-color {
+ color: #e9f2f9;
+}
+
+:root .editor-styles-wrapper .has-light-blue-background-color {
+ background-color: #e9f2f9;
+}
diff --git a/themes/twentyfifteen/css/editor-style.css b/themes/twentyfifteen/css/editor-style.css
index b3cdd0f1..b2660b1e 100644
--- a/themes/twentyfifteen/css/editor-style.css
+++ b/themes/twentyfifteen/css/editor-style.css
@@ -28,7 +28,7 @@ body {
font-weight: 400;
font-size: 17px;
line-height: 1.6471;
- margin: 20px 40px;
+ margin: auto 20px;
max-width: 660px;
vertical-align: baseline;
}
@@ -163,7 +163,6 @@ pre {
font-size: 17px;
line-height: 1.2353;
margin-bottom: 28px;
- max-width: 100%;
overflow: auto;
padding: 14px;
white-space: pre;
diff --git a/themes/twentyfifteen/footer.php b/themes/twentyfifteen/footer.php
index 6447da0e..0265485e 100644
--- a/themes/twentyfifteen/footer.php
+++ b/themes/twentyfifteen/footer.php
@@ -28,7 +28,10 @@
}
?>
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentyfifteen' ) ); ?>" class="imprint">
- <?php printf( __( 'Proudly powered by %s', 'twentyfifteen' ), 'WordPress' ); ?>
+ <?php
+ /* translators: %s: WordPress */
+ printf( __( 'Proudly powered by %s', 'twentyfifteen' ), 'WordPress' );
+ ?>
</a>
</div><!-- .site-info -->
</footer><!-- .site-footer -->
diff --git a/themes/twentyfifteen/functions.php b/themes/twentyfifteen/functions.php
index db6451f0..4371cb5c 100644
--- a/themes/twentyfifteen/functions.php
+++ b/themes/twentyfifteen/functions.php
@@ -11,14 +11,14 @@
* functions.php file. The child theme's functions.php file is included before
* the parent theme's file, so the child theme functions would be used.
*
- * @link https://codex.wordpress.org/Theme_Development
+ * @link https://developer.wordpress.org/themes/basics/theme-functions/
* @link https://developer.wordpress.org/themes/advanced-topics/child-themes/
*
* Functions that are not pluggable (not wrapped in function_exists()) are
* instead attached to a filter or action hook.
*
* For more information on hooks, actions, and filters,
- * {@link https://codex.wordpress.org/Plugin_API}
+ * {@link https://developer.wordpress.org/plugins/}
*
* @package WordPress
* @subpackage Twenty_Fifteen
@@ -100,13 +100,16 @@ if ( ! function_exists( 'twentyfifteen_setup' ) ) :
'comment-list',
'gallery',
'caption',
+ 'script',
+ 'style',
+ 'navigation-widgets',
)
);
/*
* Enable support for Post Formats.
*
- * See: https://codex.wordpress.org/Post_Formats
+ * See: https://wordpress.org/support/article/post-formats/
*/
add_theme_support(
'post-formats',
@@ -142,20 +145,20 @@ if ( ! function_exists( 'twentyfifteen_setup' ) ) :
// 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',
+ /**
+ * Filters Twenty Fifteen custom-background support arguments.
+ *
+ * @since Twenty Fifteen 1.0
+ *
+ * @param array $args {
+ * An array of custom-background support arguments.
+ *
+ * @type string $default-color Default color of the background.
+ * @type string $default-attachment Default attachment of the background.
+ * }
+ */
apply_filters(
'twentyfifteen_custom_background_args',
array(
@@ -250,7 +253,7 @@ if ( ! function_exists( 'twentyfifteen_setup' ) ) :
// Indicate widget sidebars can use selective refresh in the Customizer.
add_theme_support( 'customize-selective-refresh-widgets' );
}
-endif; // twentyfifteen_setup
+endif; // twentyfifteen_setup()
add_action( 'after_setup_theme', 'twentyfifteen_setup' );
/**
@@ -258,7 +261,7 @@ add_action( 'after_setup_theme', 'twentyfifteen_setup' );
*
* @since Twenty Fifteen 1.0
*
- * @link https://codex.wordpress.org/Function_Reference/register_sidebar
+ * @link https://developer.wordpress.org/reference/functions/register_sidebar/
*/
function twentyfifteen_widgets_init() {
register_sidebar(
@@ -289,7 +292,7 @@ if ( ! function_exists( 'twentyfifteen_fonts_url' ) ) :
$subsets = 'latin,latin-ext';
/*
- * Translators: If there are characters in your language that are not supported
+ * 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' ) ) {
@@ -297,7 +300,7 @@ if ( ! function_exists( 'twentyfifteen_fonts_url' ) ) :
}
/*
- * Translators: If there are characters in your language that are not supported
+ * 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' ) ) {
@@ -305,7 +308,7 @@ if ( ! function_exists( 'twentyfifteen_fonts_url' ) ) :
}
/*
- * Translators: If there are characters in your language that are not supported
+ * 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' ) ) {
@@ -313,26 +316,27 @@ if ( ! function_exists( 'twentyfifteen_fonts_url' ) ) :
}
/*
- * Translators: To add an additional character subset specific to your language,
+ * 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 ) {
+ if ( 'cyrillic' === $subset ) {
$subsets .= ',cyrillic,cyrillic-ext';
- } elseif ( 'greek' == $subset ) {
+ } elseif ( 'greek' === $subset ) {
$subsets .= ',greek,greek-ext';
- } elseif ( 'devanagari' == $subset ) {
+ } elseif ( 'devanagari' === $subset ) {
$subsets .= ',devanagari';
- } elseif ( 'vietnamese' == $subset ) {
+ } elseif ( 'vietnamese' === $subset ) {
$subsets .= ',vietnamese';
}
if ( $fonts ) {
$fonts_url = add_query_arg(
array(
- 'family' => urlencode( implode( '|', $fonts ) ),
- 'subset' => urlencode( $subsets ),
+ 'family' => urlencode( implode( '|', $fonts ) ),
+ 'subset' => urlencode( $subsets ),
+ 'display' => urlencode( 'fallback' ),
),
'https://fonts.googleapis.com/css'
);
@@ -364,33 +368,33 @@ function twentyfifteen_scripts() {
wp_enqueue_style( 'twentyfifteen-fonts', twentyfifteen_fonts_url(), array(), null );
// Add Genericons, used in the main stylesheet.
- wp_enqueue_style( 'genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.2' );
+ wp_enqueue_style( 'genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '20201208' );
// Load our main stylesheet.
- wp_enqueue_style( 'twentyfifteen-style', get_stylesheet_uri() );
+ wp_enqueue_style( 'twentyfifteen-style', get_stylesheet_uri(), array(), '20201208' );
// Theme block stylesheet.
- wp_enqueue_style( 'twentyfifteen-block-style', get_template_directory_uri() . '/css/blocks.css', array( 'twentyfifteen-style' ), '20181230' );
+ wp_enqueue_style( 'twentyfifteen-block-style', get_template_directory_uri() . '/css/blocks.css', array( 'twentyfifteen-style' ), '20190102' );
// Load the Internet Explorer specific stylesheet.
- wp_enqueue_style( 'twentyfifteen-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentyfifteen-style' ), '20141010' );
+ wp_enqueue_style( 'twentyfifteen-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentyfifteen-style' ), '20170916' );
wp_style_add_data( 'twentyfifteen-ie', 'conditional', 'lt IE 9' );
// Load the Internet Explorer 7 specific stylesheet.
- wp_enqueue_style( 'twentyfifteen-ie7', get_template_directory_uri() . '/css/ie7.css', array( 'twentyfifteen-style' ), '20141010' );
+ wp_enqueue_style( 'twentyfifteen-ie7', get_template_directory_uri() . '/css/ie7.css', array( 'twentyfifteen-style' ), '20141210' );
wp_style_add_data( 'twentyfifteen-ie7', 'conditional', 'lt IE 8' );
- wp_enqueue_script( 'twentyfifteen-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20141010', true );
+ wp_enqueue_script( 'twentyfifteen-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20141028', true );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
if ( is_singular() && wp_attachment_is_image() ) {
- wp_enqueue_script( 'twentyfifteen-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20141010' );
+ wp_enqueue_script( 'twentyfifteen-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20141210' );
}
- wp_enqueue_script( 'twentyfifteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20150330', true );
+ wp_enqueue_script( 'twentyfifteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20171218', true );
wp_localize_script(
'twentyfifteen-script',
'screenReaderText',
@@ -409,7 +413,7 @@ add_action( 'wp_enqueue_scripts', 'twentyfifteen_scripts' );
*/
function twentyfifteen_block_editor_styles() {
// Block styles.
- wp_enqueue_style( 'twentyfifteen-block-editor-style', get_template_directory_uri() . '/css/editor-blocks.css', array(), '20181230' );
+ wp_enqueue_style( 'twentyfifteen-block-editor-style', get_template_directory_uri() . '/css/editor-blocks.css', array(), '20201208' );
// Add custom fonts.
wp_enqueue_style( 'twentyfifteen-fonts', twentyfifteen_fonts_url(), array(), null );
}
@@ -457,7 +461,7 @@ function twentyfifteen_post_nav_background() {
$next = get_adjacent_post( false, '', false );
$css = '';
- if ( is_attachment() && 'attachment' == $previous->post_type ) {
+ if ( is_attachment() && 'attachment' === $previous->post_type ) {
return;
}
@@ -488,14 +492,14 @@ add_action( 'wp_enqueue_scripts', 'twentyfifteen_post_nav_background' );
*
* @since Twenty Fifteen 1.0
*
- * @param string $item_output The menu item output.
- * @param WP_Post $item Menu item object.
- * @param int $depth Depth of the menu.
- * @param array $args wp_nav_menu() arguments.
+ * @param string $item_output The menu item's starting HTML output.
+ * @param WP_Post $item Menu item data object.
+ * @param int $depth Depth of the menu. Used for padding.
+ * @param stdClass $args An object of wp_nav_menu() arguments.
* @return string Menu item with possible description.
*/
function twentyfifteen_nav_description( $item_output, $item, $depth, $args ) {
- if ( 'primary' == $args->theme_location && $item->description ) {
+ if ( 'primary' === $args->theme_location && $item->description ) {
$item_output = str_replace( $args->link_after . '</a>', '<div class="menu-item-description">' . $item->description . '</div>' . $args->link_after . '</a>', $item_output );
}
@@ -535,6 +539,28 @@ function twentyfifteen_widget_tag_cloud_args( $args ) {
}
add_filter( 'widget_tag_cloud_args', 'twentyfifteen_widget_tag_cloud_args' );
+/**
+ * Prevents `author-bio.php` partial template from interfering with rendering
+ * an author archive of a user with the `bio` username.
+ *
+ * @since Twenty Fifteen 2.6
+ *
+ * @param string $template Template file.
+ * @return string Replacement template file.
+ */
+function twentyfifteen_author_bio_template( $template ) {
+ if ( is_author() ) {
+ $author = get_queried_object();
+ if ( $author instanceof WP_User && 'bio' === $author->user_nicename ) {
+ // Use author templates if exist, fall back to template hierarchy otherwise.
+ return locate_template( array( "author-{$author->ID}.php", 'author.php' ) );
+ }
+ }
+
+ return $template;
+}
+add_filter( 'author_template', 'twentyfifteen_author_bio_template' );
+
/**
* Implement the Custom Header feature.
@@ -556,3 +582,10 @@ require get_template_directory() . '/inc/template-tags.php';
* @since Twenty Fifteen 1.0
*/
require get_template_directory() . '/inc/customizer.php';
+
+/**
+ * Block Patterns.
+ *
+ * @since Twenty Fifteen 3.0
+ */
+require get_template_directory() . '/inc/block-patterns.php';
diff --git a/themes/twentyfifteen/genericons/genericons.css b/themes/twentyfifteen/genericons/genericons.css
index 36f02a34..f1056ede 100644
--- a/themes/twentyfifteen/genericons/genericons.css
+++ b/themes/twentyfifteen/genericons/genericons.css
@@ -52,7 +52,7 @@
text-transform: none;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
- speak: none;
+ speak: never;
}
diff --git a/themes/twentyfifteen/header.php b/themes/twentyfifteen/header.php
index 41a1e8df..614cca89 100644
--- a/themes/twentyfifteen/header.php
+++ b/themes/twentyfifteen/header.php
@@ -13,10 +13,10 @@
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width">
- <link rel="profile" href="http://gmpg.org/xfn/11">
+ <link rel="profile" href="https://gmpg.org/xfn/11">
<link rel="pingback" href="<?php echo esc_url( get_bloginfo( 'pingback_url' ) ); ?>">
<!--[if lt IE 9]>
- <script src="<?php echo esc_url( get_template_directory_uri() ); ?>/js/html5.js"></script>
+ <script src="<?php echo esc_url( get_template_directory_uri() ); ?>/js/html5.js?ver=3.7.0"></script>
<![endif]-->
<?php wp_head(); ?>
</head>
diff --git a/themes/twentyfifteen/image.php b/themes/twentyfifteen/image.php
index 3eb25b3f..0b9c4bbb 100644
--- a/themes/twentyfifteen/image.php
+++ b/themes/twentyfifteen/image.php
@@ -13,7 +13,7 @@ get_header(); ?>
<main id="main" class="site-main" role="main">
<?php
- // Start the loop.
+ // Start the loop.
while ( have_posts() ) :
the_post();
?>
@@ -35,7 +35,7 @@ get_header(); ?>
<div class="entry-attachment">
<?php
/**
- * Filter the default Twenty Fifteen image attachment size.
+ * Filters the default Twenty Fifteen image attachment size.
*
* @since Twenty Fifteen 1.0
*
@@ -77,7 +77,7 @@ get_header(); ?>
</article><!-- #post-<?php the_ID(); ?> -->
<?php
- // If comments are open or we have at least one comment, load up the comment 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;
diff --git a/themes/twentyfifteen/inc/back-compat.php b/themes/twentyfifteen/inc/back-compat.php
index a4f03e3a..6b871f5e 100644
--- a/themes/twentyfifteen/inc/back-compat.php
+++ b/themes/twentyfifteen/inc/back-compat.php
@@ -34,8 +34,14 @@ add_action( 'after_switch_theme', 'twentyfifteen_switch_theme' );
* @since Twenty Fifteen 1.0
*/
function twentyfifteen_upgrade_notice() {
- $message = sprintf( __( 'Twenty Fifteen requires at least WordPress version 4.1. You are running version %s. Please upgrade and try again.', 'twentyfifteen' ), $GLOBALS['wp_version'] );
- printf( '<div class="error"><p>%s</p></div>', $message );
+ printf(
+ '<div class="error"><p>%s</p></div>',
+ sprintf(
+ /* translators: %s: WordPress version. */
+ __( 'Twenty Fifteen requires at least WordPress version 4.1. You are running version %s. Please upgrade and try again.', 'twentyfifteen' ),
+ $GLOBALS['wp_version']
+ )
+ );
}
/**
@@ -45,7 +51,11 @@ function twentyfifteen_upgrade_notice() {
*/
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'] ),
+ sprintf(
+ /* translators: %s: WordPress version. */
+ __( '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,
@@ -61,7 +71,13 @@ add_action( 'load-customize.php', 'twentyfifteen_customize' );
*/
function twentyfifteen_preview() {
if ( isset( $_GET['preview'] ) ) {
- 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'] ) );
+ wp_die(
+ sprintf(
+ /* translators: %s: WordPress version. */
+ __( 'Twenty Fifteen requires at least WordPress version 4.1. You are running version %s. Please upgrade and try again.', 'twentyfifteen' ),
+ $GLOBALS['wp_version']
+ )
+ );
}
}
add_action( 'template_redirect', 'twentyfifteen_preview' );
diff --git a/themes/twentyfifteen/inc/block-patterns.php b/themes/twentyfifteen/inc/block-patterns.php
new file mode 100644
index 00000000..0e220d3e
--- /dev/null
+++ b/themes/twentyfifteen/inc/block-patterns.php
@@ -0,0 +1,68 @@
+<?php
+/**
+ * Block Patterns
+ *
+ * @link https://developer.wordpress.org/reference/functions/register_block_pattern/
+ * @link https://developer.wordpress.org/reference/functions/register_block_pattern_category/
+ *
+ * @package WordPress
+ * @subpackage Twenty_Fifteen
+ * @since Twenty Fifteen 3.0
+ */
+
+/**
+ * Register Block Pattern Category.
+ */
+if ( function_exists( 'register_block_pattern_category' ) ) {
+
+ register_block_pattern_category(
+ 'twentyfifteen',
+ array( 'label' => esc_html__( 'Twenty Fifteen', 'twentyfifteen' ) )
+ );
+}
+
+/**
+ * Register Block Patterns.
+ */
+if ( function_exists( 'register_block_pattern' ) ) {
+
+ // Gallery and Description.
+ register_block_pattern(
+ 'twentyfifteen/gallery-description',
+ array(
+ 'title' => esc_html__( 'Gallery and Description', 'twentyfifteen' ),
+ 'categories' => array( 'twentyfifteen' ),
+ 'content' => '<!-- wp:columns {"verticalAlignment":"top"} --><div class="wp-block-columns are-vertically-aligned-top"><!-- wp:column {"verticalAlignment":"top","width":"70%"} --><div class="wp-block-column is-vertically-aligned-top" style="flex-basis:70%"><!-- wp:gallery {"ids":[null,null,null],"columns":2,"linkTo":"none"} --><figure class="wp-block-gallery columns-2 is-cropped"><ul class="blocks-gallery-grid"><li class="blocks-gallery-item"><figure><img src="' . esc_url( get_template_directory_uri() ) . '/assets/pier-seagull.jpg" alt="' . esc_attr__( 'A pier with a seagull.', 'twentyfifteen' ) . '" data-full-url="' . esc_url( get_template_directory_uri() ) . '/assets/pier-seagull.jpg" data-link="#"/></figure></li><li class="blocks-gallery-item"><figure><img src="' . esc_url( get_template_directory_uri() ) . '/assets/pier-seagulls.jpg" alt="' . esc_attr__( 'A pier with seagulls.', 'twentyfifteen' ) . '" data-full-url="' . esc_url( get_template_directory_uri() ) . '/assets/pier-seagulls.jpg" data-link="#"/></figure></li><li class="blocks-gallery-item"><figure><img src="' . esc_url( get_template_directory_uri() ) . '/assets/pier-sunset.jpg" alt="' . esc_attr__( 'A pier at sunset', 'twentyfifteen' ) . '" data-full-url="' . esc_url( get_template_directory_uri() ) . '/assets/pier-sunset.jpg" data-link="#"/></figure></li></ul></figure><!-- /wp:gallery --></div><!-- /wp:column --><!-- wp:column {"verticalAlignment":"top"} --><div class="wp-block-column is-vertically-aligned-top"><!-- wp:paragraph {"fontSize":"small"} --><p class="has-small-font-size"><em>' . esc_html__( 'Our default 2015 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.', 'twentyfifteen' ) . '</em></p><!-- /wp:paragraph --><!-- wp:separator {"color":"dark-gray","className":"is-style-wide"} --><hr class="wp-block-separator has-text-color has-background has-dark-gray-background-color has-dark-gray-color is-style-wide"/><!-- /wp:separator --></div><!-- /wp:column --></div><!-- /wp:columns -->',
+ )
+ );
+
+ // Contact Area.
+ register_block_pattern(
+ 'twentyfifteen/contact-area',
+ array(
+ 'title' => esc_html__( 'Contact area', 'twentyfifteen' ),
+ 'categories' => array( 'twentyfifteen' ),
+ 'content' => '<!-- wp:group {"backgroundColor":"light-gray","textColor":"dark-gray"} --><div class="wp-block-group has-dark-gray-color has-light-gray-background-color has-text-color has-background"><div class="wp-block-group__inner-container"><!-- wp:columns --><div class="wp-block-columns"><!-- wp:column --><div class="wp-block-column"><!-- wp:paragraph --><p><strong>' . esc_html__( 'Email', 'twentyfifteen' ) . '</strong><br><a href="mailto:#">' . esc_html__( 'example@example.com', 'twentyfifteen' ) . '</a></p><!-- /wp:paragraph --><!-- wp:paragraph --><p><strong>' . esc_html__( 'Follow us', 'twentyfifteen' ) . '</strong></p><!-- /wp:paragraph --><!-- wp:social-links --><ul class="wp-block-social-links"><!-- wp:social-link {"url":"https://facebook.com","service":"facebook"} /--><!-- wp:social-link {"url":"https://twitter.com","service":"twitter"} /--><!-- wp:social-link {"url":"https://instagram.com","service":"instagram"} /--><!-- wp:social-link {"url":"https://youtube.com","service":"youtube"} /--></ul><!-- /wp:social-links --></div><!-- /wp:column --><!-- wp:column --><div class="wp-block-column"><!-- wp:paragraph --><p><strong>' . esc_html__( 'Phone', 'twentyfifteen' ) . '</strong><br>' . esc_html__( '(123) 555-5555', 'twentyfifteen' ) . '</p><!-- /wp:paragraph --><!-- wp:paragraph --><p><strong>' . esc_html__( 'Address', 'twentyfifteen' ) . '</strong><br>' . esc_html__( '123 Main Street', 'twentyfifteen' ) . '<br>' . esc_html__( 'City, State, 00000', 'twentyfifteen' ) . '</p><!-- /wp:paragraph --></div><!-- /wp:column --></div><!-- /wp:columns --></div></div><!-- /wp:group -->',
+ )
+ );
+
+ // Two Columns with Images.
+ register_block_pattern(
+ 'twentyfifteen/two-columns-with-images',
+ array(
+ 'title' => esc_html__( 'Two Columns with Images', 'twentyfifteen' ),
+ 'categories' => array( 'twentyfifteen' ),
+ 'content' => '<!-- wp:columns --><div class="wp-block-columns"><!-- wp:column --><div class="wp-block-column"><!-- wp:image {"id":null,"sizeSlug":"large","linkDestination":"none"} --><figure class="wp-block-image size-large"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/pier-seagull.jpg" alt="' . esc_attr__( 'A pier with a seagull.', 'twentyfifteen' ) . '"/></figure><!-- /wp:image --><!-- wp:heading --><h2>' . esc_html__( 'Adventure', 'twentyfifteen' ) . '</h2><!-- /wp:heading --><!-- wp:paragraph --><p>' . esc_html__( 'I faced about again, and rushed towards the approaching Martian, rushed right down the gravelly beach and headlong into the water. Others did the same.', 'twentyfifteen' ) . '</p><!-- /wp:paragraph --></div><!-- /wp:column --><!-- wp:column --><div class="wp-block-column"><!-- wp:image {"id":null,"sizeSlug":"large","linkDestination":"none"} --><figure class="wp-block-image size-large"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/pier-seagulls.jpg" alt="' . esc_attr__( 'A pier with seagulls.', 'twentyfifteen' ) . '"/></figure><!-- /wp:image --><!-- wp:heading --><h2>' . esc_html__( 'Travels', 'twentyfifteen' ) . '</h2><!-- /wp:heading --><!-- wp:paragraph --><p>' . esc_html__( 'A boatload of people putting back came leaping out as I rushed past. The stones under my feet were muddy and slippery, and the river was so low.', 'twentyfifteen' ) . '</p><!-- /wp:paragraph --></div><!-- /wp:column --></div><!-- /wp:columns -->',
+ )
+ );
+
+ // Columns with a list.
+ register_block_pattern(
+ 'twentyfifteen/columns-with-list',
+ array(
+ 'title' => esc_html__( 'Columns with a List', 'twentyfifteen' ),
+ 'categories' => array( 'twentyfifteen' ),
+ 'content' => '<!-- wp:heading --><h2>' . esc_html__( 'What to pack for the beach', 'twentyfifteen' ) . '</h2><!-- /wp:heading --><!-- wp:paragraph {"style":{"color":{"text":"#707070"}}} --><p class="has-text-color" style="color:#707070"><em>' . esc_html__( 'You don’t need a lot, trust us!', 'twentyfifteen' ) . '</em></p><!-- /wp:paragraph --><!-- wp:columns --><div class="wp-block-columns"><!-- wp:column {"width":"65%"} --><div class="wp-block-column" style="flex-basis:65%"><!-- wp:paragraph --><p>' . esc_html__( 'As I watched, the planet seemed to grow larger and smaller and to advance and recede, but that was simply that my eye was tired. Forty millions of miles it was from us — more than forty millions of miles of void. Few people realize the immensity of vacancy in which the dust of the material universe swims.', 'twentyfifteen' ) . '</p><!-- /wp:paragraph --></div><!-- /wp:column --><!-- wp:column {"width":"5%"} --><div class="wp-block-column" style="flex-basis:5%"></div><!-- /wp:column --><!-- wp:column {"width":"30%"} --><div class="wp-block-column" style="flex-basis:30%"><!-- wp:list --><ul><li>' . esc_html__( 'Towels', 'twentyfifteen' ) . '</li><li>' . esc_html__( 'Camera', 'twentyfifteen' ) . '</li><li>' . esc_html__( 'Water Bottle', 'twentyfifteen' ) . '</li><li>' . esc_html__( 'Swimsuit', 'twentyfifteen' ) . '</li><li>' . esc_html__( 'Snacks', 'twentyfifteen' ) . '</li></ul><!-- /wp:list --></div><!-- /wp:column --></div><!-- /wp:columns -->',
+ )
+ );
+}
diff --git a/themes/twentyfifteen/inc/custom-header.php b/themes/twentyfifteen/inc/custom-header.php
index 763ef00d..bf8655a7 100644
--- a/themes/twentyfifteen/inc/custom-header.php
+++ b/themes/twentyfifteen/inc/custom-header.php
@@ -16,23 +16,23 @@ function twentyfifteen_custom_header_setup() {
$color_scheme = twentyfifteen_get_color_scheme();
$default_text_color = trim( $color_scheme[4], '#' );
- /**
- * 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_text_color Default color of the header text.
- * @type int $width Width in pixels of the custom header image. Default 954.
- * @type int $height Height in pixels of the custom header image. Default 1300.
- * @type string $wp-head-callback Callback function used to styles the header image and text
- * displayed on the blog.
- * }
- */
add_theme_support(
'custom-header',
+ /**
+ * Filters Twenty Fifteen custom-header support arguments.
+ *
+ * @since Twenty Fifteen 1.0
+ *
+ * @param array $args {
+ * An array of custom-header support arguments.
+ *
+ * @type string $default_text_color Default color of the header text.
+ * @type int $width Width in pixels of the custom header image. Default 954.
+ * @type int $height Height in pixels of the custom header image. Default 1300.
+ * @type string $wp-head-callback Callback function used to styles the header image and text
+ * displayed on the blog.
+ * }
+ */
apply_filters(
'twentyfifteen_custom_header_args',
array(
@@ -193,7 +193,7 @@ if ( ! function_exists( 'twentyfifteen_header_style' ) ) :
</style>
<?php
}
-endif; // twentyfifteen_header_style
+endif; // twentyfifteen_header_style()
/**
* Enqueues front-end CSS for the header background color.
diff --git a/themes/twentyfifteen/inc/customizer.php b/themes/twentyfifteen/inc/customizer.php
index 3b74f243..b4c33bce 100644
--- a/themes/twentyfifteen/inc/customizer.php
+++ b/themes/twentyfifteen/inc/customizer.php
@@ -116,6 +116,7 @@ add_action( 'customize_register', 'twentyfifteen_customize_register', 11 );
* Render the site title for the selective refresh partial.
*
* @since Twenty Fifteen 1.5
+ *
* @see twentyfifteen_customize_register()
*
* @return void
@@ -128,6 +129,7 @@ function twentyfifteen_customize_partial_blogname() {
* Render the site tagline for the selective refresh partial.
*
* @since Twenty Fifteen 1.5
+ *
* @see twentyfifteen_customize_register()
*
* @return void
@@ -155,7 +157,7 @@ function twentyfifteen_customize_partial_blogdescription() {
*/
function twentyfifteen_get_color_schemes() {
/**
- * Filter the color schemes registered for use with Twenty Fifteen.
+ * Filters the color schemes registered for use with Twenty Fifteen.
*
* The default schemes include 'default', 'dark', 'yellow', 'pink', 'purple', and 'blue'.
*
@@ -266,7 +268,7 @@ if ( ! function_exists( 'twentyfifteen_get_color_scheme' ) ) :
return $color_schemes['default']['colors'];
}
-endif; // twentyfifteen_get_color_scheme
+endif; // twentyfifteen_get_color_scheme()
if ( ! function_exists( 'twentyfifteen_get_color_scheme_choices' ) ) :
/**
@@ -286,7 +288,7 @@ if ( ! function_exists( 'twentyfifteen_get_color_scheme_choices' ) ) :
return $color_scheme_control_options;
}
-endif; // twentyfifteen_get_color_scheme_choices
+endif; // twentyfifteen_get_color_scheme_choices()
if ( ! function_exists( 'twentyfifteen_sanitize_color_scheme' ) ) :
/**
@@ -306,7 +308,7 @@ if ( ! function_exists( 'twentyfifteen_sanitize_color_scheme' ) ) :
return $value;
}
-endif; // twentyfifteen_sanitize_color_scheme
+endif; // twentyfifteen_sanitize_color_scheme()
/**
* Enqueues front-end CSS for color scheme.
diff --git a/themes/twentyfifteen/inc/template-tags.php b/themes/twentyfifteen/inc/template-tags.php
index 6af6e750..b2b515f4 100644
--- a/themes/twentyfifteen/inc/template-tags.php
+++ b/themes/twentyfifteen/inc/template-tags.php
@@ -23,13 +23,15 @@ if ( ! function_exists( 'twentyfifteen_comment_nav' ) ) :
<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' ) ) ) :
+ $prev_link = get_previous_comments_link( __( 'Older Comments', 'twentyfifteen' ) );
+ if ( $prev_link ) {
printf( '<div class="nav-previous">%s</div>', $prev_link );
- endif;
+ }
- if ( $next_link = get_next_comments_link( __( 'Newer Comments', 'twentyfifteen' ) ) ) :
+ $next_link = get_next_comments_link( __( 'Newer Comments', 'twentyfifteen' ) );
+ if ( $next_link ) {
printf( '<div class="nav-next">%s</div>', $next_link );
- endif;
+ }
?>
</div><!-- .nav-links -->
</nav><!-- .comment-navigation -->
@@ -59,7 +61,7 @@ if ( ! function_exists( 'twentyfifteen_entry_meta' ) ) :
);
}
- if ( in_array( get_post_type(), array( 'post', 'attachment' ) ) ) {
+ if ( in_array( get_post_type(), array( 'post', 'attachment' ), true ) ) {
$time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
@@ -82,7 +84,7 @@ if ( ! function_exists( 'twentyfifteen_entry_meta' ) ) :
);
}
- if ( 'post' == get_post_type() ) {
+ 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>',
@@ -126,7 +128,7 @@ if ( ! function_exists( 'twentyfifteen_entry_meta' ) ) :
if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
echo '<span class="comments-link">';
- /* translators: %s: post title */
+ /* 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>';
}
@@ -141,7 +143,8 @@ endif;
* @return bool True of there is more than one category, false otherwise.
*/
function twentyfifteen_categorized_blog() {
- if ( false === ( $all_the_cool_cats = get_transient( 'twentyfifteen_categories' ) ) ) {
+ $all_the_cool_cats = get_transient( 'twentyfifteen_categories' );
+ if ( false === $all_the_cool_cats ) {
// Create an array of all the categories that are attached to posts.
$all_the_cool_cats = get_categories(
array(
@@ -160,10 +163,10 @@ function twentyfifteen_categorized_blog() {
}
if ( $all_the_cool_cats > 1 || is_preview() ) {
- // This blog has more than 1 category so twentyfifteen_categorized_blog should return true.
+ // This blog has more than 1 category so twentyfifteen_categorized_blog() should return true.
return true;
} else {
- // This blog has only 1 category so twentyfifteen_categorized_blog should return false.
+ // This blog has only 1 category so twentyfifteen_categorized_blog() should return false.
return false;
}
}
@@ -210,7 +213,7 @@ if ( ! function_exists( 'twentyfifteen_post_thumbnail' ) ) :
</a>
<?php
- endif; // End is_singular()
+ endif; // End is_singular().
}
endif;
@@ -245,7 +248,7 @@ if ( ! function_exists( 'twentyfifteen_excerpt_more' ) && ! is_admin() ) :
$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 */
+ /* translators: %s: Post title. */
sprintf( __( 'Continue reading %s', 'twentyfifteen' ), '<span class="screen-reader-text">' . get_the_title( get_the_ID() ) . '</span>' )
);
return ' &hellip; ' . $link;
@@ -272,7 +275,7 @@ if ( ! function_exists( 'wp_body_open' ) ) :
/**
* Fire the wp_body_open action.
*
- * Added for backwards compatibility to support pre 5.2.0 WordPress versions.
+ * Added for backward compatibility to support pre-5.2.0 WordPress versions.
*
* @since Twenty Fifteen 2.5
*/
diff --git a/themes/twentyfifteen/index.php b/themes/twentyfifteen/index.php
index 4abac6a1..b8f81278 100644
--- a/themes/twentyfifteen/index.php
+++ b/themes/twentyfifteen/index.php
@@ -33,9 +33,9 @@ get_header(); ?>
the_post();
/*
- * Include the Post-Format-specific template for the content.
- * If you want to override this in a child theme, then include a file
- * called content-___.php (where ___ is the Post Format name) and that will be used instead.
+ * Include the post format-specific template for the content. If you want
+ * to use this in a child theme, then include a file called content-___.php
+ * (where ___ is the post format) and that will be used instead.
*/
get_template_part( 'content', get_post_format() );
diff --git a/themes/twentyfifteen/js/functions.js b/themes/twentyfifteen/js/functions.js
index b9dddc85..eaa3cac3 100644
--- a/themes/twentyfifteen/js/functions.js
+++ b/themes/twentyfifteen/js/functions.js
@@ -6,10 +6,8 @@
*/
( function( $ ) {
- var $body, $window, $sidebar, adminbarOffset, top = false,
- bottom = false, windowWidth, windowHeight, lastWindowPos = 0,
- topOffset = 0, bodyHeight, sidebarHeight, resizeTimer,
- secondary, button;
+ var $body, $window, $sidebar, resizeTimer,
+ secondary, button;
function initMainNavigation( container ) {
// Add dropdown toggle that display child menu items.
@@ -19,7 +17,7 @@
container.find( '.current-menu-ancestor > button' ).addClass( 'toggle-on' );
container.find( '.current-menu-ancestor > .sub-menu' ).addClass( 'toggled-on' );
- container.find( '.dropdown-toggle' ).click( function( e ) {
+ container.find( '.dropdown-toggle' ).on( 'click', function( e ) {
var _this = $( this );
e.preventDefault();
_this.toggleClass( 'toggle-on' );
@@ -81,6 +79,7 @@
*
* 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
*/
function onResizeARIA() {
@@ -96,71 +95,29 @@
}
// Sidebar scrolling.
- function resize() {
- windowWidth = $window.width();
-
- if ( 955 > windowWidth ) {
- top = bottom = false;
- $sidebar.removeAttr( 'style' );
- }
- }
-
- function scroll() {
- var windowPos = $window.scrollTop();
-
- if ( 955 > windowWidth ) {
- return;
- }
-
- sidebarHeight = $sidebar.height();
- windowHeight = $window.height();
- bodyHeight = $body.height();
-
- if ( sidebarHeight + adminbarOffset > windowHeight ) {
- if ( windowPos > lastWindowPos ) {
- if ( top ) {
- top = false;
- topOffset = ( $sidebar.offset().top > 0 ) ? $sidebar.offset().top - adminbarOffset : 0;
- $sidebar.attr( 'style', 'top: ' + topOffset + 'px;' );
- } else if ( ! bottom && windowPos + windowHeight > sidebarHeight + $sidebar.offset().top && sidebarHeight + adminbarOffset < bodyHeight ) {
- bottom = true;
- $sidebar.attr( 'style', 'position: fixed; bottom: 0;' );
- }
- } else if ( windowPos < lastWindowPos ) {
- if ( bottom ) {
- bottom = false;
- topOffset = ( $sidebar.offset().top > 0 ) ? $sidebar.offset().top - adminbarOffset : 0;
- $sidebar.attr( 'style', 'top: ' + topOffset + 'px;' );
- } else if ( ! top && windowPos + adminbarOffset < $sidebar.offset().top ) {
- top = true;
- $sidebar.attr( 'style', 'position: fixed;' );
- }
- } else {
- top = bottom = false;
- topOffset = ( $sidebar.offset().top > 0 ) ? $sidebar.offset().top - adminbarOffset : 0;
- $sidebar.attr( 'style', 'top: ' + topOffset + 'px;' );
- }
- } else if ( ! top ) {
- top = true;
- $sidebar.attr( 'style', 'position: fixed;' );
- }
-
- lastWindowPos = windowPos;
- }
-
function resizeAndScroll() {
- resize();
- scroll();
+ var windowPos = $window.scrollTop(),
+ windowHeight = $window.height(),
+ sidebarHeight = $sidebar.height(),
+ bodyHeight = $body.height();
+
+ if( 955 < $window.width() && bodyHeight > sidebarHeight && ( windowPos + windowHeight ) >= sidebarHeight ) {
+ $sidebar.css({
+ position: 'fixed',
+ bottom: sidebarHeight > windowHeight ? 0 : 'auto'
+ });
+ } else {
+ $sidebar.css('position', 'relative');
+ }
}
$( document ).ready( function() {
$body = $( document.body );
$window = $( window );
$sidebar = $( '#sidebar' ).first();
- adminbarOffset = $body.is( '.admin-bar' ) ? $( '#wpadminbar' ).height() : 0;
$window
- .on( 'scroll.twentyfifteen', scroll )
+ .on( 'scroll.twentyfifteen', resizeAndScroll )
.on( 'load.twentyfifteen', onResizeARIA )
.on( 'resize.twentyfifteen', function() {
clearTimeout( resizeTimer );
@@ -169,9 +126,7 @@
} );
$sidebar.on( 'click.twentyfifteen keydown.twentyfifteen', 'button', resizeAndScroll );
- resizeAndScroll();
-
- for ( var i = 1; i < 6; i++ ) {
+ for ( var i = 0; i < 6; i++ ) {
setTimeout( resizeAndScroll, 100 * i );
}
} );
diff --git a/themes/twentyfifteen/readme.txt b/themes/twentyfifteen/readme.txt
index fd936ad1..5893fbbc 100644
--- a/themes/twentyfifteen/readme.txt
+++ b/themes/twentyfifteen/readme.txt
@@ -1,12 +1,11 @@
=== Twenty Fifteen ===
Contributors: wordpressdotorg
Requires at least: WordPress 4.1
-Tested up to: WordPress 5.0
-Requires PHP: 5.2.4
-Version: 2.5
+Tested up to: 5.8
+Version: 3.0
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
+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, block-patterns
== 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.
@@ -19,19 +18,19 @@ Our 2015 default theme is clean, blog-focused, and designed for clarity. Twenty
* Post Formats
* The GPL v2.0 or later license. :) Use it to make something cool.
-For more information about Twenty Fifteen please go to https://codex.wordpress.org/Twenty_Fifteen.
+For more information about Twenty Fifteen please go to https://wordpress.org/support/article/twenty-fifteen/.
== Installation ==
1. In your admin panel, go to Appearance -> Themes and click the 'Add New' button.
2. Type in Twenty Fifteen in the search form and press the 'Enter' key on your keyboard.
3. Click on the 'Activate' button to use your new theme right away.
-4. Go to https://codex.wordpress.org/Twenty_Fifteen for a guide on how to customize this theme.
+4. Go to https://wordpress.org/support/article/twenty-fifteen/ for a guide on how to customize this theme.
5. Navigate to Appearance > Customize in your admin panel and customize to taste.
== Copyright ==
-Twenty Fifteen WordPress Theme, Copyright 2014-2018 WordPress.org & Automattic.com
+Twenty Fifteen WordPress Theme, Copyright 2014-2021 WordPress.org & Automattic.com
Twenty Fifteen is distributed under the terms of the GNU GPL
This program is free software: you can redistribute it and/or modify
@@ -54,8 +53,39 @@ Genericons icon font, Copyright 2013-2017 Automattic.com
License: GNU GPL, Version 2 (or later)
Source: http://www.genericons.com
+Block Pattern Images
+License: CC0
+Source: https://stocksnap.io/photo/purple-yellow-ACF0693B9C
+ https://stocksnap.io/photo/sky-sunset-BE7A7709D0
+ https://stocksnap.io/photo/sunset-pier-77F43EA43C
+
== Changelog ==
+= 3.0 =
+* Released: July 20, 2021
+
+https://codex.wordpress.org/Twenty_Fifteen_Theme_Changelog#Version_3.0
+
+= 2.9 =
+* Released: March 9, 2021
+
+https://codex.wordpress.org/Twenty_Fifteen_Theme_Changelog#Version_2.9
+
+= 2.8 =
+* Released: December 8, 2020
+
+https://codex.wordpress.org/Twenty_Fifteen_Theme_Changelog#Version_2.8
+
+= 2.7 =
+* Released: August 11, 2020
+
+https://codex.wordpress.org/Twenty_Fifteen_Theme_Changelog#Version_2.7
+
+= 2.6 =
+* Released: March 31, 2020
+
+https://codex.wordpress.org/Twenty_Fifteen_Theme_Changelog#Version_2.6
+
= 2.5 =
* Released: May 7, 2019
diff --git a/themes/twentyfifteen/search.php b/themes/twentyfifteen/search.php
index f3778f34..f8729f8f 100644
--- a/themes/twentyfifteen/search.php
+++ b/themes/twentyfifteen/search.php
@@ -15,7 +15,12 @@ get_header(); ?>
<?php if ( have_posts() ) : ?>
<header class="page-header">
- <h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'twentyfifteen' ), get_search_query() ); ?></h1>
+ <h1 class="page-title">
+ <?php
+ /* translators: %s: Search query. */
+ printf( __( 'Search Results for: %s', 'twentyfifteen' ), get_search_query() );
+ ?>
+ </h1>
</header><!-- .page-header -->
<?php
diff --git a/themes/twentyfifteen/single.php b/themes/twentyfifteen/single.php
index 4de3a493..2a4bb893 100644
--- a/themes/twentyfifteen/single.php
+++ b/themes/twentyfifteen/single.php
@@ -18,8 +18,8 @@ get_header(); ?>
the_post();
/*
- * Include the post format-specific template for the content. If you want to
- * use this in a child theme, then include a file called content-___.php
+ * Include the post format-specific template for the content. If you want
+ * to use this in a child theme, then include a file called content-___.php
* (where ___ is the post format) and that will be used instead.
*/
get_template_part( 'content', get_post_format() );
diff --git a/themes/twentyfifteen/style.css b/themes/twentyfifteen/style.css
index 4d0d8e79..d7192304 100644
--- a/themes/twentyfifteen/style.css
+++ b/themes/twentyfifteen/style.css
@@ -4,10 +4,11 @@ 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.5
+Version: 3.0
+Requires PHP: 5.2.4
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
+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, block-patterns
Text Domain: twentyfifteen
This theme, like WordPress, is licensed under the GPL.
@@ -194,7 +195,7 @@ a img {
font-weight: normal;
font-variant: normal;
line-height: 1;
- speak: none;
+ speak: never;
text-align: center;
text-decoration: inherit;
text-transform: none;
@@ -1397,7 +1398,8 @@ img.aligncenter {
text-transform: uppercase;
}
-.widget > :last-child {
+.widget > :last-child,
+.widget > nav > :last-child {
margin-bottom: 0;
}
@@ -1405,8 +1407,23 @@ img.aligncenter {
margin: 0;
}
+.widget_calendar .wp-calendar-nav {
+ display: table;
+ width: 100%;
+}
+
+.widget_calendar .wp-calendar-nav span {
+ display: table-cell;
+}
+
+.widget_calendar .wp-calendar-nav-prev,
+.widget_calendar .wp-calendar-nav-next {
+ width: 40%;
+}
+
.widget_calendar td,
-.widget_calendar th {
+.widget_calendar th,
+.widget_calendar .wp-calendar-nav span {
line-height: 2.3333;
text-align: center;
padding: 0;
@@ -3255,7 +3272,8 @@ p > video {
}
.widget_calendar td,
- .widget_calendar th {
+ .widget_calendar th,
+ .widget_calendar .wp-calendar-nav span {
line-height: 2.9286;
}
@@ -3263,6 +3281,14 @@ p > video {
margin: 0 0 1.5em;
}
+ .widget_calendar .wp-calendar-table {
+ margin-bottom: 0;
+ }
+
+ .widget_calendar .wp-calendar-nav {
+ margin: 0 0 1.5em;
+ }
+
.widget_archive li,
.widget_categories li,
.widget_links li,
@@ -3834,7 +3860,8 @@ p > video {
}
.widget_calendar td,
- .widget_calendar th {
+ .widget_calendar th,
+ .widget_calendar .wp-calendar-nav span {
line-height: 2.9375;
}
@@ -4481,7 +4508,8 @@ p > video {
}
.widget_calendar td,
- .widget_calendar th {
+ .widget_calendar th,
+ .widget_calendar .wp-calendar-nav span {
line-height: 1.9167;
}
@@ -5090,7 +5118,8 @@ p > video {
}
.widget_calendar td,
- .widget_calendar th {
+ .widget_calendar th,
+ .widget_calendar .wp-calendar-nav span {
line-height: 1.9286;
}
@@ -5638,7 +5667,8 @@ p > video {
}
.widget_calendar td,
- .widget_calendar th {
+ .widget_calendar th,
+ .widget_calendar .wp-calendar-nav span {
line-height: 1.9375;
}