summaryrefslogtreecommitdiff
path: root/themes
diff options
context:
space:
mode:
Diffstat (limited to 'themes')
-rw-r--r--themes/twentysixteen/archive.php19
-rw-r--r--themes/twentysixteen/comments.php60
-rw-r--r--themes/twentysixteen/footer.php35
-rw-r--r--themes/twentysixteen/functions.php352
-rw-r--r--themes/twentysixteen/header.php32
-rw-r--r--themes/twentysixteen/image.php124
-rw-r--r--themes/twentysixteen/inc/back-compat.php8
-rw-r--r--themes/twentysixteen/inc/customizer.php454
-rw-r--r--themes/twentysixteen/inc/template-tags.php342
-rw-r--r--themes/twentysixteen/index.php19
-rw-r--r--themes/twentysixteen/page.php3
-rw-r--r--themes/twentysixteen/readme.txt9
-rw-r--r--themes/twentysixteen/rtl.css16
-rw-r--r--themes/twentysixteen/search.php21
-rw-r--r--themes/twentysixteen/sidebar.php2
-rw-r--r--themes/twentysixteen/single.php29
-rw-r--r--themes/twentysixteen/style.css22
-rw-r--r--themes/twentysixteen/template-parts/content-page.php18
-rw-r--r--themes/twentysixteen/template-parts/content-single.php18
-rw-r--r--themes/twentysixteen/template-parts/content.php28
20 files changed, 882 insertions, 729 deletions
diff --git a/themes/twentysixteen/archive.php b/themes/twentysixteen/archive.php
index bdd2967e..7f302359 100644
--- a/themes/twentysixteen/archive.php
+++ b/themes/twentysixteen/archive.php
@@ -32,7 +32,8 @@ 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.
@@ -41,17 +42,19 @@ get_header(); ?>
*/
get_template_part( 'template-parts/content', get_post_format() );
- // End the loop.
+ // End the loop.
endwhile;
// Previous/next page navigation.
- the_posts_pagination( array(
- 'prev_text' => __( 'Previous page', 'twentysixteen' ),
- 'next_text' => __( 'Next page', 'twentysixteen' ),
- 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>',
- ) );
+ the_posts_pagination(
+ array(
+ 'prev_text' => __( 'Previous page', 'twentysixteen' ),
+ 'next_text' => __( 'Next page', 'twentysixteen' ),
+ 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>',
+ )
+ );
- // If no content, include the "No posts found" template.
+ // If no content, include the "No posts found" template.
else :
get_template_part( 'template-parts/content', 'none' );
diff --git a/themes/twentysixteen/comments.php b/themes/twentysixteen/comments.php
index 7ff5b32d..95dd5651 100644
--- a/themes/twentysixteen/comments.php
+++ b/themes/twentysixteen/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', 'twentysixteen' ), 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',
- 'twentysixteen'
- ),
- 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', 'twentysixteen' ), 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',
+ 'twentysixteen'
+ ),
+ number_format_i18n( $comments_number ),
+ get_the_title()
+ );
+ }
?>
</h2>
@@ -50,11 +50,13 @@ if ( post_password_required() ) {
<ol class="comment-list">
<?php
- wp_list_comments( array(
- 'style' => 'ol',
- 'short_ping' => true,
- 'avatar_size' => 42,
- ) );
+ wp_list_comments(
+ array(
+ 'style' => 'ol',
+ 'short_ping' => true,
+ 'avatar_size' => 42,
+ )
+ );
?>
</ol><!-- .comment-list -->
@@ -64,16 +66,18 @@ 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.', 'twentysixteen' ); ?></p>
+ <p class="no-comments"><?php _e( 'Comments are closed.', 'twentysixteen' ); ?></p>
<?php endif; ?>
<?php
- comment_form( array(
- 'title_reply_before' => '<h2 id="reply-title" class="comment-reply-title">',
- 'title_reply_after' => '</h2>',
- ) );
+ comment_form(
+ array(
+ 'title_reply_before' => '<h2 id="reply-title" class="comment-reply-title">',
+ 'title_reply_after' => '</h2>',
+ )
+ );
?>
</div><!-- .comments-area -->
diff --git a/themes/twentysixteen/footer.php b/themes/twentysixteen/footer.php
index 5c6a1827..5fff3bd9 100644
--- a/themes/twentysixteen/footer.php
+++ b/themes/twentysixteen/footer.php
@@ -16,10 +16,12 @@
<?php if ( has_nav_menu( 'primary' ) ) : ?>
<nav class="main-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Footer Primary Menu', 'twentysixteen' ); ?>">
<?php
- wp_nav_menu( array(
- 'theme_location' => 'primary',
- 'menu_class' => 'primary-menu',
- ) );
+ wp_nav_menu(
+ array(
+ 'theme_location' => 'primary',
+ 'menu_class' => 'primary-menu',
+ )
+ );
?>
</nav><!-- .main-navigation -->
<?php endif; ?>
@@ -27,13 +29,15 @@
<?php if ( has_nav_menu( 'social' ) ) : ?>
<nav class="social-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Footer Social Links Menu', 'twentysixteen' ); ?>">
<?php
- wp_nav_menu( array(
- 'theme_location' => 'social',
- 'menu_class' => 'social-links-menu',
- 'depth' => 1,
- 'link_before' => '<span class="screen-reader-text">',
- 'link_after' => '</span>',
- ) );
+ wp_nav_menu(
+ array(
+ 'theme_location' => 'social',
+ 'menu_class' => 'social-links-menu',
+ 'depth' => 1,
+ 'link_before' => '<span class="screen-reader-text">',
+ 'link_after' => '</span>',
+ )
+ );
?>
</nav><!-- .social-navigation -->
<?php endif; ?>
@@ -48,7 +52,14 @@
do_action( 'twentysixteen_credits' );
?>
<span class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span>
- <a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentysixteen' ) ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentysixteen' ), 'WordPress' ); ?></a>
+ <?php
+ if ( function_exists( 'the_privacy_policy_link' ) ) {
+ the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' );
+ }
+ ?>
+ <a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentysixteen' ) ); ?>" class="imprint">
+ <?php printf( __( 'Proudly powered by %s', 'twentysixteen' ), 'WordPress' ); ?>
+ </a>
</div><!-- .site-info -->
</footer><!-- .site-footer -->
</div><!-- .site-inner -->
diff --git a/themes/twentysixteen/functions.php b/themes/twentysixteen/functions.php
index d6e58e1a..3e675eaf 100644
--- a/themes/twentysixteen/functions.php
+++ b/themes/twentysixteen/functions.php
@@ -33,100 +33,108 @@ if ( version_compare( $GLOBALS['wp_version'], '4.4-alpha', '<' ) ) {
}
if ( ! function_exists( 'twentysixteen_setup' ) ) :
-/**
- * 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.
- *
- * Create your own twentysixteen_setup() function to override in a child theme.
- *
- * @since Twenty Sixteen 1.0
- */
-function twentysixteen_setup() {
- /*
- * Make theme available for translation.
- * Translations can be filed at WordPress.org. See: https://translate.wordpress.org/projects/wp-themes/twentysixteen
- * If you're building a theme based on Twenty Sixteen, use a find and replace
- * to change 'twentysixteen' to the name of your theme in all the template files
- */
- load_theme_textdomain( 'twentysixteen' );
-
- // 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 custom logo.
+ /**
+ * Sets up theme defaults and registers support for various WordPress features.
*
- * @since Twenty Sixteen 1.2
- */
- add_theme_support( 'custom-logo', array(
- 'height' => 240,
- 'width' => 240,
- 'flex-height' => true,
- ) );
-
- /*
- * Enable support for Post Thumbnails on posts and pages.
+ * 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.
*
- * @link https://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
- */
- add_theme_support( 'post-thumbnails' );
- set_post_thumbnail_size( 1200, 9999 );
-
- // This theme uses wp_nav_menu() in two locations.
- register_nav_menus( array(
- 'primary' => __( 'Primary Menu', 'twentysixteen' ),
- 'social' => __( 'Social Links Menu', 'twentysixteen' ),
- ) );
-
- /*
- * 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.
+ * Create your own twentysixteen_setup() function to override in a child theme.
*
- * See: https://codex.wordpress.org/Post_Formats
- */
- add_theme_support( 'post-formats', array(
- 'aside',
- 'image',
- 'video',
- 'quote',
- 'link',
- 'gallery',
- 'status',
- 'audio',
- 'chat',
- ) );
-
- /*
- * This theme styles the visual editor to resemble the theme style,
- * specifically font, colors, icons, and column width.
+ * @since Twenty Sixteen 1.0
*/
- add_editor_style( array( 'css/editor-style.css', twentysixteen_fonts_url() ) );
-
- // Indicate widget sidebars can use selective refresh in the Customizer.
- add_theme_support( 'customize-selective-refresh-widgets' );
-}
+ function twentysixteen_setup() {
+ /*
+ * Make theme available for translation.
+ * Translations can be filed at WordPress.org. See: https://translate.wordpress.org/projects/wp-themes/twentysixteen
+ * If you're building a theme based on Twenty Sixteen, use a find and replace
+ * to change 'twentysixteen' to the name of your theme in all the template files
+ */
+ load_theme_textdomain( 'twentysixteen' );
+
+ // 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 custom logo.
+ *
+ * @since Twenty Sixteen 1.2
+ */
+ add_theme_support(
+ 'custom-logo', array(
+ 'height' => 240,
+ 'width' => 240,
+ 'flex-height' => true,
+ )
+ );
+
+ /*
+ * Enable support for Post Thumbnails on posts and pages.
+ *
+ * @link https://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
+ */
+ add_theme_support( 'post-thumbnails' );
+ set_post_thumbnail_size( 1200, 9999 );
+
+ // This theme uses wp_nav_menu() in two locations.
+ register_nav_menus(
+ array(
+ 'primary' => __( 'Primary Menu', 'twentysixteen' ),
+ 'social' => __( 'Social Links Menu', 'twentysixteen' ),
+ )
+ );
+
+ /*
+ * 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',
+ )
+ );
+
+ /*
+ * 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', twentysixteen_fonts_url() ) );
+
+ // Indicate widget sidebars can use selective refresh in the Customizer.
+ add_theme_support( 'customize-selective-refresh-widgets' );
+ }
endif; // twentysixteen_setup
add_action( 'after_setup_theme', 'twentysixteen_setup' );
@@ -152,77 +160,85 @@ add_action( 'after_setup_theme', 'twentysixteen_content_width', 0 );
* @since Twenty Sixteen 1.0
*/
function twentysixteen_widgets_init() {
- register_sidebar( array(
- 'name' => __( 'Sidebar', 'twentysixteen' ),
- 'id' => 'sidebar-1',
- 'description' => __( 'Add widgets here to appear in your sidebar.', 'twentysixteen' ),
- 'before_widget' => '<section id="%1$s" class="widget %2$s">',
- 'after_widget' => '</section>',
- 'before_title' => '<h2 class="widget-title">',
- 'after_title' => '</h2>',
- ) );
-
- register_sidebar( array(
- 'name' => __( 'Content Bottom 1', 'twentysixteen' ),
- 'id' => 'sidebar-2',
- 'description' => __( 'Appears at the bottom of the content on posts and pages.', 'twentysixteen' ),
- 'before_widget' => '<section id="%1$s" class="widget %2$s">',
- 'after_widget' => '</section>',
- 'before_title' => '<h2 class="widget-title">',
- 'after_title' => '</h2>',
- ) );
-
- register_sidebar( array(
- 'name' => __( 'Content Bottom 2', 'twentysixteen' ),
- 'id' => 'sidebar-3',
- 'description' => __( 'Appears at the bottom of the content on posts and pages.', 'twentysixteen' ),
- 'before_widget' => '<section id="%1$s" class="widget %2$s">',
- 'after_widget' => '</section>',
- 'before_title' => '<h2 class="widget-title">',
- 'after_title' => '</h2>',
- ) );
+ register_sidebar(
+ array(
+ 'name' => __( 'Sidebar', 'twentysixteen' ),
+ 'id' => 'sidebar-1',
+ 'description' => __( 'Add widgets here to appear in your sidebar.', 'twentysixteen' ),
+ 'before_widget' => '<section id="%1$s" class="widget %2$s">',
+ 'after_widget' => '</section>',
+ 'before_title' => '<h2 class="widget-title">',
+ 'after_title' => '</h2>',
+ )
+ );
+
+ register_sidebar(
+ array(
+ 'name' => __( 'Content Bottom 1', 'twentysixteen' ),
+ 'id' => 'sidebar-2',
+ 'description' => __( 'Appears at the bottom of the content on posts and pages.', 'twentysixteen' ),
+ 'before_widget' => '<section id="%1$s" class="widget %2$s">',
+ 'after_widget' => '</section>',
+ 'before_title' => '<h2 class="widget-title">',
+ 'after_title' => '</h2>',
+ )
+ );
+
+ register_sidebar(
+ array(
+ 'name' => __( 'Content Bottom 2', 'twentysixteen' ),
+ 'id' => 'sidebar-3',
+ 'description' => __( 'Appears at the bottom of the content on posts and pages.', 'twentysixteen' ),
+ 'before_widget' => '<section id="%1$s" class="widget %2$s">',
+ 'after_widget' => '</section>',
+ 'before_title' => '<h2 class="widget-title">',
+ 'after_title' => '</h2>',
+ )
+ );
}
add_action( 'widgets_init', 'twentysixteen_widgets_init' );
if ( ! function_exists( 'twentysixteen_fonts_url' ) ) :
-/**
- * Register Google fonts for Twenty Sixteen.
- *
- * Create your own twentysixteen_fonts_url() function to override in a child theme.
- *
- * @since Twenty Sixteen 1.0
- *
- * @return string Google fonts URL for the theme.
- */
-function twentysixteen_fonts_url() {
- $fonts_url = '';
- $fonts = array();
- $subsets = 'latin,latin-ext';
-
- /* translators: If there are characters in your language that are not supported by Merriweather, translate this to 'off'. Do not translate into your own language. */
- if ( 'off' !== _x( 'on', 'Merriweather font: on or off', 'twentysixteen' ) ) {
- $fonts[] = 'Merriweather:400,700,900,400italic,700italic,900italic';
- }
+ /**
+ * Register Google fonts for Twenty Sixteen.
+ *
+ * Create your own twentysixteen_fonts_url() function to override in a child theme.
+ *
+ * @since Twenty Sixteen 1.0
+ *
+ * @return string Google fonts URL for the theme.
+ */
+ function twentysixteen_fonts_url() {
+ $fonts_url = '';
+ $fonts = array();
+ $subsets = 'latin,latin-ext';
+
+ /* translators: If there are characters in your language that are not supported by Merriweather, translate this to 'off'. Do not translate into your own language. */
+ if ( 'off' !== _x( 'on', 'Merriweather font: on or off', 'twentysixteen' ) ) {
+ $fonts[] = 'Merriweather:400,700,900,400italic,700italic,900italic';
+ }
- /* translators: If there are characters in your language that are not supported by Montserrat, translate this to 'off'. Do not translate into your own language. */
- if ( 'off' !== _x( 'on', 'Montserrat font: on or off', 'twentysixteen' ) ) {
- $fonts[] = 'Montserrat:400,700';
- }
+ /* translators: If there are characters in your language that are not supported by Montserrat, translate this to 'off'. Do not translate into your own language. */
+ if ( 'off' !== _x( 'on', 'Montserrat font: on or off', 'twentysixteen' ) ) {
+ $fonts[] = 'Montserrat: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', 'twentysixteen' ) ) {
- $fonts[] = 'Inconsolata:400';
- }
+ /* 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', 'twentysixteen' ) ) {
+ $fonts[] = 'Inconsolata:400';
+ }
- if ( $fonts ) {
- $fonts_url = add_query_arg( array(
- 'family' => urlencode( implode( '|', $fonts ) ),
- 'subset' => urlencode( $subsets ),
- ), 'https://fonts.googleapis.com/css' );
- }
+ if ( $fonts ) {
+ $fonts_url = add_query_arg(
+ array(
+ 'family' => urlencode( implode( '|', $fonts ) ),
+ 'subset' => urlencode( $subsets ),
+ ), 'https://fonts.googleapis.com/css'
+ );
+ }
- return $fonts_url;
-}
+ return $fonts_url;
+ }
endif;
/**
@@ -280,10 +296,12 @@ function twentysixteen_scripts() {
wp_enqueue_script( 'twentysixteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20160816', true );
- wp_localize_script( 'twentysixteen-script', 'screenReaderText', array(
- 'expand' => __( 'expand child menu', 'twentysixteen' ),
- 'collapse' => __( 'collapse child menu', 'twentysixteen' ),
- ) );
+ wp_localize_script(
+ 'twentysixteen-script', 'screenReaderText', array(
+ 'expand' => __( 'expand child menu', 'twentysixteen' ),
+ 'collapse' => __( 'collapse child menu', 'twentysixteen' ),
+ )
+ );
}
add_action( 'wp_enqueue_scripts', 'twentysixteen_scripts' );
@@ -333,10 +351,10 @@ function twentysixteen_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 ) );
- } else if ( 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 ) );
+ } elseif ( strlen( $color ) === 6 ) {
$r = hexdec( substr( $color, 0, 2 ) );
$g = hexdec( substr( $color, 2, 2 ) );
$b = hexdec( substr( $color, 4, 2 ) );
@@ -344,7 +362,11 @@ function twentysixteen_hex2rgb( $color ) {
return array();
}
- return array( 'red' => $r, 'green' => $g, 'blue' => $b );
+ return array(
+ 'red' => $r,
+ 'green' => $g,
+ 'blue' => $b,
+ );
}
/**
@@ -389,7 +411,7 @@ function twentysixteen_content_image_sizes_attr( $sizes, $size ) {
return $sizes;
}
-add_filter( 'wp_calculate_image_sizes', 'twentysixteen_content_image_sizes_attr', 10 , 2 );
+add_filter( 'wp_calculate_image_sizes', 'twentysixteen_content_image_sizes_attr', 10, 2 );
/**
* Add custom image sizes attribute to enhance responsive image functionality
@@ -412,7 +434,7 @@ function twentysixteen_post_thumbnail_sizes_attr( $attr, $attachment, $size ) {
}
return $attr;
}
-add_filter( 'wp_get_attachment_image_attributes', 'twentysixteen_post_thumbnail_sizes_attr', 10 , 3 );
+add_filter( 'wp_get_attachment_image_attributes', 'twentysixteen_post_thumbnail_sizes_attr', 10, 3 );
/**
* Modifies tag cloud widget arguments to display all tags in the same font size
@@ -427,7 +449,7 @@ function twentysixteen_widget_tag_cloud_args( $args ) {
$args['largest'] = 1;
$args['smallest'] = 1;
$args['unit'] = 'em';
- $args['format'] = 'list';
+ $args['format'] = 'list';
return $args;
}
diff --git a/themes/twentysixteen/header.php b/themes/twentysixteen/header.php
index d230c4f8..9bc0d3e6 100644
--- a/themes/twentysixteen/header.php
+++ b/themes/twentysixteen/header.php
@@ -35,10 +35,12 @@
<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; ?>
</div><!-- .site-branding -->
@@ -50,10 +52,12 @@
<?php if ( has_nav_menu( 'primary' ) ) : ?>
<nav id="site-navigation" class="main-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Primary Menu', 'twentysixteen' ); ?>">
<?php
- wp_nav_menu( array(
- 'theme_location' => 'primary',
- 'menu_class' => 'primary-menu',
- ) );
+ wp_nav_menu(
+ array(
+ 'theme_location' => 'primary',
+ 'menu_class' => 'primary-menu',
+ )
+ );
?>
</nav><!-- .main-navigation -->
<?php endif; ?>
@@ -61,13 +65,15 @@
<?php if ( has_nav_menu( 'social' ) ) : ?>
<nav id="social-navigation" class="social-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Social Links Menu', 'twentysixteen' ); ?>">
<?php
- wp_nav_menu( array(
- 'theme_location' => 'social',
- 'menu_class' => 'social-links-menu',
- 'depth' => 1,
- 'link_before' => '<span class="screen-reader-text">',
- 'link_after' => '</span>',
- ) );
+ wp_nav_menu(
+ array(
+ 'theme_location' => 'social',
+ 'menu_class' => 'social-links-menu',
+ 'depth' => 1,
+ 'link_before' => '<span class="screen-reader-text">',
+ 'link_after' => '</span>',
+ )
+ );
?>
</nav><!-- .social-navigation -->
<?php endif; ?>
diff --git a/themes/twentysixteen/image.php b/themes/twentysixteen/image.php
index 434b0b02..f67048b3 100644
--- a/themes/twentysixteen/image.php
+++ b/themes/twentysixteen/image.php
@@ -14,93 +14,99 @@ 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', 'twentysixteen' ) ); ?></div>
- <div class="nav-next"><?php next_image_link( false, __( 'Next Image', 'twentysixteen' ) ); ?></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', 'twentysixteen' ) ); ?></div>
+ <div class="nav-next"><?php next_image_link( false, __( 'Next Image', 'twentysixteen' ) ); ?></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 twentysixteen image attachment size.
- *
- * @since Twenty Sixteen 1.0
- *
- * @param string $image_size Image size. Default 'large'.
- */
- $image_size = apply_filters( 'twentysixteen_attachment_size', 'large' );
-
- echo wp_get_attachment_image( get_the_ID(), $image_size );
- ?>
+ <div class="entry-attachment">
+ <?php
+ /**
+ * Filter the default twentysixteen image attachment size.
+ *
+ * @since Twenty Sixteen 1.0
+ *
+ * @param string $image_size Image size. Default 'large'.
+ */
+ $image_size = apply_filters( 'twentysixteen_attachment_size', 'large' );
+
+ echo wp_get_attachment_image( get_the_ID(), $image_size );
+ ?>
- <?php twentysixteen_excerpt( 'entry-caption' ); ?>
+ <?php twentysixteen_excerpt( 'entry-caption' ); ?>
</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:', 'twentysixteen' ) . '</span>',
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>',
'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>%',
'separator' => '<span class="screen-reader-text">, </span>',
- ) );
- ?>
+ )
+ );
+ ?>
</div><!-- .entry-content -->
<footer class="entry-footer">
- <?php twentysixteen_entry_meta(); ?>
+ <?php twentysixteen_entry_meta(); ?>
<?php
- // Retrieve attachment metadata.
- $metadata = wp_get_attachment_metadata();
- if ( $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>',
- esc_html_x( 'Full size', 'Used before full size attachment link.', 'twentysixteen' ),
- esc_url( wp_get_attachment_url() ),
- absint( $metadata['width'] ),
- absint( $metadata['height'] )
- );
- }
- ?>
- <?php
- edit_post_link(
- sprintf(
- /* translators: %s: Name of current post */
- __( 'Edit<span class="screen-reader-text"> "%s"</span>', 'twentysixteen' ),
- get_the_title()
- ),
- '<span class="edit-link">',
- '</span>'
+ // Retrieve attachment metadata.
+ $metadata = wp_get_attachment_metadata();
+ if ( $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>',
+ esc_html_x( 'Full size', 'Used before full size attachment link.', 'twentysixteen' ),
+ esc_url( wp_get_attachment_url() ),
+ absint( $metadata['width'] ),
+ absint( $metadata['height'] )
);
+ }
?>
+ <?php
+ edit_post_link(
+ sprintf(
+ /* translators: %s: Name of current post */
+ __( 'Edit<span class="screen-reader-text"> "%s"</span>', 'twentysixteen' ),
+ get_the_title()
+ ),
+ '<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();
- }
-
- // Parent post navigation.
- the_post_navigation( array(
+ // If comments are open or we have at least one comment, load up the comment template.
+ if ( comments_open() || get_comments_number() ) {
+ comments_template();
+ }
+
+ // Parent 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', 'twentysixteen' ),
- ) );
+ )
+ );
// End the loop.
endwhile;
?>
diff --git a/themes/twentysixteen/inc/back-compat.php b/themes/twentysixteen/inc/back-compat.php
index 7ed4240c..ed0f86df 100644
--- a/themes/twentysixteen/inc/back-compat.php
+++ b/themes/twentysixteen/inc/back-compat.php
@@ -50,9 +50,11 @@ function twentysixteen_upgrade_notice() {
* @global string $wp_version WordPress version.
*/
function twentysixteen_customize() {
- wp_die( sprintf( __( 'Twenty Sixteen requires at least WordPress version 4.4. You are running version %s. Please upgrade and try again.', 'twentysixteen' ), $GLOBALS['wp_version'] ), '', array(
- 'back_link' => true,
- ) );
+ wp_die(
+ sprintf( __( 'Twenty Sixteen requires at least WordPress version 4.4. You are running version %s. Please upgrade and try again.', 'twentysixteen' ), $GLOBALS['wp_version'] ), '', array(
+ 'back_link' => true,
+ )
+ );
}
add_action( 'load-customize.php', 'twentysixteen_customize' );
diff --git a/themes/twentysixteen/inc/customizer.php b/themes/twentysixteen/inc/customizer.php
index 62eb1b0b..0cc2fb52 100644
--- a/themes/twentysixteen/inc/customizer.php
+++ b/themes/twentysixteen/inc/customizer.php
@@ -30,9 +30,13 @@ function twentysixteen_custom_header_and_background() {
* @type string $default-color Default color of the background.
* }
*/
- add_theme_support( 'custom-background', apply_filters( 'twentysixteen_custom_background_args', array(
- 'default-color' => $default_background_color,
- ) ) );
+ add_theme_support(
+ 'custom-background', apply_filters(
+ 'twentysixteen_custom_background_args', array(
+ 'default-color' => $default_background_color,
+ )
+ )
+ );
/**
* Filter the arguments used when adding 'custom-header' support in Twenty Sixteen.
@@ -50,35 +54,39 @@ function twentysixteen_custom_header_and_background() {
* displayed on the blog.
* }
*/
- add_theme_support( 'custom-header', apply_filters( 'twentysixteen_custom_header_args', array(
- 'default-text-color' => $default_text_color,
- 'width' => 1200,
- 'height' => 280,
- 'flex-height' => true,
- 'wp-head-callback' => 'twentysixteen_header_style',
- ) ) );
+ add_theme_support(
+ 'custom-header', apply_filters(
+ 'twentysixteen_custom_header_args', array(
+ 'default-text-color' => $default_text_color,
+ 'width' => 1200,
+ 'height' => 280,
+ 'flex-height' => true,
+ 'wp-head-callback' => 'twentysixteen_header_style',
+ )
+ )
+ );
}
add_action( 'after_setup_theme', 'twentysixteen_custom_header_and_background' );
if ( ! function_exists( 'twentysixteen_header_style' ) ) :
-/**
- * Styles the header text displayed on the site.
- *
- * Create your own twentysixteen_header_style() function to override in a child theme.
- *
- * @since Twenty Sixteen 1.0
- *
- * @see twentysixteen_custom_header_and_background().
- */
-function twentysixteen_header_style() {
- // If the header text option is untouched, let's bail.
- if ( display_header_text() ) {
- return;
- }
+ /**
+ * Styles the header text displayed on the site.
+ *
+ * Create your own twentysixteen_header_style() function to override in a child theme.
+ *
+ * @since Twenty Sixteen 1.0
+ *
+ * @see twentysixteen_custom_header_and_background().
+ */
+ function twentysixteen_header_style() {
+ // If the header text option is untouched, let's bail.
+ if ( display_header_text() ) {
+ return;
+ }
- // If the header text has been hidden.
- ?>
- <style type="text/css" id="twentysixteen-header-css">
+ // If the header text has been hidden.
+ ?>
+ <style type="text/css" id="twentysixteen-header-css">
.site-branding {
margin: 0 auto 0 0;
}
@@ -88,9 +96,9 @@ function twentysixteen_header_style() {
clip: rect(1px, 1px, 1px, 1px);
position: absolute;
}
- </style>
- <?php
-}
+ </style>
+ <?php
+ }
endif; // twentysixteen_header_style
/**
@@ -103,87 +111,119 @@ endif; // twentysixteen_header_style
function twentysixteen_customize_register( $wp_customize ) {
$color_scheme = twentysixteen_get_color_scheme();
- $wp_customize->get_setting( 'blogname' )->transport = 'postMessage';
- $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
+ $wp_customize->get_setting( 'blogname' )->transport = 'postMessage';
+ $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
if ( isset( $wp_customize->selective_refresh ) ) {
- $wp_customize->selective_refresh->add_partial( 'blogname', array(
- 'selector' => '.site-title a',
- 'container_inclusive' => false,
- 'render_callback' => 'twentysixteen_customize_partial_blogname',
- ) );
- $wp_customize->selective_refresh->add_partial( 'blogdescription', array(
- 'selector' => '.site-description',
- 'container_inclusive' => false,
- 'render_callback' => 'twentysixteen_customize_partial_blogdescription',
- ) );
+ $wp_customize->selective_refresh->add_partial(
+ 'blogname', array(
+ 'selector' => '.site-title a',
+ 'container_inclusive' => false,
+ 'render_callback' => 'twentysixteen_customize_partial_blogname',
+ )
+ );
+ $wp_customize->selective_refresh->add_partial(
+ 'blogdescription', array(
+ 'selector' => '.site-description',
+ 'container_inclusive' => false,
+ 'render_callback' => 'twentysixteen_customize_partial_blogdescription',
+ )
+ );
}
// Add color scheme setting and control.
- $wp_customize->add_setting( 'color_scheme', array(
- 'default' => 'default',
- 'sanitize_callback' => 'twentysixteen_sanitize_color_scheme',
- 'transport' => 'postMessage',
- ) );
-
- $wp_customize->add_control( 'color_scheme', array(
- 'label' => __( 'Base Color Scheme', 'twentysixteen' ),
- 'section' => 'colors',
- 'type' => 'select',
- 'choices' => twentysixteen_get_color_scheme_choices(),
- 'priority' => 1,
- ) );
+ $wp_customize->add_setting(
+ 'color_scheme', array(
+ 'default' => 'default',
+ 'sanitize_callback' => 'twentysixteen_sanitize_color_scheme',
+ 'transport' => 'postMessage',
+ )
+ );
+
+ $wp_customize->add_control(
+ 'color_scheme', array(
+ 'label' => __( 'Base Color Scheme', 'twentysixteen' ),
+ 'section' => 'colors',
+ 'type' => 'select',
+ 'choices' => twentysixteen_get_color_scheme_choices(),
+ 'priority' => 1,
+ )
+ );
// Add page background color setting and control.
- $wp_customize->add_setting( 'page_background_color', array(
- 'default' => $color_scheme[1],
- 'sanitize_callback' => 'sanitize_hex_color',
- 'transport' => 'postMessage',
- ) );
+ $wp_customize->add_setting(
+ 'page_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, 'page_background_color', array(
- 'label' => __( 'Page Background Color', 'twentysixteen' ),
- 'section' => 'colors',
- ) ) );
+ $wp_customize->add_control(
+ new WP_Customize_Color_Control(
+ $wp_customize, 'page_background_color', array(
+ 'label' => __( 'Page Background Color', 'twentysixteen' ),
+ 'section' => 'colors',
+ )
+ )
+ );
// Remove the core header textcolor control, as it shares the main text color.
$wp_customize->remove_control( 'header_textcolor' );
// Add link color setting and control.
- $wp_customize->add_setting( 'link_color', array(
- 'default' => $color_scheme[2],
- 'sanitize_callback' => 'sanitize_hex_color',
- 'transport' => 'postMessage',
- ) );
+ $wp_customize->add_setting(
+ 'link_color', array(
+ 'default' => $color_scheme[2],
+ 'sanitize_callback' => 'sanitize_hex_color',
+ 'transport' => 'postMessage',
+ )
+ );
- $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'link_color', array(
- 'label' => __( 'Link Color', 'twentysixteen' ),
- 'section' => 'colors',
- ) ) );
+ $wp_customize->add_control(
+ new WP_Customize_Color_Control(
+ $wp_customize, 'link_color', array(
+ 'label' => __( 'Link Color', 'twentysixteen' ),
+ 'section' => 'colors',
+ )
+ )
+ );
// Add main text color setting and control.
- $wp_customize->add_setting( 'main_text_color', array(
- 'default' => $color_scheme[3],
- 'sanitize_callback' => 'sanitize_hex_color',
- 'transport' => 'postMessage',
- ) );
+ $wp_customize->add_setting(
+ 'main_text_color', array(
+ 'default' => $color_scheme[3],
+ 'sanitize_callback' => 'sanitize_hex_color',
+ 'transport' => 'postMessage',
+ )
+ );
- $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'main_text_color', array(
- 'label' => __( 'Main Text Color', 'twentysixteen' ),
- 'section' => 'colors',
- ) ) );
+ $wp_customize->add_control(
+ new WP_Customize_Color_Control(
+ $wp_customize, 'main_text_color', array(
+ 'label' => __( 'Main Text Color', 'twentysixteen' ),
+ 'section' => 'colors',
+ )
+ )
+ );
// Add secondary text color setting and control.
- $wp_customize->add_setting( 'secondary_text_color', array(
- 'default' => $color_scheme[4],
- 'sanitize_callback' => 'sanitize_hex_color',
- 'transport' => 'postMessage',
- ) );
-
- $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'secondary_text_color', array(
- 'label' => __( 'Secondary Text Color', 'twentysixteen' ),
- 'section' => 'colors',
- ) ) );
+ $wp_customize->add_setting(
+ 'secondary_text_color', array(
+ 'default' => $color_scheme[4],
+ 'sanitize_callback' => 'sanitize_hex_color',
+ 'transport' => 'postMessage',
+ )
+ );
+
+ $wp_customize->add_control(
+ new WP_Customize_Color_Control(
+ $wp_customize, 'secondary_text_color', array(
+ 'label' => __( 'Secondary Text Color', 'twentysixteen' ),
+ 'section' => 'colors',
+ )
+ )
+ );
}
add_action( 'customize_register', 'twentysixteen_customize_register', 11 );
@@ -248,127 +288,129 @@ function twentysixteen_get_color_schemes() {
* }
* }
*/
- return apply_filters( 'twentysixteen_color_schemes', array(
- 'default' => array(
- 'label' => __( 'Default', 'twentysixteen' ),
- 'colors' => array(
- '#1a1a1a',
- '#ffffff',
- '#007acc',
- '#1a1a1a',
- '#686868',
+ return apply_filters(
+ 'twentysixteen_color_schemes', array(
+ 'default' => array(
+ 'label' => __( 'Default', 'twentysixteen' ),
+ 'colors' => array(
+ '#1a1a1a',
+ '#ffffff',
+ '#007acc',
+ '#1a1a1a',
+ '#686868',
+ ),
),
- ),
- 'dark' => array(
- 'label' => __( 'Dark', 'twentysixteen' ),
- 'colors' => array(
- '#262626',
- '#1a1a1a',
- '#9adffd',
- '#e5e5e5',
- '#c1c1c1',
+ 'dark' => array(
+ 'label' => __( 'Dark', 'twentysixteen' ),
+ 'colors' => array(
+ '#262626',
+ '#1a1a1a',
+ '#9adffd',
+ '#e5e5e5',
+ '#c1c1c1',
+ ),
),
- ),
- 'gray' => array(
- 'label' => __( 'Gray', 'twentysixteen' ),
- 'colors' => array(
- '#616a73',
- '#4d545c',
- '#c7c7c7',
- '#f2f2f2',
- '#f2f2f2',
+ 'gray' => array(
+ 'label' => __( 'Gray', 'twentysixteen' ),
+ 'colors' => array(
+ '#616a73',
+ '#4d545c',
+ '#c7c7c7',
+ '#f2f2f2',
+ '#f2f2f2',
+ ),
),
- ),
- 'red' => array(
- 'label' => __( 'Red', 'twentysixteen' ),
- 'colors' => array(
- '#ffffff',
- '#ff675f',
- '#640c1f',
- '#402b30',
- '#402b30',
+ 'red' => array(
+ 'label' => __( 'Red', 'twentysixteen' ),
+ 'colors' => array(
+ '#ffffff',
+ '#ff675f',
+ '#640c1f',
+ '#402b30',
+ '#402b30',
+ ),
),
- ),
- 'yellow' => array(
- 'label' => __( 'Yellow', 'twentysixteen' ),
- 'colors' => array(
- '#3b3721',
- '#ffef8e',
- '#774e24',
- '#3b3721',
- '#5b4d3e',
+ 'yellow' => array(
+ 'label' => __( 'Yellow', 'twentysixteen' ),
+ 'colors' => array(
+ '#3b3721',
+ '#ffef8e',
+ '#774e24',
+ '#3b3721',
+ '#5b4d3e',
+ ),
),
- ),
- ) );
+ )
+ );
}
if ( ! function_exists( 'twentysixteen_get_color_scheme' ) ) :
-/**
- * Retrieves the current Twenty Sixteen color scheme.
- *
- * Create your own twentysixteen_get_color_scheme() function to override in a child theme.
- *
- * @since Twenty Sixteen 1.0
- *
- * @return array An associative array of either the current or default color scheme HEX values.
- */
-function twentysixteen_get_color_scheme() {
- $color_scheme_option = get_theme_mod( 'color_scheme', 'default' );
- $color_schemes = twentysixteen_get_color_schemes();
+ /**
+ * Retrieves the current Twenty Sixteen color scheme.
+ *
+ * Create your own twentysixteen_get_color_scheme() function to override in a child theme.
+ *
+ * @since Twenty Sixteen 1.0
+ *
+ * @return array An associative array of either the current or default color scheme HEX values.
+ */
+ function twentysixteen_get_color_scheme() {
+ $color_scheme_option = get_theme_mod( 'color_scheme', 'default' );
+ $color_schemes = twentysixteen_get_color_schemes();
- if ( array_key_exists( $color_scheme_option, $color_schemes ) ) {
- return $color_schemes[ $color_scheme_option ]['colors'];
- }
+ if ( array_key_exists( $color_scheme_option, $color_schemes ) ) {
+ return $color_schemes[ $color_scheme_option ]['colors'];
+ }
- return $color_schemes['default']['colors'];
-}
+ return $color_schemes['default']['colors'];
+ }
endif; // twentysixteen_get_color_scheme
if ( ! function_exists( 'twentysixteen_get_color_scheme_choices' ) ) :
-/**
- * Retrieves an array of color scheme choices registered for Twenty Sixteen.
- *
- * Create your own twentysixteen_get_color_scheme_choices() function to override
- * in a child theme.
- *
- * @since Twenty Sixteen 1.0
- *
- * @return array Array of color schemes.
- */
-function twentysixteen_get_color_scheme_choices() {
- $color_schemes = twentysixteen_get_color_schemes();
- $color_scheme_control_options = array();
+ /**
+ * Retrieves an array of color scheme choices registered for Twenty Sixteen.
+ *
+ * Create your own twentysixteen_get_color_scheme_choices() function to override
+ * in a child theme.
+ *
+ * @since Twenty Sixteen 1.0
+ *
+ * @return array Array of color schemes.
+ */
+ function twentysixteen_get_color_scheme_choices() {
+ $color_schemes = twentysixteen_get_color_schemes();
+ $color_scheme_control_options = array();
- foreach ( $color_schemes as $color_scheme => $value ) {
- $color_scheme_control_options[ $color_scheme ] = $value['label'];
- }
+ foreach ( $color_schemes as $color_scheme => $value ) {
+ $color_scheme_control_options[ $color_scheme ] = $value['label'];
+ }
- return $color_scheme_control_options;
-}
+ return $color_scheme_control_options;
+ }
endif; // twentysixteen_get_color_scheme_choices
if ( ! function_exists( 'twentysixteen_sanitize_color_scheme' ) ) :
-/**
- * Handles sanitization for Twenty Sixteen color schemes.
- *
- * Create your own twentysixteen_sanitize_color_scheme() function to override
- * in a child theme.
- *
- * @since Twenty Sixteen 1.0
- *
- * @param string $value Color scheme name value.
- * @return string Color scheme name.
- */
-function twentysixteen_sanitize_color_scheme( $value ) {
- $color_schemes = twentysixteen_get_color_scheme_choices();
+ /**
+ * Handles sanitization for Twenty Sixteen color schemes.
+ *
+ * Create your own twentysixteen_sanitize_color_scheme() function to override
+ * in a child theme.
+ *
+ * @since Twenty Sixteen 1.0
+ *
+ * @param string $value Color scheme name value.
+ * @return string Color scheme name.
+ */
+ function twentysixteen_sanitize_color_scheme( $value ) {
+ $color_schemes = twentysixteen_get_color_scheme_choices();
- if ( ! array_key_exists( $value, $color_schemes ) ) {
- return 'default';
- }
+ if ( ! array_key_exists( $value, $color_schemes ) ) {
+ return 'default';
+ }
- return $value;
-}
+ return $value;
+ }
endif; // twentysixteen_sanitize_color_scheme
/**
@@ -445,14 +487,16 @@ add_action( 'customize_preview_init', 'twentysixteen_customize_preview_js' );
* @return string Color scheme CSS.
*/
function twentysixteen_get_color_scheme_css( $colors ) {
- $colors = wp_parse_args( $colors, array(
- 'background_color' => '',
- 'page_background_color' => '',
- 'link_color' => '',
- 'main_text_color' => '',
- 'secondary_text_color' => '',
- 'border_color' => '',
- ) );
+ $colors = wp_parse_args(
+ $colors, array(
+ 'background_color' => '',
+ 'page_background_color' => '',
+ 'link_color' => '',
+ 'main_text_color' => '',
+ 'secondary_text_color' => '',
+ 'border_color' => '',
+ )
+ );
return <<<CSS
/* Color Scheme */
@@ -869,9 +913,9 @@ add_action( 'wp_enqueue_scripts', 'twentysixteen_page_background_color_css', 11
* @see wp_add_inline_style()
*/
function twentysixteen_link_color_css() {
- $color_scheme = twentysixteen_get_color_scheme();
- $default_color = $color_scheme[2];
- $link_color = get_theme_mod( 'link_color', $default_color );
+ $color_scheme = twentysixteen_get_color_scheme();
+ $default_color = $color_scheme[2];
+ $link_color = get_theme_mod( 'link_color', $default_color );
// Don't do anything if the current color is the default.
if ( $link_color === $default_color ) {
@@ -1126,8 +1170,8 @@ add_action( 'wp_enqueue_scripts', 'twentysixteen_main_text_color_css', 11 );
* @see wp_add_inline_style()
*/
function twentysixteen_secondary_text_color_css() {
- $color_scheme = twentysixteen_get_color_scheme();
- $default_color = $color_scheme[4];
+ $color_scheme = twentysixteen_get_color_scheme();
+ $default_color = $color_scheme[4];
$secondary_text_color = get_theme_mod( 'secondary_text_color', $default_color );
// Don't do anything if the current color is the default.
diff --git a/themes/twentysixteen/inc/template-tags.php b/themes/twentysixteen/inc/template-tags.php
index 9b8f1f39..ce5190a0 100644
--- a/themes/twentysixteen/inc/template-tags.php
+++ b/themes/twentysixteen/inc/template-tags.php
@@ -10,126 +10,132 @@
*/
if ( ! function_exists( 'twentysixteen_entry_meta' ) ) :
-/**
- * Prints HTML with meta information for the categories, tags.
- *
- * Create your own twentysixteen_entry_meta() function to override in a child theme.
- *
- * @since Twenty Sixteen 1.0
- */
-function twentysixteen_entry_meta() {
- if ( 'post' === get_post_type() ) {
- $author_avatar_size = apply_filters( 'twentysixteen_author_avatar_size', 49 );
- printf( '<span class="byline"><span class="author vcard">%1$s<span class="screen-reader-text">%2$s </span> <a class="url fn n" href="%3$s">%4$s</a></span></span>',
- get_avatar( get_the_author_meta( 'user_email' ), $author_avatar_size ),
- _x( 'Author', 'Used before post author name.', 'twentysixteen' ),
- esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
- get_the_author()
- );
- }
+ /**
+ * Prints HTML with meta information for the categories, tags.
+ *
+ * Create your own twentysixteen_entry_meta() function to override in a child theme.
+ *
+ * @since Twenty Sixteen 1.0
+ */
+ function twentysixteen_entry_meta() {
+ if ( 'post' === get_post_type() ) {
+ $author_avatar_size = apply_filters( 'twentysixteen_author_avatar_size', 49 );
+ printf(
+ '<span class="byline"><span class="author vcard">%1$s<span class="screen-reader-text">%2$s </span> <a class="url fn n" href="%3$s">%4$s</a></span></span>',
+ get_avatar( get_the_author_meta( 'user_email' ), $author_avatar_size ),
+ _x( 'Author', 'Used before post author name.', 'twentysixteen' ),
+ esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
+ get_the_author()
+ );
+ }
- if ( in_array( get_post_type(), array( 'post', 'attachment' ) ) ) {
- twentysixteen_entry_date();
- }
+ if ( in_array( get_post_type(), array( 'post', 'attachment' ) ) ) {
+ twentysixteen_entry_date();
+ }
- $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.', 'twentysixteen' ) ),
- 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.', 'twentysixteen' ) ),
+ esc_url( get_post_format_link( $format ) ),
+ get_post_format_string( $format )
+ );
+ }
- if ( 'post' === get_post_type() ) {
- twentysixteen_entry_taxonomies();
- }
+ if ( 'post' === get_post_type() ) {
+ twentysixteen_entry_taxonomies();
+ }
- if ( ! is_singular() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
- echo '<span class="comments-link">';
- comments_popup_link( sprintf( __( 'Leave a comment<span class="screen-reader-text"> on %s</span>', 'twentysixteen' ), get_the_title() ) );
- echo '</span>';
+ if ( ! is_singular() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
+ echo '<span class="comments-link">';
+ comments_popup_link( sprintf( __( 'Leave a comment<span class="screen-reader-text"> on %s</span>', 'twentysixteen' ), get_the_title() ) );
+ echo '</span>';
+ }
}
-}
endif;
if ( ! function_exists( 'twentysixteen_entry_date' ) ) :
-/**
- * Prints HTML with date information for current post.
- *
- * Create your own twentysixteen_entry_date() function to override in a child theme.
- *
- * @since Twenty Sixteen 1.0
- */
-function twentysixteen_entry_date() {
- $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
+ /**
+ * Prints HTML with date information for current post.
+ *
+ * Create your own twentysixteen_entry_date() function to override in a child theme.
+ *
+ * @since Twenty Sixteen 1.0
+ */
+ function twentysixteen_entry_date() {
+ $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 ( 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>';
+ }
- $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()
- );
-
- 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.', 'twentysixteen' ),
- esc_url( get_permalink() ),
- $time_string
- );
-}
-endif;
+ $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 ( ! function_exists( 'twentysixteen_entry_taxonomies' ) ) :
-/**
- * Prints HTML with category and tags for current post.
- *
- * Create your own twentysixteen_entry_taxonomies() function to override in a child theme.
- *
- * @since Twenty Sixteen 1.0
- */
-function twentysixteen_entry_taxonomies() {
- $categories_list = get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentysixteen' ) );
- if ( $categories_list && twentysixteen_categorized_blog() ) {
- printf( '<span class="cat-links"><span class="screen-reader-text">%1$s </span>%2$s</span>',
- _x( 'Categories', 'Used before category names.', 'twentysixteen' ),
- $categories_list
+ 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.', 'twentysixteen' ),
+ esc_url( get_permalink() ),
+ $time_string
);
}
+endif;
- $tags_list = get_the_tag_list( '', _x( ', ', 'Used between list items, there is a space after the comma.', 'twentysixteen' ) );
- 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.', 'twentysixteen' ),
- $tags_list
- );
+if ( ! function_exists( 'twentysixteen_entry_taxonomies' ) ) :
+ /**
+ * Prints HTML with category and tags for current post.
+ *
+ * Create your own twentysixteen_entry_taxonomies() function to override in a child theme.
+ *
+ * @since Twenty Sixteen 1.0
+ */
+ function twentysixteen_entry_taxonomies() {
+ $categories_list = get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentysixteen' ) );
+ if ( $categories_list && twentysixteen_categorized_blog() ) {
+ printf(
+ '<span class="cat-links"><span class="screen-reader-text">%1$s </span>%2$s</span>',
+ _x( 'Categories', 'Used before category names.', 'twentysixteen' ),
+ $categories_list
+ );
+ }
+
+ $tags_list = get_the_tag_list( '', _x( ', ', 'Used between list items, there is a space after the comma.', 'twentysixteen' ) );
+ 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.', 'twentysixteen' ),
+ $tags_list
+ );
+ }
}
-}
endif;
if ( ! function_exists( 'twentysixteen_post_thumbnail' ) ) :
-/**
- * Displays an optional post thumbnail.
- *
- * Wraps the post thumbnail in an anchor element on index views, or a div
- * element when on single views.
- *
- * Create your own twentysixteen_post_thumbnail() function to override in a child theme.
- *
- * @since Twenty Sixteen 1.0
- */
-function twentysixteen_post_thumbnail() {
- if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) {
- return;
- }
+ /**
+ * Displays an optional post thumbnail.
+ *
+ * Wraps the post thumbnail in an anchor element on index views, or a div
+ * element when on single views.
+ *
+ * Create your own twentysixteen_post_thumbnail() function to override in a child theme.
+ *
+ * @since Twenty Sixteen 1.0
+ */
+ function twentysixteen_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 -->
@@ -139,8 +145,9 @@ function twentysixteen_post_thumbnail() {
<?php the_post_thumbnail( 'post-thumbnail', array( 'alt' => the_title_attribute( 'echo=0' ) ) ); ?>
</a>
- <?php endif; // End is_singular()
-}
+ <?php
+ endif; // End is_singular()
+ }
endif;
if ( ! function_exists( 'twentysixteen_excerpt' ) ) :
@@ -158,69 +165,74 @@ if ( ! function_exists( 'twentysixteen_excerpt' ) ) :
function twentysixteen_excerpt( $class = 'entry-summary' ) {
$class = esc_attr( $class );
- if ( has_excerpt() || is_search() ) : ?>
+ if ( has_excerpt() || is_search() ) :
+ ?>
<div class="<?php echo $class; ?>">
<?php the_excerpt(); ?>
</div><!-- .<?php echo $class; ?> -->
- <?php endif;
+ <?php
+ endif;
}
endif;
if ( ! function_exists( 'twentysixteen_excerpt_more' ) && ! is_admin() ) :
-/**
- * Replaces "[...]" (appended to automatically generated excerpts) with ... and
- * a 'Continue reading' link.
- *
- * Create your own twentysixteen_excerpt_more() function to override in a child theme.
- *
- * @since Twenty Sixteen 1.0
- *
- * @return string 'Continue reading' link prepended with an ellipsis.
- */
-function twentysixteen_excerpt_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<span class="screen-reader-text"> "%s"</span>', 'twentysixteen' ), get_the_title( get_the_ID() ) )
- );
- return ' &hellip; ' . $link;
-}
-add_filter( 'excerpt_more', 'twentysixteen_excerpt_more' );
+ /**
+ * Replaces "[...]" (appended to automatically generated excerpts) with ... and
+ * a 'Continue reading' link.
+ *
+ * Create your own twentysixteen_excerpt_more() function to override in a child theme.
+ *
+ * @since Twenty Sixteen 1.0
+ *
+ * @return string 'Continue reading' link prepended with an ellipsis.
+ */
+ function twentysixteen_excerpt_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<span class="screen-reader-text"> "%s"</span>', 'twentysixteen' ), get_the_title( get_the_ID() ) )
+ );
+ return ' &hellip; ' . $link;
+ }
+ add_filter( 'excerpt_more', 'twentysixteen_excerpt_more' );
endif;
if ( ! function_exists( 'twentysixteen_categorized_blog' ) ) :
-/**
- * Determines whether blog/site has more than one category.
- *
- * Create your own twentysixteen_categorized_blog() function to override in a child theme.
- *
- * @since Twenty Sixteen 1.0
- *
- * @return bool True if there is more than one category, false otherwise.
- */
-function twentysixteen_categorized_blog() {
- if ( false === ( $all_the_cool_cats = get_transient( 'twentysixteen_categories' ) ) ) {
- // Create an array of all the categories that are attached to posts.
- $all_the_cool_cats = get_categories( array(
- 'fields' => 'ids',
- // 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 );
-
- set_transient( 'twentysixteen_categories', $all_the_cool_cats );
- }
+ /**
+ * Determines whether blog/site has more than one category.
+ *
+ * Create your own twentysixteen_categorized_blog() function to override in a child theme.
+ *
+ * @since Twenty Sixteen 1.0
+ *
+ * @return bool True if there is more than one category, false otherwise.
+ */
+ function twentysixteen_categorized_blog() {
+ if ( false === ( $all_the_cool_cats = get_transient( 'twentysixteen_categories' ) ) ) {
+ // Create an array of all the categories that are attached to posts.
+ $all_the_cool_cats = get_categories(
+ array(
+ 'fields' => 'ids',
+ // We only need to know if there is more than one category.
+ 'number' => 2,
+ )
+ );
- if ( $all_the_cool_cats > 1 || is_preview() ) {
- // This blog has more than 1 category so twentysixteen_categorized_blog should return true.
- return true;
- } else {
- // This blog has only 1 category so twentysixteen_categorized_blog should return false.
- return false;
+ // Count the number of categories that are attached to the posts.
+ $all_the_cool_cats = count( $all_the_cool_cats );
+
+ set_transient( 'twentysixteen_categories', $all_the_cool_cats );
+ }
+
+ if ( $all_the_cool_cats > 1 || is_preview() ) {
+ // This blog has more than 1 category so twentysixteen_categorized_blog should return true.
+ return true;
+ } else {
+ // This blog has only 1 category so twentysixteen_categorized_blog should return false.
+ return false;
+ }
}
-}
endif;
/**
@@ -236,19 +248,19 @@ function twentysixteen_category_transient_flusher() {
delete_transient( 'twentysixteen_categories' );
}
add_action( 'edit_category', 'twentysixteen_category_transient_flusher' );
-add_action( 'save_post', 'twentysixteen_category_transient_flusher' );
+add_action( 'save_post', 'twentysixteen_category_transient_flusher' );
if ( ! function_exists( 'twentysixteen_the_custom_logo' ) ) :
-/**
- * Displays the optional custom logo.
- *
- * Does nothing if the custom logo is not available.
- *
- * @since Twenty Sixteen 1.2
- */
-function twentysixteen_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 Sixteen 1.2
+ */
+ function twentysixteen_the_custom_logo() {
+ if ( function_exists( 'the_custom_logo' ) ) {
+ the_custom_logo();
+ }
}
-}
endif;
diff --git a/themes/twentysixteen/index.php b/themes/twentysixteen/index.php
index 3f621abe..d31ef2f8 100644
--- a/themes/twentysixteen/index.php
+++ b/themes/twentysixteen/index.php
@@ -29,7 +29,8 @@ 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.
@@ -38,17 +39,19 @@ get_header(); ?>
*/
get_template_part( 'template-parts/content', get_post_format() );
- // End the loop.
+ // End the loop.
endwhile;
// Previous/next page navigation.
- the_posts_pagination( array(
- 'prev_text' => __( 'Previous page', 'twentysixteen' ),
- 'next_text' => __( 'Next page', 'twentysixteen' ),
- 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>',
- ) );
+ the_posts_pagination(
+ array(
+ 'prev_text' => __( 'Previous page', 'twentysixteen' ),
+ 'next_text' => __( 'Next page', 'twentysixteen' ),
+ 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>',
+ )
+ );
- // If no content, include the "No posts found" template.
+ // If no content, include the "No posts found" template.
else :
get_template_part( 'template-parts/content', 'none' );
diff --git a/themes/twentysixteen/page.php b/themes/twentysixteen/page.php
index 315a3da7..a232c9fc 100644
--- a/themes/twentysixteen/page.php
+++ b/themes/twentysixteen/page.php
@@ -17,7 +17,8 @@ get_header(); ?>
<main id="main" class="site-main" role="main">
<?php
// Start the loop.
- while ( have_posts() ) : the_post();
+ while ( have_posts() ) :
+ the_post();
// Include the page content template.
get_template_part( 'template-parts/content', 'page' );
diff --git a/themes/twentysixteen/readme.txt b/themes/twentysixteen/readme.txt
index 95e05590..9c0cf092 100644
--- a/themes/twentysixteen/readme.txt
+++ b/themes/twentysixteen/readme.txt
@@ -2,7 +2,7 @@
Contributors: the WordPress team
Requires at least: WordPress 4.4
Tested up to: WordPress 5.0-trunk
-Version: 1.4
+Version: 1.5
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: one-column, two-columns, right-sidebar, accessibility-ready, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-images, flexible-header, microformats, post-formats, rtl-language-support, sticky-post, threaded-comments, translation-ready, blog
@@ -29,7 +29,7 @@ For more information about Twenty Sixteen please go to https://codex.wordpress.o
== Copyright ==
-Twenty Sixteen WordPress Theme, Copyright 2014-2017 WordPress.org
+Twenty Sixteen WordPress Theme, Copyright 2014-2018 WordPress.org
Twenty Sixteen is distributed under the terms of the GNU GPL
This program is free software: you can redistribute it and/or modify
@@ -56,6 +56,11 @@ Image used in screenshot.png: A photo by Austin Schmid (https://unsplash.com/sch
== Changelog ==
+= 1.5 =
+* Released: May 17, 2018
+
+https://codex.wordpress.org/Twenty_Sixteen_Theme_Changelog#Version_1.5
+
= 1.4 =
* Released: November 14, 2017
diff --git a/themes/twentysixteen/rtl.css b/themes/twentysixteen/rtl.css
index f88041a2..48ece280 100644
--- a/themes/twentysixteen/rtl.css
+++ b/themes/twentysixteen/rtl.css
@@ -98,7 +98,8 @@ textarea,
.site-footer .site-title,
.site-footer .site-title:after,
.widecolumn label,
-.widecolumn .mu_register label {
+.widecolumn .mu_register label,
+.site-footer span[role=separator] {
font-family: Arial, Tahoma, sans-serif;
}
@@ -399,16 +400,13 @@ body:not(.search-results) .entry-summary .alignleft {
float: left;
}
-
-/**
- * 8.4 - Footer
- */
-
-.site-footer .site-title:after {
- padding-right: 0.538461538em;
- padding-left: 0.307692308em;
+.comment-form #wp-comment-cookies-consent {
+ margin: 0 0 0 10px;
}
+.comment-form .comment-form-cookies-consent label {
+ font-family: Arial, Tahoma, sans-serif;
+}
/**
* 9.0 - Multisites
diff --git a/themes/twentysixteen/search.php b/themes/twentysixteen/search.php
index 4180b5f9..0f893636 100644
--- a/themes/twentysixteen/search.php
+++ b/themes/twentysixteen/search.php
@@ -20,7 +20,8 @@ get_header(); ?>
<?php
// Start the loop.
- while ( have_posts() ) : the_post();
+ while ( have_posts() ) :
+ the_post();
/**
* Run the loop for the search to output the results.
@@ -29,17 +30,19 @@ get_header(); ?>
*/
get_template_part( 'template-parts/content', 'search' );
- // End the loop.
+ // End the loop.
endwhile;
// Previous/next page navigation.
- the_posts_pagination( array(
- 'prev_text' => __( 'Previous page', 'twentysixteen' ),
- 'next_text' => __( 'Next page', 'twentysixteen' ),
- 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>',
- ) );
-
- // If no content, include the "No posts found" template.
+ the_posts_pagination(
+ array(
+ 'prev_text' => __( 'Previous page', 'twentysixteen' ),
+ 'next_text' => __( 'Next page', 'twentysixteen' ),
+ 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>',
+ )
+ );
+
+ // If no content, include the "No posts found" template.
else :
get_template_part( 'template-parts/content', 'none' );
diff --git a/themes/twentysixteen/sidebar.php b/themes/twentysixteen/sidebar.php
index d4d893eb..45aff971 100644
--- a/themes/twentysixteen/sidebar.php
+++ b/themes/twentysixteen/sidebar.php
@@ -8,7 +8,7 @@
*/
?>
-<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>
+<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>
<aside id="secondary" class="sidebar widget-area" role="complementary">
<?php dynamic_sidebar( 'sidebar-1' ); ?>
</aside><!-- .sidebar .widget-area -->
diff --git a/themes/twentysixteen/single.php b/themes/twentysixteen/single.php
index 07e0df29..34541703 100644
--- a/themes/twentysixteen/single.php
+++ b/themes/twentysixteen/single.php
@@ -13,7 +13,8 @@ get_header(); ?>
<main id="main" class="site-main" role="main">
<?php
// Start the loop.
- while ( have_posts() ) : the_post();
+ while ( have_posts() ) :
+ the_post();
// Include the single post content template.
get_template_part( 'template-parts/content', 'single' );
@@ -25,19 +26,23 @@ get_header(); ?>
if ( is_singular( 'attachment' ) ) {
// Parent 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', 'twentysixteen' ),
- ) );
+ the_post_navigation(
+ array(
+ 'prev_text' => _x( '<span class="meta-nav">Published in</span><span class="post-title">%title</span>', 'Parent post link', 'twentysixteen' ),
+ )
+ );
} elseif ( is_singular( 'post' ) ) {
// Previous/next post navigation.
- the_post_navigation( array(
- 'next_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Next', 'twentysixteen' ) . '</span> ' .
- '<span class="screen-reader-text">' . __( 'Next post:', 'twentysixteen' ) . '</span> ' .
- '<span class="post-title">%title</span>',
- 'prev_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Previous', 'twentysixteen' ) . '</span> ' .
- '<span class="screen-reader-text">' . __( 'Previous post:', 'twentysixteen' ) . '</span> ' .
- '<span class="post-title">%title</span>',
- ) );
+ the_post_navigation(
+ array(
+ 'next_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Next', 'twentysixteen' ) . '</span> ' .
+ '<span class="screen-reader-text">' . __( 'Next post:', 'twentysixteen' ) . '</span> ' .
+ '<span class="post-title">%title</span>',
+ 'prev_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Previous', 'twentysixteen' ) . '</span> ' .
+ '<span class="screen-reader-text">' . __( 'Previous post:', 'twentysixteen' ) . '</span> ' .
+ '<span class="post-title">%title</span>',
+ )
+ );
}
// End of the loop.
diff --git a/themes/twentysixteen/style.css b/themes/twentysixteen/style.css
index ed228286..aacb880a 100644
--- a/themes/twentysixteen/style.css
+++ b/themes/twentysixteen/style.css
@@ -4,7 +4,7 @@ Theme URI: https://wordpress.org/themes/twentysixteen/
Author: the WordPress team
Author URI: https://wordpress.org/
Description: Twenty Sixteen is a modernized take on an ever-popular WordPress layout — the horizontal masthead with an optional right sidebar that works perfectly for blogs and websites. It has custom color options with beautiful default color schemes, a harmonious fluid grid using a mobile-first approach, and impeccable polish in every detail. Twenty Sixteen will make your WordPress look beautiful everywhere.
-Version: 1.4
+Version: 1.5
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: one-column, two-columns, right-sidebar, accessibility-ready, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-images, flexible-header, microformats, post-formats, rtl-language-support, sticky-post, threaded-comments, translation-ready, blog
@@ -2394,6 +2394,16 @@ body.search-no-results .page-header {
top: -5px;
}
+.comment-form #wp-comment-cookies-consent {
+ margin: 0 10px 0 0;
+}
+
+.comment-form .comment-form-cookies-consent label {
+ display: inline;
+ font-family: Merriweather, Georgia, serif;
+ letter-spacing: 0;
+ text-transform: none;
+}
/**
* 11.5 - Sidebar
@@ -2443,6 +2453,16 @@ body.search-no-results .page-header {
padding: 0 0.307692308em 0 0.538461538em;
}
+.site-footer span[role=separator] {
+ font-family: Montserrat, sans-serif;
+ opacity: 0.7;
+ padding: 0 0.307692308em 0 0.538461538em;
+}
+
+.site-footer span[role=separator]::before {
+ content: '\002f';
+}
+
/**
* 12.0 - Media
diff --git a/themes/twentysixteen/template-parts/content-page.php b/themes/twentysixteen/template-parts/content-page.php
index 2b57d2b5..470776b4 100644
--- a/themes/twentysixteen/template-parts/content-page.php
+++ b/themes/twentysixteen/template-parts/content-page.php
@@ -19,14 +19,16 @@
<?php
the_content();
- wp_link_pages( array(
- 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentysixteen' ) . '</span>',
- 'after' => '</div>',
- 'link_before' => '<span>',
- 'link_after' => '</span>',
- 'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>%',
- 'separator' => '<span class="screen-reader-text">, </span>',
- ) );
+ wp_link_pages(
+ array(
+ 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentysixteen' ) . '</span>',
+ 'after' => '</div>',
+ 'link_before' => '<span>',
+ 'link_after' => '</span>',
+ 'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>%',
+ 'separator' => '<span class="screen-reader-text">, </span>',
+ )
+ );
?>
</div><!-- .entry-content -->
diff --git a/themes/twentysixteen/template-parts/content-single.php b/themes/twentysixteen/template-parts/content-single.php
index 241f5285..58f829b4 100644
--- a/themes/twentysixteen/template-parts/content-single.php
+++ b/themes/twentysixteen/template-parts/content-single.php
@@ -21,14 +21,16 @@
<?php
the_content();
- wp_link_pages( array(
- 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentysixteen' ) . '</span>',
- 'after' => '</div>',
- 'link_before' => '<span>',
- 'link_after' => '</span>',
- 'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>%',
- 'separator' => '<span class="screen-reader-text">, </span>',
- ) );
+ wp_link_pages(
+ array(
+ 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentysixteen' ) . '</span>',
+ 'after' => '</div>',
+ 'link_before' => '<span>',
+ 'link_after' => '</span>',
+ 'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>%',
+ 'separator' => '<span class="screen-reader-text">, </span>',
+ )
+ );
if ( '' !== get_the_author_meta( 'description' ) ) {
get_template_part( 'template-parts/biography' );
diff --git a/themes/twentysixteen/template-parts/content.php b/themes/twentysixteen/template-parts/content.php
index 22b0ea41..703487dc 100644
--- a/themes/twentysixteen/template-parts/content.php
+++ b/themes/twentysixteen/template-parts/content.php
@@ -24,19 +24,23 @@
<div class="entry-content">
<?php
/* translators: %s: Name of current post */
- the_content( sprintf(
- __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentysixteen' ),
- get_the_title()
- ) );
+ the_content(
+ sprintf(
+ __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentysixteen' ),
+ get_the_title()
+ )
+ );
- wp_link_pages( array(
- 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentysixteen' ) . '</span>',
- 'after' => '</div>',
- 'link_before' => '<span>',
- 'link_after' => '</span>',
- 'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>%',
- 'separator' => '<span class="screen-reader-text">, </span>',
- ) );
+ wp_link_pages(
+ array(
+ 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentysixteen' ) . '</span>',
+ 'after' => '</div>',
+ 'link_before' => '<span>',
+ 'link_after' => '</span>',
+ 'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>%',
+ 'separator' => '<span class="screen-reader-text">, </span>',
+ )
+ );
?>
</div><!-- .entry-content -->