Update themes

This commit is contained in:
Oliver Davies 2019-05-08 08:07:01 +01:00
parent e00f87f2f5
commit 168d1a5ee7
98 changed files with 6532 additions and 2223 deletions

View file

@ -71,13 +71,13 @@ class TwentyNineteen_SVG_Icons {
* @var array
*/
static $ui_icons = array(
'link' => /* material-design link */ '
'link' => /* material-design link */ '
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path d="M0 0h24v24H0z" fill="none"></path>
<path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"></path>
</svg>',
'watch' => /* material-design watch-later */ '
'watch' => /* material-design watch-later */ '
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<defs>
<path id="a" d="M0 0h24v24H0V0z"></path>
@ -88,73 +88,73 @@ class TwentyNineteen_SVG_Icons {
<path clip-path="url(#b)" d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm4.2 14.2L11 13V7h1.5v5.2l4.5 2.7-.8 1.3z"></path>
</svg>',
'archive' => /* material-design folder */ '
'archive' => /* material-design folder */ '
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"></path>
<path d="M0 0h24v24H0z" fill="none"></path>
</svg>',
'tag' => /* material-design local_offer */ '
'tag' => /* material-design local_offer */ '
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path d="M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58.55 0 1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41 0-.55-.23-1.06-.59-1.42zM5.5 7C4.67 7 4 6.33 4 5.5S4.67 4 5.5 4 7 4.67 7 5.5 6.33 7 5.5 7z"></path>
<path d="M0 0h24v24H0z" fill="none"></path>
</svg>',
'comment' => /* material-design comment */ '
'comment' => /* material-design comment */ '
<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<path d="M21.99 4c0-1.1-.89-2-1.99-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4-.01-18z"></path>
<path d="M0 0h24v24H0z" fill="none"></path>
</svg>',
'person' => /* material-design person */ '
'person' => /* material-design person */ '
<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"></path>
<path d="M0 0h24v24H0z" fill="none"></path>
</svg>',
'edit' => /* material-design edit */ '
'edit' => /* material-design edit */ '
<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"></path>
<path d="M0 0h24v24H0z" fill="none"></path>
</svg>',
'chevron_left' => /* material-design chevron_left */ '
'chevron_left' => /* material-design chevron_left */ '
<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"></path>
<path d="M0 0h24v24H0z" fill="none"></path>
</svg>',
'chevron_right' => /* material-design chevron_right */ '
'chevron_right' => /* material-design chevron_right */ '
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"></path>
<path d="M0 0h24v24H0z" fill="none"></path>
</svg>',
'check' => /* material-design check */ '
'check' => /* material-design check */ '
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path d="M0 0h24v24H0z" fill="none"></path>
<path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"></path>
</svg>',
'arrow_drop_down_circle' => /* material-design arrow_drop_down_circle */ '
'arrow_drop_down_circle' => /* material-design arrow_drop_down_circle */ '
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path d="M0 0h24v24H0z" fill="none"></path>
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 12l-4-4h8l-4 4z"></path>
</svg>',
'keyboard_arrow_down' => /* material-design keyboard_arrow_down */ '
'keyboard_arrow_down' => /* material-design keyboard_arrow_down */ '
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"></path>
<path fill="none" d="M0 0h24v24H0V0z"></path>
</svg>',
'keyboard_arrow_right' => /* material-design keyboard_arrow_right */ '
'keyboard_arrow_right' => /* material-design keyboard_arrow_right */ '
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path d="M10 17l5-5-5-5v10z"></path>
<path fill="none" d="M0 24V0h24v24H0z"></path>
</svg>',
'keyboard_arrow_left' => /* material-design keyboard_arrow_left */ '
'keyboard_arrow_left' => /* material-design keyboard_arrow_left */ '
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<path d="M14 7l-5 5 5 5V7z"></path>
<path fill="none" d="M24 0v24H0V0h24z"></path>
@ -343,7 +343,7 @@ class TwentyNineteen_SVG_Icons {
<path d="M12,4.622c2.403,0,2.688,0.009,3.637,0.052c0.877,0.04,1.354,0.187,1.671,0.31c0.42,0.163,0.72,0.358,1.035,0.673 c0.315,0.315,0.51,0.615,0.673,1.035c0.123,0.317,0.27,0.794,0.31,1.671c0.043,0.949,0.052,1.234,0.052,3.637 s-0.009,2.688-0.052,3.637c-0.04,0.877-0.187,1.354-0.31,1.671c-0.163,0.42-0.358,0.72-0.673,1.035 c-0.315,0.315-0.615,0.51-1.035,0.673c-0.317,0.123-0.794,0.27-1.671,0.31c-0.949,0.043-1.233,0.052-3.637,0.052 s-2.688-0.009-3.637-0.052c-0.877-0.04-1.354-0.187-1.671-0.31c-0.42-0.163-0.72-0.358-1.035-0.673 c-0.315-0.315-0.51-0.615-0.673-1.035c-0.123-0.317-0.27-0.794-0.31-1.671C4.631,14.688,4.622,14.403,4.622,12 s0.009-2.688,0.052-3.637c0.04-0.877,0.187-1.354,0.31-1.671c0.163-0.42,0.358-0.72,0.673-1.035 c0.315-0.315,0.615-0.51,1.035-0.673c0.317-0.123,0.794-0.27,1.671-0.31C9.312,4.631,9.597,4.622,12,4.622 M12,3 C9.556,3,9.249,3.01,8.289,3.054C7.331,3.098,6.677,3.25,6.105,3.472C5.513,3.702,5.011,4.01,4.511,4.511 c-0.5,0.5-0.808,1.002-1.038,1.594C3.25,6.677,3.098,7.331,3.054,8.289C3.01,9.249,3,9.556,3,12c0,2.444,0.01,2.751,0.054,3.711 c0.044,0.958,0.196,1.612,0.418,2.185c0.23,0.592,0.538,1.094,1.038,1.594c0.5,0.5,1.002,0.808,1.594,1.038 c0.572,0.222,1.227,0.375,2.185,0.418C9.249,20.99,9.556,21,12,21s2.751-0.01,3.711-0.054c0.958-0.044,1.612-0.196,2.185-0.418 c0.592-0.23,1.094-0.538,1.594-1.038c0.5-0.5,0.808-1.002,1.038-1.594c0.222-0.572,0.375-1.227,0.418-2.185 C20.99,14.751,21,14.444,21,12s-0.01-2.751-0.054-3.711c-0.044-0.958-0.196-1.612-0.418-2.185c-0.23-0.592-0.538-1.094-1.038-1.594 c-0.5-0.5-1.002-0.808-1.594-1.038c-0.572-0.222-1.227-0.375-2.185-0.418C14.751,3.01,14.444,3,12,3L12,3z M12,7.378 c-2.552,0-4.622,2.069-4.622,4.622S9.448,16.622,12,16.622s4.622-2.069,4.622-4.622S14.552,7.378,12,7.378z M12,15 c-1.657,0-3-1.343-3-3s1.343-3,3-3s3,1.343,3,3S13.657,15,12,15z M16.804,6.116c-0.596,0-1.08,0.484-1.08,1.08 s0.484,1.08,1.08,1.08c0.596,0,1.08-0.484,1.08-1.08S17.401,6.116,16.804,6.116z"></path>
</svg>',
'lastfm' => '
'lastfm' => '
<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<path d="M10.5002,0 C4.7006,0 0,4.70109753 0,10.4998496 C0,16.2989526 4.7006,21 10.5002,21 C16.299,21 21,16.2989526 21,10.4998496 C21,4.70109753 16.299,0 10.5002,0 Z M14.69735,14.7204413 C13.3164,14.7151781 12.4346,14.0870017 11.83445,12.6859357 L11.6816001,12.3451305 L10.35405,9.31011397 C9.92709997,8.26875064 8.85260001,7.57120012 7.68010001,7.57120012 C6.06945001,7.57120012 4.75925001,8.88509738 4.75925001,10.5009524 C4.75925001,12.1164565 6.06945001,13.4303036 7.68010001,13.4303036 C8.77200001,13.4303036 9.76514999,12.827541 10.2719501,11.8567047 C10.2893,11.8235214 10.3239,11.8019673 10.36305,11.8038219 C10.4007,11.8053759 10.43535,11.8287847 10.4504,11.8631709 L10.98655,13.1045863 C11.0016,13.1389726 10.9956,13.17782 10.97225,13.2068931 C10.1605001,14.1995341 8.96020001,14.7683115 7.68010001,14.7683115 C5.33305,14.7683115 3.42340001,12.8535563 3.42340001,10.5009524 C3.42340001,8.14679459 5.33300001,6.23203946 7.68010001,6.23203946 C9.45720002,6.23203946 10.8909,7.19074535 11.6138,8.86359341 C11.6205501,8.88018505 12.3412,10.5707777 12.97445,12.0190621 C13.34865,12.8739575 13.64615,13.3959676 14.6288,13.4291508 C15.5663001,13.4612814 16.25375,12.9121534 16.25375,12.1484869 C16.25375,11.4691321 15.8320501,11.3003585 14.8803,10.98216 C13.2365,10.4397989 12.34495,9.88605929 12.34495,8.51817658 C12.34495,7.1809207 13.26665,6.31615054 14.692,6.31615054 C15.62875,6.31615054 16.3155,6.7286858 16.79215,7.5768142 C16.80495,7.60062396 16.8079001,7.62814302 16.8004001,7.65420843 C16.7929,7.68027384 16.7748,7.70212868 16.7507001,7.713808 L15.86145,8.16900031 C15.8178001,8.19200805 15.7643,8.17807308 15.73565,8.13847371 C15.43295,7.71345711 15.0956,7.52513451 14.6423,7.52513451 C14.05125,7.52513451 13.6220001,7.92899802 13.6220001,8.48649708 C13.6220001,9.17382194 14.1529001,9.34144259 15.0339,9.61923972 C15.14915,9.65578139 15.26955,9.69397731 15.39385,9.73432853 C16.7763,10.1865133 17.57675,10.7311301 17.57675,12.1836251 C17.57685,13.629654 16.3389,14.7204413 14.69735,14.7204413 Z"></path>
</svg>',

View file

@ -33,10 +33,9 @@ class TwentyNineteen_Walker_Comment extends Walker_Comment {
<footer class="comment-meta">
<div class="comment-author vcard">
<?php
$comment_author_link = get_comment_author_link( $comment );
$comment_author_url = get_comment_author_url( $comment );
$comment_author = get_comment_author( $comment );
$avatar = get_avatar( $comment, $args['avatar_size'] );
$comment_author_url = get_comment_author_url( $comment );
$comment_author = get_comment_author( $comment );
$avatar = get_avatar( $comment, $args['avatar_size'] );
if ( 0 != $args['avatar_size'] ) {
if ( empty( $comment_author_url ) ) {
echo $avatar;
@ -53,6 +52,14 @@ class TwentyNineteen_Walker_Comment extends Walker_Comment {
printf( '<span class="post-author-badge" aria-hidden="true">%s</span>', twentynineteen_get_icon_svg( 'check', 24 ) );
}
/*
* Using the `check` icon instead of `check_circle`, since we can't add a
* fill color to the inner check shape when in circle form.
*/
if ( twentynineteen_is_comment_by_post_author( $comment ) ) {
printf( '<span class="post-author-badge" aria-hidden="true">%s</span>', twentynineteen_get_icon_svg( 'check', 24 ) );
}
printf(
/* translators: %s: comment author link */
wp_kses(
@ -63,7 +70,7 @@ class TwentyNineteen_Walker_Comment extends Walker_Comment {
),
)
),
'<b class="fn">' . get_comment_author_link( $comment ) . '</b>'
'<b class="fn">' . $comment_author . '</b>'
);
if ( ! empty( $comment_author_url ) ) {

View file

@ -20,6 +20,7 @@
</head>
<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<div id="page" class="site">
<a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'twentynineteen' ); ?></a>
@ -27,7 +28,7 @@
<div class="site-branding-container">
<?php get_template_part( 'template-parts/header/site', 'branding' ); ?>
</div><!-- .layout-wrap -->
</div><!-- .site-branding-container -->
<?php if ( is_singular() && twentynineteen_can_show_post_thumbnail() ) : ?>
<div class="site-featured-image">
@ -37,9 +38,9 @@
$discussion = ! is_page() && twentynineteen_can_show_post_thumbnail() ? twentynineteen_get_discussion_data() : null;
$classes = 'entry-header';
if ( ! empty( $discussion ) && absint( $discussion->responses ) > 0 ) {
$classes = 'entry-header has-discussion';
}
if ( ! empty( $discussion ) && absint( $discussion->responses ) > 0 ) {
$classes = 'entry-header has-discussion';
}
?>
<div class="<?php echo $classes; ?>">
<?php get_template_part( 'template-parts/header/entry', 'header' ); ?>

View file

@ -15,83 +15,83 @@ 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(); ?>>
<header class="entry-header">
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
</header><!-- .entry-header -->
<div class="entry-content">
<figure class="entry-attachment wp-block-image">
<?php
/**
* Filter the default twentynineteen image attachment size.
*
* @since Twenty Sixteen 1.0
*
* @param string $image_size Image size. Default 'large'.
*/
$image_size = apply_filters( 'twentynineteen_attachment_size', 'full' );
<?php
/**
* Filter the default twentynineteen image attachment size.
*
* @since Twenty Sixteen 1.0
*
* @param string $image_size Image size. Default 'large'.
*/
$image_size = apply_filters( 'twentynineteen_attachment_size', 'full' );
echo wp_get_attachment_image( get_the_ID(), $image_size );
?>
echo wp_get_attachment_image( get_the_ID(), $image_size );
?>
<figcaption class="wp-caption-text"><?php the_excerpt(); ?></figcaption>
</figure><!-- .entry-attachment -->
<?php
the_content();
wp_link_pages(
array(
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentynineteen' ) . '</span>',
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>',
'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentynineteen' ) . ' </span>%',
'separator' => '<span class="screen-reader-text">, </span>',
)
);
the_content();
wp_link_pages(
array(
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentynineteen' ) . '</span>',
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>',
'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentynineteen' ) . ' </span>%',
'separator' => '<span class="screen-reader-text">, </span>',
)
);
?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<?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>',
_x( 'Full size', 'Used before full size attachment link.', 'twentynineteen' ),
esc_url( wp_get_attachment_url() ),
absint( $metadata['width'] ),
absint( $metadata['height'] )
);
}
?>
<?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>',
_x( 'Full size', 'Used before full size attachment link.', 'twentynineteen' ),
esc_url( wp_get_attachment_url() ),
absint( $metadata['width'] ),
absint( $metadata['height'] )
);
}
?>
<?php twentynineteen_entry_footer(); ?>
</footer><!-- .entry-footer -->
</article><!-- #post-## -->
</article><!-- #post-<?php the_ID(); ?> -->
<?php
// Parent post navigation.
the_post_navigation(
array(
'prev_text' => _x( '<span class="meta-nav">Published in</span><br><span class="post-title">%title</span>', 'Parent post link', 'twentynineteen' ),
)
);
// Parent post navigation.
the_post_navigation(
array(
'prev_text' => _x( '<span class="meta-nav">Published in</span><br><span class="post-title">%title</span>', 'Parent post link', 'twentynineteen' ),
)
);
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) {
comments_template();
}
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) {
comments_template();
}
// End the loop.
endwhile;

View file

@ -132,20 +132,14 @@ function twentynineteen_custom_colors_css() {
}
/*
* Set left border color for:
* Set border color for:
* wp block quote
* :focus
*/
blockquote,
.entry .entry-content blockquote,
.entry .entry-content .wp-block-quote:not(.is-large),
.entry .entry-content .wp-block-quote:not(.is-style-large) {
border-left-color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness . ' ); /* base: #0073a8; */
}
/*
* Set border color for:
* :focus
*/
.entry .entry-content .wp-block-quote:not(.is-style-large),
input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
@ -231,7 +225,7 @@ function twentynineteen_custom_colors_css() {
.editor-block-list__layout .editor-block-list__block .wp-block-quote:not(.is-large):not(.is-style-large),
.editor-styles-wrapper .editor-block-list__layout .wp-block-freeform blockquote {
border-left: 2px solid hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness . ' ); /* base: #0073a8; */
border-color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness . ' ); /* base: #0073a8; */
}
.editor-block-list__layout .editor-block-list__block .wp-block-pullquote.is-style-solid-color:not(.has-background-color) {

View file

@ -52,8 +52,8 @@ function twentynineteen_customize_register( $wp_customize ) {
'type' => 'radio',
'label' => __( 'Primary Color', 'twentynineteen' ),
'choices' => array(
'default' => _x( 'Default', 'primary color', 'twentynineteen' ),
'custom' => _x( 'Custom', 'primary color', 'twentynineteen' ),
'default' => _x( 'Default', 'primary color', 'twentynineteen' ),
'custom' => _x( 'Custom', 'primary color', 'twentynineteen' ),
),
'section' => 'colors',
'priority' => 5,

View file

@ -361,14 +361,14 @@ function twentynineteen_hsl_hex( $h, $s, $l, $to_hex = true ) {
$mid1;
$mid2;
$m = $l + $l - $v;
$sv = ( $v - $m ) / $v;
$h *= 6.0;
$m = $l + $l - $v;
$sv = ( $v - $m ) / $v;
$h *= 6.0;
$sextant = floor( $h );
$fract = $h - $sextant;
$vsf = $v * $sv * $fract;
$mid1 = $m + $vsf;
$mid2 = $v - $vsf;
$fract = $h - $sextant;
$vsf = $v * $sv * $fract;
$mid1 = $m + $vsf;
$mid2 = $v - $vsf;
switch ( $sextant ) {
case 0:

View file

@ -238,3 +238,21 @@ if ( ! function_exists( 'twentynineteen_the_posts_navigation' ) ) :
);
}
endif;
if ( ! function_exists( 'wp_body_open' ) ) :
/**
* Fire the wp_body_open action.
*
* Added for backwards compatibility to support pre 5.2.0 WordPress versions.
*
* @since Twenty Nineteen 1.4
*/
function wp_body_open() {
/**
* Triggered after the opening <body> tag.
*
* @since Twenty Nineteen 1.4
*/
do_action( 'wp_body_open' );
}
endif;

View file

@ -1,4 +1,3 @@
@charset "UTF-8";
/*
Theme Name: Twenty Nineteen
@ -9,7 +8,7 @@ Andreas Hecht in https://www.jotform.com/blog/css-perfect-print-stylesheet-98272
>>> TABLE OF CONTENTS:
----------------------------------------------------------------
# Margins
# Typography÷
# Typography
# Page breaks
# Links
# Visibility

View file

@ -9,7 +9,7 @@ Andreas Hecht in https://www.jotform.com/blog/css-perfect-print-stylesheet-98272
>>> TABLE OF CONTENTS:
----------------------------------------------------------------
# Margins
# Typography÷
# Typography
# Page breaks
# Links
# Visibility
@ -17,182 +17,182 @@ Andreas Hecht in https://www.jotform.com/blog/css-perfect-print-stylesheet-98272
@media print {
/* Margins */
/* Margins */
@page {
margin: 2cm;
}
@page {
margin: 2cm;
}
.entry {
margin-top: 1em;
}
.entry {
margin-top: 1em;
}
.entry .entry-header, .site-footer .site-info {
margin: 0;
}
.entry .entry-header, .site-footer .site-info {
margin: 0;
}
/* Fonts */
/* Fonts */
body {
font: 13pt Georgia, "Times New Roman", Times, serif;
line-height: 1.3;
background: #fff !important;
color: #000;
}
body {
font: 13pt Georgia, "Times New Roman", Times, serif;
line-height: 1.3;
background: #fff !important;
color: #000;
}
h1 {
font-size: 24pt;
}
h1 {
font-size: 24pt;
}
h2,
h3,
h4,
.has-regular-font-size,
.has-large-font-size,
h2.author-title,
p.author-bio,
.comments-title, h3 {
font-size: 14pt;
margin-top: 25px;
}
h2,
h3,
h4,
.has-regular-font-size,
.has-large-font-size,
h2.author-title,
p.author-bio,
.comments-title, h3 {
font-size: 14pt;
margin-top: 25px;
}
/* Page breaks */
/* Page breaks */
a {
page-break-inside: avoid
}
a {
page-break-inside: avoid
}
blockquote {
page-break-inside: avoid;
}
blockquote {
page-break-inside: avoid;
}
h1,
h2,
h3,
h4,
h5,
h6 {
page-break-after: avoid;
page-break-inside: avoid
}
h1,
h2,
h3,
h4,
h5,
h6 {
page-break-after: avoid;
page-break-inside: avoid
}
img {
page-break-inside: avoid;
page-break-after: avoid;
}
img {
page-break-inside: avoid;
page-break-after: avoid;
}
table, pre {
page-break-inside: avoid;
}
table, pre {
page-break-inside: avoid;
}
ul, ol, dl {
page-break-before: avoid;
}
ul, ol, dl {
page-break-before: avoid;
}
/* Links */
/* Links */
a:link, a:visited, a {
background: transparent;
font-weight: bold;
text-decoration: underline;
text-align: left;
}
a:link, a:visited, a {
background: transparent;
font-weight: bold;
text-decoration: underline;
text-align: left;
}
a {
page-break-inside: avoid;
}
a {
page-break-inside: avoid;
}
a[href^=http]:after {
content: " < " attr(href) "> ";
}
a[href^=http]:after {
content: " < " attr(href) "> ";
}
a:after > img {
content: "";
}
a:after > img {
content: "";
}
article a[href^="#"]:after {
content: "";
}
article a[href^="#"]:after {
content: "";
}
a:not(:local-link):after {
content: " < " attr(href) "> ";
}
a:not(:local-link):after {
content: " < " attr(href) "> ";
}
/* Visibility */
.main-navigation,
.site-title + .main-navigation,
.social-navigation,
.site-branding-container:before,
.entry .entry-title:before,
.entry-footer,
.author-description:before,
.post-navigation,
.widget-area,
.comment-form-flex,
.comment-reply,
.comment .comment-metadata .edit-link {
display: none;
}
/* Visibility */
.main-navigation,
.site-title + .main-navigation,
.social-navigation,
.site-branding-container:before,
.entry .entry-title:before,
.entry-footer,
.author-description:before,
.post-navigation,
.widget-area,
.comment-form-flex,
.comment-reply,
.comment .comment-metadata .edit-link {
display: none;
}
.entry .entry-content .wp-block-button .wp-block-button__link,
.entry .entry-content .button {
color: #000;
background: none;
}
.entry .entry-content .wp-block-button .wp-block-button__link,
.entry .entry-content .button {
color: #000;
background: none;
}
/* Site Header (With Featured Image) */
.site-header.featured-image {
min-height: 0;
.main-navigation a,
.main-navigation a + svg,
.social-navigation a,
.site-title a,
.site-featured-image a,
.site-branding .site-title,
.site-branding .site-description,
.main-navigation a:after,
.main-navigation .main-menu > li.menu-item-has-children:after,
.main-navigation li,
.social-navigation li,
.entry-meta,
.entry-title,
&#masthead .site-title a {
color: #000;
text-shadow: none;
}
/* Site Header (With Featured Image) */
.site-header.featured-image {
min-height: 0;
.site-featured-image .entry-header,
.site-branding-container {
margin-top: 0;
margin-bottom: 0;
}
.main-navigation a,
.main-navigation a + svg,
.social-navigation a,
.site-title a,
.site-featured-image a,
.site-branding .site-title,
.site-branding .site-description,
.main-navigation a:after,
.main-navigation .main-menu > li.menu-item-has-children:after,
.main-navigation li,
.social-navigation li,
.entry-meta,
.entry-title,
&#masthead .site-title a {
color: #000;
text-shadow: none;
}
.site-featured-image .post-thumbnail img {
position: relative;
height: initial;
width: initial;
object-fit: none;
min-width: 0;
min-height: 0;
max-width: 100%;
margin-top: 1rem;
}
}
/* Remove image filters from featured image */
.image-filters-enabled {
.site-featured-image .entry-header,
.site-branding-container {
margin-top: 0;
margin-bottom: 0;
}
*:after {
display: none !important;
}
.site-featured-image .post-thumbnail img {
position: relative;
height: initial;
width: initial;
object-fit: none;
min-width: 0;
min-height: 0;
max-width: 100%;
margin-top: 1rem;
}
}
.site-header.featured-image .site-featured-image:before {
display: none;
}
/* Remove image filters from featured image */
.image-filters-enabled {
.site-header.featured-image .site-featured-image .post-thumbnail img {
filter: none;
}
}
*:after {
display: none !important;
}
.site-header.featured-image .site-featured-image:before {
display: none;
}
.site-header.featured-image .site-featured-image .post-thumbnail img {
filter: none;
}
}
}

View file

@ -1,9 +1,10 @@
=== Twenty Nineteen ===
Contributors: the WordPress team
Contributors: wordpressdotorg
Tags: one-column, flexible-header, accessibility-ready, custom-colors, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, rtl-language-support, sticky-post, threaded-comments, translation-ready
Requires at least: 4.9.6
Tested up to: WordPress 5.0
Stable tag: 1.2
Requires PHP: 5.2.4
Stable tag: 1.4
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
@ -14,6 +15,16 @@ Our 2019 default theme is designed to show off the power of the block editor. It
== Changelog ==
= 1.4 =
* Released: May 7, 2019
https://codex.wordpress.org/Twenty_Nineteen_Theme_Changelog#Version_1.4
= 1.3 =
* Released: February 21, 2019
https://codex.wordpress.org/Twenty_Nineteen_Theme_Changelog#Version_1.3
= 1.2 =
* Released: January 9, 2019

View file

@ -160,7 +160,7 @@
@include button-transition;
border: none;
font-size: $font__size-sm;
font-family: $font__heading;
@include font-family( $font__heading );
line-height: $font__line-height-heading;
box-sizing: border-box;
font-weight: bold;
@ -230,7 +230,7 @@
li {
color: $color__text-light;
font-family: $font__heading;
@include font-family( $font__heading );
font-size: calc(#{$font__size_base} * #{$font__size-ratio});
font-weight: bold;
line-height: $font__line-height-heading;
@ -299,7 +299,7 @@
//! Verse
.wp-block-verse {
font-family: $font__body;
@include font-family( $font__body );
font-size: $font__size_base;
line-height: 1.8;
}
@ -307,7 +307,7 @@
//! Paragraphs
.has-drop-cap {
&:not(:focus):first-letter {
font-family: $font__heading;
@include font-family( $font__heading );
font-size: $font__size-xxxl;
line-height: 1;
font-weight: bold;
@ -348,7 +348,7 @@
cite {
display: inline-block;
font-family: $font__heading;
@include font-family( $font__heading );
line-height: 1.6;
text-transform: none;
color: $color__text-light;
@ -452,7 +452,8 @@
&:not(.is-large),
&:not(.is-style-large) {
border-left: 2px solid $color__link;
border-width: 2px;
border-color: $color__link;
padding-top: 0;
padding-bottom: 0;
}
@ -512,7 +513,7 @@
}
.aligncenter {
@include postContentMaxWidth();
@include media(tablet) {
@ -559,7 +560,7 @@
.wp-block-cover-image-text,
.wp-block-cover-text,
h2 {
font-family: $font__heading;
@include font-family( $font__heading );
font-size: $font__size-lg;
font-weight: bold;
line-height: 1.25;
@ -624,7 +625,7 @@
.wp-block-gallery .blocks-gallery-image figcaption,
.wp-block-gallery .blocks-gallery-item figcaption {
font-size: $font__size-xs;
font-family: $font__heading;
@include font-family( $font__heading );
line-height: $font__line-height-pre;
margin: 0;
padding: ( $size__spacing-unit * .5 );
@ -690,7 +691,7 @@
//! File
.wp-block-file {
font-family: $font__heading;
@include font-family( $font__heading );
.wp-block-file__button {
display: table;
@ -699,7 +700,7 @@
border-radius: 5px;
background: $color__background-button;
font-size: $font__size-base;
font-family: $font__heading;
@include font-family( $font__heading );
line-height: $font__line-height-heading;
text-decoration: none;
font-weight: bold;
@ -733,46 +734,29 @@
code {
font-size: $font__size-md;
white-space: pre-wrap;
word-break: break-word;
word-break: break-word;
}
}
//! Columns
.wp-block-columns {
&.alignfull {
padding-left: $size__spacing-unit;
padding-right: $size__spacing-unit;
}
.wp-block-column > * {
@include media(mobile) {
flex-wrap: nowrap;
&:first-child {
margin-top: 0;
}
&:last-child {
margin-bottom: 0;
}
}
@include media(tablet) {
.wp-block-column > * {
flex-wrap: nowrap;
&:first-child {
margin-top: 0;
}
&:last-child {
margin-bottom: 0;
}
}
&[class*='has-'] > * {
margin-right: $size__spacing-unit;
&:last-child {
margin-right: 0;
}
}
&.alignfull,
&.alignfull .wp-block-column {
padding-left: calc(2 * #{$size__spacing-unit});
padding-right: calc(2 * #{$size__spacing-unit});
.wp-block-column:not(:first-child) {
margin-left: 32px;
}
}
}
@ -781,7 +765,7 @@
.wp-block-latest-comments {
.wp-block-latest-comments__comment-meta {
font-family: $font__heading;
@include font-family( $font__heading );
font-weight: bold;
.wp-block-latest-comments__comment-date {
@ -837,14 +821,14 @@
// Use white text against these backgrounds by default.
color: $color__background-body;
p,
h1,
h2,
h3,
h4,
h5,
h6,
a {
> p,
> h1,
> h2,
> h3,
> h4,
> h5,
> h6,
> a {
color: $color__background-body;
}
}
@ -853,14 +837,14 @@
color: $color__text-main;
// Use dark gray text against this background by default.
p,
h1,
h2,
h3,
h4,
h5,
h6,
a {
> p,
> h1,
> h2,
> h3,
> h4,
> h5,
> h6,
> a {
color: $color__text-main;
}
}
@ -893,25 +877,25 @@
//! Custom foreground colors
.has-primary-color,
.wp-block-pullquote.is-style-solid-color blockquote.has-primary-color,
.wp-block-pullquote.is-style-solid-color blockquote.has-primary-color p {
.wp-block-pullquote.is-style-solid-color blockquote.has-primary-color > p {
color: $color__link;
}
.has-secondary-color,
.wp-block-pullquote.is-style-solid-color blockquote.has-secondary-color,
.wp-block-pullquote.is-style-solid-color blockquote.has-secondary-color p {
.wp-block-pullquote.is-style-solid-color blockquote.has-secondary-color > p {
color: $color__border-link-hover;
}
.has-dark-gray-color,
.wp-block-pullquote.is-style-solid-color blockquote.has-dark-gray-color,
.wp-block-pullquote.is-style-solid-color blockquote.has-dark-gray-color p {
.wp-block-pullquote.is-style-solid-color blockquote.has-dark-gray-color > p {
color: $color__text-main;
}
.has-light-gray-color,
.wp-block-pullquote.is-style-solid-color blockquote.has-light-gray-color,
.wp-block-pullquote.is-style-solid-color blockquote.has-light-gray-color p {
.wp-block-pullquote.is-style-solid-color blockquote.has-light-gray-color > p {
color: $color__text-light;
}

View file

@ -2,7 +2,7 @@ table {
margin: 0 0 $size__spacing-unit;
border-collapse: collapse;
width: 100%;
font-family: $font__heading;
@include font-family( $font__heading );
td,
th {

View file

@ -10,7 +10,7 @@ input[type="submit"] {
border-radius: 5px;
box-sizing: border-box;
color: $color__background-body;
font-family: $font__heading;
@include font-family( $font__heading );
font-size: $font__size-sm;
font-weight: 700;
line-height: $font__line-height-heading;

View file

@ -24,7 +24,7 @@
.wp-caption-text {
color: $color__text-light;
font-size: $font__size-xs;
font-family: $font__heading;
@include font-family( $font__heading );
line-height: $font__line-height-pre;
margin: 0;
padding: ( $size__spacing-unit * .5 );

View file

@ -32,7 +32,7 @@
.gallery-caption {
display: block;
font-size: $font__size-xs;
font-family: $font__heading;
@include font-family( $font__heading );
line-height: $font__line-height-pre;
margin: 0;
padding: ( $size__spacing-unit * .5 );

View file

@ -82,97 +82,9 @@
@mixin box-shadow( $size ) {
box-shadow:
0 0 0 $size $color__text-light inset, // Original border.
0 0 0 ($size + 1px) $color__text-light inset, // Antialiasing, inner edge.
0 0 1px 0 rgba( $color__text-light, 0.7 ); // Antialiasing, outer edge.
}
/* Fallback for non-latin fonts */
@mixin non-latin-fonts( $wrapper_classname: '.site' ) {
/* Arabic */
html[lang="ar"] #{$wrapper_classname} *,
html[lang="ary"] #{$wrapper_classname} *,
html[lang="azb"] #{$wrapper_classname} *,
html[lang="ckb"] #{$wrapper_classname} *,
html[lang="fa-IR"] #{$wrapper_classname} *,
html[lang="haz"] #{$wrapper_classname} *,
html[lang="ps"] #{$wrapper_classname} * {
font-family: Tahoma, Arial, sans-serif !important;
}
/* Cyrillic */
html[lang="be"] #{$wrapper_classname} *,
html[lang="bg-BG"] #{$wrapper_classname} *,
html[lang="kk"] #{$wrapper_classname} *,
html[lang="mk-MK"] #{$wrapper_classname} *,
html[lang="mn"] #{$wrapper_classname} *,
html[lang="ru-RU"] #{$wrapper_classname} *,
html[lang="sah"] #{$wrapper_classname} *,
html[lang="sr-RS"] #{$wrapper_classname} *,
html[lang="tt-RU"] #{$wrapper_classname} *,
html[lang="uk"] #{$wrapper_classname} * {
font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, sans-serif !important;
}
/* Chinese (Hong Kong) */
html[lang="zh-HK"] #{$wrapper_classname} * {
font-family: -apple-system, BlinkMacSystemFont, 'PingFang HK', 'Helvetica Neue', "Microsoft YaHei New", STHeiti Light, sans-serif !important;
}
/* Chinese (Taiwan) */
html[lang="zh-TW"] #{$wrapper_classname} * {
font-family: -apple-system, BlinkMacSystemFont, 'PingFang TC', 'Helvetica Neue', "Microsoft YaHei New", STHeiti Light, sans-serif !important;
}
/* Chinese (China) */
html[lang="zh-CN"] #{$wrapper_classname} * {
font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', "Microsoft YaHei New", STHeiti Light, sans-serif !important;
}
/* Devanagari */
html[lang="bn-BD"] #{$wrapper_classname} *,
html[lang="hi-IN"] #{$wrapper_classname} *,
html[lang="mr"] #{$wrapper_classname} *,
html[lang="ne-NP"] #{$wrapper_classname} * {
font-family: Arial, sans-serif !important;
}
/* Greek */
html[lang="el"] #{$wrapper_classname} * {
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
}
/* Gujarati */
html[lang="gu"] #{$wrapper_classname} * {
font-family: Arial, sans-serif !important;
}
/* Hebrew */
html[lang="he-IL"] #{$wrapper_classname} * {
font-family: 'Arial Hebrew', Arial, sans-serif !important;
}
/* Japanese */
html[lang="ja"] #{$wrapper_classname} * {
font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", Meiryo, "Helvetica Neue", sans-serif !important;
}
/* Korean */
html[lang="ko-KR"] #{$wrapper_classname} * {
font-family: 'Apple SD Gothic Neo', 'Malgun Gothic', 'Nanum Gothic', Dotum, sans-serif !important;
}
/* Thai */
html[lang="th"] #{$wrapper_classname} * {
font-family: 'Sukhumvit Set', 'Helvetica Neue', helvetica, arial, sans-serif !important;
}
/* Vietnamese */
html[lang="vi"] #{$wrapper_classname} * {
font-family: 'Libre Franklin', sans-serif !important;
}
0 0 0 $size $color__text-light inset, // Original border.
0 0 0 ($size + 1px) $color__text-light inset, // Antialiasing, inner edge.
0 0 1px 0 rgba( $color__text-light, 0.7 ); // Antialiasing, outer edge.
}
/* Calculates maximum width for post content */
@ -202,4 +114,19 @@
}
}
/* Ensure all font family declarations come with non-latin fallbacks */
@mixin font-family( $font_family: $font__body ) {
font-family: $font_family;
@extend %non-latin-fonts;
}
/* Build our non-latin font styles */
%non-latin-fonts {
@each $lang, $font__fallback in $font__fallbacks {
&:lang(#{$lang}) {
font-family: unquote( $font__fallback );
}
}
}
@import "utilities";

View file

@ -26,8 +26,9 @@
background: transparent;
color: inherit;
cursor: pointer;
transition: background 250ms ease-in-out,
transform 150ms ease;
transition:
background 250ms ease-in-out,
transform 150ms ease;
-webkit-appearance: none;
-moz-appearance: none;
@ -447,7 +448,7 @@
position: fixed;
z-index: 100000; /* Make sure appears above mobile admin bar */
width: 100vw;
height: 100vh;
height: 100vh;
max-width: 100vw;
transform: translateX(+100%);
animation: slide_in_right 0.3s forwards;

View file

@ -176,7 +176,7 @@
.nav-next {
min-width: 50%;
width: 100%;
font-family: $font__heading;
@include font-family( $font__heading );
font-weight: bold;
.secondary-text {

View file

@ -15,7 +15,12 @@
display: flex;
flex-wrap: wrap;
.widget {
-webkit-hyphens: auto;
-moz-hyphens: auto;
-ms-hyphens: auto;
hyphens: auto;
width: 100%;
word-wrap: break-word;
@include media(desktop) {
margin-right: calc(3 * #{$size__spacing-unit});
width: calc(50% - (3 * #{$size__spacing-unit}));
@ -25,6 +30,11 @@
.site-info {
color: $color__text-light;
-webkit-hyphens: auto;
-moz-hyphens: auto;
-ms-hyphens: auto;
hyphens: auto;
word-wrap: break-word;
a {
color: inherit;

View file

@ -242,7 +242,7 @@
mix-blend-mode: multiply;
opacity: .7;
/* When image filters are active, a blue overlay is added. */
/* When image filters are active, a blue overlay is added. */
.image-filters-enabled & {
background: $color__link;
opacity: .8;
@ -256,7 +256,7 @@
}
/* Fourth layer: overlay. */
.image-filters-enabled & .site-branding-container:after {
.image-filters-enabled & .site-branding-container:after {
background: rgba(0, 0, 0, 0.35);
mix-blend-mode: overlay;
opacity: 0.5;

View file

@ -30,7 +30,12 @@
.site-branding {
color: $color__text-light;
-webkit-hyphens: auto;
-moz-hyphens: auto;
-ms-hyphens: auto;
hyphens: auto;
position: relative;
word-wrap: break-word;
@include media(tablet) {
margin: 0 $size__site-margins;

View file

@ -50,6 +50,7 @@
.error-404.not-found,
.no-results.not-found {
.page-title,
.page-content {
margin: calc(3 * #{$size__spacing-unit}) #{$size__spacing-unit};

View file

@ -7,7 +7,12 @@
}
.comments-area {
-webkit-hyphens: auto;
-moz-hyphens: auto;
-ms-hyphens: auto;
hyphens: auto;
margin: calc(2 * #{$size__spacing-unit}) $size__spacing-unit;
word-wrap: break-word;
@include postContentMaxWidth();
@include media(tablet) {
@ -127,7 +132,7 @@
.comment-body {
color: $color__text-light;
font-family: $font__heading;
@include font-family( $font__heading );
font-size: $font__size-xs;
font-weight: 500;
margin-top: $size__spacing-unit;
@ -143,7 +148,7 @@
.comment-edit-link {
color: $color__text-light;
font-family: $font__heading;
@include font-family( $font__heading );
font-weight: 500;
}
}
@ -372,7 +377,7 @@
.comment-notes,
label {
font-family: $font__heading;
@include font-family( $font__heading );
font-size: $font__size-xs;
color: $color__text-light;
}

View file

@ -30,7 +30,7 @@
li {
color: $color__text-light;
font-family: $font__heading;
@include font-family( $font__heading );
font-size: calc(#{$font__size_base} * #{$font__size-ratio});
font-weight: 700;
line-height: $font__line-height-heading;
@ -45,7 +45,7 @@
.widget_tag_cloud {
.tagcloud {
font-family: $font__heading;
@include font-family( $font__heading );
font-weight: 700;
}
}

View file

@ -15,7 +15,7 @@ blockquote {
cite {
font-size: $font__size-xs;
font-style: normal;
font-family: $font__heading;
@include font-family( $font__heading );
}
}

View file

@ -18,14 +18,13 @@
.site-title,
.site-info,
#cancel-comment-reply-link,
img:after,
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: $font__heading;
@include font-family( $font__heading );
}
.main-navigation,
@ -53,7 +52,7 @@ h6 {
}
.page-title {
font-family: $font__body;
@include font-family( $font__body );
}
.site-branding,
@ -146,13 +145,20 @@ h6 {
.error-404 .page-title,
.comments-title,
blockquote {
-webkit-hyphens: auto;
-moz-hyphens: auto;
-ms-hyphens: auto;
hyphens: auto;
word-break: break-word;
word-wrap: break-word;
}
/* Do not hyphenate entry title on tablet view and bigger. */
.entry-title {
@include media(tablet) {
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
}

View file

@ -7,7 +7,7 @@ body {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
color: $color__text-main;
font-family: $font__body;
@include font-family( $font__body );
font-weight: 400;
font-size: 1em;
line-height: $font__line-height-body;
@ -21,7 +21,7 @@ select,
optgroup,
textarea {
color: $color__text-main;
font-family: $font__body;
@include font-family( $font__body );
font-weight: 400;
line-height: $font__line-height-body;
text-rendering: optimizeLegibility;
@ -30,5 +30,3 @@ textarea {
@import "headings";
@import "copy";
@include non-latin-fonts();

View file

@ -16,6 +16,52 @@
$font__body: "NonBreakingSpaceOverride", "Hoefler Text", "Baskerville Old Face", Garamond, "Times New Roman", serif;
$font__heading: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
$font__fallbacks: (
/* Arabic */
ar: 'Tahoma, Arial, sans-serif',
ary: 'Tahoma, Arial, sans-serif',
azb: 'Tahoma, Arial, sans-serif',
ckb: 'Tahoma, Arial, sans-serif',
fa-IR: 'Tahoma, Arial, sans-serif',
haz: 'Tahoma, Arial, sans-serif',
ps: 'Tahoma, Arial, sans-serif',
/* Cyrillic */
be: '"Helvetica Neue", Helvetica, "Segoe UI", Arial, sans-serif',
bg-BG: '"Helvetica Neue", Helvetica, "Segoe UI", Arial, sans-serif',
kk: '"Helvetica Neue", Helvetica, "Segoe UI", Arial, sans-serif',
mk-MK: '"Helvetica Neue", Helvetica, "Segoe UI", Arial, sans-serif',
mn: '"Helvetica Neue", Helvetica, "Segoe UI", Arial, sans-serif',
ru-RU: '"Helvetica Neue", Helvetica, "Segoe UI", Arial, sans-serif',
sah: '"Helvetica Neue", Helvetica, "Segoe UI", Arial, sans-serif',
sr-RS: '"Helvetica Neue", Helvetica, "Segoe UI", Arial, sans-serif',
tt-RU: '"Helvetica Neue", Helvetica, "Segoe UI", Arial, sans-serif',
uk: '"Helvetica Neue", Helvetica, "Segoe UI", Arial, sans-serif',
/* Chinese (Hong Kong) */
zh-HK: '-apple-system, BlinkMacSystemFont, "PingFang HK", "Helvetica Neue", "Microsoft YaHei New", STHeiti Light, sans-serif',
/* Chinese (Taiwan) */
zh-TW: '-apple-system, BlinkMacSystemFont, "PingFang TC", "Helvetica Neue", "Microsoft YaHei New", STHeiti Light, sans-serif',
/* Chinese (China) */
zh-CN: '-apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei New", STHeiti Light, sans-serif',
/* Devanagari */
bn-BD: 'Arial, sans-serif',
hi-IN: 'Arial, sans-serif',
mr: 'Arial, sans-serif',
ne-NP: 'Arial, sans-serif',
/* Greek */
el: '"Helvetica Neue", Helvetica, Arial, sans-serif',
/* Gujarati */
gu: 'Arial, sans-serif',
/* Hebrew */
he-IL: '"Arial Hebrew", Arial, sans-serif',
/* Japanese */
ja: '-apple-system, BlinkMacSystemFont, "Hiragino Sans", Meiryo, "Helvetica Neue", sans-serif',
/* Korean */
ko-KR: '"Apple SD Gothic Neo", "Malgun Gothic", "Nanum Gothic", Dotum, sans-serif',
/* Thai */
th: '"Sukhumvit Set", "Helvetica Neue", helvetica, arial, sans-serif',
/* Vietnamese */
vi: '"Libre Franklin", sans-serif',
);
$font__code: Menlo, monaco, Consolas, Lucida Console, monospace;
$font__pre: "Courier 10 Pitch", Courier, monospace;

View file

@ -1,95 +1,5 @@
/*!
Twenty Nineteen Customizer Styles & Non-latin Font Fallbacks
Twenty Nineteen Customizer Styles
NOTE: This file is automatically populated with additional styles if the user selects a custom primary color in the customzier.
NOTE: This file is automatically populated with styles if the user selects a custom primary color in the customzier.
*/
/** === Includes === */
/* If we add the border using a regular CSS border, it won't look good on non-retina devices,
* since its edges can look jagged due to lack of antialiasing. In this case, we are several
* layers of box-shadow to add the border visually, which will render the border smoother. */
/* Fallback for non-latin fonts */
/* Calculates maximum width for post content */
/* Nested sub-menu padding: 10 levels deep */
/** === Non-Latin font fallbacks === */
/* Arabic */
html[lang="ar"] .wp-block *,
html[lang="ary"] .wp-block *,
html[lang="azb"] .wp-block *,
html[lang="ckb"] .wp-block *,
html[lang="fa-IR"] .wp-block *,
html[lang="haz"] .wp-block *,
html[lang="ps"] .wp-block * {
font-family: Tahoma, Arial, sans-serif !important;
}
/* Cyrillic */
html[lang="be"] .wp-block *,
html[lang="bg-BG"] .wp-block *,
html[lang="kk"] .wp-block *,
html[lang="mk-MK"] .wp-block *,
html[lang="mn"] .wp-block *,
html[lang="ru-RU"] .wp-block *,
html[lang="sah"] .wp-block *,
html[lang="sr-RS"] .wp-block *,
html[lang="tt-RU"] .wp-block *,
html[lang="uk"] .wp-block * {
font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, sans-serif !important;
}
/* Chinese (Hong Kong) */
html[lang="zh-HK"] .wp-block * {
font-family: -apple-system, BlinkMacSystemFont, 'PingFang HK', 'Helvetica Neue', "Microsoft YaHei New", STHeiti Light, sans-serif !important;
}
/* Chinese (Taiwan) */
html[lang="zh-TW"] .wp-block * {
font-family: -apple-system, BlinkMacSystemFont, 'PingFang TC', 'Helvetica Neue', "Microsoft YaHei New", STHeiti Light, sans-serif !important;
}
/* Chinese (China) */
html[lang="zh-CN"] .wp-block * {
font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', "Microsoft YaHei New", STHeiti Light, sans-serif !important;
}
/* Devanagari */
html[lang="bn-BD"] .wp-block *,
html[lang="hi-IN"] .wp-block *,
html[lang="mr"] .wp-block *,
html[lang="ne-NP"] .wp-block * {
font-family: Arial, sans-serif !important;
}
/* Greek */
html[lang="el"] .wp-block * {
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
}
/* Gujarati */
html[lang="gu"] .wp-block * {
font-family: Arial, sans-serif !important;
}
/* Hebrew */
html[lang="he-IL"] .wp-block * {
font-family: 'Arial Hebrew', Arial, sans-serif !important;
}
/* Japanese */
html[lang="ja"] .wp-block * {
font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", Meiryo, "Helvetica Neue", sans-serif !important;
}
/* Korean */
html[lang="ko-KR"] .wp-block * {
font-family: 'Apple SD Gothic Neo', 'Malgun Gothic', 'Nanum Gothic', Dotum, sans-serif !important;
}
/* Thai */
html[lang="th"] .wp-block * {
font-family: 'Sukhumvit Set', 'Helvetica Neue', helvetica, arial, sans-serif !important;
}
/* Vietnamese */
html[lang="vi"] .wp-block * {
font-family: 'Libre Franklin', sans-serif !important;
}

View file

@ -1,13 +1,5 @@
/*!
Twenty Nineteen Customizer Styles & Non-latin Font Fallbacks
Twenty Nineteen Customizer Styles
NOTE: This file is automatically populated with additional styles if the user selects a custom primary color in the customzier.
*/
/** === Includes === */
@import "sass/mixins/mixins-master";
/** === Non-Latin font fallbacks === */
@include non-latin-fonts( '.wp-block' );
NOTE: This file is automatically populated with styles if the user selects a custom primary color in the customzier.
*/

View file

@ -18,9 +18,537 @@ Twenty Nineteen Editor Styles
/* If we add the border using a regular CSS border, it won't look good on non-retina devices,
* since its edges can look jagged due to lack of antialiasing. In this case, we are several
* layers of box-shadow to add the border visually, which will render the border smoother. */
/* Fallback for non-latin fonts */
/* Calculates maximum width for post content */
/* Nested sub-menu padding: 10 levels deep */
/* Ensure all font family declarations come with non-latin fallbacks */
/* Build our non-latin font styles */
body:lang(ar), h1:lang(ar),
h2:lang(ar),
h3:lang(ar),
h4:lang(ar),
h5:lang(ar),
h6:lang(ar), figcaption:lang(ar),
.gallery-caption:lang(ar), .editor-post-title__block .editor-post-title__input:lang(ar), .editor-default-block-appender .editor-default-block-appender__content:lang(ar), .wp-block-paragraph.has-drop-cap:lang(ar):not(:focus)::first-letter, .wp-block-table:lang(ar), .wp-block-cover h2:lang(ar),
.wp-block-cover .wp-block-cover-text:lang(ar), .wp-block-button .wp-block-button__link:lang(ar), .wp-block-quote cite:lang(ar),
.wp-block-quote footer:lang(ar),
.wp-block-quote .wp-block-quote__citation:lang(ar), .wp-block[data-type="core/pullquote"] .wp-block-pullquote__citation:lang(ar),
.wp-block[data-type="core/pullquote"][data-align="left"] .wp-block-pullquote__citation:lang(ar),
.wp-block[data-type="core/pullquote"][data-align="right"] .wp-block-pullquote__citation:lang(ar), .wp-block-file:lang(ar), ul.wp-block-archives li:lang(ar),
.wp-block-categories li:lang(ar),
.wp-block-latest-posts li:lang(ar), .wp-block-latest-comments .wp-block-latest-comments__comment-meta:lang(ar), .wp-caption dd:lang(ar), .wp-block-freeform blockquote cite:lang(ar) {
font-family: Tahoma, Arial, sans-serif;
}
body:lang(ary), h1:lang(ary),
h2:lang(ary),
h3:lang(ary),
h4:lang(ary),
h5:lang(ary),
h6:lang(ary), figcaption:lang(ary),
.gallery-caption:lang(ary), .editor-post-title__block .editor-post-title__input:lang(ary), .editor-default-block-appender .editor-default-block-appender__content:lang(ary), .wp-block-paragraph.has-drop-cap:lang(ary):not(:focus)::first-letter, .wp-block-table:lang(ary), .wp-block-cover h2:lang(ary),
.wp-block-cover .wp-block-cover-text:lang(ary), .wp-block-button .wp-block-button__link:lang(ary), .wp-block-quote cite:lang(ary),
.wp-block-quote footer:lang(ary),
.wp-block-quote .wp-block-quote__citation:lang(ary), .wp-block[data-type="core/pullquote"] .wp-block-pullquote__citation:lang(ary),
.wp-block[data-type="core/pullquote"][data-align="left"] .wp-block-pullquote__citation:lang(ary),
.wp-block[data-type="core/pullquote"][data-align="right"] .wp-block-pullquote__citation:lang(ary), .wp-block-file:lang(ary), ul.wp-block-archives li:lang(ary),
.wp-block-categories li:lang(ary),
.wp-block-latest-posts li:lang(ary), .wp-block-latest-comments .wp-block-latest-comments__comment-meta:lang(ary), .wp-caption dd:lang(ary), .wp-block-freeform blockquote cite:lang(ary) {
font-family: Tahoma, Arial, sans-serif;
}
body:lang(azb), h1:lang(azb),
h2:lang(azb),
h3:lang(azb),
h4:lang(azb),
h5:lang(azb),
h6:lang(azb), figcaption:lang(azb),
.gallery-caption:lang(azb), .editor-post-title__block .editor-post-title__input:lang(azb), .editor-default-block-appender .editor-default-block-appender__content:lang(azb), .wp-block-paragraph.has-drop-cap:lang(azb):not(:focus)::first-letter, .wp-block-table:lang(azb), .wp-block-cover h2:lang(azb),
.wp-block-cover .wp-block-cover-text:lang(azb), .wp-block-button .wp-block-button__link:lang(azb), .wp-block-quote cite:lang(azb),
.wp-block-quote footer:lang(azb),
.wp-block-quote .wp-block-quote__citation:lang(azb), .wp-block[data-type="core/pullquote"] .wp-block-pullquote__citation:lang(azb),
.wp-block[data-type="core/pullquote"][data-align="left"] .wp-block-pullquote__citation:lang(azb),
.wp-block[data-type="core/pullquote"][data-align="right"] .wp-block-pullquote__citation:lang(azb), .wp-block-file:lang(azb), ul.wp-block-archives li:lang(azb),
.wp-block-categories li:lang(azb),
.wp-block-latest-posts li:lang(azb), .wp-block-latest-comments .wp-block-latest-comments__comment-meta:lang(azb), .wp-caption dd:lang(azb), .wp-block-freeform blockquote cite:lang(azb) {
font-family: Tahoma, Arial, sans-serif;
}
body:lang(ckb), h1:lang(ckb),
h2:lang(ckb),
h3:lang(ckb),
h4:lang(ckb),
h5:lang(ckb),
h6:lang(ckb), figcaption:lang(ckb),
.gallery-caption:lang(ckb), .editor-post-title__block .editor-post-title__input:lang(ckb), .editor-default-block-appender .editor-default-block-appender__content:lang(ckb), .wp-block-paragraph.has-drop-cap:lang(ckb):not(:focus)::first-letter, .wp-block-table:lang(ckb), .wp-block-cover h2:lang(ckb),
.wp-block-cover .wp-block-cover-text:lang(ckb), .wp-block-button .wp-block-button__link:lang(ckb), .wp-block-quote cite:lang(ckb),
.wp-block-quote footer:lang(ckb),
.wp-block-quote .wp-block-quote__citation:lang(ckb), .wp-block[data-type="core/pullquote"] .wp-block-pullquote__citation:lang(ckb),
.wp-block[data-type="core/pullquote"][data-align="left"] .wp-block-pullquote__citation:lang(ckb),
.wp-block[data-type="core/pullquote"][data-align="right"] .wp-block-pullquote__citation:lang(ckb), .wp-block-file:lang(ckb), ul.wp-block-archives li:lang(ckb),
.wp-block-categories li:lang(ckb),
.wp-block-latest-posts li:lang(ckb), .wp-block-latest-comments .wp-block-latest-comments__comment-meta:lang(ckb), .wp-caption dd:lang(ckb), .wp-block-freeform blockquote cite:lang(ckb) {
font-family: Tahoma, Arial, sans-serif;
}
body:lang(fa-IR), h1:lang(fa-IR),
h2:lang(fa-IR),
h3:lang(fa-IR),
h4:lang(fa-IR),
h5:lang(fa-IR),
h6:lang(fa-IR), figcaption:lang(fa-IR),
.gallery-caption:lang(fa-IR), .editor-post-title__block .editor-post-title__input:lang(fa-IR), .editor-default-block-appender .editor-default-block-appender__content:lang(fa-IR), .wp-block-paragraph.has-drop-cap:lang(fa-IR):not(:focus)::first-letter, .wp-block-table:lang(fa-IR), .wp-block-cover h2:lang(fa-IR),
.wp-block-cover .wp-block-cover-text:lang(fa-IR), .wp-block-button .wp-block-button__link:lang(fa-IR), .wp-block-quote cite:lang(fa-IR),
.wp-block-quote footer:lang(fa-IR),
.wp-block-quote .wp-block-quote__citation:lang(fa-IR), .wp-block[data-type="core/pullquote"] .wp-block-pullquote__citation:lang(fa-IR),
.wp-block[data-type="core/pullquote"][data-align="left"] .wp-block-pullquote__citation:lang(fa-IR),
.wp-block[data-type="core/pullquote"][data-align="right"] .wp-block-pullquote__citation:lang(fa-IR), .wp-block-file:lang(fa-IR), ul.wp-block-archives li:lang(fa-IR),
.wp-block-categories li:lang(fa-IR),
.wp-block-latest-posts li:lang(fa-IR), .wp-block-latest-comments .wp-block-latest-comments__comment-meta:lang(fa-IR), .wp-caption dd:lang(fa-IR), .wp-block-freeform blockquote cite:lang(fa-IR) {
font-family: Tahoma, Arial, sans-serif;
}
body:lang(haz), h1:lang(haz),
h2:lang(haz),
h3:lang(haz),
h4:lang(haz),
h5:lang(haz),
h6:lang(haz), figcaption:lang(haz),
.gallery-caption:lang(haz), .editor-post-title__block .editor-post-title__input:lang(haz), .editor-default-block-appender .editor-default-block-appender__content:lang(haz), .wp-block-paragraph.has-drop-cap:lang(haz):not(:focus)::first-letter, .wp-block-table:lang(haz), .wp-block-cover h2:lang(haz),
.wp-block-cover .wp-block-cover-text:lang(haz), .wp-block-button .wp-block-button__link:lang(haz), .wp-block-quote cite:lang(haz),
.wp-block-quote footer:lang(haz),
.wp-block-quote .wp-block-quote__citation:lang(haz), .wp-block[data-type="core/pullquote"] .wp-block-pullquote__citation:lang(haz),
.wp-block[data-type="core/pullquote"][data-align="left"] .wp-block-pullquote__citation:lang(haz),
.wp-block[data-type="core/pullquote"][data-align="right"] .wp-block-pullquote__citation:lang(haz), .wp-block-file:lang(haz), ul.wp-block-archives li:lang(haz),
.wp-block-categories li:lang(haz),
.wp-block-latest-posts li:lang(haz), .wp-block-latest-comments .wp-block-latest-comments__comment-meta:lang(haz), .wp-caption dd:lang(haz), .wp-block-freeform blockquote cite:lang(haz) {
font-family: Tahoma, Arial, sans-serif;
}
body:lang(ps), h1:lang(ps),
h2:lang(ps),
h3:lang(ps),
h4:lang(ps),
h5:lang(ps),
h6:lang(ps), figcaption:lang(ps),
.gallery-caption:lang(ps), .editor-post-title__block .editor-post-title__input:lang(ps), .editor-default-block-appender .editor-default-block-appender__content:lang(ps), .wp-block-paragraph.has-drop-cap:lang(ps):not(:focus)::first-letter, .wp-block-table:lang(ps), .wp-block-cover h2:lang(ps),
.wp-block-cover .wp-block-cover-text:lang(ps), .wp-block-button .wp-block-button__link:lang(ps), .wp-block-quote cite:lang(ps),
.wp-block-quote footer:lang(ps),
.wp-block-quote .wp-block-quote__citation:lang(ps), .wp-block[data-type="core/pullquote"] .wp-block-pullquote__citation:lang(ps),
.wp-block[data-type="core/pullquote"][data-align="left"] .wp-block-pullquote__citation:lang(ps),
.wp-block[data-type="core/pullquote"][data-align="right"] .wp-block-pullquote__citation:lang(ps), .wp-block-file:lang(ps), ul.wp-block-archives li:lang(ps),
.wp-block-categories li:lang(ps),
.wp-block-latest-posts li:lang(ps), .wp-block-latest-comments .wp-block-latest-comments__comment-meta:lang(ps), .wp-caption dd:lang(ps), .wp-block-freeform blockquote cite:lang(ps) {
font-family: Tahoma, Arial, sans-serif;
}
body:lang(be), h1:lang(be),
h2:lang(be),
h3:lang(be),
h4:lang(be),
h5:lang(be),
h6:lang(be), figcaption:lang(be),
.gallery-caption:lang(be), .editor-post-title__block .editor-post-title__input:lang(be), .editor-default-block-appender .editor-default-block-appender__content:lang(be), .wp-block-paragraph.has-drop-cap:lang(be):not(:focus)::first-letter, .wp-block-table:lang(be), .wp-block-cover h2:lang(be),
.wp-block-cover .wp-block-cover-text:lang(be), .wp-block-button .wp-block-button__link:lang(be), .wp-block-quote cite:lang(be),
.wp-block-quote footer:lang(be),
.wp-block-quote .wp-block-quote__citation:lang(be), .wp-block[data-type="core/pullquote"] .wp-block-pullquote__citation:lang(be),
.wp-block[data-type="core/pullquote"][data-align="left"] .wp-block-pullquote__citation:lang(be),
.wp-block[data-type="core/pullquote"][data-align="right"] .wp-block-pullquote__citation:lang(be), .wp-block-file:lang(be), ul.wp-block-archives li:lang(be),
.wp-block-categories li:lang(be),
.wp-block-latest-posts li:lang(be), .wp-block-latest-comments .wp-block-latest-comments__comment-meta:lang(be), .wp-caption dd:lang(be), .wp-block-freeform blockquote cite:lang(be) {
font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, sans-serif;
}
body:lang(bg-BG), h1:lang(bg-BG),
h2:lang(bg-BG),
h3:lang(bg-BG),
h4:lang(bg-BG),
h5:lang(bg-BG),
h6:lang(bg-BG), figcaption:lang(bg-BG),
.gallery-caption:lang(bg-BG), .editor-post-title__block .editor-post-title__input:lang(bg-BG), .editor-default-block-appender .editor-default-block-appender__content:lang(bg-BG), .wp-block-paragraph.has-drop-cap:lang(bg-BG):not(:focus)::first-letter, .wp-block-table:lang(bg-BG), .wp-block-cover h2:lang(bg-BG),
.wp-block-cover .wp-block-cover-text:lang(bg-BG), .wp-block-button .wp-block-button__link:lang(bg-BG), .wp-block-quote cite:lang(bg-BG),
.wp-block-quote footer:lang(bg-BG),
.wp-block-quote .wp-block-quote__citation:lang(bg-BG), .wp-block[data-type="core/pullquote"] .wp-block-pullquote__citation:lang(bg-BG),
.wp-block[data-type="core/pullquote"][data-align="left"] .wp-block-pullquote__citation:lang(bg-BG),
.wp-block[data-type="core/pullquote"][data-align="right"] .wp-block-pullquote__citation:lang(bg-BG), .wp-block-file:lang(bg-BG), ul.wp-block-archives li:lang(bg-BG),
.wp-block-categories li:lang(bg-BG),
.wp-block-latest-posts li:lang(bg-BG), .wp-block-latest-comments .wp-block-latest-comments__comment-meta:lang(bg-BG), .wp-caption dd:lang(bg-BG), .wp-block-freeform blockquote cite:lang(bg-BG) {
font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, sans-serif;
}
body:lang(kk), h1:lang(kk),
h2:lang(kk),
h3:lang(kk),
h4:lang(kk),
h5:lang(kk),
h6:lang(kk), figcaption:lang(kk),
.gallery-caption:lang(kk), .editor-post-title__block .editor-post-title__input:lang(kk), .editor-default-block-appender .editor-default-block-appender__content:lang(kk), .wp-block-paragraph.has-drop-cap:lang(kk):not(:focus)::first-letter, .wp-block-table:lang(kk), .wp-block-cover h2:lang(kk),
.wp-block-cover .wp-block-cover-text:lang(kk), .wp-block-button .wp-block-button__link:lang(kk), .wp-block-quote cite:lang(kk),
.wp-block-quote footer:lang(kk),
.wp-block-quote .wp-block-quote__citation:lang(kk), .wp-block[data-type="core/pullquote"] .wp-block-pullquote__citation:lang(kk),
.wp-block[data-type="core/pullquote"][data-align="left"] .wp-block-pullquote__citation:lang(kk),
.wp-block[data-type="core/pullquote"][data-align="right"] .wp-block-pullquote__citation:lang(kk), .wp-block-file:lang(kk), ul.wp-block-archives li:lang(kk),
.wp-block-categories li:lang(kk),
.wp-block-latest-posts li:lang(kk), .wp-block-latest-comments .wp-block-latest-comments__comment-meta:lang(kk), .wp-caption dd:lang(kk), .wp-block-freeform blockquote cite:lang(kk) {
font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, sans-serif;
}
body:lang(mk-MK), h1:lang(mk-MK),
h2:lang(mk-MK),
h3:lang(mk-MK),
h4:lang(mk-MK),
h5:lang(mk-MK),
h6:lang(mk-MK), figcaption:lang(mk-MK),
.gallery-caption:lang(mk-MK), .editor-post-title__block .editor-post-title__input:lang(mk-MK), .editor-default-block-appender .editor-default-block-appender__content:lang(mk-MK), .wp-block-paragraph.has-drop-cap:lang(mk-MK):not(:focus)::first-letter, .wp-block-table:lang(mk-MK), .wp-block-cover h2:lang(mk-MK),
.wp-block-cover .wp-block-cover-text:lang(mk-MK), .wp-block-button .wp-block-button__link:lang(mk-MK), .wp-block-quote cite:lang(mk-MK),
.wp-block-quote footer:lang(mk-MK),
.wp-block-quote .wp-block-quote__citation:lang(mk-MK), .wp-block[data-type="core/pullquote"] .wp-block-pullquote__citation:lang(mk-MK),
.wp-block[data-type="core/pullquote"][data-align="left"] .wp-block-pullquote__citation:lang(mk-MK),
.wp-block[data-type="core/pullquote"][data-align="right"] .wp-block-pullquote__citation:lang(mk-MK), .wp-block-file:lang(mk-MK), ul.wp-block-archives li:lang(mk-MK),
.wp-block-categories li:lang(mk-MK),
.wp-block-latest-posts li:lang(mk-MK), .wp-block-latest-comments .wp-block-latest-comments__comment-meta:lang(mk-MK), .wp-caption dd:lang(mk-MK), .wp-block-freeform blockquote cite:lang(mk-MK) {
font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, sans-serif;
}
body:lang(mn), h1:lang(mn),
h2:lang(mn),
h3:lang(mn),
h4:lang(mn),
h5:lang(mn),
h6:lang(mn), figcaption:lang(mn),
.gallery-caption:lang(mn), .editor-post-title__block .editor-post-title__input:lang(mn), .editor-default-block-appender .editor-default-block-appender__content:lang(mn), .wp-block-paragraph.has-drop-cap:lang(mn):not(:focus)::first-letter, .wp-block-table:lang(mn), .wp-block-cover h2:lang(mn),
.wp-block-cover .wp-block-cover-text:lang(mn), .wp-block-button .wp-block-button__link:lang(mn), .wp-block-quote cite:lang(mn),
.wp-block-quote footer:lang(mn),
.wp-block-quote .wp-block-quote__citation:lang(mn), .wp-block[data-type="core/pullquote"] .wp-block-pullquote__citation:lang(mn),
.wp-block[data-type="core/pullquote"][data-align="left"] .wp-block-pullquote__citation:lang(mn),
.wp-block[data-type="core/pullquote"][data-align="right"] .wp-block-pullquote__citation:lang(mn), .wp-block-file:lang(mn), ul.wp-block-archives li:lang(mn),
.wp-block-categories li:lang(mn),
.wp-block-latest-posts li:lang(mn), .wp-block-latest-comments .wp-block-latest-comments__comment-meta:lang(mn), .wp-caption dd:lang(mn), .wp-block-freeform blockquote cite:lang(mn) {
font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, sans-serif;
}
body:lang(ru-RU), h1:lang(ru-RU),
h2:lang(ru-RU),
h3:lang(ru-RU),
h4:lang(ru-RU),
h5:lang(ru-RU),
h6:lang(ru-RU), figcaption:lang(ru-RU),
.gallery-caption:lang(ru-RU), .editor-post-title__block .editor-post-title__input:lang(ru-RU), .editor-default-block-appender .editor-default-block-appender__content:lang(ru-RU), .wp-block-paragraph.has-drop-cap:lang(ru-RU):not(:focus)::first-letter, .wp-block-table:lang(ru-RU), .wp-block-cover h2:lang(ru-RU),
.wp-block-cover .wp-block-cover-text:lang(ru-RU), .wp-block-button .wp-block-button__link:lang(ru-RU), .wp-block-quote cite:lang(ru-RU),
.wp-block-quote footer:lang(ru-RU),
.wp-block-quote .wp-block-quote__citation:lang(ru-RU), .wp-block[data-type="core/pullquote"] .wp-block-pullquote__citation:lang(ru-RU),
.wp-block[data-type="core/pullquote"][data-align="left"] .wp-block-pullquote__citation:lang(ru-RU),
.wp-block[data-type="core/pullquote"][data-align="right"] .wp-block-pullquote__citation:lang(ru-RU), .wp-block-file:lang(ru-RU), ul.wp-block-archives li:lang(ru-RU),
.wp-block-categories li:lang(ru-RU),
.wp-block-latest-posts li:lang(ru-RU), .wp-block-latest-comments .wp-block-latest-comments__comment-meta:lang(ru-RU), .wp-caption dd:lang(ru-RU), .wp-block-freeform blockquote cite:lang(ru-RU) {
font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, sans-serif;
}
body:lang(sah), h1:lang(sah),
h2:lang(sah),
h3:lang(sah),
h4:lang(sah),
h5:lang(sah),
h6:lang(sah), figcaption:lang(sah),
.gallery-caption:lang(sah), .editor-post-title__block .editor-post-title__input:lang(sah), .editor-default-block-appender .editor-default-block-appender__content:lang(sah), .wp-block-paragraph.has-drop-cap:lang(sah):not(:focus)::first-letter, .wp-block-table:lang(sah), .wp-block-cover h2:lang(sah),
.wp-block-cover .wp-block-cover-text:lang(sah), .wp-block-button .wp-block-button__link:lang(sah), .wp-block-quote cite:lang(sah),
.wp-block-quote footer:lang(sah),
.wp-block-quote .wp-block-quote__citation:lang(sah), .wp-block[data-type="core/pullquote"] .wp-block-pullquote__citation:lang(sah),
.wp-block[data-type="core/pullquote"][data-align="left"] .wp-block-pullquote__citation:lang(sah),
.wp-block[data-type="core/pullquote"][data-align="right"] .wp-block-pullquote__citation:lang(sah), .wp-block-file:lang(sah), ul.wp-block-archives li:lang(sah),
.wp-block-categories li:lang(sah),
.wp-block-latest-posts li:lang(sah), .wp-block-latest-comments .wp-block-latest-comments__comment-meta:lang(sah), .wp-caption dd:lang(sah), .wp-block-freeform blockquote cite:lang(sah) {
font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, sans-serif;
}
body:lang(sr-RS), h1:lang(sr-RS),
h2:lang(sr-RS),
h3:lang(sr-RS),
h4:lang(sr-RS),
h5:lang(sr-RS),
h6:lang(sr-RS), figcaption:lang(sr-RS),
.gallery-caption:lang(sr-RS), .editor-post-title__block .editor-post-title__input:lang(sr-RS), .editor-default-block-appender .editor-default-block-appender__content:lang(sr-RS), .wp-block-paragraph.has-drop-cap:lang(sr-RS):not(:focus)::first-letter, .wp-block-table:lang(sr-RS), .wp-block-cover h2:lang(sr-RS),
.wp-block-cover .wp-block-cover-text:lang(sr-RS), .wp-block-button .wp-block-button__link:lang(sr-RS), .wp-block-quote cite:lang(sr-RS),
.wp-block-quote footer:lang(sr-RS),
.wp-block-quote .wp-block-quote__citation:lang(sr-RS), .wp-block[data-type="core/pullquote"] .wp-block-pullquote__citation:lang(sr-RS),
.wp-block[data-type="core/pullquote"][data-align="left"] .wp-block-pullquote__citation:lang(sr-RS),
.wp-block[data-type="core/pullquote"][data-align="right"] .wp-block-pullquote__citation:lang(sr-RS), .wp-block-file:lang(sr-RS), ul.wp-block-archives li:lang(sr-RS),
.wp-block-categories li:lang(sr-RS),
.wp-block-latest-posts li:lang(sr-RS), .wp-block-latest-comments .wp-block-latest-comments__comment-meta:lang(sr-RS), .wp-caption dd:lang(sr-RS), .wp-block-freeform blockquote cite:lang(sr-RS) {
font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, sans-serif;
}
body:lang(tt-RU), h1:lang(tt-RU),
h2:lang(tt-RU),
h3:lang(tt-RU),
h4:lang(tt-RU),
h5:lang(tt-RU),
h6:lang(tt-RU), figcaption:lang(tt-RU),
.gallery-caption:lang(tt-RU), .editor-post-title__block .editor-post-title__input:lang(tt-RU), .editor-default-block-appender .editor-default-block-appender__content:lang(tt-RU), .wp-block-paragraph.has-drop-cap:lang(tt-RU):not(:focus)::first-letter, .wp-block-table:lang(tt-RU), .wp-block-cover h2:lang(tt-RU),
.wp-block-cover .wp-block-cover-text:lang(tt-RU), .wp-block-button .wp-block-button__link:lang(tt-RU), .wp-block-quote cite:lang(tt-RU),
.wp-block-quote footer:lang(tt-RU),
.wp-block-quote .wp-block-quote__citation:lang(tt-RU), .wp-block[data-type="core/pullquote"] .wp-block-pullquote__citation:lang(tt-RU),
.wp-block[data-type="core/pullquote"][data-align="left"] .wp-block-pullquote__citation:lang(tt-RU),
.wp-block[data-type="core/pullquote"][data-align="right"] .wp-block-pullquote__citation:lang(tt-RU), .wp-block-file:lang(tt-RU), ul.wp-block-archives li:lang(tt-RU),
.wp-block-categories li:lang(tt-RU),
.wp-block-latest-posts li:lang(tt-RU), .wp-block-latest-comments .wp-block-latest-comments__comment-meta:lang(tt-RU), .wp-caption dd:lang(tt-RU), .wp-block-freeform blockquote cite:lang(tt-RU) {
font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, sans-serif;
}
body:lang(uk), h1:lang(uk),
h2:lang(uk),
h3:lang(uk),
h4:lang(uk),
h5:lang(uk),
h6:lang(uk), figcaption:lang(uk),
.gallery-caption:lang(uk), .editor-post-title__block .editor-post-title__input:lang(uk), .editor-default-block-appender .editor-default-block-appender__content:lang(uk), .wp-block-paragraph.has-drop-cap:lang(uk):not(:focus)::first-letter, .wp-block-table:lang(uk), .wp-block-cover h2:lang(uk),
.wp-block-cover .wp-block-cover-text:lang(uk), .wp-block-button .wp-block-button__link:lang(uk), .wp-block-quote cite:lang(uk),
.wp-block-quote footer:lang(uk),
.wp-block-quote .wp-block-quote__citation:lang(uk), .wp-block[data-type="core/pullquote"] .wp-block-pullquote__citation:lang(uk),
.wp-block[data-type="core/pullquote"][data-align="left"] .wp-block-pullquote__citation:lang(uk),
.wp-block[data-type="core/pullquote"][data-align="right"] .wp-block-pullquote__citation:lang(uk), .wp-block-file:lang(uk), ul.wp-block-archives li:lang(uk),
.wp-block-categories li:lang(uk),
.wp-block-latest-posts li:lang(uk), .wp-block-latest-comments .wp-block-latest-comments__comment-meta:lang(uk), .wp-caption dd:lang(uk), .wp-block-freeform blockquote cite:lang(uk) {
font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, sans-serif;
}
body:lang(zh-HK), h1:lang(zh-HK),
h2:lang(zh-HK),
h3:lang(zh-HK),
h4:lang(zh-HK),
h5:lang(zh-HK),
h6:lang(zh-HK), figcaption:lang(zh-HK),
.gallery-caption:lang(zh-HK), .editor-post-title__block .editor-post-title__input:lang(zh-HK), .editor-default-block-appender .editor-default-block-appender__content:lang(zh-HK), .wp-block-paragraph.has-drop-cap:lang(zh-HK):not(:focus)::first-letter, .wp-block-table:lang(zh-HK), .wp-block-cover h2:lang(zh-HK),
.wp-block-cover .wp-block-cover-text:lang(zh-HK), .wp-block-button .wp-block-button__link:lang(zh-HK), .wp-block-quote cite:lang(zh-HK),
.wp-block-quote footer:lang(zh-HK),
.wp-block-quote .wp-block-quote__citation:lang(zh-HK), .wp-block[data-type="core/pullquote"] .wp-block-pullquote__citation:lang(zh-HK),
.wp-block[data-type="core/pullquote"][data-align="left"] .wp-block-pullquote__citation:lang(zh-HK),
.wp-block[data-type="core/pullquote"][data-align="right"] .wp-block-pullquote__citation:lang(zh-HK), .wp-block-file:lang(zh-HK), ul.wp-block-archives li:lang(zh-HK),
.wp-block-categories li:lang(zh-HK),
.wp-block-latest-posts li:lang(zh-HK), .wp-block-latest-comments .wp-block-latest-comments__comment-meta:lang(zh-HK), .wp-caption dd:lang(zh-HK), .wp-block-freeform blockquote cite:lang(zh-HK) {
font-family: -apple-system, BlinkMacSystemFont, "PingFang HK", "Helvetica Neue", "Microsoft YaHei New", STHeiti Light, sans-serif;
}
body:lang(zh-TW), h1:lang(zh-TW),
h2:lang(zh-TW),
h3:lang(zh-TW),
h4:lang(zh-TW),
h5:lang(zh-TW),
h6:lang(zh-TW), figcaption:lang(zh-TW),
.gallery-caption:lang(zh-TW), .editor-post-title__block .editor-post-title__input:lang(zh-TW), .editor-default-block-appender .editor-default-block-appender__content:lang(zh-TW), .wp-block-paragraph.has-drop-cap:lang(zh-TW):not(:focus)::first-letter, .wp-block-table:lang(zh-TW), .wp-block-cover h2:lang(zh-TW),
.wp-block-cover .wp-block-cover-text:lang(zh-TW), .wp-block-button .wp-block-button__link:lang(zh-TW), .wp-block-quote cite:lang(zh-TW),
.wp-block-quote footer:lang(zh-TW),
.wp-block-quote .wp-block-quote__citation:lang(zh-TW), .wp-block[data-type="core/pullquote"] .wp-block-pullquote__citation:lang(zh-TW),
.wp-block[data-type="core/pullquote"][data-align="left"] .wp-block-pullquote__citation:lang(zh-TW),
.wp-block[data-type="core/pullquote"][data-align="right"] .wp-block-pullquote__citation:lang(zh-TW), .wp-block-file:lang(zh-TW), ul.wp-block-archives li:lang(zh-TW),
.wp-block-categories li:lang(zh-TW),
.wp-block-latest-posts li:lang(zh-TW), .wp-block-latest-comments .wp-block-latest-comments__comment-meta:lang(zh-TW), .wp-caption dd:lang(zh-TW), .wp-block-freeform blockquote cite:lang(zh-TW) {
font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Helvetica Neue", "Microsoft YaHei New", STHeiti Light, sans-serif;
}
body:lang(zh-CN), h1:lang(zh-CN),
h2:lang(zh-CN),
h3:lang(zh-CN),
h4:lang(zh-CN),
h5:lang(zh-CN),
h6:lang(zh-CN), figcaption:lang(zh-CN),
.gallery-caption:lang(zh-CN), .editor-post-title__block .editor-post-title__input:lang(zh-CN), .editor-default-block-appender .editor-default-block-appender__content:lang(zh-CN), .wp-block-paragraph.has-drop-cap:lang(zh-CN):not(:focus)::first-letter, .wp-block-table:lang(zh-CN), .wp-block-cover h2:lang(zh-CN),
.wp-block-cover .wp-block-cover-text:lang(zh-CN), .wp-block-button .wp-block-button__link:lang(zh-CN), .wp-block-quote cite:lang(zh-CN),
.wp-block-quote footer:lang(zh-CN),
.wp-block-quote .wp-block-quote__citation:lang(zh-CN), .wp-block[data-type="core/pullquote"] .wp-block-pullquote__citation:lang(zh-CN),
.wp-block[data-type="core/pullquote"][data-align="left"] .wp-block-pullquote__citation:lang(zh-CN),
.wp-block[data-type="core/pullquote"][data-align="right"] .wp-block-pullquote__citation:lang(zh-CN), .wp-block-file:lang(zh-CN), ul.wp-block-archives li:lang(zh-CN),
.wp-block-categories li:lang(zh-CN),
.wp-block-latest-posts li:lang(zh-CN), .wp-block-latest-comments .wp-block-latest-comments__comment-meta:lang(zh-CN), .wp-caption dd:lang(zh-CN), .wp-block-freeform blockquote cite:lang(zh-CN) {
font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei New", STHeiti Light, sans-serif;
}
body:lang(bn-BD), h1:lang(bn-BD),
h2:lang(bn-BD),
h3:lang(bn-BD),
h4:lang(bn-BD),
h5:lang(bn-BD),
h6:lang(bn-BD), figcaption:lang(bn-BD),
.gallery-caption:lang(bn-BD), .editor-post-title__block .editor-post-title__input:lang(bn-BD), .editor-default-block-appender .editor-default-block-appender__content:lang(bn-BD), .wp-block-paragraph.has-drop-cap:lang(bn-BD):not(:focus)::first-letter, .wp-block-table:lang(bn-BD), .wp-block-cover h2:lang(bn-BD),
.wp-block-cover .wp-block-cover-text:lang(bn-BD), .wp-block-button .wp-block-button__link:lang(bn-BD), .wp-block-quote cite:lang(bn-BD),
.wp-block-quote footer:lang(bn-BD),
.wp-block-quote .wp-block-quote__citation:lang(bn-BD), .wp-block[data-type="core/pullquote"] .wp-block-pullquote__citation:lang(bn-BD),
.wp-block[data-type="core/pullquote"][data-align="left"] .wp-block-pullquote__citation:lang(bn-BD),
.wp-block[data-type="core/pullquote"][data-align="right"] .wp-block-pullquote__citation:lang(bn-BD), .wp-block-file:lang(bn-BD), ul.wp-block-archives li:lang(bn-BD),
.wp-block-categories li:lang(bn-BD),
.wp-block-latest-posts li:lang(bn-BD), .wp-block-latest-comments .wp-block-latest-comments__comment-meta:lang(bn-BD), .wp-caption dd:lang(bn-BD), .wp-block-freeform blockquote cite:lang(bn-BD) {
font-family: Arial, sans-serif;
}
body:lang(hi-IN), h1:lang(hi-IN),
h2:lang(hi-IN),
h3:lang(hi-IN),
h4:lang(hi-IN),
h5:lang(hi-IN),
h6:lang(hi-IN), figcaption:lang(hi-IN),
.gallery-caption:lang(hi-IN), .editor-post-title__block .editor-post-title__input:lang(hi-IN), .editor-default-block-appender .editor-default-block-appender__content:lang(hi-IN), .wp-block-paragraph.has-drop-cap:lang(hi-IN):not(:focus)::first-letter, .wp-block-table:lang(hi-IN), .wp-block-cover h2:lang(hi-IN),
.wp-block-cover .wp-block-cover-text:lang(hi-IN), .wp-block-button .wp-block-button__link:lang(hi-IN), .wp-block-quote cite:lang(hi-IN),
.wp-block-quote footer:lang(hi-IN),
.wp-block-quote .wp-block-quote__citation:lang(hi-IN), .wp-block[data-type="core/pullquote"] .wp-block-pullquote__citation:lang(hi-IN),
.wp-block[data-type="core/pullquote"][data-align="left"] .wp-block-pullquote__citation:lang(hi-IN),
.wp-block[data-type="core/pullquote"][data-align="right"] .wp-block-pullquote__citation:lang(hi-IN), .wp-block-file:lang(hi-IN), ul.wp-block-archives li:lang(hi-IN),
.wp-block-categories li:lang(hi-IN),
.wp-block-latest-posts li:lang(hi-IN), .wp-block-latest-comments .wp-block-latest-comments__comment-meta:lang(hi-IN), .wp-caption dd:lang(hi-IN), .wp-block-freeform blockquote cite:lang(hi-IN) {
font-family: Arial, sans-serif;
}
body:lang(mr), h1:lang(mr),
h2:lang(mr),
h3:lang(mr),
h4:lang(mr),
h5:lang(mr),
h6:lang(mr), figcaption:lang(mr),
.gallery-caption:lang(mr), .editor-post-title__block .editor-post-title__input:lang(mr), .editor-default-block-appender .editor-default-block-appender__content:lang(mr), .wp-block-paragraph.has-drop-cap:lang(mr):not(:focus)::first-letter, .wp-block-table:lang(mr), .wp-block-cover h2:lang(mr),
.wp-block-cover .wp-block-cover-text:lang(mr), .wp-block-button .wp-block-button__link:lang(mr), .wp-block-quote cite:lang(mr),
.wp-block-quote footer:lang(mr),
.wp-block-quote .wp-block-quote__citation:lang(mr), .wp-block[data-type="core/pullquote"] .wp-block-pullquote__citation:lang(mr),
.wp-block[data-type="core/pullquote"][data-align="left"] .wp-block-pullquote__citation:lang(mr),
.wp-block[data-type="core/pullquote"][data-align="right"] .wp-block-pullquote__citation:lang(mr), .wp-block-file:lang(mr), ul.wp-block-archives li:lang(mr),
.wp-block-categories li:lang(mr),
.wp-block-latest-posts li:lang(mr), .wp-block-latest-comments .wp-block-latest-comments__comment-meta:lang(mr), .wp-caption dd:lang(mr), .wp-block-freeform blockquote cite:lang(mr) {
font-family: Arial, sans-serif;
}
body:lang(ne-NP), h1:lang(ne-NP),
h2:lang(ne-NP),
h3:lang(ne-NP),
h4:lang(ne-NP),
h5:lang(ne-NP),
h6:lang(ne-NP), figcaption:lang(ne-NP),
.gallery-caption:lang(ne-NP), .editor-post-title__block .editor-post-title__input:lang(ne-NP), .editor-default-block-appender .editor-default-block-appender__content:lang(ne-NP), .wp-block-paragraph.has-drop-cap:lang(ne-NP):not(:focus)::first-letter, .wp-block-table:lang(ne-NP), .wp-block-cover h2:lang(ne-NP),
.wp-block-cover .wp-block-cover-text:lang(ne-NP), .wp-block-button .wp-block-button__link:lang(ne-NP), .wp-block-quote cite:lang(ne-NP),
.wp-block-quote footer:lang(ne-NP),
.wp-block-quote .wp-block-quote__citation:lang(ne-NP), .wp-block[data-type="core/pullquote"] .wp-block-pullquote__citation:lang(ne-NP),
.wp-block[data-type="core/pullquote"][data-align="left"] .wp-block-pullquote__citation:lang(ne-NP),
.wp-block[data-type="core/pullquote"][data-align="right"] .wp-block-pullquote__citation:lang(ne-NP), .wp-block-file:lang(ne-NP), ul.wp-block-archives li:lang(ne-NP),
.wp-block-categories li:lang(ne-NP),
.wp-block-latest-posts li:lang(ne-NP), .wp-block-latest-comments .wp-block-latest-comments__comment-meta:lang(ne-NP), .wp-caption dd:lang(ne-NP), .wp-block-freeform blockquote cite:lang(ne-NP) {
font-family: Arial, sans-serif;
}
body:lang(el), h1:lang(el),
h2:lang(el),
h3:lang(el),
h4:lang(el),
h5:lang(el),
h6:lang(el), figcaption:lang(el),
.gallery-caption:lang(el), .editor-post-title__block .editor-post-title__input:lang(el), .editor-default-block-appender .editor-default-block-appender__content:lang(el), .wp-block-paragraph.has-drop-cap:lang(el):not(:focus)::first-letter, .wp-block-table:lang(el), .wp-block-cover h2:lang(el),
.wp-block-cover .wp-block-cover-text:lang(el), .wp-block-button .wp-block-button__link:lang(el), .wp-block-quote cite:lang(el),
.wp-block-quote footer:lang(el),
.wp-block-quote .wp-block-quote__citation:lang(el), .wp-block[data-type="core/pullquote"] .wp-block-pullquote__citation:lang(el),
.wp-block[data-type="core/pullquote"][data-align="left"] .wp-block-pullquote__citation:lang(el),
.wp-block[data-type="core/pullquote"][data-align="right"] .wp-block-pullquote__citation:lang(el), .wp-block-file:lang(el), ul.wp-block-archives li:lang(el),
.wp-block-categories li:lang(el),
.wp-block-latest-posts li:lang(el), .wp-block-latest-comments .wp-block-latest-comments__comment-meta:lang(el), .wp-caption dd:lang(el), .wp-block-freeform blockquote cite:lang(el) {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
body:lang(gu), h1:lang(gu),
h2:lang(gu),
h3:lang(gu),
h4:lang(gu),
h5:lang(gu),
h6:lang(gu), figcaption:lang(gu),
.gallery-caption:lang(gu), .editor-post-title__block .editor-post-title__input:lang(gu), .editor-default-block-appender .editor-default-block-appender__content:lang(gu), .wp-block-paragraph.has-drop-cap:lang(gu):not(:focus)::first-letter, .wp-block-table:lang(gu), .wp-block-cover h2:lang(gu),
.wp-block-cover .wp-block-cover-text:lang(gu), .wp-block-button .wp-block-button__link:lang(gu), .wp-block-quote cite:lang(gu),
.wp-block-quote footer:lang(gu),
.wp-block-quote .wp-block-quote__citation:lang(gu), .wp-block[data-type="core/pullquote"] .wp-block-pullquote__citation:lang(gu),
.wp-block[data-type="core/pullquote"][data-align="left"] .wp-block-pullquote__citation:lang(gu),
.wp-block[data-type="core/pullquote"][data-align="right"] .wp-block-pullquote__citation:lang(gu), .wp-block-file:lang(gu), ul.wp-block-archives li:lang(gu),
.wp-block-categories li:lang(gu),
.wp-block-latest-posts li:lang(gu), .wp-block-latest-comments .wp-block-latest-comments__comment-meta:lang(gu), .wp-caption dd:lang(gu), .wp-block-freeform blockquote cite:lang(gu) {
font-family: Arial, sans-serif;
}
body:lang(he-IL), h1:lang(he-IL),
h2:lang(he-IL),
h3:lang(he-IL),
h4:lang(he-IL),
h5:lang(he-IL),
h6:lang(he-IL), figcaption:lang(he-IL),
.gallery-caption:lang(he-IL), .editor-post-title__block .editor-post-title__input:lang(he-IL), .editor-default-block-appender .editor-default-block-appender__content:lang(he-IL), .wp-block-paragraph.has-drop-cap:lang(he-IL):not(:focus)::first-letter, .wp-block-table:lang(he-IL), .wp-block-cover h2:lang(he-IL),
.wp-block-cover .wp-block-cover-text:lang(he-IL), .wp-block-button .wp-block-button__link:lang(he-IL), .wp-block-quote cite:lang(he-IL),
.wp-block-quote footer:lang(he-IL),
.wp-block-quote .wp-block-quote__citation:lang(he-IL), .wp-block[data-type="core/pullquote"] .wp-block-pullquote__citation:lang(he-IL),
.wp-block[data-type="core/pullquote"][data-align="left"] .wp-block-pullquote__citation:lang(he-IL),
.wp-block[data-type="core/pullquote"][data-align="right"] .wp-block-pullquote__citation:lang(he-IL), .wp-block-file:lang(he-IL), ul.wp-block-archives li:lang(he-IL),
.wp-block-categories li:lang(he-IL),
.wp-block-latest-posts li:lang(he-IL), .wp-block-latest-comments .wp-block-latest-comments__comment-meta:lang(he-IL), .wp-caption dd:lang(he-IL), .wp-block-freeform blockquote cite:lang(he-IL) {
font-family: "Arial Hebrew", Arial, sans-serif;
}
body:lang(ja), h1:lang(ja),
h2:lang(ja),
h3:lang(ja),
h4:lang(ja),
h5:lang(ja),
h6:lang(ja), figcaption:lang(ja),
.gallery-caption:lang(ja), .editor-post-title__block .editor-post-title__input:lang(ja), .editor-default-block-appender .editor-default-block-appender__content:lang(ja), .wp-block-paragraph.has-drop-cap:lang(ja):not(:focus)::first-letter, .wp-block-table:lang(ja), .wp-block-cover h2:lang(ja),
.wp-block-cover .wp-block-cover-text:lang(ja), .wp-block-button .wp-block-button__link:lang(ja), .wp-block-quote cite:lang(ja),
.wp-block-quote footer:lang(ja),
.wp-block-quote .wp-block-quote__citation:lang(ja), .wp-block[data-type="core/pullquote"] .wp-block-pullquote__citation:lang(ja),
.wp-block[data-type="core/pullquote"][data-align="left"] .wp-block-pullquote__citation:lang(ja),
.wp-block[data-type="core/pullquote"][data-align="right"] .wp-block-pullquote__citation:lang(ja), .wp-block-file:lang(ja), ul.wp-block-archives li:lang(ja),
.wp-block-categories li:lang(ja),
.wp-block-latest-posts li:lang(ja), .wp-block-latest-comments .wp-block-latest-comments__comment-meta:lang(ja), .wp-caption dd:lang(ja), .wp-block-freeform blockquote cite:lang(ja) {
font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", Meiryo, "Helvetica Neue", sans-serif;
}
body:lang(ko-KR), h1:lang(ko-KR),
h2:lang(ko-KR),
h3:lang(ko-KR),
h4:lang(ko-KR),
h5:lang(ko-KR),
h6:lang(ko-KR), figcaption:lang(ko-KR),
.gallery-caption:lang(ko-KR), .editor-post-title__block .editor-post-title__input:lang(ko-KR), .editor-default-block-appender .editor-default-block-appender__content:lang(ko-KR), .wp-block-paragraph.has-drop-cap:lang(ko-KR):not(:focus)::first-letter, .wp-block-table:lang(ko-KR), .wp-block-cover h2:lang(ko-KR),
.wp-block-cover .wp-block-cover-text:lang(ko-KR), .wp-block-button .wp-block-button__link:lang(ko-KR), .wp-block-quote cite:lang(ko-KR),
.wp-block-quote footer:lang(ko-KR),
.wp-block-quote .wp-block-quote__citation:lang(ko-KR), .wp-block[data-type="core/pullquote"] .wp-block-pullquote__citation:lang(ko-KR),
.wp-block[data-type="core/pullquote"][data-align="left"] .wp-block-pullquote__citation:lang(ko-KR),
.wp-block[data-type="core/pullquote"][data-align="right"] .wp-block-pullquote__citation:lang(ko-KR), .wp-block-file:lang(ko-KR), ul.wp-block-archives li:lang(ko-KR),
.wp-block-categories li:lang(ko-KR),
.wp-block-latest-posts li:lang(ko-KR), .wp-block-latest-comments .wp-block-latest-comments__comment-meta:lang(ko-KR), .wp-caption dd:lang(ko-KR), .wp-block-freeform blockquote cite:lang(ko-KR) {
font-family: "Apple SD Gothic Neo", "Malgun Gothic", "Nanum Gothic", Dotum, sans-serif;
}
body:lang(th), h1:lang(th),
h2:lang(th),
h3:lang(th),
h4:lang(th),
h5:lang(th),
h6:lang(th), figcaption:lang(th),
.gallery-caption:lang(th), .editor-post-title__block .editor-post-title__input:lang(th), .editor-default-block-appender .editor-default-block-appender__content:lang(th), .wp-block-paragraph.has-drop-cap:lang(th):not(:focus)::first-letter, .wp-block-table:lang(th), .wp-block-cover h2:lang(th),
.wp-block-cover .wp-block-cover-text:lang(th), .wp-block-button .wp-block-button__link:lang(th), .wp-block-quote cite:lang(th),
.wp-block-quote footer:lang(th),
.wp-block-quote .wp-block-quote__citation:lang(th), .wp-block[data-type="core/pullquote"] .wp-block-pullquote__citation:lang(th),
.wp-block[data-type="core/pullquote"][data-align="left"] .wp-block-pullquote__citation:lang(th),
.wp-block[data-type="core/pullquote"][data-align="right"] .wp-block-pullquote__citation:lang(th), .wp-block-file:lang(th), ul.wp-block-archives li:lang(th),
.wp-block-categories li:lang(th),
.wp-block-latest-posts li:lang(th), .wp-block-latest-comments .wp-block-latest-comments__comment-meta:lang(th), .wp-caption dd:lang(th), .wp-block-freeform blockquote cite:lang(th) {
font-family: "Sukhumvit Set", "Helvetica Neue", helvetica, arial, sans-serif;
}
body:lang(vi), h1:lang(vi),
h2:lang(vi),
h3:lang(vi),
h4:lang(vi),
h5:lang(vi),
h6:lang(vi), figcaption:lang(vi),
.gallery-caption:lang(vi), .editor-post-title__block .editor-post-title__input:lang(vi), .editor-default-block-appender .editor-default-block-appender__content:lang(vi), .wp-block-paragraph.has-drop-cap:lang(vi):not(:focus)::first-letter, .wp-block-table:lang(vi), .wp-block-cover h2:lang(vi),
.wp-block-cover .wp-block-cover-text:lang(vi), .wp-block-button .wp-block-button__link:lang(vi), .wp-block-quote cite:lang(vi),
.wp-block-quote footer:lang(vi),
.wp-block-quote .wp-block-quote__citation:lang(vi), .wp-block[data-type="core/pullquote"] .wp-block-pullquote__citation:lang(vi),
.wp-block[data-type="core/pullquote"][data-align="left"] .wp-block-pullquote__citation:lang(vi),
.wp-block[data-type="core/pullquote"][data-align="right"] .wp-block-pullquote__citation:lang(vi), .wp-block-file:lang(vi), ul.wp-block-archives li:lang(vi),
.wp-block-categories li:lang(vi),
.wp-block-latest-posts li:lang(vi), .wp-block-latest-comments .wp-block-latest-comments__comment-meta:lang(vi), .wp-caption dd:lang(vi), .wp-block-freeform blockquote cite:lang(vi) {
font-family: "Libre Franklin", sans-serif;
}
/** === Editor Frame === */
body .wp-block[data-align="full"] {
width: 100%;
@ -412,7 +940,8 @@ figcaption,
/** === Blockquote === */
.wp-block-quote:not(.is-large):not(.is-style-large) {
border-left: 2px solid #0073aa;
border-width: 2px;
border-color: #0073aa;
}
.wp-block-quote.is-large, .wp-block-quote.is-style-large {
@ -764,8 +1293,3 @@ ul.wp-block-archives li ul,
line-height: 1.6;
color: #767676;
}
/* Make sure our non-latin font overrides don't overwrite the iconfont used in the classic editor toolbar */
.wp-block[data-type="core/freeform"] .mce-btn i {
font-family: dashicons !important;
}

View file

@ -78,7 +78,7 @@ body {
body {
font-size: $font__size_base;
font-family: $font__body;
@include font-family( $font__body );
line-height: $font__line-height-body;
color: $color__text-main;
}
@ -93,7 +93,7 @@ h3,
h4,
h5,
h6 {
font-family: $font__heading;
@include font-family( $font__heading );
font-weight: 700;
}
@ -189,7 +189,7 @@ a {
figcaption,
.gallery-caption {
font-family: $font__heading;
@include font-family( $font__heading );
font-size: $font__size-xs;
line-height: 1.6;
color: $color__text-light;
@ -210,7 +210,7 @@ figcaption,
}
.editor-post-title__input {
font-family: $font__heading;
@include font-family( $font__heading );
font-size: $font__size-xxl;
font-weight: 700;
}
@ -219,7 +219,7 @@ figcaption,
/** === Default Appender === */
.editor-default-block-appender .editor-default-block-appender__content {
font-family: $font__body;
@include font-family( $font__body );
font-size: $font__size_base;
}
@ -235,7 +235,7 @@ figcaption,
.wp-block-paragraph {
&.has-drop-cap:not(:focus)::first-letter {
font-family: $font__heading;
@include font-family( $font__heading );
font-size: $font__size-xxxl;
line-height: 1;
font-weight: bold;
@ -246,7 +246,7 @@ figcaption,
/** === Table === */
.wp-block-table {
font-family: $font__heading;
@include font-family( $font__heading );
}
/** === Cover === */
@ -255,7 +255,7 @@ figcaption,
h2,
.wp-block-cover-text {
font-family: $font__heading;
@include font-family( $font__heading );
font-size: $font__size-lg;
font-weight: bold;
line-height: 1.4;
@ -356,7 +356,7 @@ figcaption,
.wp-block-button__link {
line-height: 1.8;
font-family: $font__heading;
@include font-family( $font__heading );
font-size: $font__size-sm;
font-weight: bold;
}
@ -391,7 +391,8 @@ figcaption,
.wp-block-quote {
&:not(.is-large):not(.is-style-large) {
border-left: 2px solid $color__link;
border-width: 2px;
border-color: $color__link;
}
&.is-large,
@ -411,7 +412,7 @@ figcaption,
cite,
footer,
.wp-block-quote__citation {
font-family: $font__heading;
@include font-family( $font__heading );
font-size: $font__size-xs;
line-height: 1.6;
color: $color__text-light;
@ -482,7 +483,7 @@ figcaption,
}
.wp-block-pullquote__citation {
font-family: $font__heading;
@include font-family( $font__heading );
font-size: $font__size-xs;
line-height: 1.6;
text-transform: none;
@ -531,7 +532,7 @@ figcaption,
/** === File === */
.wp-block-file {
font-family: $font__heading;
@include font-family( $font__heading );
.wp-block-file__textlink {
text-decoration: underline;
@ -625,7 +626,7 @@ ul.wp-block-archives,
li {
color: $color__text-light;
font-family: $font__heading;
@include font-family( $font__heading );
font-size: calc(#{$font__size_base} * #{$font__size-ratio});
font-weight: bold;
line-height: $font__line-height-heading;
@ -686,7 +687,7 @@ ul.wp-block-archives,
.wp-block-latest-comments {
.wp-block-latest-comments__comment-meta {
font-family: $font__heading;
@include font-family( $font__heading );
font-weight: bold;
.wp-block-latest-comments__comment-date {
@ -712,7 +713,7 @@ ul.wp-block-archives,
dd {
color: $color__text-light;
font-size: $font__size-xs;
font-family: $font__heading;
@include font-family( $font__heading );
line-height: $font__line-height-pre;
margin: 0;
padding: ( $size__spacing-unit * .5 );
@ -730,7 +731,7 @@ ul.wp-block-archives,
border-left: 2px solid $color__link;
cite {
font-family: $font__heading;
@include font-family( $font__heading );
font-size: $font__size-xs;
font-style: normal;
line-height: 1.6;
@ -738,8 +739,3 @@ ul.wp-block-archives,
}
}
}
/* Make sure our non-latin font overrides don't overwrite the iconfont used in the classic editor toolbar */
.wp-block[data-type="core/freeform"] .mce-btn i {
font-family: dashicons !important;
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -1,11 +1,11 @@
/*
Theme Name: Twenty Nineteen
Theme URI: https://github.com/WordPress/twentynineteen
Theme URI: https://wordpress.org/themes/twentynineteen/
Author: the WordPress team
Author URI: https://wordpress.org/
Description: Our 2019 default theme is designed to show off the power of the block editor. It features custom styles for all the default blocks, and is built so that what you see in the editor looks like what you'll see on your website. Twenty Nineteen is designed to be adaptable to a wide range of websites, whether youre running a photo blog, launching a new business, or supporting a non-profit. Featuring ample whitespace and modern sans-serif headlines paired with classic serif body text, it's built to be beautiful on all screen sizes.
Requires at least: WordPress 4.9.6
Version: 1.2
Version: 1.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: twentynineteen

View file

@ -30,4 +30,4 @@
<footer class="entry-footer">
<?php twentynineteen_entry_footer(); ?>
</footer><!-- .entry-footer -->
</article><!-- #post-${ID} -->
</article><!-- #post-<?php the_ID(); ?> -->

View file

@ -49,7 +49,7 @@
</footer><!-- .entry-footer -->
<?php if ( ! is_singular( 'attachment' ) ) : ?>
<?php get_template_part( 'template-parts/post/author', 'bio' ); ?>
<?php get_template_part( 'template-parts/post/author', 'bio' ); ?>
<?php endif; ?>
</article><!-- #post-${ID} -->
</article><!-- #post-<?php the_ID(); ?> -->

View file

@ -56,4 +56,4 @@
<footer class="entry-footer">
<?php twentynineteen_entry_footer(); ?>
</footer><!-- .entry-footer -->
</article><!-- #post-${ID} -->
</article><!-- #post-<?php the_ID(); ?> -->

View file

@ -11,13 +11,13 @@ if ( is_active_sidebar( 'sidebar-1' ) ) : ?>
<aside class="widget-area" role="complementary" aria-label="<?php esc_attr_e( 'Footer', 'twentynineteen' ); ?>">
<?php
if ( is_active_sidebar( 'sidebar-1' ) ) {
?>
if ( is_active_sidebar( 'sidebar-1' ) ) {
?>
<div class="widget-column footer-widget-1">
<?php dynamic_sidebar( 'sidebar-1' ); ?>
<?php dynamic_sidebar( 'sidebar-1' ); ?>
</div>
<?php
}
}
?>
</aside><!-- .widget-area -->

View file

@ -42,5 +42,5 @@ $discussion = ! is_page() && twentynineteen_can_show_post_thumbnail() ? twentyni
'</span>'
);
?>
</div><!-- .meta-info -->
</div><!-- .entry-meta -->
<?php endif; ?>

View file

@ -31,4 +31,5 @@ get_header(); ?>
</div><!-- #primary -->
</div><!-- .wrap -->
<?php get_footer();
<?php
get_footer();

View file

@ -1,8 +1,9 @@
=== Twenty Seventeen ===
Contributors: the WordPress team
Contributors: wordpressdotorg
Requires at least: WordPress 4.7
Tested up to: WordPress 5.0
Version: 2.0
Requires PHP: 5.2.4
Version: 2.2
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: one-column, two-columns, right-sidebar, flexible-header, accessibility-ready, custom-colors, custom-header, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, post-formats, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready
@ -60,6 +61,16 @@ Source: https://unsplash.com/@englr?photo=bIhpiQA009k
== Changelog ==
= 2.2 =
* Released: May 7, 2019
https://codex.wordpress.org/Twenty_Seventeen_Theme_Changelog#Version_2.2
= 2.1 =
* Released: February 21, 2019
https://codex.wordpress.org/Twenty_Seventeen_Theme_Changelog#Version_2.1
= 2.0 =
* Released: January 9, 2019

View file

@ -2,7 +2,7 @@
/**
* The template for displaying archive pages
*
* @link https://codex.wordpress.org/Template_Hierarchy
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package WordPress
* @subpackage Twenty_Seventeen
@ -27,10 +27,12 @@ get_header(); ?>
<main id="main" class="site-main" role="main">
<?php
if ( have_posts() ) : ?>
if ( have_posts() ) :
?>
<?php
/* Start the Loop */
while ( have_posts() ) : the_post();
while ( have_posts() ) :
the_post();
/*
* Include the Post-Format-specific template for the content.
@ -41,21 +43,25 @@ get_header(); ?>
endwhile;
the_posts_pagination( array(
'prev_text' => twentyseventeen_get_svg( array( 'icon' => 'arrow-left' ) ) . '<span class="screen-reader-text">' . __( 'Previous page', 'twentyseventeen' ) . '</span>',
'next_text' => '<span class="screen-reader-text">' . __( 'Next page', 'twentyseventeen' ) . '</span>' . twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ),
'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyseventeen' ) . ' </span>',
) );
the_posts_pagination(
array(
'prev_text' => twentyseventeen_get_svg( array( 'icon' => 'arrow-left' ) ) . '<span class="screen-reader-text">' . __( 'Previous page', 'twentyseventeen' ) . '</span>',
'next_text' => '<span class="screen-reader-text">' . __( 'Next page', 'twentyseventeen' ) . '</span>' . twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ),
'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyseventeen' ) . ' </span>',
)
);
else :
get_template_part( 'template-parts/post/content', 'none' );
endif; ?>
endif;
?>
</main><!-- #main -->
</div><!-- #primary -->
<?php get_sidebar(); ?>
</div><!-- .wrap -->
<?php get_footer();
<?php
get_footer();

View file

@ -289,7 +289,7 @@ body.colors-dark,
color: #bbb;
}
.colors-dark button:hover,
.colors-dark button:hover:not( .mejs-container > button ),
.colors-dark button:focus,
.colors-dark input[type="button"]:hover,
.colors-dark input[type="button"]:focus,

View file

@ -674,6 +674,7 @@ table.wp-block-table tr {
border-bottom: 1px solid #eee;
}
table.wp-block-table th,
table.wp-block-table td {
border: 0;
padding: 0.4em;

View file

@ -208,6 +208,7 @@
adjustHeaderHeight();
setQuotesIcon();
belowEntryMetaClass( 'blockquote.alignleft, blockquote.alignright' );
if ( true === supportsInlineSVG() ) {
document.documentElement.className = document.documentElement.className.replace( /(\s*)no-svg(\s*)/, '$1svg$2' );
}

View file

@ -5,7 +5,7 @@
* This is the template that displays the area of the page that contains both the current comments
* and the comment form.
*
* @link https://codex.wordpress.org/Template_Hierarchy
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package WordPress
* @subpackage Twenty_Seventeen
@ -27,7 +27,8 @@ if ( post_password_required() ) {
<?php
// You can start editing here -- including this comment!
if ( have_comments() ) : ?>
if ( have_comments() ) :
?>
<h2 class="comments-title">
<?php
$comments_number = get_comments_number();
@ -53,27 +54,33 @@ if ( post_password_required() ) {
<ol class="comment-list">
<?php
wp_list_comments( array(
'avatar_size' => 100,
'style' => 'ol',
'short_ping' => true,
'reply_text' => twentyseventeen_get_svg( array( 'icon' => 'mail-reply' ) ) . __( 'Reply', 'twentyseventeen' ),
) );
wp_list_comments(
array(
'avatar_size' => 100,
'style' => 'ol',
'short_ping' => true,
'reply_text' => twentyseventeen_get_svg( array( 'icon' => 'mail-reply' ) ) . __( 'Reply', 'twentyseventeen' ),
)
);
?>
</ol>
<?php the_comments_pagination( array(
'prev_text' => twentyseventeen_get_svg( array( 'icon' => 'arrow-left' ) ) . '<span class="screen-reader-text">' . __( 'Previous', 'twentyseventeen' ) . '</span>',
'next_text' => '<span class="screen-reader-text">' . __( 'Next', 'twentyseventeen' ) . '</span>' . twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ),
) );
<?php
the_comments_pagination(
array(
'prev_text' => twentyseventeen_get_svg( array( 'icon' => 'arrow-left' ) ) . '<span class="screen-reader-text">' . __( 'Previous', 'twentyseventeen' ) . '</span>',
'next_text' => '<span class="screen-reader-text">' . __( 'Next', 'twentyseventeen' ) . '</span>' . twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ),
)
);
endif; // Check for have_comments().
// 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.', 'twentyseventeen' ); ?></p>
<?php
<?php
endif;
comment_form();

View file

@ -21,19 +21,23 @@
<?php
get_template_part( 'template-parts/footer/footer', 'widgets' );
if ( has_nav_menu( 'social' ) ) : ?>
if ( has_nav_menu( 'social' ) ) :
?>
<nav class="social-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Footer Social Links Menu', 'twentyseventeen' ); ?>">
<?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>' . twentyseventeen_get_svg( array( 'icon' => 'chain' ) ),
) );
wp_nav_menu(
array(
'theme_location' => 'social',
'menu_class' => 'social-links-menu',
'depth' => 1,
'link_before' => '<span class="screen-reader-text">',
'link_after' => '</span>' . twentyseventeen_get_svg( array( 'icon' => 'chain' ) ),
)
);
?>
</nav><!-- .social-navigation -->
<?php endif;
<?php
endif;
get_template_part( 'template-parts/footer/site', 'info' );
?>

View file

@ -4,7 +4,7 @@
*
* If the user has selected a static page for their homepage, this is what will
* appear.
* Learn more: https://codex.wordpress.org/Template_Hierarchy
* Learn more: https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package WordPress
* @subpackage Twenty_Seventeen
@ -17,14 +17,17 @@ get_header(); ?>
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<?php // Show the selected frontpage content.
<?php
// Show the selected front page content.
if ( have_posts() ) :
while ( have_posts() ) : the_post();
while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/page/content', 'front-page' );
endwhile;
else :
get_template_part( 'template-parts/post/content', 'none' );
endif; ?>
endif;
?>
<?php
// Get each of our panels and show the post data.
@ -46,9 +49,11 @@ get_header(); ?>
twentyseventeen_front_page_section( null, $i );
}
endif; // The if ( 0 !== twentyseventeen_panel_count() ) ends here. ?>
endif; // The if ( 0 !== twentyseventeen_panel_count() ) ends here.
?>
</main><!-- #main -->
</div><!-- #primary -->
<?php get_footer();
<?php
get_footer();

View file

@ -59,43 +59,54 @@ function twentyseventeen_setup() {
$GLOBALS['content_width'] = 525;
// This theme uses wp_nav_menu() in two locations.
register_nav_menus( array(
'top' => __( 'Top Menu', 'twentyseventeen' ),
'social' => __( 'Social Links Menu', 'twentyseventeen' ),
) );
register_nav_menus(
array(
'top' => __( 'Top Menu', 'twentyseventeen' ),
'social' => __( 'Social Links Menu', 'twentyseventeen' ),
)
);
/*
* Switch default core markup for search form, comment form, and comments
* to output valid HTML5.
*/
add_theme_support( 'html5', array(
'comment-form',
'comment-list',
'gallery',
'caption',
) );
add_theme_support(
'html5',
array(
'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',
'audio',
) );
add_theme_support(
'post-formats',
array(
'aside',
'image',
'video',
'quote',
'link',
'gallery',
'audio',
)
);
// Add theme support for Custom Logo.
add_theme_support( 'custom-logo', array(
'width' => 250,
'height' => 250,
'flex-width' => true,
) );
add_theme_support(
'custom-logo',
array(
'width' => 250,
'height' => 250,
'flex-width' => true,
)
);
// Add theme support for selective refresh for widgets.
add_theme_support( 'customize-selective-refresh-widgets' );
@ -103,13 +114,13 @@ function twentyseventeen_setup() {
/*
* This theme styles the visual editor to resemble the theme style,
* specifically font, colors, and column width.
*/
*/
add_editor_style( array( 'assets/css/editor-style.css', twentyseventeen_fonts_url() ) );
// Load regular editor styles into the new block-based editor.
add_theme_support( 'editor-styles' );
// Load default block styles.
// Load default block styles.
add_theme_support( 'wp-block-styles' );
// Add support for responsive embeds.
@ -117,7 +128,7 @@ function twentyseventeen_setup() {
// Define and register starter content to showcase the theme on new sites.
$starter_content = array(
'widgets' => array(
'widgets' => array(
// Place three core-defined widgets in the sidebar area.
'sidebar-1' => array(
'text_business_info',
@ -138,15 +149,15 @@ function twentyseventeen_setup() {
),
// Specify the core-defined pages to create and add custom thumbnails to some of them.
'posts' => array(
'posts' => array(
'home',
'about' => array(
'about' => array(
'thumbnail' => '{{image-sandwich}}',
),
'contact' => array(
'contact' => array(
'thumbnail' => '{{image-espresso}}',
),
'blog' => array(
'blog' => array(
'thumbnail' => '{{image-coffee}}',
),
'homepage-section' => array(
@ -158,27 +169,27 @@ function twentyseventeen_setup() {
'attachments' => array(
'image-espresso' => array(
'post_title' => _x( 'Espresso', 'Theme starter content', 'twentyseventeen' ),
'file' => 'assets/images/espresso.jpg', // URL relative to the template directory.
'file' => 'assets/images/espresso.jpg', // URL relative to the template directory.
),
'image-sandwich' => array(
'post_title' => _x( 'Sandwich', 'Theme starter content', 'twentyseventeen' ),
'file' => 'assets/images/sandwich.jpg',
'file' => 'assets/images/sandwich.jpg',
),
'image-coffee' => array(
'image-coffee' => array(
'post_title' => _x( 'Coffee', 'Theme starter content', 'twentyseventeen' ),
'file' => 'assets/images/coffee.jpg',
'file' => 'assets/images/coffee.jpg',
),
),
// Default to a static front page and assign the front and posts pages.
'options' => array(
'show_on_front' => 'page',
'page_on_front' => '{{home}}',
'options' => array(
'show_on_front' => 'page',
'page_on_front' => '{{home}}',
'page_for_posts' => '{{blog}}',
),
// Set the front page section theme mods to the IDs of the core-registered pages.
'theme_mods' => array(
'theme_mods' => array(
'panel_1' => '{{homepage-section}}',
'panel_2' => '{{about}}',
'panel_3' => '{{blog}}',
@ -186,10 +197,10 @@ function twentyseventeen_setup() {
),
// Set up nav menus for each of the two areas registered in the theme.
'nav_menus' => array(
'nav_menus' => array(
// Assign a menu to the "top" location.
'top' => array(
'name' => __( 'Top Menu', 'twentyseventeen' ),
'top' => array(
'name' => __( 'Top Menu', 'twentyseventeen' ),
'items' => array(
'link_home', // Note that the core "home" page is actually a link in case a static front page is not used.
'page_about',
@ -200,7 +211,7 @@ function twentyseventeen_setup() {
// Assign a menu to the "social" location.
'social' => array(
'name' => __( 'Social Links Menu', 'twentyseventeen' ),
'name' => __( 'Social Links Menu', 'twentyseventeen' ),
'items' => array(
'link_yelp',
'link_facebook',
@ -320,35 +331,41 @@ add_filter( 'wp_resource_hints', 'twentyseventeen_resource_hints', 10, 2 );
* @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
*/
function twentyseventeen_widgets_init() {
register_sidebar( array(
'name' => __( 'Blog Sidebar', 'twentyseventeen' ),
'id' => 'sidebar-1',
'description' => __( 'Add widgets here to appear in your sidebar on blog posts and archive pages.', 'twentyseventeen' ),
'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' => __( 'Blog Sidebar', 'twentyseventeen' ),
'id' => 'sidebar-1',
'description' => __( 'Add widgets here to appear in your sidebar on blog posts and archive pages.', 'twentyseventeen' ),
'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' => __( 'Footer 1', 'twentyseventeen' ),
'id' => 'sidebar-2',
'description' => __( 'Add widgets here to appear in your footer.', 'twentyseventeen' ),
'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' => __( 'Footer 1', 'twentyseventeen' ),
'id' => 'sidebar-2',
'description' => __( 'Add widgets here to appear in your footer.', 'twentyseventeen' ),
'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' => __( 'Footer 2', 'twentyseventeen' ),
'id' => 'sidebar-3',
'description' => __( 'Add widgets here to appear in your footer.', 'twentyseventeen' ),
'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' => __( 'Footer 2', 'twentyseventeen' ),
'id' => 'sidebar-3',
'description' => __( 'Add widgets here to appear in your footer.', 'twentyseventeen' ),
'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', 'twentyseventeen_widgets_init' );
@ -366,7 +383,8 @@ function twentyseventeen_excerpt_more( $link ) {
return $link;
}
$link = sprintf( '<p class="link-more"><a href="%1$s" class="more-link">%2$s</a></p>',
$link = sprintf(
'<p class="link-more"><a href="%1$s" class="more-link">%2$s</a></p>',
esc_url( get_permalink( get_the_ID() ) ),
/* translators: %s: Name of current post */
sprintf( __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ), get_the_title( get_the_ID() ) )
@ -392,7 +410,7 @@ add_action( 'wp_head', 'twentyseventeen_javascript_detection', 0 );
*/
function twentyseventeen_pingback_header() {
if ( is_singular() && pings_open() ) {
printf( '<link rel="pingback" href="%s">' . "\n", get_bloginfo( 'pingback_url' ) );
printf( '<link rel="pingback" href="%s">' . "\n", esc_url( get_bloginfo( 'pingback_url' ) ) );
}
}
add_action( 'wp_head', 'twentyseventeen_pingback_header' );
@ -407,15 +425,21 @@ function twentyseventeen_colors_css_wrap() {
require_once( get_parent_theme_file_path( '/inc/color-patterns.php' ) );
$hue = absint( get_theme_mod( 'colorscheme_hue', 250 ) );
?>
<style type="text/css" id="custom-theme-colors" <?php if ( is_customize_preview() ) { echo 'data-hue="' . $hue . '"'; } ?>>
$customize_preview_data_hue = '';
if ( is_customize_preview() ) {
$customize_preview_data_hue = 'data-hue="' . $hue . '"';
}
?>
<style type="text/css" id="custom-theme-colors" <?php echo $customize_preview_data_hue; ?>>
<?php echo twentyseventeen_custom_colors_css(); ?>
</style>
<?php }
<?php
}
add_action( 'wp_head', 'twentyseventeen_colors_css_wrap' );
/**
* Enqueue scripts and styles.
* Enqueues scripts and styles.
*/
function twentyseventeen_scripts() {
// Add custom fonts, used in the main stylesheet.
@ -449,14 +473,19 @@ function twentyseventeen_scripts() {
wp_enqueue_script( 'twentyseventeen-skip-link-focus-fix', get_theme_file_uri( '/assets/js/skip-link-focus-fix.js' ), array(), '1.0', true );
$twentyseventeen_l10n = array(
'quote' => twentyseventeen_get_svg( array( 'icon' => 'quote-right' ) ),
'quote' => twentyseventeen_get_svg( array( 'icon' => 'quote-right' ) ),
);
if ( has_nav_menu( 'top' ) ) {
wp_enqueue_script( 'twentyseventeen-navigation', get_theme_file_uri( '/assets/js/navigation.js' ), array( 'jquery' ), '1.0', true );
$twentyseventeen_l10n['expand'] = __( 'Expand child menu', 'twentyseventeen' );
$twentyseventeen_l10n['collapse'] = __( 'Collapse child menu', 'twentyseventeen' );
$twentyseventeen_l10n['icon'] = twentyseventeen_get_svg( array( 'icon' => 'angle-down', 'fallback' => true ) );
$twentyseventeen_l10n['expand'] = __( 'Expand child menu', 'twentyseventeen' );
$twentyseventeen_l10n['collapse'] = __( 'Collapse child menu', 'twentyseventeen' );
$twentyseventeen_l10n['icon'] = twentyseventeen_get_svg(
array(
'icon' => 'angle-down',
'fallback' => true,
)
);
}
wp_enqueue_script( 'twentyseventeen-global', get_theme_file_uri( '/assets/js/global.js' ), array( 'jquery' ), '1.0', true );
@ -472,7 +501,7 @@ function twentyseventeen_scripts() {
add_action( 'wp_enqueue_scripts', 'twentyseventeen_scripts' );
/**
* Enqueue styles for the block-based editor.
* Enqueues styles for the block-based editor.
*
* @since Twenty Seventeen 1.8
*/
@ -504,7 +533,7 @@ function twentyseventeen_content_image_sizes_attr( $sizes, $size ) {
if ( is_active_sidebar( 'sidebar-1' ) || is_archive() || is_search() || is_home() || is_page() ) {
if ( ! ( is_page() && 'one-column' === get_theme_mod( 'page_options' ) ) && 767 <= $width ) {
$sizes = '(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px';
$sizes = '(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px';
}
}
@ -564,7 +593,7 @@ add_filter( 'wp_get_attachment_image_attributes', 'twentyseventeen_post_thumbnai
function twentyseventeen_front_page_template( $template ) {
return is_home() ? '' : $template;
}
add_filter( 'frontpage_template', 'twentyseventeen_front_page_template' );
add_filter( 'frontpage_template', 'twentyseventeen_front_page_template' );
/**
* Modifies tag cloud widget arguments to display all tags in the same font size

View file

@ -23,6 +23,7 @@
</head>
<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<div id="page" class="site">
<a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'twentyseventeen' ); ?></a>

View file

@ -48,9 +48,13 @@ function twentyseventeen_upgrade_notice() {
* @global string $wp_version WordPress version.
*/
function twentyseventeen_customize() {
wp_die( sprintf( __( 'Twenty Seventeen requires at least WordPress version 4.7. You are running version %s. Please upgrade and try again.', 'twentyseventeen' ), $GLOBALS['wp_version'] ), '', array(
'back_link' => true,
) );
wp_die(
sprintf( __( 'Twenty Seventeen requires at least WordPress version 4.7. You are running version %s. Please upgrade and try again.', 'twentyseventeen' ), $GLOBALS['wp_version'] ),
'',
array(
'back_link' => true,
)
);
}
add_action( 'load-customize.php', 'twentyseventeen_customize' );

View file

@ -20,10 +20,10 @@ function twentyseventeen_custom_colors_css() {
*
* @param int $saturation Color saturation level.
*/
$saturation = absint( apply_filters( 'twentyseventeen_custom_colors_saturation', 50 ) );
$saturation = absint( apply_filters( 'twentyseventeen_custom_colors_saturation', 50 ) );
$reduced_saturation = ( .8 * $saturation ) . '%';
$saturation = $saturation . '%';
$css = '
$saturation = $saturation . '%';
$css = '
/**
* Twenty Seventeen: Color Patterns
*
@ -307,7 +307,7 @@ body.colors-custom,
color: hsl( ' . $hue . ', ' . $saturation . ', 46% ); /* base: #767676; */
}
.colors-custom button:hover,
.colors-custom button:hover:not( .mejs-container > button ),
.colors-custom button:focus,
.colors-custom input[type="button"]:hover,
.colors-custom input[type="button"]:focus,

View file

@ -24,65 +24,73 @@ function twentyseventeen_custom_header_setup() {
* @param array $args {
* An array of custom-header support arguments.
*
* @type string $default-image Default image of the header.
* @type string $default_text_color Default color of the header text.
* @type string $default-image Default image of the header.
* @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 $flex-height Flex support for height of header.
* @type string $video Video support for header.
* @type string $wp-head-callback Callback function used to styles the header image and text
* displayed on the blog.
* @type string $flex-height Flex support for height of header.
* }
*/
add_theme_support( 'custom-header', apply_filters( 'twentyseventeen_custom_header_args', array(
'default-image' => get_parent_theme_file_uri( '/assets/images/header.jpg' ),
'width' => 2000,
'height' => 1200,
'flex-height' => true,
'video' => true,
'wp-head-callback' => 'twentyseventeen_header_style',
) ) );
add_theme_support(
'custom-header',
apply_filters(
'twentyseventeen_custom_header_args',
array(
'default-image' => get_parent_theme_file_uri( '/assets/images/header.jpg' ),
'width' => 2000,
'height' => 1200,
'flex-height' => true,
'video' => true,
'wp-head-callback' => 'twentyseventeen_header_style',
)
)
);
register_default_headers( array(
'default-image' => array(
'url' => '%s/assets/images/header.jpg',
'thumbnail_url' => '%s/assets/images/header.jpg',
'description' => __( 'Default Header Image', 'twentyseventeen' ),
),
) );
register_default_headers(
array(
'default-image' => array(
'url' => '%s/assets/images/header.jpg',
'thumbnail_url' => '%s/assets/images/header.jpg',
'description' => __( 'Default Header Image', 'twentyseventeen' ),
),
)
);
}
add_action( 'after_setup_theme', 'twentyseventeen_custom_header_setup' );
if ( ! function_exists( 'twentyseventeen_header_style' ) ) :
/**
* Styles the header image and text displayed on the blog.
*
* @see twentyseventeen_custom_header_setup().
*/
function twentyseventeen_header_style() {
$header_text_color = get_header_textcolor();
/**
* Styles the header image and text displayed on the blog.
*
* @see twentyseventeen_custom_header_setup().
*/
function twentyseventeen_header_style() {
$header_text_color = get_header_textcolor();
// If no custom options for text are set, let's bail.
// get_header_textcolor() options: add_theme_support( 'custom-header' ) is default, hide text (returns 'blank') or any hex value.
if ( get_theme_support( 'custom-header', 'default-text-color' ) === $header_text_color ) {
return;
}
// If no custom options for text are set, let's bail.
// get_header_textcolor() options: add_theme_support( 'custom-header' ) is default, hide text (returns 'blank') or any hex value.
if ( get_theme_support( 'custom-header', 'default-text-color' ) === $header_text_color ) {
return;
}
// If we get this far, we have custom styles. Let's do this.
?>
<style id="twentyseventeen-custom-header-styles" type="text/css">
<?php
// If we get this far, we have custom styles. Let's do this.
?>
<style id="twentyseventeen-custom-header-styles" type="text/css">
<?php
// Has the text been hidden?
if ( 'blank' === $header_text_color ) :
?>
?>
.site-title,
.site-description {
position: absolute;
clip: rect(1px, 1px, 1px, 1px);
}
<?php
// If the user has set a custom color for the text use that.
<?php
// If the user has set a custom color for the text use that.
else :
?>
?>
.site-title a,
.colors-dark .site-title a,
.colors-custom .site-title a,
@ -105,8 +113,8 @@ function twentyseventeen_header_style() {
}
<?php endif; ?>
</style>
<?php
}
<?php
}
endif; // End of twentyseventeen_header_style.
/**
@ -116,7 +124,7 @@ endif; // End of twentyseventeen_header_style.
* @return array The filtered video settings.
*/
function twentyseventeen_video_controls( $settings ) {
$settings['l10n']['play'] = '<span class="screen-reader-text">' . __( 'Play background video', 'twentyseventeen' ) . '</span>' . twentyseventeen_get_svg( array( 'icon' => 'play' ) );
$settings['l10n']['play'] = '<span class="screen-reader-text">' . __( 'Play background video', 'twentyseventeen' ) . '</span>' . twentyseventeen_get_svg( array( 'icon' => 'play' ) );
$settings['l10n']['pause'] = '<span class="screen-reader-text">' . __( 'Pause background video', 'twentyseventeen' ) . '</span>' . twentyseventeen_get_svg( array( 'icon' => 'pause' ) );
return $settings;
}

View file

@ -13,77 +13,107 @@
* @param WP_Customize_Manager $wp_customize Theme Customizer object.
*/
function twentyseventeen_customize_register( $wp_customize ) {
$wp_customize->get_setting( 'blogname' )->transport = 'postMessage';
$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';
$wp_customize->get_setting( 'blogname' )->transport = 'postMessage';
$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';
$wp_customize->selective_refresh->add_partial( 'blogname', array(
'selector' => '.site-title a',
'render_callback' => 'twentyseventeen_customize_partial_blogname',
) );
$wp_customize->selective_refresh->add_partial( 'blogdescription', array(
'selector' => '.site-description',
'render_callback' => 'twentyseventeen_customize_partial_blogdescription',
) );
$wp_customize->selective_refresh->add_partial(
'blogname',
array(
'selector' => '.site-title a',
'render_callback' => 'twentyseventeen_customize_partial_blogname',
)
);
$wp_customize->selective_refresh->add_partial(
'blogdescription',
array(
'selector' => '.site-description',
'render_callback' => 'twentyseventeen_customize_partial_blogdescription',
)
);
/**
* Custom colors.
*/
$wp_customize->add_setting( 'colorscheme', array(
'default' => 'light',
'transport' => 'postMessage',
'sanitize_callback' => 'twentyseventeen_sanitize_colorscheme',
) );
$wp_customize->add_setting(
'colorscheme',
array(
'default' => 'light',
'transport' => 'postMessage',
'sanitize_callback' => 'twentyseventeen_sanitize_colorscheme',
)
);
$wp_customize->add_setting( 'colorscheme_hue', array(
'default' => 250,
'transport' => 'postMessage',
'sanitize_callback' => 'absint', // The hue is stored as a positive integer.
) );
$wp_customize->add_setting(
'colorscheme_hue',
array(
'default' => 250,
'transport' => 'postMessage',
'sanitize_callback' => 'absint', // The hue is stored as a positive integer.
)
);
$wp_customize->add_control( 'colorscheme', array(
'type' => 'radio',
'label' => __( 'Color Scheme', 'twentyseventeen' ),
'choices' => array(
'light' => __( 'Light', 'twentyseventeen' ),
'dark' => __( 'Dark', 'twentyseventeen' ),
'custom' => __( 'Custom', 'twentyseventeen' ),
),
'section' => 'colors',
'priority' => 5,
) );
$wp_customize->add_control(
'colorscheme',
array(
'type' => 'radio',
'label' => __( 'Color Scheme', 'twentyseventeen' ),
'choices' => array(
'light' => __( 'Light', 'twentyseventeen' ),
'dark' => __( 'Dark', 'twentyseventeen' ),
'custom' => __( 'Custom', 'twentyseventeen' ),
),
'section' => 'colors',
'priority' => 5,
)
);
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'colorscheme_hue', array(
'mode' => 'hue',
'section' => 'colors',
'priority' => 6,
) ) );
$wp_customize->add_control(
new WP_Customize_Color_Control(
$wp_customize,
'colorscheme_hue',
array(
'mode' => 'hue',
'section' => 'colors',
'priority' => 6,
)
)
);
/**
* Theme options.
*/
$wp_customize->add_section( 'theme_options', array(
'title' => __( 'Theme Options', 'twentyseventeen' ),
'priority' => 130, // Before Additional CSS.
) );
$wp_customize->add_section(
'theme_options',
array(
'title' => __( 'Theme Options', 'twentyseventeen' ),
'priority' => 130, // Before Additional CSS.
)
);
$wp_customize->add_setting( 'page_layout', array(
'default' => 'two-column',
'sanitize_callback' => 'twentyseventeen_sanitize_page_layout',
'transport' => 'postMessage',
) );
$wp_customize->add_setting(
'page_layout',
array(
'default' => 'two-column',
'sanitize_callback' => 'twentyseventeen_sanitize_page_layout',
'transport' => 'postMessage',
)
);
$wp_customize->add_control( 'page_layout', array(
'label' => __( 'Page Layout', 'twentyseventeen' ),
'section' => 'theme_options',
'type' => 'radio',
'description' => __( 'When the two-column layout is assigned, the page title is in one column and content is in the other.', 'twentyseventeen' ),
'choices' => array(
'one-column' => __( 'One Column', 'twentyseventeen' ),
'two-column' => __( 'Two Column', 'twentyseventeen' ),
),
'active_callback' => 'twentyseventeen_is_view_with_layout_option',
) );
$wp_customize->add_control(
'page_layout',
array(
'label' => __( 'Page Layout', 'twentyseventeen' ),
'section' => 'theme_options',
'type' => 'radio',
'description' => __( 'When the two-column layout is assigned, the page title is in one column and content is in the other.', 'twentyseventeen' ),
'choices' => array(
'one-column' => __( 'One Column', 'twentyseventeen' ),
'two-column' => __( 'Two Column', 'twentyseventeen' ),
),
'active_callback' => 'twentyseventeen_is_view_with_layout_option',
)
);
/**
* Filter number of front page sections in Twenty Seventeen.
@ -96,27 +126,36 @@ function twentyseventeen_customize_register( $wp_customize ) {
// Create a setting and control for each of the sections available in the theme.
for ( $i = 1; $i < ( 1 + $num_sections ); $i++ ) {
$wp_customize->add_setting( 'panel_' . $i, array(
'default' => false,
'sanitize_callback' => 'absint',
'transport' => 'postMessage',
) );
$wp_customize->add_setting(
'panel_' . $i,
array(
'default' => false,
'sanitize_callback' => 'absint',
'transport' => 'postMessage',
)
);
$wp_customize->add_control( 'panel_' . $i, array(
/* translators: %d is the front page section number */
'label' => sprintf( __( 'Front Page Section %d Content', 'twentyseventeen' ), $i ),
'description' => ( 1 !== $i ? '' : __( 'Select pages to feature in each area from the dropdowns. Add an image to a section by setting a featured image in the page editor. Empty sections will not be displayed.', 'twentyseventeen' ) ),
'section' => 'theme_options',
'type' => 'dropdown-pages',
'allow_addition' => true,
'active_callback' => 'twentyseventeen_is_static_front_page',
) );
$wp_customize->add_control(
'panel_' . $i,
array(
/* translators: %d is the front page section number */
'label' => sprintf( __( 'Front Page Section %d Content', 'twentyseventeen' ), $i ),
'description' => ( 1 !== $i ? '' : __( 'Select pages to feature in each area from the dropdowns. Add an image to a section by setting a featured image in the page editor. Empty sections will not be displayed.', 'twentyseventeen' ) ),
'section' => 'theme_options',
'type' => 'dropdown-pages',
'allow_addition' => true,
'active_callback' => 'twentyseventeen_is_static_front_page',
)
);
$wp_customize->selective_refresh->add_partial( 'panel_' . $i, array(
'selector' => '#panel' . $i,
'render_callback' => 'twentyseventeen_front_page_section',
'container_inclusive' => true,
) );
$wp_customize->selective_refresh->add_partial(
'panel_' . $i,
array(
'selector' => '#panel' . $i,
'render_callback' => 'twentyseventeen_front_page_section',
'container_inclusive' => true,
)
);
}
}
add_action( 'customize_register', 'twentyseventeen_customize_register' );

View file

@ -46,10 +46,10 @@ function twentyseventeen_get_svg( $args = array() ) {
// Set defaults.
$defaults = array(
'icon' => '',
'title' => '',
'desc' => '',
'fallback' => false,
'icon' => '',
'title' => '',
'desc' => '',
'fallback' => false,
);
// Parse args.

View file

@ -59,7 +59,7 @@ function twentyseventeen_body_classes( $classes ) {
}
// Get the colorscheme or the default if there isn't one.
$colors = twentyseventeen_sanitize_colorscheme( get_theme_mod( 'colorscheme', 'light' ) );
$colors = twentyseventeen_sanitize_colorscheme( get_theme_mod( 'colorscheme', 'light' ) );
$classes[] = 'colors-' . $colors;
return $classes;
@ -95,7 +95,7 @@ function twentyseventeen_panel_count() {
}
/**
* Checks to see if we're on the homepage or not.
* Checks to see if we're on the front page or not.
*/
function twentyseventeen_is_frontpage() {
return ( is_front_page() && ! is_home() );

View file

@ -10,83 +10,84 @@
*/
if ( ! function_exists( 'twentyseventeen_posted_on' ) ) :
/**
* Prints HTML with meta information for the current post-date/time and author.
*/
function twentyseventeen_posted_on() {
/**
* Prints HTML with meta information for the current post-date/time and author.
*/
function twentyseventeen_posted_on() {
// Get the author name; wrap it in a link.
$byline = sprintf(
/* translators: %s: post author */
__( 'by %s', 'twentyseventeen' ),
'<span class="author vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '">' . get_the_author() . '</a></span>'
);
// Get the author name; wrap it in a link.
$byline = sprintf(
/* translators: %s: post author */
__( 'by %s', 'twentyseventeen' ),
'<span class="author vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '">' . get_the_author() . '</a></span>'
);
// Finally, let's write all of this to the page.
echo '<span class="posted-on">' . twentyseventeen_time_link() . '</span><span class="byline"> ' . $byline . '</span>';
}
// Finally, let's write all of this to the page.
echo '<span class="posted-on">' . twentyseventeen_time_link() . '</span><span class="byline"> ' . $byline . '</span>';
}
endif;
if ( ! function_exists( 'twentyseventeen_time_link' ) ) :
/**
* Gets a nicely formatted string for the published date.
*/
function twentyseventeen_time_link() {
$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>';
/**
* Gets a nicely formatted string for the published date.
*/
function twentyseventeen_time_link() {
$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>';
}
$time_string = sprintf(
$time_string,
get_the_date( DATE_W3C ),
get_the_date(),
get_the_modified_date( DATE_W3C ),
get_the_modified_date()
);
// Wrap the time string in a link, and preface it with 'Posted on'.
return sprintf(
/* translators: %s: post date */
__( '<span class="screen-reader-text">Posted on</span> %s', 'twentyseventeen' ),
'<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' . $time_string . '</a>'
);
}
$time_string = sprintf( $time_string,
get_the_date( DATE_W3C ),
get_the_date(),
get_the_modified_date( DATE_W3C ),
get_the_modified_date()
);
// Wrap the time string in a link, and preface it with 'Posted on'.
return sprintf(
/* translators: %s: post date */
__( '<span class="screen-reader-text">Posted on</span> %s', 'twentyseventeen' ),
'<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' . $time_string . '</a>'
);
}
endif;
if ( ! function_exists( 'twentyseventeen_entry_footer' ) ) :
/**
* Prints HTML with meta information for the categories, tags and comments.
*/
function twentyseventeen_entry_footer() {
/**
* Prints HTML with meta information for the categories, tags and comments.
*/
function twentyseventeen_entry_footer() {
/* translators: used between list items, there is a space after the comma */
$separate_meta = __( ', ', 'twentyseventeen' );
/* translators: used between list items, there is a space after the comma */
$separate_meta = __( ', ', 'twentyseventeen' );
// Get Categories for posts.
$categories_list = get_the_category_list( $separate_meta );
// Get Categories for posts.
$categories_list = get_the_category_list( $separate_meta );
// Get Tags for posts.
$tags_list = get_the_tag_list( '', $separate_meta );
// Get Tags for posts.
$tags_list = get_the_tag_list( '', $separate_meta );
// We don't want to output .entry-footer if it will be empty, so make sure its not.
if ( ( ( twentyseventeen_categorized_blog() && $categories_list ) || $tags_list ) || get_edit_post_link() ) {
// We don't want to output .entry-footer if it will be empty, so make sure its not.
if ( ( ( twentyseventeen_categorized_blog() && $categories_list ) || $tags_list ) || get_edit_post_link() ) {
echo '<footer class="entry-footer">';
echo '<footer class="entry-footer">';
if ( 'post' === get_post_type() ) {
if ( ( $categories_list && twentyseventeen_categorized_blog() ) || $tags_list ) {
echo '<span class="cat-tags-links">';
// Make sure there's more than one category before displaying.
if ( $categories_list && twentyseventeen_categorized_blog() ) {
echo '<span class="cat-links">' . twentyseventeen_get_svg( array( 'icon' => 'folder-open' ) ) . '<span class="screen-reader-text">' . __( 'Categories', 'twentyseventeen' ) . '</span>' . $categories_list . '</span>';
}
if ( $categories_list && twentyseventeen_categorized_blog() ) {
echo '<span class="cat-links">' . twentyseventeen_get_svg( array( 'icon' => 'folder-open' ) ) . '<span class="screen-reader-text">' . __( 'Categories', 'twentyseventeen' ) . '</span>' . $categories_list . '</span>';
}
if ( $tags_list && ! is_wp_error( $tags_list ) ) {
echo '<span class="tags-links">' . twentyseventeen_get_svg( array( 'icon' => 'hashtag' ) ) . '<span class="screen-reader-text">' . __( 'Tags', 'twentyseventeen' ) . '</span>' . $tags_list . '</span>';
}
if ( $tags_list && ! is_wp_error( $tags_list ) ) {
echo '<span class="tags-links">' . twentyseventeen_get_svg( array( 'icon' => 'hashtag' ) ) . '<span class="screen-reader-text">' . __( 'Tags', 'twentyseventeen' ) . '</span>' . $tags_list . '</span>';
}
echo '</span>';
}
@ -94,32 +95,32 @@ function twentyseventeen_entry_footer() {
twentyseventeen_edit_link();
echo '</footer> <!-- .entry-footer -->';
echo '</footer> <!-- .entry-footer -->';
}
}
}
endif;
if ( ! function_exists( 'twentyseventeen_edit_link' ) ) :
/**
* Returns an accessibility-friendly link to edit a post or page.
*
* This also gives us a little context about what exactly we're editing
* (post or page?) so that users understand a bit more where they are in terms
* of the template hierarchy and their content. Helpful when/if the single-page
* layout with multiple posts/pages shown gets confusing.
*/
function twentyseventeen_edit_link() {
edit_post_link(
sprintf(
/* translators: %s: Name of current post */
__( 'Edit<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
get_the_title()
),
'<span class="edit-link">',
'</span>'
);
}
/**
* Returns an accessibility-friendly link to edit a post or page.
*
* This also gives us a little context about what exactly we're editing
* (post or page?) so that users understand a bit more where they are in terms
* of the template hierarchy and their content. Helpful when/if the single-page
* layout with multiple posts/pages shown gets confusing.
*/
function twentyseventeen_edit_link() {
edit_post_link(
sprintf(
/* translators: %s: Name of current post */
__( 'Edit<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
get_the_title()
),
'<span class="edit-link">',
'</span>'
);
}
endif;
/**
@ -132,7 +133,7 @@ function twentyseventeen_front_page_section( $partial = null, $id = 0 ) {
if ( is_a( $partial, 'WP_Customize_Partial' ) ) {
// Find out the id and set it up during a selective refresh.
global $twentyseventeencounter;
$id = str_replace( 'panel_', '', $partial->id );
$id = str_replace( 'panel_', '', $partial->id );
$twentyseventeencounter = $id;
}
@ -161,12 +162,14 @@ function twentyseventeen_categorized_blog() {
if ( false === $category_count ) {
// Create an array of all the categories that are attached to posts.
$categories = get_categories( array(
'fields' => 'ids',
'hide_empty' => 1,
// We only need to know if there is more than one category.
'number' => 2,
) );
$categories = get_categories(
array(
'fields' => 'ids',
'hide_empty' => 1,
// 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.
$category_count = count( $categories );
@ -194,4 +197,22 @@ function twentyseventeen_category_transient_flusher() {
delete_transient( 'twentyseventeen_categories' );
}
add_action( 'edit_category', 'twentyseventeen_category_transient_flusher' );
add_action( 'save_post', 'twentyseventeen_category_transient_flusher' );
add_action( 'save_post', 'twentyseventeen_category_transient_flusher' );
if ( ! function_exists( 'wp_body_open' ) ) :
/**
* Fire the wp_body_open action.
*
* Added for backwards compatibility to support pre 5.2.0 WordPress versions.
*
* @since Twenty Seventeen 2.2
*/
function wp_body_open() {
/**
* Triggered after the opening <body> tag.
*
* @since Twenty Seventeen 2.2
*/
do_action( 'wp_body_open' );
}
endif;

View file

@ -7,7 +7,7 @@
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
*
* @link https://codex.wordpress.org/Template_Hierarchy
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package WordPress
* @subpackage Twenty_Seventeen
@ -35,7 +35,8 @@ get_header(); ?>
if ( have_posts() ) :
/* Start the Loop */
while ( have_posts() ) : the_post();
while ( have_posts() ) :
the_post();
/*
* Include the Post-Format-specific template for the content.
@ -46,11 +47,13 @@ get_header(); ?>
endwhile;
the_posts_pagination( array(
'prev_text' => twentyseventeen_get_svg( array( 'icon' => 'arrow-left' ) ) . '<span class="screen-reader-text">' . __( 'Previous page', 'twentyseventeen' ) . '</span>',
'next_text' => '<span class="screen-reader-text">' . __( 'Next page', 'twentyseventeen' ) . '</span>' . twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ),
'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyseventeen' ) . ' </span>',
) );
the_posts_pagination(
array(
'prev_text' => twentyseventeen_get_svg( array( 'icon' => 'arrow-left' ) ) . '<span class="screen-reader-text">' . __( 'Previous page', 'twentyseventeen' ) . '</span>',
'next_text' => '<span class="screen-reader-text">' . __( 'Next page', 'twentyseventeen' ) . '</span>' . twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ),
'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyseventeen' ) . ' </span>',
)
);
else :
@ -64,4 +67,5 @@ get_header(); ?>
<?php get_sidebar(); ?>
</div><!-- .wrap -->
<?php get_footer();
<?php
get_footer();

View file

@ -7,7 +7,7 @@
* and that other 'pages' on your WordPress site may use a
* different template.
*
* @link https://codex.wordpress.org/Template_Hierarchy
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package WordPress
* @subpackage Twenty_Seventeen
@ -22,7 +22,8 @@ get_header(); ?>
<main id="main" class="site-main" role="main">
<?php
while ( have_posts() ) : the_post();
while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/page/content', 'page' );
@ -38,4 +39,5 @@ get_header(); ?>
</div><!-- #primary -->
</div><!-- .wrap -->
<?php get_footer();
<?php
get_footer();

View file

@ -28,7 +28,8 @@ get_header(); ?>
<?php
if ( have_posts() ) :
/* Start the Loop */
while ( have_posts() ) : the_post();
while ( have_posts() ) :
the_post();
/**
* Run the loop for the search to output the results.
@ -39,13 +40,16 @@ get_header(); ?>
endwhile; // End of the loop.
the_posts_pagination( array(
'prev_text' => twentyseventeen_get_svg( array( 'icon' => 'arrow-left' ) ) . '<span class="screen-reader-text">' . __( 'Previous page', 'twentyseventeen' ) . '</span>',
'next_text' => '<span class="screen-reader-text">' . __( 'Next page', 'twentyseventeen' ) . '</span>' . twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ),
'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyseventeen' ) . ' </span>',
) );
the_posts_pagination(
array(
'prev_text' => twentyseventeen_get_svg( array( 'icon' => 'arrow-left' ) ) . '<span class="screen-reader-text">' . __( 'Previous page', 'twentyseventeen' ) . '</span>',
'next_text' => '<span class="screen-reader-text">' . __( 'Next page', 'twentyseventeen' ) . '</span>' . twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ),
'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyseventeen' ) . ' </span>',
)
);
else : ?>
else :
?>
<p><?php _e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'twentyseventeen' ); ?></p>
<?php
@ -59,4 +63,5 @@ get_header(); ?>
<?php get_sidebar(); ?>
</div><!-- .wrap -->
<?php get_footer();
<?php
get_footer();

View file

@ -18,7 +18,8 @@ get_header(); ?>
<?php
/* Start the Loop */
while ( have_posts() ) : the_post();
while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/post/content', get_post_format() );
@ -27,10 +28,12 @@ get_header(); ?>
comments_template();
endif;
the_post_navigation( array(
'prev_text' => '<span class="screen-reader-text">' . __( 'Previous Post', 'twentyseventeen' ) . '</span><span aria-hidden="true" class="nav-subtitle">' . __( 'Previous', 'twentyseventeen' ) . '</span> <span class="nav-title"><span class="nav-title-icon-wrapper">' . twentyseventeen_get_svg( array( 'icon' => 'arrow-left' ) ) . '</span>%title</span>',
'next_text' => '<span class="screen-reader-text">' . __( 'Next Post', 'twentyseventeen' ) . '</span><span aria-hidden="true" class="nav-subtitle">' . __( 'Next', 'twentyseventeen' ) . '</span> <span class="nav-title">%title<span class="nav-title-icon-wrapper">' . twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ) . '</span></span>',
) );
the_post_navigation(
array(
'prev_text' => '<span class="screen-reader-text">' . __( 'Previous Post', 'twentyseventeen' ) . '</span><span aria-hidden="true" class="nav-subtitle">' . __( 'Previous', 'twentyseventeen' ) . '</span> <span class="nav-title"><span class="nav-title-icon-wrapper">' . twentyseventeen_get_svg( array( 'icon' => 'arrow-left' ) ) . '</span>%title</span>',
'next_text' => '<span class="screen-reader-text">' . __( 'Next Post', 'twentyseventeen' ) . '</span><span aria-hidden="true" class="nav-subtitle">' . __( 'Next', 'twentyseventeen' ) . '</span> <span class="nav-title">%title<span class="nav-title-icon-wrapper">' . twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ) . '</span></span>',
)
);
endwhile; // End of the loop.
?>
@ -40,4 +43,5 @@ get_header(); ?>
<?php get_sidebar(); ?>
</div><!-- .wrap -->
<?php get_footer();
<?php
get_footer();

View file

@ -4,7 +4,7 @@ Theme URI: https://wordpress.org/themes/twentyseventeen/
Author: the WordPress team
Author URI: https://wordpress.org/
Description: Twenty Seventeen brings your site to life with header video and immersive featured images. With a focus on business sites, it features multiple sections on the front page as well as widgets, navigation and social menus, a logo, and more. Personalize its asymmetrical grid with a custom color scheme and showcase your multimedia content with post formats. Our default theme for 2017 works great in many languages, for any abilities, and on any device.
Version: 2.0
Version: 2.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: twentyseventeen
@ -1034,7 +1034,7 @@ input[type="submit"].secondary {
color: #222;
}
button:hover,
button:hover:not( .mejs-container > button ),
button:focus,
input[type="button"]:hover,
input[type="button"]:focus,
@ -1646,6 +1646,7 @@ body.home.title-tagline-hidden.has-header-video .custom-logo-link img {
body:not(.title-tagline-hidden) .site-branding-text {
display: inline-block;
max-width: 100%;
vertical-align: middle;
}
@ -1748,7 +1749,6 @@ body:not(.title-tagline-hidden) .site-branding-text {
@supports ( object-fit: cover ) {
.has-header-image .custom-header-media img,
.has-header-video .custom-header-media video,
.has-header-video .custom-header-media iframe,
.has-header-image:not(.twentyseventeen-front-page):not(.home) .custom-header-media img {
height: 100%;
left: 0;

View file

@ -12,17 +12,20 @@
<?php
if ( is_active_sidebar( 'sidebar-2' ) ||
is_active_sidebar( 'sidebar-3' ) ) :
?>
is_active_sidebar( 'sidebar-3' ) ) :
?>
<aside class="widget-area" role="complementary" aria-label="<?php esc_attr_e( 'Footer', 'twentyseventeen' ); ?>">
<?php
if ( is_active_sidebar( 'sidebar-2' ) ) { ?>
if ( is_active_sidebar( 'sidebar-2' ) ) {
?>
<div class="widget-column footer-widget-1">
<?php dynamic_sidebar( 'sidebar-2' ); ?>
</div>
<?php }
if ( is_active_sidebar( 'sidebar-3' ) ) { ?>
<?php
}
if ( is_active_sidebar( 'sidebar-3' ) ) {
?>
<div class="widget-column footer-widget-2">
<?php dynamic_sidebar( 'sidebar-3' ); ?>
</div>

View file

@ -25,7 +25,7 @@
$description = get_bloginfo( 'description', 'display' );
if ( $description || is_customize_preview() ) :
?>
?>
<p class="site-description"><?php echo $description; ?></p>
<?php endif; ?>
</div><!-- .site-branding-text -->

View file

@ -18,10 +18,14 @@
?>
</button>
<?php wp_nav_menu( array(
'theme_location' => 'top',
'menu_id' => 'top-menu',
) ); ?>
<?php
wp_nav_menu(
array(
'theme_location' => 'top',
'menu_id' => 'top-menu',
)
);
?>
<?php if ( ( twentyseventeen_is_frontpage() || ( is_home() && is_front_page() ) ) && has_custom_header() ) : ?>
<a href="#content" class="menu-scroll-down"><?php echo twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ); ?><span class="screen-reader-text"><?php _e( 'Scroll down to content', 'twentyseventeen' ); ?></span></a>

View file

@ -14,7 +14,8 @@ global $twentyseventeencounter;
<article id="panel<?php echo $twentyseventeencounter; ?>" <?php post_class( 'twentyseventeen-panel ' ); ?> >
<?php if ( has_post_thumbnail() ) :
<?php
if ( has_post_thumbnail() ) :
$thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'twentyseventeen-featured-image' );
// Calculate aspect ratio: h / w * 100%.
@ -39,32 +40,39 @@ global $twentyseventeencounter;
<div class="entry-content">
<?php
/* translators: %s: Name of current post */
the_content( sprintf(
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
get_the_title()
) );
?>
the_content(
sprintf(
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
get_the_title()
)
);
?>
</div><!-- .entry-content -->
<?php
// Show recent blog posts if is blog posts page (Note that get_option returns a string, so we're casting the result as an int).
if ( get_the_ID() === (int) get_option( 'page_for_posts' ) ) : ?>
<?php // Show four most recent posts.
$recent_posts = new WP_Query( array(
'posts_per_page' => 3,
'post_status' => 'publish',
'ignore_sticky_posts' => true,
'no_found_rows' => true,
) );
if ( get_the_ID() === (int) get_option( 'page_for_posts' ) ) :
?>
<?php if ( $recent_posts->have_posts() ) : ?>
<?php
// Show three most recent posts.
$recent_posts = new WP_Query(
array(
'posts_per_page' => 3,
'post_status' => 'publish',
'ignore_sticky_posts' => true,
'no_found_rows' => true,
)
);
?>
<?php if ( $recent_posts->have_posts() ) : ?>
<div class="recent-posts">
<?php
while ( $recent_posts->have_posts() ) : $recent_posts->the_post();
while ( $recent_posts->have_posts() ) :
$recent_posts->the_post();
get_template_part( 'template-parts/post/content', 'excerpt' );
endwhile;
wp_reset_postdata();
@ -76,4 +84,4 @@ global $twentyseventeencounter;
</div><!-- .wrap -->
</div><!-- .panel-content -->
</article><!-- #post-## -->
</article><!-- #post-<?php the_ID(); ?> -->

View file

@ -11,7 +11,8 @@
?>
<article id="post-<?php the_ID(); ?>" <?php post_class( 'twentyseventeen-panel ' ); ?> >
<?php if ( has_post_thumbnail() ) :
<?php
if ( has_post_thumbnail() ) :
$thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'twentyseventeen-featured-image' );
// Calculate aspect ratio: h / w * 100%.
@ -36,14 +37,16 @@
<div class="entry-content">
<?php
/* translators: %s: Name of current post */
the_content( sprintf(
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
get_the_title()
) );
?>
the_content(
sprintf(
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
get_the_title()
)
);
?>
</div><!-- .entry-content -->
</div><!-- .wrap -->
</div><!-- .panel-content -->
</article><!-- #post-## -->
</article><!-- #post-<?php the_ID(); ?> -->

View file

@ -2,7 +2,7 @@
/**
* Template part for displaying page content in page.php
*
* @link https://codex.wordpress.org/Template_Hierarchy
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package WordPress
* @subpackage Twenty_Seventeen
@ -21,10 +21,12 @@
<?php
the_content();
wp_link_pages( array(
'before' => '<div class="page-links">' . __( 'Pages:', 'twentyseventeen' ),
'after' => '</div>',
) );
?>
wp_link_pages(
array(
'before' => '<div class="page-links">' . __( 'Pages:', 'twentyseventeen' ),
'after' => '</div>',
)
);
?>
</div><!-- .entry-content -->
</article><!-- #post-## -->
</article><!-- #post-<?php the_ID(); ?> -->

View file

@ -2,7 +2,7 @@
/**
* Template part for displaying audio posts
*
* @link https://codex.wordpress.org/Template_Hierarchy
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package WordPress
* @subpackage Twenty_Seventeen
@ -14,41 +14,41 @@
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php
if ( is_sticky() && is_home() ) {
echo twentyseventeen_get_svg( array( 'icon' => 'thumb-tack' ) );
}
if ( is_sticky() && is_home() ) {
echo twentyseventeen_get_svg( array( 'icon' => 'thumb-tack' ) );
}
?>
<header class="entry-header">
<?php
if ( 'post' === get_post_type() ) {
echo '<div class="entry-meta">';
if ( is_single() ) {
twentyseventeen_posted_on();
} else {
echo twentyseventeen_time_link();
twentyseventeen_edit_link();
};
echo '</div><!-- .entry-meta -->';
};
if ( 'post' === get_post_type() ) {
echo '<div class="entry-meta">';
if ( is_single() ) {
the_title( '<h1 class="entry-title">', '</h1>' );
} elseif ( is_front_page() && is_home() ) {
the_title( '<h3 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h3>' );
twentyseventeen_posted_on();
} else {
the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
}
echo twentyseventeen_time_link();
twentyseventeen_edit_link();
};
echo '</div><!-- .entry-meta -->';
};
if ( is_single() ) {
the_title( '<h1 class="entry-title">', '</h1>' );
} elseif ( is_front_page() && is_home() ) {
the_title( '<h3 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h3>' );
} else {
the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
}
?>
</header><!-- .entry-header -->
<?php
$content = apply_filters( 'the_content', get_the_content() );
$audio = false;
$audio = false;
// Only get audio from the content if a playlist isn't present.
if ( false === strpos( $content, 'wp-playlist-script' ) ) {
$audio = get_media_embedded_in_content( $content, array( 'audio' ) );
}
if ( false === strpos( $content, 'wp-playlist-script' ) ) {
$audio = get_media_embedded_in_content( $content, array( 'audio' ) );
}
?>
@ -79,17 +79,21 @@
if ( is_single() || empty( $audio ) ) {
/* translators: %s: Name of current post */
the_content( sprintf(
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
get_the_title()
) );
the_content(
sprintf(
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
get_the_title()
)
);
wp_link_pages( array(
'before' => '<div class="page-links">' . __( 'Pages:', 'twentyseventeen' ),
'after' => '</div>',
'link_before' => '<span class="page-number">',
'link_after' => '</span>',
) );
wp_link_pages(
array(
'before' => '<div class="page-links">' . __( 'Pages:', 'twentyseventeen' ),
'after' => '</div>',
'link_before' => '<span class="page-number">',
'link_after' => '</span>',
)
);
};
?>
@ -102,4 +106,4 @@
}
?>
</article><!-- #post-## -->
</article><!-- #post-<?php the_ID(); ?> -->

View file

@ -4,7 +4,7 @@
*
* Used in Search Results and for Recent Posts in Front Page panels.
*
* @link https://codex.wordpress.org/Template_Hierarchy
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package WordPress
* @subpackage Twenty_Seventeen
@ -30,17 +30,19 @@
</div><!-- .entry-meta -->
<?php endif; ?>
<?php if ( is_front_page() && ! is_home() ) {
<?php
if ( is_front_page() && ! is_home() ) {
// The excerpt is being displayed within a front page section, so it's a lower hierarchy than h2.
the_title( sprintf( '<h3 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h3>' );
} else {
the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' );
} ?>
}
?>
</header><!-- .entry-header -->
<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
</article><!-- #post-## -->
</article><!-- #post-<?php the_ID(); ?> -->

View file

@ -2,7 +2,7 @@
/**
* Template part for displaying gallery posts
*
* @link https://codex.wordpress.org/Template_Hierarchy
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package WordPress
* @subpackage Twenty_Seventeen
@ -22,12 +22,12 @@
<?php
if ( 'post' === get_post_type() ) {
echo '<div class="entry-meta">';
if ( is_single() ) {
twentyseventeen_posted_on();
} else {
echo twentyseventeen_time_link();
twentyseventeen_edit_link();
};
if ( is_single() ) {
twentyseventeen_posted_on();
} else {
echo twentyseventeen_time_link();
twentyseventeen_edit_link();
};
echo '</div><!-- .entry-meta -->';
};
@ -66,17 +66,21 @@
if ( is_single() || ! get_post_gallery() ) {
/* translators: %s: Name of current post */
the_content( sprintf(
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
get_the_title()
) );
the_content(
sprintf(
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
get_the_title()
)
);
wp_link_pages( array(
'before' => '<div class="page-links">' . __( 'Pages:', 'twentyseventeen' ),
'after' => '</div>',
'link_before' => '<span class="page-number">',
'link_after' => '</span>',
) );
wp_link_pages(
array(
'before' => '<div class="page-links">' . __( 'Pages:', 'twentyseventeen' ),
'after' => '</div>',
'link_before' => '<span class="page-number">',
'link_after' => '</span>',
)
);
};
?>
@ -89,4 +93,4 @@
}
?>
</article><!-- #post-## -->
</article><!-- #post-<?php the_ID(); ?> -->

View file

@ -2,7 +2,7 @@
/**
* Template part for displaying image posts
*
* @link https://codex.wordpress.org/Template_Hierarchy
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package WordPress
* @subpackage Twenty_Seventeen
@ -14,30 +14,30 @@
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php
if ( is_sticky() && is_home() ) {
echo twentyseventeen_get_svg( array( 'icon' => 'thumb-tack' ) );
}
if ( is_sticky() && is_home() ) {
echo twentyseventeen_get_svg( array( 'icon' => 'thumb-tack' ) );
}
?>
<header class="entry-header">
<?php
if ( 'post' === get_post_type() ) {
echo '<div class="entry-meta">';
if ( is_single() ) {
twentyseventeen_posted_on();
} else {
echo twentyseventeen_time_link();
twentyseventeen_edit_link();
};
echo '</div><!-- .entry-meta -->';
};
if ( 'post' === get_post_type() ) {
echo '<div class="entry-meta">';
if ( is_single() ) {
the_title( '<h1 class="entry-title">', '</h1>' );
} elseif ( is_front_page() && is_home() ) {
the_title( '<h3 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h3>' );
twentyseventeen_posted_on();
} else {
the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
}
echo twentyseventeen_time_link();
twentyseventeen_edit_link();
};
echo '</div><!-- .entry-meta -->';
};
if ( is_single() ) {
the_title( '<h1 class="entry-title">', '</h1>' );
} elseif ( is_front_page() && is_home() ) {
the_title( '<h3 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h3>' );
} else {
the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
}
?>
</header><!-- .entry-header -->
@ -51,21 +51,26 @@
<div class="entry-content">
<?php if ( is_single() || '' === get_the_post_thumbnail() ) {
<?php
if ( is_single() || '' === get_the_post_thumbnail() ) {
// Only show content if is a single post, or if there's no featured image.
/* translators: %s: Name of current post */
the_content( sprintf(
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
get_the_title()
) );
the_content(
sprintf(
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
get_the_title()
)
);
wp_link_pages( array(
'before' => '<div class="page-links">' . __( 'Pages:', 'twentyseventeen' ),
'after' => '</div>',
'link_before' => '<span class="page-number">',
'link_after' => '</span>',
) );
wp_link_pages(
array(
'before' => '<div class="page-links">' . __( 'Pages:', 'twentyseventeen' ),
'after' => '</div>',
'link_before' => '<span class="page-number">',
'link_after' => '</span>',
)
);
};
?>
@ -78,4 +83,4 @@
}
?>
</article><!-- #post-## -->
</article><!-- #post-<?php the_ID(); ?> -->

View file

@ -2,7 +2,7 @@
/**
* Template part for displaying a message that posts cannot be found
*
* @link https://codex.wordpress.org/Template_Hierarchy
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package WordPress
* @subpackage Twenty_Seventeen
@ -18,7 +18,8 @@
</header>
<div class="page-content">
<?php
if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>
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>.', 'twentyseventeen' ), esc_url( admin_url( 'post-new.php' ) ) ); ?></p>
@ -28,6 +29,7 @@
<?php
get_search_form();
endif; ?>
endif;
?>
</div><!-- .page-content -->
</section><!-- .no-results -->

View file

@ -2,7 +2,7 @@
/**
* Template part for displaying video posts
*
* @link https://codex.wordpress.org/Template_Hierarchy
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package WordPress
* @subpackage Twenty_Seventeen
@ -14,41 +14,41 @@
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php
if ( is_sticky() && is_home() ) {
echo twentyseventeen_get_svg( array( 'icon' => 'thumb-tack' ) );
}
if ( is_sticky() && is_home() ) {
echo twentyseventeen_get_svg( array( 'icon' => 'thumb-tack' ) );
}
?>
<header class="entry-header">
<?php
if ( 'post' === get_post_type() ) {
echo '<div class="entry-meta">';
if ( is_single() ) {
twentyseventeen_posted_on();
} else {
echo twentyseventeen_time_link();
twentyseventeen_edit_link();
}
echo '</div><!-- .entry-meta -->';
};
if ( 'post' === get_post_type() ) {
echo '<div class="entry-meta">';
if ( is_single() ) {
the_title( '<h1 class="entry-title">', '</h1>' );
} elseif ( is_front_page() && is_home() ) {
the_title( '<h3 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h3>' );
twentyseventeen_posted_on();
} else {
the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
echo twentyseventeen_time_link();
twentyseventeen_edit_link();
}
echo '</div><!-- .entry-meta -->';
};
if ( is_single() ) {
the_title( '<h1 class="entry-title">', '</h1>' );
} elseif ( is_front_page() && is_home() ) {
the_title( '<h3 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h3>' );
} else {
the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
}
?>
</header><!-- .entry-header -->
<?php
$content = apply_filters( 'the_content', get_the_content() );
$video = false;
$video = false;
// Only get video from the content if a playlist isn't present.
if ( false === strpos( $content, 'wp-playlist-script' ) ) {
$video = get_media_embedded_in_content( $content, array( 'video', 'object', 'embed', 'iframe' ) );
}
if ( false === strpos( $content, 'wp-playlist-script' ) ) {
$video = get_media_embedded_in_content( $content, array( 'video', 'object', 'embed', 'iframe' ) );
}
?>
<?php if ( '' !== get_the_post_thumbnail() && ! is_single() && empty( $video ) ) : ?>
@ -78,17 +78,21 @@
if ( is_single() || empty( $video ) ) {
/* translators: %s: Name of current post */
the_content( sprintf(
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
get_the_title()
) );
the_content(
sprintf(
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
get_the_title()
)
);
wp_link_pages( array(
'before' => '<div class="page-links">' . __( 'Pages:', 'twentyseventeen' ),
'after' => '</div>',
'link_before' => '<span class="page-number">',
'link_after' => '</span>',
) );
wp_link_pages(
array(
'before' => '<div class="page-links">' . __( 'Pages:', 'twentyseventeen' ),
'after' => '</div>',
'link_before' => '<span class="page-number">',
'link_after' => '</span>',
)
);
};
?>
@ -100,4 +104,4 @@
}
?>
</article><!-- #post-## -->
</article><!-- #post-<?php the_ID(); ?> -->

View file

@ -2,7 +2,7 @@
/**
* Template part for displaying posts
*
* @link https://codex.wordpress.org/Template_Hierarchy
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package WordPress
* @subpackage Twenty_Seventeen
@ -22,12 +22,12 @@
<?php
if ( 'post' === get_post_type() ) {
echo '<div class="entry-meta">';
if ( is_single() ) {
twentyseventeen_posted_on();
} else {
echo twentyseventeen_time_link();
twentyseventeen_edit_link();
};
if ( is_single() ) {
twentyseventeen_posted_on();
} else {
echo twentyseventeen_time_link();
twentyseventeen_edit_link();
};
echo '</div><!-- .entry-meta -->';
};
@ -52,17 +52,21 @@
<div class="entry-content">
<?php
/* translators: %s: Name of current post */
the_content( sprintf(
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
get_the_title()
) );
the_content(
sprintf(
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
get_the_title()
)
);
wp_link_pages( array(
'before' => '<div class="page-links">' . __( 'Pages:', 'twentyseventeen' ),
'after' => '</div>',
'link_before' => '<span class="page-number">',
'link_after' => '</span>',
) );
wp_link_pages(
array(
'before' => '<div class="page-links">' . __( 'Pages:', 'twentyseventeen' ),
'after' => '</div>',
'link_before' => '<span class="page-number">',
'link_after' => '</span>',
)
);
?>
</div><!-- .entry-content -->
@ -72,4 +76,4 @@
}
?>
</article><!-- #post-## -->
</article><!-- #post-<?php the_ID(); ?> -->

View file

@ -9,7 +9,7 @@
* new template file for each one. For example, tag.php (Tag archives),
* category.php (Category archives), author.php (Author archives), etc.
*
* @link https://codex.wordpress.org/Template_Hierarchy
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package WordPress
* @subpackage Twenty_Sixteen
@ -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' );

View file

@ -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' ) ) :
?>
<p class="no-comments"><?php _e( 'Comments are closed.', 'twentysixteen' ); ?></p>
if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
?>
<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 -->

View file

@ -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; ?>

View file

@ -12,7 +12,7 @@
* the parent theme's file, so the child theme functions would be used.
*
* @link https://codex.wordpress.org/Theme_Development
* @link https://codex.wordpress.org/Child_Themes
* @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.
@ -33,173 +33,187 @@ 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
* @since Twenty Sixteen 1.0
*/
add_theme_support( 'post-formats', array(
'aside',
'image',
'video',
'quote',
'link',
'gallery',
'status',
'audio',
'chat',
) );
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' );
/*
* 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() ) );
// Add default posts and comments RSS feed links to head.
add_theme_support( 'automatic-feed-links' );
// Load regular editor styles into the new block-based editor.
add_theme_support( 'editor-styles' );
/*
* 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' );
// Load default block styles.
add_theme_support( 'wp-block-styles' );
/*
* Enable support for custom logo.
*
* @since Twenty Sixteen 1.2
*/
add_theme_support(
'custom-logo',
array(
'height' => 240,
'width' => 240,
'flex-height' => true,
)
);
// Add support for responsive embeds.
add_theme_support( 'responsive-embeds' );
/*
* Enable support for Post Thumbnails on posts and pages.
*
* @link https://developer.wordpress.org/reference/functions/add_theme_support/#post-thumbnails
*/
add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 1200, 9999 );
// Add support for custom color scheme.
add_theme_support( 'editor-color-palette', array(
array(
'name' => __( 'Dark Gray', 'twentysixteen' ),
'slug' => 'dark-gray',
'color' => '#1a1a1a',
),
array(
'name' => __( 'Medium Gray', 'twentysixteen' ),
'slug' => 'medium-gray',
'color' => '#686868',
),
array(
'name' => __( 'Light Gray', 'twentysixteen' ),
'slug' => 'light-gray',
'color' => '#e5e5e5',
),
array(
'name' => __( 'White', 'twentysixteen' ),
'slug' => 'white',
'color' => '#fff',
),
array(
'name' => __( 'Blue Gray', 'twentysixteen' ),
'slug' => 'blue-gray',
'color' => '#4d545c',
),
array(
'name' => __( 'Bright Blue', 'twentysixteen' ),
'slug' => 'bright-blue',
'color' => '#007acc',
),
array(
'name' => __( 'Light Blue', 'twentysixteen' ),
'slug' => 'light-blue',
'color' => '#9adffd',
),
array(
'name' => __( 'Dark Brown', 'twentysixteen' ),
'slug' => 'dark-brown',
'color' => '#402b30',
),
array(
'name' => __( 'Medium Brown', 'twentysixteen' ),
'slug' => 'medium-brown',
'color' => '#774e24',
),
array(
'name' => __( 'Dark Red', 'twentysixteen' ),
'slug' => 'dark-red',
'color' => '#640c1f',
),
array(
'name' => __( 'Bright Red', 'twentysixteen' ),
'slug' => 'bright-red',
'color' => '#ff675f',
),
array(
'name' => __( 'Yellow', 'twentysixteen' ),
'slug' => 'yellow',
'color' => '#ffef8e',
),
) );
// This theme uses wp_nav_menu() in two locations.
register_nav_menus(
array(
'primary' => __( 'Primary Menu', 'twentysixteen' ),
'social' => __( 'Social Links Menu', 'twentysixteen' ),
)
);
// Indicate widget sidebars can use selective refresh in the Customizer.
add_theme_support( 'customize-selective-refresh-widgets' );
}
/*
* 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() ) );
// Load regular editor styles into the new block-based editor.
add_theme_support( 'editor-styles' );
// Load default block styles.
add_theme_support( 'wp-block-styles' );
// Add support for responsive embeds.
add_theme_support( 'responsive-embeds' );
// Add support for custom color scheme.
add_theme_support(
'editor-color-palette',
array(
array(
'name' => __( 'Dark Gray', 'twentysixteen' ),
'slug' => 'dark-gray',
'color' => '#1a1a1a',
),
array(
'name' => __( 'Medium Gray', 'twentysixteen' ),
'slug' => 'medium-gray',
'color' => '#686868',
),
array(
'name' => __( 'Light Gray', 'twentysixteen' ),
'slug' => 'light-gray',
'color' => '#e5e5e5',
),
array(
'name' => __( 'White', 'twentysixteen' ),
'slug' => 'white',
'color' => '#fff',
),
array(
'name' => __( 'Blue Gray', 'twentysixteen' ),
'slug' => 'blue-gray',
'color' => '#4d545c',
),
array(
'name' => __( 'Bright Blue', 'twentysixteen' ),
'slug' => 'bright-blue',
'color' => '#007acc',
),
array(
'name' => __( 'Light Blue', 'twentysixteen' ),
'slug' => 'light-blue',
'color' => '#9adffd',
),
array(
'name' => __( 'Dark Brown', 'twentysixteen' ),
'slug' => 'dark-brown',
'color' => '#402b30',
),
array(
'name' => __( 'Medium Brown', 'twentysixteen' ),
'slug' => 'medium-brown',
'color' => '#774e24',
),
array(
'name' => __( 'Dark Red', 'twentysixteen' ),
'slug' => 'dark-red',
'color' => '#640c1f',
),
array(
'name' => __( 'Bright Red', 'twentysixteen' ),
'slug' => 'bright-red',
'color' => '#ff675f',
),
array(
'name' => __( 'Yellow', 'twentysixteen' ),
'slug' => 'yellow',
'color' => '#ffef8e',
),
)
);
// 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' );
@ -217,6 +231,27 @@ function twentysixteen_content_width() {
}
add_action( 'after_setup_theme', 'twentysixteen_content_width', 0 );
/**
* Add preconnect for Google Fonts.
*
* @since Twenty Sixteen 1.6
*
* @param array $urls URLs to print for resource hints.
* @param string $relation_type The relation type the URLs are printed.
* @return array $urls URLs to print for resource hints.
*/
function twentysixteen_resource_hints( $urls, $relation_type ) {
if ( wp_style_is( 'twentysixteen-fonts', 'queue' ) && 'preconnect' === $relation_type ) {
$urls[] = array(
'href' => 'https://fonts.gstatic.com',
'crossorigin',
);
}
return $urls;
}
add_filter( 'wp_resource_hints', 'twentysixteen_resource_hints', 10, 2 );
/**
* Registers a widget area.
*
@ -225,77 +260,86 @@ 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' => __( '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 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' => __( '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';
/**
* 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 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 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'
);
}
return $fonts_url;
}
/* 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';
}
if ( $fonts ) {
$fonts_url = add_query_arg( array(
'family' => urlencode( implode( '|', $fonts ) ),
'subset' => urlencode( $subsets ),
), 'https://fonts.googleapis.com/css' );
}
return $fonts_url;
}
endif;
/**
@ -356,10 +400,14 @@ function twentysixteen_scripts() {
wp_enqueue_script( 'twentysixteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20181230', 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' );
@ -422,10 +470,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 ) );
@ -433,7 +481,11 @@ function twentysixteen_hex2rgb( $color ) {
return array();
}
return array( 'red' => $r, 'green' => $g, 'blue' => $b );
return array(
'red' => $r,
'green' => $g,
'blue' => $b,
);
}
/**
@ -478,7 +530,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
@ -501,7 +553,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

View file

@ -16,12 +16,13 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="http://gmpg.org/xfn/11">
<?php if ( is_singular() && pings_open( get_queried_object() ) ) : ?>
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<link rel="pingback" href="<?php echo esc_url( get_bloginfo( 'pingback_url' ) ); ?>">
<?php endif; ?>
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<div id="page" class="site">
<div class="site-inner">
<a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'twentysixteen' ); ?></a>
@ -35,10 +36,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 +53,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 +66,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; ?>

View file

@ -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' );
<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 );
?>
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'] )
);
}
// 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>'
);
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-## -->
</article><!-- #post-<?php the_ID(); ?> -->
<?php
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) {
comments_template();
}
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) {
comments_template();
}
// Parent post navigation.
the_post_navigation( array(
// 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;
?>

View file

@ -50,9 +50,13 @@ 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' );

View file

@ -30,9 +30,15 @@ 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 +56,41 @@ 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 +100,9 @@ function twentysixteen_header_style() {
clip: rect(1px, 1px, 1px, 1px);
position: absolute;
}
</style>
<?php
}
</style>
<?php
}
endif; // twentysixteen_header_style
/**
@ -103,87 +115,135 @@ 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_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_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_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_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 +308,130 @@ 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 +508,17 @@ 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 +935,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 +1192,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.

View file

@ -10,127 +10,133 @@
*/
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
);
}
$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;
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
);
}
/**
* 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
);
$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">
<?php the_post_thumbnail(); ?>
<div class="post-thumbnail">
<?php the_post_thumbnail(); ?>
</div><!-- .post-thumbnail -->
<?php else : ?>
@ -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,
) );
/**
* 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 );
// 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 );
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;
}
}
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,37 @@ 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;
if ( ! function_exists( 'wp_body_open' ) ) :
/**
* Fire the wp_body_open action.
*
* Added for backwards compatibility to support pre 5.2.0 WordPress versions.
*
* @since Twenty Sixteen 2.0
*/
function wp_body_open() {
/**
* Triggered after the opening <body> tag.
*
* @since Twenty Sixteen 2.0
*/
do_action( 'wp_body_open' );
}
}
endif;

View file

@ -7,7 +7,7 @@
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
*
* @link https://codex.wordpress.org/Template_Hierarchy
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package WordPress
* @subpackage Twenty_Sixteen
@ -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' );

View file

@ -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' );

View file

@ -1,8 +1,9 @@
=== Twenty Sixteen ===
Contributors: the WordPress team
Contributors: wordpressdotorg
Requires at least: WordPress 4.4
Tested up to: WordPress 5.0
Version: 1.8
Requires PHP: 5.2.4
Version: 2.0
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
@ -56,6 +57,16 @@ Image used in screenshot.png: A photo by Austin Schmid (https://unsplash.com/sch
== Changelog ==
= 2.0 =
* Released: May 7, 2019
https://codex.wordpress.org/Twenty_Sixteen_Theme_Changelog#Version_2.0
= 1.9 =
* Released: February 21, 2019
https://codex.wordpress.org/Twenty_Sixteen_Theme_Changelog#Version_1.9
= 1.8 =
* Released: January 9, 2019

View file

@ -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>',
) );
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' );

View file

@ -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 -->

View file

@ -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.

View file

@ -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.8
Version: 2.0
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

View file

@ -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 -->
@ -40,6 +42,6 @@
'<footer class="entry-footer"><span class="edit-link">',
'</span></footer><!-- .entry-footer -->'
);
?>
?>
</article><!-- #post-## -->
</article><!-- #post-<?php the_ID(); ?> -->

View file

@ -49,5 +49,5 @@
?>
<?php endif; ?>
</article><!-- #post-## -->
</article><!-- #post-<?php the_ID(); ?> -->

View file

@ -21,19 +21,21 @@
<?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' );
}
?>
?>
</div><!-- .entry-content -->
<footer class="entry-footer">
@ -48,6 +50,6 @@
'<span class="edit-link">',
'</span>'
);
?>
?>
</footer><!-- .entry-footer -->
</article><!-- #post-## -->
</article><!-- #post-<?php the_ID(); ?> -->

View file

@ -24,20 +24,24 @@
<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 -->
<footer class="entry-footer">
@ -52,6 +56,6 @@
'<span class="edit-link">',
'</span>'
);
?>
?>
</footer><!-- .entry-footer -->
</article><!-- #post-## -->
</article><!-- #post-<?php the_ID(); ?> -->