Commit 5cdeda7b authored by lucha's avatar lucha

[auto] theme: twentyfifteen 2.3

parent a96d3707
......@@ -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( 'content', get_post_format() );
// End the loop.
// End the loop.
endwhile;
// Previous/next page navigation.
the_posts_pagination( array(
'prev_text' => __( 'Previous page', 'twentyfifteen' ),
'next_text' => __( 'Next page', 'twentyfifteen' ),
'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>',
) );
the_posts_pagination(
array(
'prev_text' => __( 'Previous page', 'twentyfifteen' ),
'next_text' => __( 'Next page', 'twentyfifteen' ),
'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>',
)
);
// If no content, include the "No posts found" template.
// If no content, include the "No posts found" template.
else :
get_template_part( 'content', 'none' );
......
......@@ -26,23 +26,23 @@ if ( post_password_required() ) {
<h2 class="comments-title">
<?php
$comments_number = get_comments_number();
if ( '1' === $comments_number ) {
/* translators: %s: post title */
printf( _x( 'One thought on &ldquo;%s&rdquo;', 'comments title', 'twentyfifteen' ), get_the_title() );
} else {
printf(
/* translators: 1: number of comments, 2: post title */
_nx(
'%1$s thought on &ldquo;%2$s&rdquo;',
'%1$s thoughts on &ldquo;%2$s&rdquo;',
$comments_number,
'comments title',
'twentyfifteen'
),
number_format_i18n( $comments_number ),
get_the_title()
);
}
if ( '1' === $comments_number ) {
/* translators: %s: post title */
printf( _x( 'One thought on &ldquo;%s&rdquo;', 'comments title', 'twentyfifteen' ), get_the_title() );
} else {
printf(
/* translators: 1: number of comments, 2: post title */
_nx(
'%1$s thought on &ldquo;%2$s&rdquo;',
'%1$s thoughts on &ldquo;%2$s&rdquo;',
$comments_number,
'comments title',
'twentyfifteen'
),
number_format_i18n( $comments_number ),
get_the_title()
);
}
?>
</h2>
......@@ -50,11 +50,13 @@ if ( post_password_required() ) {
<ol class="comment-list">
<?php
wp_list_comments( array(
'style' => 'ol',
'short_ping' => true,
'avatar_size' => 56,
) );
wp_list_comments(
array(
'style' => 'ol',
'short_ping' => true,
'avatar_size' => 56,
)
);
?>
</ol><!-- .comment-list -->
......@@ -64,9 +66,9 @@ if ( post_password_required() ) {
<?php
// If comments are closed and there are comments, let's leave a little note, shall we?
if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
?>
<p class="no-comments"><?php _e( 'Comments are closed.', 'twentyfifteen' ); ?></p>
if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
?>
<p class="no-comments"><?php _e( 'Comments are closed.', 'twentyfifteen' ); ?></p>
<?php endif; ?>
<?php comment_form(); ?>
......
......@@ -15,39 +15,43 @@
<header class="entry-header">
<?php
if ( is_single() ) :
the_title( sprintf( '<h1 class="entry-title"><a href="%s">', esc_url( twentyfifteen_get_link_url() ) ), '</a></h1>' );
if ( is_single() ) :
the_title( sprintf( '<h1 class="entry-title"><a href="%s">', esc_url( twentyfifteen_get_link_url() ) ), '</a></h1>' );
else :
the_title( sprintf( '<h2 class="entry-title"><a href="%s">', esc_url( twentyfifteen_get_link_url() ) ), '</a></h2>' );
endif;
?>
?>
</header>
<!-- .entry-header -->
<div class="entry-content">
<?php
/* translators: %s: Name of current post */
the_content( sprintf(
__( 'Continue reading %s', 'twentyfifteen' ),
the_title( '<span class="screen-reader-text">', '</span>', false )
) );
the_content(
sprintf(
__( 'Continue reading %s', 'twentyfifteen' ),
the_title( '<span class="screen-reader-text">', '</span>', false )
)
);
wp_link_pages( array(
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfifteen' ) . '</span>',
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>',
'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>%',
'separator' => '<span class="screen-reader-text">, </span>',
) );
?>
wp_link_pages(
array(
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfifteen' ) . '</span>',
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>',
'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>%',
'separator' => '<span class="screen-reader-text">, </span>',
)
);
?>
</div>
<!-- .entry-content -->
<?php
// Author bio.
if ( is_single() && get_the_author_meta( 'description' ) ) :
get_template_part( 'author-bio' );
if ( is_single() && get_the_author_meta( 'description' ) ) :
get_template_part( 'author-bio' );
endif;
?>
......
......@@ -21,15 +21,17 @@
<div class="entry-content">
<?php the_content(); ?>
<?php
wp_link_pages( array(
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfifteen' ) . '</span>',
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>',
'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>%',
'separator' => '<span class="screen-reader-text">, </span>',
) );
?>
wp_link_pages(
array(
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfifteen' ) . '</span>',
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>',
'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>%',
'separator' => '<span class="screen-reader-text">, </span>',
)
);
?>
</div><!-- .entry-content -->
<?php edit_post_link( __( 'Edit', 'twentyfifteen' ), '<footer class="entry-footer"><span class="edit-link">', '</span></footer><!-- .entry-footer -->' ); ?>
......
......@@ -18,37 +18,41 @@
<header class="entry-header">
<?php
if ( is_single() ) :
the_title( '<h1 class="entry-title">', '</h1>' );
if ( is_single() ) :
the_title( '<h1 class="entry-title">', '</h1>' );
else :
the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' );
endif;
?>
?>
</header><!-- .entry-header -->
<div class="entry-content">
<?php
/* translators: %s: Name of current post */
the_content( sprintf(
__( 'Continue reading %s', 'twentyfifteen' ),
the_title( '<span class="screen-reader-text">', '</span>', false )
) );
the_content(
sprintf(
__( 'Continue reading %s', 'twentyfifteen' ),
the_title( '<span class="screen-reader-text">', '</span>', false )
)
);
wp_link_pages( array(
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfifteen' ) . '</span>',
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>',
'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>%',
'separator' => '<span class="screen-reader-text">, </span>',
) );
?>
wp_link_pages(
array(
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfifteen' ) . '</span>',
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>',
'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>%',
'separator' => '<span class="screen-reader-text">, </span>',
)
);
?>
</div><!-- .entry-content -->
<?php
// Author bio.
if ( is_single() && get_the_author_meta( 'description' ) ) :
get_template_part( 'author-bio' );
if ( is_single() && get_the_author_meta( 'description' ) ) :
get_template_part( 'author-bio' );
endif;
?>
......
......@@ -384,8 +384,6 @@ p.has-drop-cap:not(:focus)::first-letter {
/* Button */
.wp-block-button .wp-block-button__link {
border: 0;
border-radius: 0;
cursor: pointer;
font-family: "Noto Sans", sans-serif;
font-size: 12px;
......@@ -397,13 +395,27 @@ p.has-drop-cap:not(:focus)::first-letter {
vertical-align: baseline;
}
.entry-content .wp-block-button:not(.is-style-outline) .wp-block-button__link {
border: 0;
}
.entry-content .wp-block-button.is-style-outline .wp-block-button__link:hover {
border-bottom: 2px solid;
}
.wp-block-button__link {
background-color: #333;
color: #fff;
}
.is-style-outline .wp-block-button__link:not(.has-text-color) {
color: #333;
}
.wp-block-button__link:hover,
.wp-block-button__link:focus {
.wp-block-button__link:focus,
.is-style-outline .wp-block-button__link:hover,
.is-style-outline .wp-block-button__link:focus {
background-color: #707070;
background-color: rgba(51, 51, 51, 0.7);
color: #fff;
......
......@@ -708,10 +708,6 @@ p.has-drop-cap:not(:focus)::first-letter {
/* Button */
.wp-block-button .wp-block-button__link {
background-color: #333;
border: 0;
border-radius: 0;
color: #fff;
cursor: pointer;
font-family: "Noto Sans", sans-serif;
font-size: 12px;
......@@ -722,6 +718,15 @@ p.has-drop-cap:not(:focus)::first-letter {
vertical-align: baseline;
}
.wp-block-button__link {
background-color: #333;
color: #fff;
}
.is-style-outline .wp-block-button__link {
color: #333;
}
@media screen and (min-width: 46.25em) {
.wp-block-button .wp-block-button__link {
font-size: 14px;
......
......@@ -42,182 +42,214 @@ if ( version_compare( $GLOBALS['wp_version'], '4.1-alpha', '<' ) ) {
}
if ( ! function_exists( 'twentyfifteen_setup' ) ) :
/**
* Sets up theme defaults and registers support for various WordPress features.
*
* Note that this function is hooked into the after_setup_theme hook, which
* runs before the init hook. The init hook is too late for some features, such
* as indicating support for post thumbnails.
*
* @since Twenty Fifteen 1.0
*/
function twentyfifteen_setup() {
/*
* Make theme available for translation.
* Translations can be filed at WordPress.org. See: https://translate.wordpress.org/projects/wp-themes/twentyfifteen
* If you're building a theme based on twentyfifteen, use a find and replace
* to change 'twentyfifteen' to the name of your theme in all the template files
*/
load_theme_textdomain( 'twentyfifteen' );
// Add default posts and comments RSS feed links to head.
add_theme_support( 'automatic-feed-links' );
/*
* Let WordPress manage the document title.
* By adding theme support, we declare that this theme does not use a
* hard-coded <title> tag in the document head, and expect WordPress to
* provide it for us.
*/
add_theme_support( 'title-tag' );
/*
* Enable support for Post Thumbnails on posts and pages.
*
* See: https://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
*/
add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 825, 510, true );
// This theme uses wp_nav_menu() in two locations.
register_nav_menus( array(
'primary' => __( 'Primary Menu', 'twentyfifteen' ),
'social' => __( 'Social Links Menu', 'twentyfifteen' ),
) );
/*
* Switch default core markup for search form, comment form, and comments
* to output valid HTML5.
*/
add_theme_support( 'html5', array(
'search-form', 'comment-form', 'comment-list', 'gallery', 'caption'
) );
/*
* Enable support for Post Formats.
*
* See: https://codex.wordpress.org/Post_Formats
*/
add_theme_support( 'post-formats', array(
'aside', 'image', 'video', 'quote', 'link', 'gallery', 'status', 'audio', 'chat'
) );
/*
* Enable support for custom logo.
*
* @since Twenty Fifteen 1.5
*/
add_theme_support( 'custom-logo', array(
'height' => 248,
'width' => 248,
'flex-height' => true,
) );
$color_scheme = twentyfifteen_get_color_scheme();
$default_color = trim( $color_scheme[0], '#' );
// Setup the WordPress core custom background feature.
/**
* Filter Twenty Fifteen custom-header support arguments.
* Sets up theme defaults and registers support for various WordPress features.
*
* @since Twenty Fifteen 1.0
*
* @param array $args {
* An array of custom-header support arguments.
* 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.
*
* @type string $default-color Default color of the header.
* @type string $default-attachment Default attachment of the header.
* }
*/
add_theme_support( 'custom-background', apply_filters( 'twentyfifteen_custom_background_args', array(
'default-color' => $default_color,
'default-attachment' => 'fixed',
) ) );
/*
* This theme styles the visual editor to resemble the theme style,
* specifically font, colors, icons, and column width.
* @since Twenty Fifteen 1.0
*/
add_editor_style( array( 'css/editor-style.css', 'genericons/genericons.css', twentyfifteen_fonts_url() ) );
// Load regular editor styles into the new block-based editor.
add_theme_support( 'editor-styles' );
// Load default block styles.
add_theme_support( 'wp-block-styles' );
// Add support for responsive embeds.
add_theme_support( 'responsive-embeds' );
// Add support for custom color scheme.
add_theme_support( 'editor-color-palette', array(
array(
'name' => __( 'Dark Gray', 'twentyfifteen' ),
'slug' => 'dark-gray',
'color' => '#111',
),
array(
'name' => __( 'Light Gray', 'twentyfifteen' ),
'slug' => 'light-gray',
'color' => '#f1f1f1',
),
array(
'name' => __( 'White', 'twentyfifteen' ),
'slug' => 'white',
'color' => '#fff',
),
array(
'name' => __( 'Yellow', 'twentyfifteen' ),
'slug' => 'yellow',
'color' => '#f4ca16',
),
array(
'name' => __( 'Dark Brown', 'twentyfifteen' ),
'slug' => 'dark-brown',
'color' => '#352712',
),
array(
'name' => __( 'Medium Pink', 'twentyfifteen' ),
'slug' => 'medium-pink',
'color' => '#e53b51',
),
array(
'name' => __( 'Light Pink', 'twentyfifteen' ),
'slug' => 'light-pink',
'color' => '#ffe5d1',
),
array(
'name' => __( 'Dark Purple', 'twentyfifteen' ),
'slug' => 'dark-purple',
'color' => '#2e2256',
),
array(
'name' => __( 'Purple', 'twentyfifteen' ),
'slug' => 'purple',
'color' => '#674970',
),
array(
'name' => __( 'Blue Gray', 'twentyfifteen' ),
'slug' => 'blue-gray',
'color' => '#22313f',
),
array(
'name' => __( 'Bright Blue', 'twentyfifteen' ),
'slug' => 'bright-blue',
'color' => '#55c3dc',
),
array(
'name' => __( 'Light Blue', 'twentyfifteen' ),
'slug' => 'light-blue',
'color' => '#e9f2f9',
),
) );
// Indicate widget sidebars can use selective refresh in the Customizer.
add_theme_support( 'customize-selective-refresh-widgets' );
}
function twentyfifteen_setup() {
/*
* Make theme available for translation.
* Translations can be filed at WordPress.org. See: https://translate.wordpress.org/projects/wp-themes/twentyfifteen
* If you're building a theme based on twentyfifteen, use a find and replace
* to change 'twentyfifteen' to the name of your theme in all the template files
*/
load_theme_textdomain( 'twentyfifteen' );
// Add default posts and comments RSS feed links to head.
add_theme_support( 'automatic-feed-links' );
/*
* Let WordPress manage the document title.
* By adding theme support, we declare that this theme does not use a
* hard-coded <title> tag in the document head, and expect WordPress to
* provide it for us.
*/
add_theme_support( 'title-tag' );
/*
* Enable support for Post Thumbnails on posts and pages.
*
* See: https://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
*/
add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 825, 510, true );
// This theme uses wp_nav_menu() in two locations.
register_nav_menus(
array(
'primary' => __( 'Primary Menu', 'twentyfifteen' ),
'social' => __( 'Social Links Menu', 'twentyfifteen' ),
)
);
/*
* Switch default core markup for search form, comment form, and comments
* to output valid HTML5.
*/
add_theme_support(
'html5',
array(
'search-form',
'comment-form',
'comment-list',
'gallery',
'caption',
)
);
/*
* Enable support for Post Formats.
*
* See: https://codex.wordpress.org/Post_Formats
*/
add_theme_support(
'post-formats',
array(
'aside',
'image',
'video',
'quote',
'link',
'gallery',
'status',
'audio',
'chat',
)
);
/*
* Enable support for custom logo.
*
* @since Twenty Fifteen 1.5
*/
add_theme_support(
'custom-logo',
array(
'height' => 248,
'width' => 248,
'flex-height' => true,
)
);
$color_scheme = twentyfifteen_get_color_scheme();
$default_color = trim( $color_scheme[0], '#' );
// Setup the WordPress core custom background feature.
/**
* Filter Twenty Fifteen custom-header support arguments.
*
* @since Twenty Fifteen 1.0
*
* @param array $args {
* An array of custom-header support arguments.
*
* @type string $default-color Default color of the header.
* @type string $default-attachment Default attachment of the header.
* }
*/
add_theme_support(
'custom-background',
apply_filters(
'twentyfifteen_custom_background_args',
array(
'default-color' => $default_color,
'default-attachment' => 'fixed',
)
)
);
/*
* This theme styles the visual editor to resemble the theme style,
* specifically font, colors, icons, and column width.
*/
add_editor_style( array( 'css/editor-style.css', 'genericons/genericons.css', twentyfifteen_fonts_url() ) );
// Load regular editor styles into the new block-based editor.
add_theme_support( 'editor-styles' );