Twenty Fifteen: doc cleanup, addresses removing periods from file header summaries, some spacing, loop documentation, and https instead of http.
Props DrewAPicture, MikeHansenMe, see #30149. Built from https://develop.svn.wordpress.org/trunk@30394 git-svn-id: http://core.svn.wordpress.org/trunk@30390 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ad646bc183
commit
b7ede43c4f
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* The template for displaying 404 pages (not found).
|
* The template for displaying 404 pages (not found)
|
||||||
*
|
*
|
||||||
* @package WordPress
|
* @package WordPress
|
||||||
* @subpackage Twenty_Fifteen
|
* @subpackage Twenty_Fifteen
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* The template for displaying archive pages.
|
* The template for displaying archive pages
|
||||||
*
|
*
|
||||||
* Used to display archive-type pages if nothing more specific matches a query.
|
* Used to display archive-type pages if nothing more specific matches a query.
|
||||||
* For example, puts together date-based pages if no date.php file exists.
|
* For example, puts together date-based pages if no date.php file exists.
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
* already has tag.php for Tag archives, category.php for Category archives,
|
* already has tag.php for Tag archives, category.php for Category archives,
|
||||||
* and author.php for Author archives.
|
* and author.php for Author archives.
|
||||||
*
|
*
|
||||||
* @link http://codex.wordpress.org/Template_Hierarchy
|
* @link https://codex.wordpress.org/Template_Hierarchy
|
||||||
*
|
*
|
||||||
* @package WordPress
|
* @package WordPress
|
||||||
* @subpackage Twenty_Fifteen
|
* @subpackage Twenty_Fifteen
|
||||||
|
@ -31,33 +31,34 @@ get_header(); ?>
|
||||||
?>
|
?>
|
||||||
</header><!-- .page-header -->
|
</header><!-- .page-header -->
|
||||||
|
|
||||||
<?php /* Start the Loop */ ?>
|
|
||||||
<?php while ( have_posts() ) : the_post(); ?>
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
/* Include the Post-Format-specific template for the content.
|
// Start the Loop.
|
||||||
|
while ( have_posts() ) : the_post();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Include the Post-Format-specific template for the content.
|
||||||
* If you want to override this in a child theme, then include a file
|
* If you want to override this in a child theme, then include a file
|
||||||
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
|
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
|
||||||
*/
|
*/
|
||||||
get_template_part( 'content', get_post_format() );
|
get_template_part( 'content', get_post_format() );
|
||||||
?>
|
|
||||||
|
|
||||||
<?php endwhile; ?>
|
// End the loop.
|
||||||
|
endwhile;
|
||||||
|
|
||||||
<?php
|
// Previous/next page navigation.
|
||||||
the_pagination( array(
|
the_pagination( array(
|
||||||
'prev_text' => __( 'Previous page', 'twentyfifteen' ),
|
'prev_text' => __( 'Previous page', 'twentyfifteen' ),
|
||||||
'next_text' => __( 'Next page', 'twentyfifteen' ),
|
'next_text' => __( 'Next page', 'twentyfifteen' ),
|
||||||
'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>',
|
'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>',
|
||||||
) );
|
) );
|
||||||
|
|
||||||
|
// If no content, include the "No posts found" template.
|
||||||
|
else :
|
||||||
|
get_template_part( 'content', 'none' );
|
||||||
|
|
||||||
|
endif;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php else : ?>
|
|
||||||
|
|
||||||
<?php get_template_part( 'content', 'none' ); ?>
|
|
||||||
|
|
||||||
<?php endif; ?>
|
|
||||||
|
|
||||||
</main><!-- .site-main -->
|
</main><!-- .site-main -->
|
||||||
</section><!-- .content-area -->
|
</section><!-- .content-area -->
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* The template for displaying Author bios.
|
* The template for displaying Author bios
|
||||||
*
|
*
|
||||||
* @package WordPress
|
* @package WordPress
|
||||||
* @subpackage Twenty_Fifteen
|
* @subpackage Twenty_Fifteen
|
||||||
|
@ -20,16 +20,20 @@
|
||||||
* @param int $size The avatar height and width size in pixels.
|
* @param int $size The avatar height and width size in pixels.
|
||||||
*/
|
*/
|
||||||
$author_bio_avatar_size = apply_filters( 'twentyfifteen_author_bio_avatar_size', 56 );
|
$author_bio_avatar_size = apply_filters( 'twentyfifteen_author_bio_avatar_size', 56 );
|
||||||
|
|
||||||
echo get_avatar( get_the_author_meta( 'user_email' ), $author_bio_avatar_size );
|
echo get_avatar( get_the_author_meta( 'user_email' ), $author_bio_avatar_size );
|
||||||
?>
|
?>
|
||||||
</div><!-- .author-avatar -->
|
</div><!-- .author-avatar -->
|
||||||
|
|
||||||
<div class="author-description">
|
<div class="author-description">
|
||||||
<h3 class="author-title"><?php echo get_the_author(); ?></h3>
|
<h3 class="author-title"><?php echo get_the_author(); ?></h3>
|
||||||
|
|
||||||
<p class="author-bio">
|
<p class="author-bio">
|
||||||
<?php the_author_meta( 'description' ); ?>
|
<?php the_author_meta( 'description' ); ?>
|
||||||
<a class="author-link" href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
|
<a class="author-link" href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
|
||||||
<?php printf( __( 'View all posts by %s', 'twentyfifteen' ), get_the_author() ); ?>
|
<?php printf( __( 'View all posts by %s', 'twentyfifteen' ), get_the_author() ); ?>
|
||||||
</a>
|
</a>
|
||||||
</p><!-- .author-bio -->
|
</p><!-- .author-bio -->
|
||||||
|
|
||||||
</div><!-- .author-description -->
|
</div><!-- .author-description -->
|
||||||
</div><!-- .author-info -->
|
</div><!-- .author-info -->
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* The template for displaying comments.
|
* The template for displaying comments
|
||||||
*
|
*
|
||||||
* The area of the page that contains both current comments
|
* The area of the page that contains both current comments
|
||||||
* and the comment form.
|
* and the comment form.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* The template for displaying link post formats.
|
* The template for displaying link post formats
|
||||||
*
|
*
|
||||||
* Used for both single and index/archive/search.
|
* Used for both single and index/archive/search.
|
||||||
*
|
*
|
||||||
|
@ -45,6 +45,7 @@
|
||||||
<!-- .entry-content -->
|
<!-- .entry-content -->
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
// Author bio.
|
||||||
if ( is_single() && get_the_author_meta( 'description' ) ) :
|
if ( is_single() && get_the_author_meta( 'description' ) ) :
|
||||||
get_template_part( 'author-bio' );
|
get_template_part( 'author-bio' );
|
||||||
endif;
|
endif;
|
||||||
|
@ -55,4 +56,5 @@
|
||||||
<?php edit_post_link( esc_html__( 'Edit', 'twentyfifteen' ), '<span class="edit-link">', '</span>' ); ?>
|
<?php edit_post_link( esc_html__( 'Edit', 'twentyfifteen' ), '<span class="edit-link">', '</span>' ); ?>
|
||||||
</footer>
|
</footer>
|
||||||
<!-- .entry-footer -->
|
<!-- .entry-footer -->
|
||||||
|
|
||||||
</article><!-- #post-## -->
|
</article><!-- #post-## -->
|
|
@ -1,8 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* The template part for displaying a message that posts cannot be found.
|
* The template part for displaying a message that posts cannot be found
|
||||||
*
|
*
|
||||||
* Learn more: http://codex.wordpress.org/Template_Hierarchy
|
* Learn more: {@link https://codex.wordpress.org/Template_Hierarchy}
|
||||||
*
|
*
|
||||||
* @package WordPress
|
* @package WordPress
|
||||||
* @subpackage Twenty_Fifteen
|
* @subpackage Twenty_Fifteen
|
||||||
|
@ -16,6 +16,7 @@
|
||||||
</header><!-- .page-header -->
|
</header><!-- .page-header -->
|
||||||
|
|
||||||
<div class="page-content">
|
<div class="page-content">
|
||||||
|
|
||||||
<?php if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>
|
<?php if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>
|
||||||
|
|
||||||
<p><?php printf( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'twentyfifteen' ), esc_url( admin_url( 'post-new.php' ) ) ); ?></p>
|
<p><?php printf( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'twentyfifteen' ), esc_url( admin_url( 'post-new.php' ) ) ); ?></p>
|
||||||
|
@ -31,5 +32,6 @@
|
||||||
<?php get_search_form(); ?>
|
<?php get_search_form(); ?>
|
||||||
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
</div><!-- .page-content -->
|
</div><!-- .page-content -->
|
||||||
</section><!-- .no-results -->
|
</section><!-- .no-results -->
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* The template used for displaying page content.
|
* The template used for displaying page content
|
||||||
*
|
*
|
||||||
* @package WordPress
|
* @package WordPress
|
||||||
* @subpackage Twenty_Fifteen
|
* @subpackage Twenty_Fifteen
|
||||||
|
@ -9,7 +9,10 @@
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||||
<?php twentyfifteen_post_thumbnail(); ?>
|
<?php
|
||||||
|
// Post thumbnail.
|
||||||
|
twentyfifteen_post_thumbnail();
|
||||||
|
?>
|
||||||
|
|
||||||
<header class="entry-header">
|
<header class="entry-header">
|
||||||
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
|
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* The template part for displaying results in search pages.
|
* The template part for displaying results in search pages
|
||||||
*
|
*
|
||||||
* Learn more: http://codex.wordpress.org/Template_Hierarchy
|
* Learn more: {@link https://codex.wordpress.org/Template_Hierarchy}
|
||||||
*
|
*
|
||||||
* @package WordPress
|
* @package WordPress
|
||||||
* @subpackage Twenty_Fifteen
|
* @subpackage Twenty_Fifteen
|
||||||
|
@ -22,11 +22,16 @@
|
||||||
</div><!-- .entry-summary -->
|
</div><!-- .entry-summary -->
|
||||||
|
|
||||||
<?php if ( 'post' == get_post_type() ) : ?>
|
<?php if ( 'post' == get_post_type() ) : ?>
|
||||||
|
|
||||||
<footer class="entry-footer">
|
<footer class="entry-footer">
|
||||||
<?php twentyfifteen_entry_meta(); ?>
|
<?php twentyfifteen_entry_meta(); ?>
|
||||||
<?php edit_post_link( esc_html__( 'Edit', 'twentyfifteen' ), '<span class="edit-link">', '</span>' ); ?>
|
<?php edit_post_link( esc_html__( 'Edit', 'twentyfifteen' ), '<span class="edit-link">', '</span>' ); ?>
|
||||||
</footer><!-- .entry-footer -->
|
</footer><!-- .entry-footer -->
|
||||||
|
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
|
|
||||||
<?php edit_post_link( esc_html__( 'Edit', 'twentyfifteen' ), '<footer class="entry-footer"><span class="edit-link">', '</span></footer><!-- .entry-footer -->' ); ?>
|
<?php edit_post_link( esc_html__( 'Edit', 'twentyfifteen' ), '<footer class="entry-footer"><span class="edit-link">', '</span></footer><!-- .entry-footer -->' ); ?>
|
||||||
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
</article><!-- #post-## -->
|
</article><!-- #post-## -->
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* The default template for displaying content.
|
* The default template for displaying content
|
||||||
*
|
*
|
||||||
* Used for both single and index/archive/search.
|
* Used for both single and index/archive/search.
|
||||||
*
|
*
|
||||||
|
@ -11,7 +11,10 @@
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||||
<?php twentyfifteen_post_thumbnail(); ?>
|
<?php
|
||||||
|
// Post thumbnail.
|
||||||
|
twentyfifteen_post_thumbnail();
|
||||||
|
?>
|
||||||
|
|
||||||
<header class="entry-header">
|
<header class="entry-header">
|
||||||
<?php
|
<?php
|
||||||
|
@ -43,6 +46,7 @@
|
||||||
</div><!-- .entry-content -->
|
</div><!-- .entry-content -->
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
// Author bio.
|
||||||
if ( is_single() && get_the_author_meta( 'description' ) ) :
|
if ( is_single() && get_the_author_meta( 'description' ) ) :
|
||||||
get_template_part( 'author-bio' );
|
get_template_part( 'author-bio' );
|
||||||
endif;
|
endif;
|
||||||
|
@ -52,4 +56,5 @@
|
||||||
<?php twentyfifteen_entry_meta(); ?>
|
<?php twentyfifteen_entry_meta(); ?>
|
||||||
<?php edit_post_link( esc_html__( 'Edit', 'twentyfifteen' ), '<span class="edit-link">', '</span>' ); ?>
|
<?php edit_post_link( esc_html__( 'Edit', 'twentyfifteen' ), '<span class="edit-link">', '</span>' ); ?>
|
||||||
</footer><!-- .entry-footer -->
|
</footer><!-- .entry-footer -->
|
||||||
|
|
||||||
</article><!-- #post-## -->
|
</article><!-- #post-## -->
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* The template for displaying the footer.
|
* The template for displaying the footer
|
||||||
*
|
*
|
||||||
* Contains the closing of the "site-content" div and all content after.
|
* Contains the closing of the "site-content" div and all content after.
|
||||||
*
|
*
|
||||||
|
@ -22,9 +22,10 @@
|
||||||
*/
|
*/
|
||||||
do_action( 'twentyfifteen_credits' );
|
do_action( 'twentyfifteen_credits' );
|
||||||
?>
|
?>
|
||||||
<a href="<?php echo esc_url( __( 'http://wordpress.org/', 'twentyfifteen' ) ); ?>"><?php printf( esc_html__( 'Proudly powered by %s', 'twentyfifteen' ), 'WordPress' ); ?></a>
|
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentyfifteen' ) ); ?>"><?php printf( esc_html__( 'Proudly powered by %s', 'twentyfifteen' ), 'WordPress' ); ?></a>
|
||||||
</div><!-- .site-info -->
|
</div><!-- .site-info -->
|
||||||
</footer><!-- .site-footer -->
|
</footer><!-- .site-footer -->
|
||||||
|
|
||||||
</div><!-- .site -->
|
</div><!-- .site -->
|
||||||
|
|
||||||
<?php wp_footer(); ?>
|
<?php wp_footer(); ?>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Twenty Fifteen functions and definitions.
|
* Twenty Fifteen functions and definitions
|
||||||
*
|
*
|
||||||
* Set up the theme and provides some helper functions, which are used in the
|
* Set up the theme and provides some helper functions, which are used in the
|
||||||
* theme as custom template tags. Others are attached to action and filter
|
* theme as custom template tags. Others are attached to action and filter
|
||||||
|
@ -11,14 +11,14 @@
|
||||||
* functions.php file. The child theme's functions.php file is included before
|
* functions.php file. The child theme's functions.php file is included before
|
||||||
* the parent theme's file, so the child theme functions would be used.
|
* the parent theme's file, so the child theme functions would be used.
|
||||||
*
|
*
|
||||||
* @link http://codex.wordpress.org/Theme_Development
|
* @link https://codex.wordpress.org/Theme_Development
|
||||||
* @link http://codex.wordpress.org/Child_Themes
|
* @link https://codex.wordpress.org/Child_Themes
|
||||||
*
|
*
|
||||||
* Functions that are not pluggable (not wrapped in function_exists()) are
|
* Functions that are not pluggable (not wrapped in function_exists()) are
|
||||||
* instead attached to a filter or action hook.
|
* instead attached to a filter or action hook.
|
||||||
*
|
*
|
||||||
* For more information on hooks, actions, and filters,
|
* For more information on hooks, actions, and filters,
|
||||||
* @link http://codex.wordpress.org/Plugin_API
|
* {@link https://codex.wordpress.org/Plugin_API}
|
||||||
*
|
*
|
||||||
* @package WordPress
|
* @package WordPress
|
||||||
* @subpackage Twenty_Fifteen
|
* @subpackage Twenty_Fifteen
|
||||||
|
@ -75,7 +75,7 @@ function twentyfifteen_setup() {
|
||||||
/*
|
/*
|
||||||
* Enable support for Post Thumbnails on posts and pages.
|
* Enable support for Post Thumbnails on posts and pages.
|
||||||
*
|
*
|
||||||
* @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
|
* See: https://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
|
||||||
*/
|
*/
|
||||||
add_theme_support( 'post-thumbnails' );
|
add_theme_support( 'post-thumbnails' );
|
||||||
set_post_thumbnail_size( 825, 510, true );
|
set_post_thumbnail_size( 825, 510, true );
|
||||||
|
@ -96,7 +96,8 @@ function twentyfifteen_setup() {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Enable support for Post Formats.
|
* Enable support for Post Formats.
|
||||||
* See http://codex.wordpress.org/Post_Formats
|
*
|
||||||
|
* See: https://codex.wordpress.org/Post_Formats
|
||||||
*/
|
*/
|
||||||
add_theme_support( 'post-formats', array(
|
add_theme_support( 'post-formats', array(
|
||||||
'aside', 'image', 'video', 'quote', 'link', 'gallery', 'status', 'audio', 'chat'
|
'aside', 'image', 'video', 'quote', 'link', 'gallery', 'status', 'audio', 'chat'
|
||||||
|
@ -125,7 +126,7 @@ add_action( 'after_setup_theme', 'twentyfifteen_setup' );
|
||||||
*
|
*
|
||||||
* @since Twenty Fifteen 1.0
|
* @since Twenty Fifteen 1.0
|
||||||
*
|
*
|
||||||
* @link http://codex.wordpress.org/Function_Reference/register_sidebar
|
* @link https://codex.wordpress.org/Function_Reference/register_sidebar
|
||||||
*/
|
*/
|
||||||
function twentyfifteen_widgets_init() {
|
function twentyfifteen_widgets_init() {
|
||||||
register_sidebar( array(
|
register_sidebar( array(
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* The header for our theme.
|
* The template for displaying the header
|
||||||
*
|
*
|
||||||
* Displays all of the <head> section and everything up until the "site-content" div.
|
* Displays all of the <head> section and everything up until the "site-content" div.
|
||||||
*
|
*
|
||||||
* @package WordPress
|
* @package WordPress
|
||||||
* @subpackage Twenty_Fifteen
|
* @subpackage Twenty_Fifteen
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* The template for displaying all single posts and attachments.
|
* The template for displaying image attachments
|
||||||
*
|
*
|
||||||
* @package WordPress
|
* @package WordPress
|
||||||
* @subpackage Twenty_Fifteen
|
* @subpackage Twenty_Fifteen
|
||||||
|
@ -12,9 +12,13 @@ get_header(); ?>
|
||||||
<div id="primary" class="content-area">
|
<div id="primary" class="content-area">
|
||||||
<main id="main" class="site-main" role="main">
|
<main id="main" class="site-main" role="main">
|
||||||
|
|
||||||
<?php while ( have_posts() ) : the_post(); ?>
|
<?php
|
||||||
|
// Start the loop.
|
||||||
|
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">
|
<nav id="image-navigation" class="navigation image-navigation">
|
||||||
<div class="nav-links">
|
<div class="nav-links">
|
||||||
<div class="nav-previous"><?php previous_image_link( false, esc_html__( 'Previous Image', 'twentyfifteen' ) ); ?></div><div class="nav-next"><?php next_image_link( false, esc_html__( 'Next Image', 'twentyfifteen' ) ); ?></div>
|
<div class="nav-previous"><?php previous_image_link( false, esc_html__( 'Previous Image', 'twentyfifteen' ) ); ?></div><div class="nav-next"><?php next_image_link( false, esc_html__( 'Next Image', 'twentyfifteen' ) ); ?></div>
|
||||||
|
@ -26,6 +30,7 @@ get_header(); ?>
|
||||||
</header><!-- .entry-header -->
|
</header><!-- .entry-header -->
|
||||||
|
|
||||||
<div class="entry-content">
|
<div class="entry-content">
|
||||||
|
|
||||||
<div class="entry-attachment">
|
<div class="entry-attachment">
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
|
@ -36,6 +41,7 @@ get_header(); ?>
|
||||||
* @param string $image_size Image size. Default 'large'.
|
* @param string $image_size Image size. Default 'large'.
|
||||||
*/
|
*/
|
||||||
$image_size = apply_filters( 'twentyfifteen_attachment_size', 'large' );
|
$image_size = apply_filters( 'twentyfifteen_attachment_size', 'large' );
|
||||||
|
|
||||||
echo wp_get_attachment_image( get_the_ID(), $image_size );
|
echo wp_get_attachment_image( get_the_ID(), $image_size );
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
@ -44,6 +50,7 @@ get_header(); ?>
|
||||||
<?php the_excerpt(); ?>
|
<?php the_excerpt(); ?>
|
||||||
</div><!-- .entry-caption -->
|
</div><!-- .entry-caption -->
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
</div><!-- .entry-attachment -->
|
</div><!-- .entry-attachment -->
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
@ -63,6 +70,7 @@ get_header(); ?>
|
||||||
<?php twentyfifteen_entry_meta(); ?>
|
<?php twentyfifteen_entry_meta(); ?>
|
||||||
<?php edit_post_link( esc_html__( 'Edit', 'twentyfifteen' ), '<span class="edit-link">', '</span>' ); ?>
|
<?php edit_post_link( esc_html__( 'Edit', 'twentyfifteen' ), '<span class="edit-link">', '</span>' ); ?>
|
||||||
</footer><!-- .entry-footer -->
|
</footer><!-- .entry-footer -->
|
||||||
|
|
||||||
</article><!-- #post-## -->
|
</article><!-- #post-## -->
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
@ -70,15 +78,15 @@ get_header(); ?>
|
||||||
if ( comments_open() || get_comments_number() ) :
|
if ( comments_open() || get_comments_number() ) :
|
||||||
comments_template();
|
comments_template();
|
||||||
endif;
|
endif;
|
||||||
?>
|
|
||||||
|
|
||||||
<?php
|
// Previous/next post navigation.
|
||||||
the_post_navigation( array(
|
the_post_navigation( array(
|
||||||
'prev_text' => _x( '<span class="meta-nav">Published in</span><span class="post-title">%title</span>', 'Parent post link', 'twentyfifteen' ),
|
'prev_text' => _x( '<span class="meta-nav">Published in</span><span class="post-title">%title</span>', 'Parent post link', 'twentyfifteen' ),
|
||||||
) );
|
) );
|
||||||
?>
|
|
||||||
|
|
||||||
<?php endwhile; // end of the loop. ?>
|
// End the loop.
|
||||||
|
endwhile;
|
||||||
|
?>
|
||||||
|
|
||||||
</main><!-- .site-main -->
|
</main><!-- .site-main -->
|
||||||
</div><!-- .content-area -->
|
</div><!-- .content-area -->
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* The main template file.
|
* The main template file
|
||||||
*
|
*
|
||||||
* This is the most generic template file in a WordPress theme
|
* This is the most generic template file in a WordPress theme
|
||||||
* and one of the two required files for a theme (the other being style.css).
|
* and one of the two required files for a theme (the other being style.css).
|
||||||
* It is used to display a page when nothing more specific matches a query.
|
* 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.
|
* e.g., it puts together the home page when no home.php file exists.
|
||||||
* Learn more: http://codex.wordpress.org/Template_Hierarchy
|
|
||||||
*
|
*
|
||||||
* @link http://codex.wordpress.org/Template_Hierarchy
|
* Learn more: {@link https://codex.wordpress.org/Template_Hierarchy}
|
||||||
*
|
*
|
||||||
* @package WordPress
|
* @package WordPress
|
||||||
* @subpackage Twenty_Fifteen
|
* @subpackage Twenty_Fifteen
|
||||||
|
@ -28,32 +27,34 @@ get_header(); ?>
|
||||||
</header>
|
</header>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php while ( have_posts() ) : the_post(); ?>
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
/* Include the Post-Format-specific template for the content.
|
// Start the loop.
|
||||||
|
while ( have_posts() ) : the_post();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Include the Post-Format-specific template for the content.
|
||||||
* If you want to override this in a child theme, then include a file
|
* If you want to override this in a child theme, then include a file
|
||||||
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
|
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
|
||||||
*/
|
*/
|
||||||
get_template_part( 'content', get_post_format() );
|
get_template_part( 'content', get_post_format() );
|
||||||
?>
|
|
||||||
|
|
||||||
<?php endwhile; ?>
|
// End the loop.
|
||||||
|
endwhile;
|
||||||
|
|
||||||
<?php
|
// Previous/next page navigation.
|
||||||
the_pagination( array(
|
the_pagination( array(
|
||||||
'prev_text' => __( 'Previous page', 'twentyfifteen' ),
|
'prev_text' => __( 'Previous page', 'twentyfifteen' ),
|
||||||
'next_text' => __( 'Next page', 'twentyfifteen' ),
|
'next_text' => __( 'Next page', 'twentyfifteen' ),
|
||||||
'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>',
|
'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>',
|
||||||
) );
|
) );
|
||||||
|
|
||||||
|
// If no content, include the "No posts found" template.
|
||||||
|
else :
|
||||||
|
get_template_part( 'content', 'none' );
|
||||||
|
|
||||||
|
endif;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php else : ?>
|
|
||||||
|
|
||||||
<?php get_template_part( 'content', 'none' ); ?>
|
|
||||||
|
|
||||||
<?php endif; ?>
|
|
||||||
|
|
||||||
</main><!-- .site-main -->
|
</main><!-- .site-main -->
|
||||||
</div><!-- .content-area -->
|
</div><!-- .content-area -->
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* The template for displaying pages.
|
* The template for displaying pages
|
||||||
*
|
*
|
||||||
* This is the template that displays all pages by default.
|
* This is the template that displays all pages by default.
|
||||||
* Please note that this is the WordPress construct of pages and that
|
* Please note that this is the WordPress construct of pages and that
|
||||||
|
@ -16,18 +16,21 @@ get_header(); ?>
|
||||||
<div id="primary" class="content-area">
|
<div id="primary" class="content-area">
|
||||||
<main id="main" class="site-main" role="main">
|
<main id="main" class="site-main" role="main">
|
||||||
|
|
||||||
<?php while ( have_posts() ) : the_post(); ?>
|
|
||||||
|
|
||||||
<?php get_template_part( 'content', 'page' ); ?>
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
// If comments are open or we have at least one comment, load up the comment template
|
// Start the loop.
|
||||||
|
while ( have_posts() ) : the_post();
|
||||||
|
|
||||||
|
// Include the page content template.
|
||||||
|
get_template_part( 'content', 'page' );
|
||||||
|
|
||||||
|
// If comments are open or we have at least one comment, load up the comment template.
|
||||||
if ( comments_open() || get_comments_number() ) :
|
if ( comments_open() || get_comments_number() ) :
|
||||||
comments_template();
|
comments_template();
|
||||||
endif;
|
endif;
|
||||||
?>
|
|
||||||
|
|
||||||
<?php endwhile; // end of the loop. ?>
|
// End the loop.
|
||||||
|
endwhile;
|
||||||
|
?>
|
||||||
|
|
||||||
</main><!-- .site-main -->
|
</main><!-- .site-main -->
|
||||||
</div><!-- .content-area -->
|
</div><!-- .content-area -->
|
||||||
|
|
|
@ -4,7 +4,7 @@ Description: Adds support for languages written in a Right To Left (RTL) directi
|
||||||
It's easy, just a matter of overwriting all the horizontal positioning attributes
|
It's easy, just a matter of overwriting all the horizontal positioning attributes
|
||||||
of your CSS stylesheet in a separate stylesheet file named rtl.css.
|
of your CSS stylesheet in a separate stylesheet file named rtl.css.
|
||||||
|
|
||||||
See http://codex.wordpress.org/Right_to_Left_Language_Support
|
See: https://codex.wordpress.org/Right_to_Left_Language_Support
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -18,34 +18,35 @@ get_header(); ?>
|
||||||
<h1 class="page-title"><?php printf( esc_html__( 'Search Results for: %s', 'twentyfifteen' ), get_search_query() ); ?></h1>
|
<h1 class="page-title"><?php printf( esc_html__( 'Search Results for: %s', 'twentyfifteen' ), get_search_query() ); ?></h1>
|
||||||
</header><!-- .page-header -->
|
</header><!-- .page-header -->
|
||||||
|
|
||||||
<?php /* Start the Loop */ ?>
|
<?php
|
||||||
<?php while ( have_posts() ) : the_post(); ?>
|
// Start the loop.
|
||||||
|
while ( have_posts() ) : the_post(); ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
/**
|
/*
|
||||||
* Run the loop for the search to output the results.
|
* Run the loop for the search to output the results.
|
||||||
* If you want to overload this in a child theme then include a file
|
* If you want to overload this in a child theme then include a file
|
||||||
* called content-search.php and that will be used instead.
|
* called content-search.php and that will be used instead.
|
||||||
*/
|
*/
|
||||||
get_template_part( 'content', 'search' );
|
get_template_part( 'content', 'search' );
|
||||||
?>
|
|
||||||
|
|
||||||
<?php endwhile; ?>
|
// End the loop.
|
||||||
|
endwhile;
|
||||||
|
|
||||||
<?php
|
// Previous/next page navigation.
|
||||||
the_pagination( array(
|
the_pagination( array(
|
||||||
'prev_text' => __( 'Previous page', 'twentyfifteen' ),
|
'prev_text' => __( 'Previous page', 'twentyfifteen' ),
|
||||||
'next_text' => __( 'Next page', 'twentyfifteen' ),
|
'next_text' => __( 'Next page', 'twentyfifteen' ),
|
||||||
'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>',
|
'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>',
|
||||||
) );
|
) );
|
||||||
|
|
||||||
|
// If no content, include the "No posts found" template.
|
||||||
|
else :
|
||||||
|
get_template_part( 'content', 'none' );
|
||||||
|
|
||||||
|
endif;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php else : ?>
|
|
||||||
|
|
||||||
<?php get_template_part( 'content', 'none' ); ?>
|
|
||||||
|
|
||||||
<?php endif; ?>
|
|
||||||
|
|
||||||
</main><!-- .site-main -->
|
</main><!-- .site-main -->
|
||||||
</section><!-- .content-area -->
|
</section><!-- .content-area -->
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* The sidebar containing the main widget area.
|
* The sidebar containing the main widget area
|
||||||
*
|
*
|
||||||
* @package WordPress
|
* @package WordPress
|
||||||
* @subpackage Twenty_Fifteen
|
* @subpackage Twenty_Fifteen
|
||||||
|
@ -9,9 +9,11 @@
|
||||||
|
|
||||||
if ( has_nav_menu( 'primary' ) || has_nav_menu( 'social' ) || is_active_sidebar( 'sidebar-1' ) ) : ?>
|
if ( has_nav_menu( 'primary' ) || has_nav_menu( 'social' ) || is_active_sidebar( 'sidebar-1' ) ) : ?>
|
||||||
<div id="secondary" class="secondary">
|
<div id="secondary" class="secondary">
|
||||||
|
|
||||||
<?php if ( has_nav_menu( 'primary' ) ) : ?>
|
<?php if ( has_nav_menu( 'primary' ) ) : ?>
|
||||||
<nav id="site-navigation" class="main-navigation" role="navigation">
|
<nav id="site-navigation" class="main-navigation" role="navigation">
|
||||||
<?php
|
<?php
|
||||||
|
// Primary navigation menu.
|
||||||
wp_nav_menu( array(
|
wp_nav_menu( array(
|
||||||
'menu_class' => 'nav-menu',
|
'menu_class' => 'nav-menu',
|
||||||
'theme_location' => 'primary',
|
'theme_location' => 'primary',
|
||||||
|
@ -23,6 +25,7 @@ if ( has_nav_menu( 'primary' ) || has_nav_menu( 'social' ) || is_active_sidebar(
|
||||||
<?php if ( has_nav_menu( 'social' ) ) : ?>
|
<?php if ( has_nav_menu( 'social' ) ) : ?>
|
||||||
<nav id="social-navigation" class="social-navigation" role="navigation">
|
<nav id="social-navigation" class="social-navigation" role="navigation">
|
||||||
<?php
|
<?php
|
||||||
|
// Social links navigation menu.
|
||||||
wp_nav_menu( array(
|
wp_nav_menu( array(
|
||||||
'theme_location' => 'social',
|
'theme_location' => 'social',
|
||||||
'depth' => 1,
|
'depth' => 1,
|
||||||
|
@ -38,5 +41,7 @@ if ( has_nav_menu( 'primary' ) || has_nav_menu( 'social' ) || is_active_sidebar(
|
||||||
<?php dynamic_sidebar( 'sidebar-1' ); ?>
|
<?php dynamic_sidebar( 'sidebar-1' ); ?>
|
||||||
</div><!-- .widget-area -->
|
</div><!-- .widget-area -->
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
</div><!-- .secondary -->
|
</div><!-- .secondary -->
|
||||||
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* The template for displaying all single posts and attachments.
|
* The template for displaying all single posts and attachments
|
||||||
*
|
*
|
||||||
* @package WordPress
|
* @package WordPress
|
||||||
* @subpackage Twenty_Fifteen
|
* @subpackage Twenty_Fifteen
|
||||||
|
@ -12,25 +12,31 @@ get_header(); ?>
|
||||||
<div id="primary" class="content-area">
|
<div id="primary" class="content-area">
|
||||||
<main id="main" class="site-main" role="main">
|
<main id="main" class="site-main" role="main">
|
||||||
|
|
||||||
<?php while ( have_posts() ) : the_post(); ?>
|
|
||||||
|
|
||||||
<?php get_template_part( 'content', get_post_format() ); ?>
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
// If comments are open or we have at least one comment, load up the comment template
|
// Start the loop.
|
||||||
|
while ( have_posts() ) : the_post();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Include the post format-specific template for the content. If you want to
|
||||||
|
* use this in a child theme, then include a file called called content-___.php
|
||||||
|
* (where ___ is the post format) and that will be used instead.
|
||||||
|
*/
|
||||||
|
get_template_part( 'content', get_post_format() );
|
||||||
|
|
||||||
|
// If comments are open or we have at least one comment, load up the comment template.
|
||||||
if ( comments_open() || get_comments_number() ) :
|
if ( comments_open() || get_comments_number() ) :
|
||||||
comments_template();
|
comments_template();
|
||||||
endif;
|
endif;
|
||||||
?>
|
|
||||||
|
|
||||||
<?php
|
// Previous/next post navigation.
|
||||||
the_post_navigation( array(
|
the_post_navigation( array(
|
||||||
'next_text' => _x( '<span class="meta-nav">Next <span class="screen-reader-text">post:</span></span><span class="post-title">%title</span>', 'Next post link', 'twentyfifteen' ),
|
'next_text' => _x( '<span class="meta-nav">Next <span class="screen-reader-text">post:</span></span><span class="post-title">%title</span>', 'Next post link', 'twentyfifteen' ),
|
||||||
'prev_text' => _x( '<span class="meta-nav">Previous <span class="screen-reader-text">post:</span></span><span class="post-title">%title</span>', 'Previous post link', 'twentyfifteen' )
|
'prev_text' => _x( '<span class="meta-nav">Previous <span class="screen-reader-text">post:</span></span><span class="post-title">%title</span>', 'Previous post link', 'twentyfifteen' )
|
||||||
) );
|
) );
|
||||||
?>
|
|
||||||
|
|
||||||
<?php endwhile; // end of the loop. ?>
|
// End the loop.
|
||||||
|
endwhile;
|
||||||
|
?>
|
||||||
|
|
||||||
</main><!-- .site-main -->
|
</main><!-- .site-main -->
|
||||||
</div><!-- .content-area -->
|
</div><!-- .content-area -->
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/*
|
/*
|
||||||
Theme Name: Twenty Fifteen
|
Theme Name: Twenty Fifteen
|
||||||
Theme URI: http://wordpress.org/themes/twentyfifteen
|
Theme URI: https://wordpress.org/themes/twentyfifteen
|
||||||
Author: the WordPress team
|
Author: the WordPress team
|
||||||
Author URI: http://wordpress.org/
|
Author URI: https://wordpress.org/
|
||||||
Description: Our 2015 default theme is clean, blog-focused, and designed for clarity. Twenty Fifteen's simple, straightforward typography is readable on a wide variety of screen sizes, and suitable for multiple languages. We designed it using a mobile-first approach, meaning your content takes center-stage, regardless of whether your visitors arrive by smartphone, tablet, laptop, or desktop computer.
|
Description: Our 2015 default theme is clean, blog-focused, and designed for clarity. Twenty Fifteen's simple, straightforward typography is readable on a wide variety of screen sizes, and suitable for multiple languages. We designed it using a mobile-first approach, meaning your content takes center-stage, regardless of whether your visitors arrive by smartphone, tablet, laptop, or desktop computer.
|
||||||
Version: 0.1
|
Version: 0.1
|
||||||
License: GNU General Public License v2 or later
|
License: GNU General Public License v2 or later
|
||||||
|
@ -2593,10 +2593,11 @@ span > video {
|
||||||
* 15.0 Media Queries
|
* 15.0 Media Queries
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Does the same thing as <meta name="viewport" content="width=device-width">,
|
/*
|
||||||
|
* Does the same thing as <meta name="viewport" content="width=device-width">,
|
||||||
* but in the future W3C standard way. -ms- prefix is required for IE10+ to
|
* but in the future W3C standard way. -ms- prefix is required for IE10+ to
|
||||||
* render responsive styling in Windows 8 "snapped" views; IE10+ does not honor
|
* render responsive styling in Windows 8 "snapped" views; IE10+ does not honor
|
||||||
* the meta tag. See http://core.trac.wordpress.org/ticket/25888.
|
* the meta tag. See https://core.trac.wordpress.org/ticket/25888.
|
||||||
*/
|
*/
|
||||||
@-ms-viewport {
|
@-ms-viewport {
|
||||||
width: device-width;
|
width: device-width;
|
||||||
|
|
Loading…
Reference in New Issue