Twenty Seventeen: Improves code readability and code standards in files
Adds better DocBlock comments and fixes some spacing issues based on PHP_CodeSniffer WordPress coding standards. Props sstoqnov. Fixes #39152. Built from https://develop.svn.wordpress.org/trunk@39618 git-svn-id: http://core.svn.wordpress.org/trunk@39558 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
efb191c2ed
commit
7ad554f955
|
@ -30,24 +30,24 @@ if ( post_password_required() ) {
|
||||||
if ( have_comments() ) : ?>
|
if ( have_comments() ) : ?>
|
||||||
<h2 class="comments-title">
|
<h2 class="comments-title">
|
||||||
<?php
|
<?php
|
||||||
$comments_number = get_comments_number();
|
$comments_number = get_comments_number();
|
||||||
if ( '1' === $comments_number ) {
|
if ( '1' === $comments_number ) {
|
||||||
/* translators: %s: post title */
|
/* translators: %s: post title */
|
||||||
printf( _x( 'One Reply to “%s”', 'comments title', 'twentyseventeen' ), get_the_title() );
|
printf( _x( 'One Reply to “%s”', 'comments title', 'twentyseventeen' ), get_the_title() );
|
||||||
} else {
|
} else {
|
||||||
printf(
|
printf(
|
||||||
/* translators: 1: number of comments, 2: post title */
|
/* translators: 1: number of comments, 2: post title */
|
||||||
_nx(
|
_nx(
|
||||||
'%1$s Reply to “%2$s”',
|
'%1$s Reply to “%2$s”',
|
||||||
'%1$s Replies to “%2$s”',
|
'%1$s Replies to “%2$s”',
|
||||||
$comments_number,
|
$comments_number,
|
||||||
'comments title',
|
'comments title',
|
||||||
'twentyseventeen'
|
'twentyseventeen'
|
||||||
),
|
),
|
||||||
number_format_i18n( $comments_number ),
|
number_format_i18n( $comments_number ),
|
||||||
get_the_title()
|
get_the_title()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
|
@ -310,6 +310,7 @@ add_action( 'widgets_init', 'twentyseventeen_widgets_init' );
|
||||||
*
|
*
|
||||||
* @since Twenty Seventeen 1.0
|
* @since Twenty Seventeen 1.0
|
||||||
*
|
*
|
||||||
|
* @param string $link Link to single post/page.
|
||||||
* @return string 'Continue reading' link prepended with an ellipsis.
|
* @return string 'Continue reading' link prepended with an ellipsis.
|
||||||
*/
|
*/
|
||||||
function twentyseventeen_excerpt_more( $link ) {
|
function twentyseventeen_excerpt_more( $link ) {
|
||||||
|
|
|
@ -95,7 +95,7 @@ function twentyseventeen_custom_colors_css() {
|
||||||
.colors-custom .site-footer .widget-area a,
|
.colors-custom .site-footer .widget-area a,
|
||||||
.colors-custom .posts-navigation a,
|
.colors-custom .posts-navigation a,
|
||||||
.colors-custom .widget_authors a strong {
|
.colors-custom .widget_authors a strong {
|
||||||
-webkit-box-shadow: inset 0 -1px 0 hsl( ' . $hue . ', ' . $saturation . ', 6% ); /* base: rgba(15, 15, 15, 1); */
|
-webkit-box-shadow: inset 0 -1px 0 hsl( ' . $hue . ', ' . $saturation . ', 6% ); /* base: rgba(15, 15, 15, 1); */
|
||||||
box-shadow: inset 0 -1px 0 hsl( ' . $hue . ', ' . $saturation . ', 6% ); /* base: rgba(15, 15, 15, 1); */
|
box-shadow: inset 0 -1px 0 hsl( ' . $hue . ', ' . $saturation . ', 6% ); /* base: rgba(15, 15, 15, 1); */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -201,7 +201,7 @@ function twentyseventeen_custom_colors_css() {
|
||||||
.colors-custom .widget ul li a:focus,
|
.colors-custom .widget ul li a:focus,
|
||||||
.colors-custom .widget ul li a:hover {
|
.colors-custom .widget ul li a:hover {
|
||||||
-webkit-box-shadow: inset 0 0 0 hsl( ' . $hue . ', ' . $saturation . ', 13% ), 0 3px 0 hsl( ' . $hue . ', ' . $saturation . ', 13% );
|
-webkit-box-shadow: inset 0 0 0 hsl( ' . $hue . ', ' . $saturation . ', 13% ), 0 3px 0 hsl( ' . $hue . ', ' . $saturation . ', 13% );
|
||||||
box-shadow: inset 0 0 0 hsl( ' . $hue . ', ' . $saturation. ' , 13% ), 0 3px 0 hsl( ' . $hue . ', ' . $saturation . ', 13% );
|
box-shadow: inset 0 0 0 hsl( ' . $hue . ', ' . $saturation . ' , 13% ), 0 3px 0 hsl( ' . $hue . ', ' . $saturation . ', 13% );
|
||||||
}
|
}
|
||||||
|
|
||||||
body.colors-custom,
|
body.colors-custom,
|
||||||
|
@ -560,7 +560,6 @@ body.colors-custom,
|
||||||
}
|
}
|
||||||
}';
|
}';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filters Twenty Seventeen custom colors CSS.
|
* Filters Twenty Seventeen custom colors CSS.
|
||||||
*
|
*
|
||||||
|
|
|
@ -111,6 +111,8 @@ endif; // End of twentyseventeen_header_style.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Customize video play/pause button in the custom header.
|
* Customize video play/pause button in the custom header.
|
||||||
|
*
|
||||||
|
* @param array $settings Video settings.
|
||||||
*/
|
*/
|
||||||
function twentyseventeen_video_controls( $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' ) );
|
||||||
|
|
|
@ -123,6 +123,8 @@ add_action( 'customize_register', 'twentyseventeen_customize_register' );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sanitize the page layout options.
|
* Sanitize the page layout options.
|
||||||
|
*
|
||||||
|
* @param string $input Page layout.
|
||||||
*/
|
*/
|
||||||
function twentyseventeen_sanitize_page_layout( $input ) {
|
function twentyseventeen_sanitize_page_layout( $input ) {
|
||||||
$valid = array(
|
$valid = array(
|
||||||
|
@ -139,11 +141,13 @@ function twentyseventeen_sanitize_page_layout( $input ) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sanitize the colorscheme.
|
* Sanitize the colorscheme.
|
||||||
|
*
|
||||||
|
* @param string $input Color scheme.
|
||||||
*/
|
*/
|
||||||
function twentyseventeen_sanitize_colorscheme( $input ) {
|
function twentyseventeen_sanitize_colorscheme( $input ) {
|
||||||
$valid = array( 'light', 'dark', 'custom' );
|
$valid = array( 'light', 'dark', 'custom' );
|
||||||
|
|
||||||
if ( in_array( $input, $valid ) ) {
|
if ( in_array( $input, $valid, true ) ) {
|
||||||
return $input;
|
return $input;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -128,8 +128,8 @@ endif;
|
||||||
/**
|
/**
|
||||||
* Display a front page section.
|
* Display a front page section.
|
||||||
*
|
*
|
||||||
* @param $partial WP_Customize_Partial Partial associated with a selective refresh request.
|
* @param WP_Customize_Partial $partial Partial associated with a selective refresh request.
|
||||||
* @param $id integer Front page section to display.
|
* @param integer $id Front page section to display.
|
||||||
*/
|
*/
|
||||||
function twentyseventeen_front_page_section( $partial = null, $id = 0 ) {
|
function twentyseventeen_front_page_section( $partial = null, $id = 0 ) {
|
||||||
if ( is_a( $partial, 'WP_Customize_Partial' ) ) {
|
if ( is_a( $partial, 'WP_Customize_Partial' ) ) {
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php $unique_id = esc_attr( uniqid( 'search-form-' ) ); ?>
|
<?php $unique_id = esc_attr( uniqid( 'search-form-' ) ); ?>
|
||||||
|
|
|
@ -17,22 +17,22 @@ get_header(); ?>
|
||||||
<main id="main" class="site-main" role="main">
|
<main id="main" class="site-main" role="main">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
/* Start the Loop */
|
/* Start the Loop */
|
||||||
while ( have_posts() ) : the_post();
|
while ( have_posts() ) : the_post();
|
||||||
|
|
||||||
get_template_part( 'template-parts/post/content', get_post_format() );
|
get_template_part( 'template-parts/post/content', get_post_format() );
|
||||||
|
|
||||||
// If comments are open or we have at least one comment, load up the comment template.
|
// If comments are open or we have at least one comment, load up the comment template.
|
||||||
if ( comments_open() || get_comments_number() ) :
|
if ( comments_open() || get_comments_number() ) :
|
||||||
comments_template();
|
comments_template();
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
the_post_navigation( array(
|
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>',
|
'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>',
|
'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.
|
endwhile; // End of the loop.
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</main><!-- #main -->
|
</main><!-- #main -->
|
||||||
|
|
|
@ -21,10 +21,13 @@
|
||||||
<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
|
<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php $description = get_bloginfo( 'description', 'display' );
|
<?php
|
||||||
if ( $description || is_customize_preview() ) : ?>
|
$description = get_bloginfo( 'description', 'display' );
|
||||||
<p class="site-description"><?php echo $description; ?></p>
|
|
||||||
<?php endif; ?>
|
if ( $description || is_customize_preview() ) :
|
||||||
|
?>
|
||||||
|
<p class="site-description"><?php echo $description; ?></p>
|
||||||
|
<?php endif; ?>
|
||||||
</div><!-- .site-branding-text -->
|
</div><!-- .site-branding-text -->
|
||||||
|
|
||||||
<?php if ( ( twentyseventeen_is_frontpage() || ( is_home() && is_front_page() ) ) && ! has_nav_menu( 'top' ) ) : ?>
|
<?php if ( ( twentyseventeen_is_frontpage() || ( is_home() && is_front_page() ) ) && ! has_nav_menu( 'top' ) ) : ?>
|
||||||
|
|
|
@ -10,7 +10,14 @@
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<nav id="site-navigation" class="main-navigation" role="navigation" aria-label="<?php _e( 'Top Menu', 'twentyseventeen' ); ?>">
|
<nav id="site-navigation" class="main-navigation" role="navigation" aria-label="<?php _e( 'Top Menu', 'twentyseventeen' ); ?>">
|
||||||
<button class="menu-toggle" aria-controls="top-menu" aria-expanded="false"><?php echo twentyseventeen_get_svg( array( 'icon' => 'bars' ) ); echo twentyseventeen_get_svg( array( 'icon' => 'close' ) ); _e( 'Menu', 'twentyseventeen' ); ?></button>
|
<button class="menu-toggle" aria-controls="top-menu" aria-expanded="false">
|
||||||
|
<?php
|
||||||
|
echo twentyseventeen_get_svg( array( 'icon' => 'bars' ) );
|
||||||
|
echo twentyseventeen_get_svg( array( 'icon' => 'close' ) );
|
||||||
|
_e( 'Menu', 'twentyseventeen' );
|
||||||
|
?>
|
||||||
|
</button>
|
||||||
|
|
||||||
<?php wp_nav_menu( array(
|
<?php wp_nav_menu( array(
|
||||||
'theme_location' => 'top',
|
'theme_location' => 'top',
|
||||||
'menu_id' => 'top-menu',
|
'menu_id' => 'top-menu',
|
||||||
|
|
|
@ -14,22 +14,22 @@
|
||||||
|
|
||||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||||
<?php
|
<?php
|
||||||
if ( is_sticky() && is_home() ) :
|
if ( is_sticky() && is_home() ) {
|
||||||
echo twentyseventeen_get_svg( array( 'icon' => 'thumb-tack' ) );
|
echo twentyseventeen_get_svg( array( 'icon' => 'thumb-tack' ) );
|
||||||
endif;
|
}
|
||||||
?>
|
?>
|
||||||
<header class="entry-header">
|
<header class="entry-header">
|
||||||
<?php
|
<?php
|
||||||
if ( 'post' === get_post_type() ) :
|
if ( 'post' === get_post_type() ) {
|
||||||
echo '<div class="entry-meta">';
|
echo '<div class="entry-meta">';
|
||||||
if ( is_single() ) :
|
if ( is_single() ) {
|
||||||
twentyseventeen_posted_on();
|
twentyseventeen_posted_on();
|
||||||
else :
|
} else {
|
||||||
echo twentyseventeen_time_link();
|
echo twentyseventeen_time_link();
|
||||||
twentyseventeen_edit_link();
|
twentyseventeen_edit_link();
|
||||||
endif;
|
};
|
||||||
echo '</div><!-- .entry-meta -->';
|
echo '</div><!-- .entry-meta -->';
|
||||||
endif;
|
};
|
||||||
|
|
||||||
if ( is_single() ) {
|
if ( is_single() ) {
|
||||||
the_title( '<h1 class="entry-title">', '</h1>' );
|
the_title( '<h1 class="entry-title">', '</h1>' );
|
||||||
|
@ -60,20 +60,21 @@
|
||||||
|
|
||||||
<div class="entry-content">
|
<div class="entry-content">
|
||||||
|
|
||||||
<?php if ( ! is_single() ) :
|
<?php
|
||||||
|
if ( ! is_single() ) {
|
||||||
|
|
||||||
// If not a single post, highlight the audio file.
|
// If not a single post, highlight the audio file.
|
||||||
if ( ! empty( $audio ) ) :
|
if ( ! empty( $audio ) ) {
|
||||||
foreach ( $audio as $audio_html ) {
|
foreach ( $audio as $audio_html ) {
|
||||||
echo '<div class="entry-audio">';
|
echo '<div class="entry-audio">';
|
||||||
echo $audio_html;
|
echo $audio_html;
|
||||||
echo '</div><!-- .entry-audio -->';
|
echo '</div><!-- .entry-audio -->';
|
||||||
}
|
}
|
||||||
endif;
|
};
|
||||||
|
|
||||||
endif;
|
};
|
||||||
|
|
||||||
if ( is_single() || empty( $audio ) ) :
|
if ( is_single() || empty( $audio ) ) {
|
||||||
|
|
||||||
/* translators: %s: Name of current post */
|
/* translators: %s: Name of current post */
|
||||||
the_content( sprintf(
|
the_content( sprintf(
|
||||||
|
@ -88,12 +89,15 @@
|
||||||
'link_after' => '</span>',
|
'link_after' => '</span>',
|
||||||
) );
|
) );
|
||||||
|
|
||||||
endif; ?>
|
};
|
||||||
|
?>
|
||||||
|
|
||||||
</div><!-- .entry-content -->
|
</div><!-- .entry-content -->
|
||||||
|
|
||||||
<?php if ( is_single() ) : ?>
|
<?php
|
||||||
<?php twentyseventeen_entry_footer(); ?>
|
if ( is_single() ) {
|
||||||
<?php endif; ?>
|
twentyseventeen_entry_footer();
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
</article><!-- #post-## -->
|
</article><!-- #post-## -->
|
||||||
|
|
|
@ -20,8 +20,8 @@
|
||||||
<?php if ( 'post' === get_post_type() ) : ?>
|
<?php if ( 'post' === get_post_type() ) : ?>
|
||||||
<div class="entry-meta">
|
<div class="entry-meta">
|
||||||
<?php
|
<?php
|
||||||
echo twentyseventeen_time_link();
|
echo twentyseventeen_time_link();
|
||||||
twentyseventeen_edit_link();
|
twentyseventeen_edit_link();
|
||||||
?>
|
?>
|
||||||
</div><!-- .entry-meta -->
|
</div><!-- .entry-meta -->
|
||||||
<?php elseif ( 'page' === get_post_type() && get_edit_post_link() ) : ?>
|
<?php elseif ( 'page' === get_post_type() && get_edit_post_link() ) : ?>
|
||||||
|
|
|
@ -9,32 +9,33 @@
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||||
<?php
|
<?php
|
||||||
if ( is_sticky() && is_home() ) :
|
if ( is_sticky() && is_home() ) {
|
||||||
echo twentyseventeen_get_svg( array( 'icon' => 'thumb-tack' ) );
|
echo twentyseventeen_get_svg( array( 'icon' => 'thumb-tack' ) );
|
||||||
endif;
|
}
|
||||||
?>
|
?>
|
||||||
<header class="entry-header">
|
<header class="entry-header">
|
||||||
<?php
|
<?php
|
||||||
if ( 'post' === get_post_type() ) :
|
if ( 'post' === get_post_type() ) {
|
||||||
echo '<div class="entry-meta">';
|
echo '<div class="entry-meta">';
|
||||||
if ( is_single() ) :
|
if ( is_single() ) {
|
||||||
twentyseventeen_posted_on();
|
twentyseventeen_posted_on();
|
||||||
else :
|
} else {
|
||||||
echo twentyseventeen_time_link();
|
echo twentyseventeen_time_link();
|
||||||
twentyseventeen_edit_link();
|
twentyseventeen_edit_link();
|
||||||
endif;
|
};
|
||||||
echo '</div><!-- .entry-meta -->';
|
echo '</div><!-- .entry-meta -->';
|
||||||
endif;
|
};
|
||||||
|
|
||||||
if ( is_single() ) {
|
if ( is_single() ) {
|
||||||
the_title( '<h1 class="entry-title">', '</h1>' );
|
the_title( '<h1 class="entry-title">', '</h1>' );
|
||||||
} else {
|
} else {
|
||||||
the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
|
the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</header><!-- .entry-header -->
|
</header><!-- .entry-header -->
|
||||||
|
|
||||||
|
@ -48,18 +49,19 @@
|
||||||
|
|
||||||
<div class="entry-content">
|
<div class="entry-content">
|
||||||
|
|
||||||
<?php if ( ! is_single() ) :
|
<?php
|
||||||
|
if ( ! is_single() ) {
|
||||||
|
|
||||||
// If not a single post, highlight the gallery.
|
// If not a single post, highlight the gallery.
|
||||||
if ( get_post_gallery() ) :
|
if ( get_post_gallery() ) {
|
||||||
echo '<div class="entry-gallery">';
|
echo '<div class="entry-gallery">';
|
||||||
echo get_post_gallery();
|
echo get_post_gallery();
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
endif;
|
};
|
||||||
|
|
||||||
endif;
|
};
|
||||||
|
|
||||||
if ( is_single() || ! get_post_gallery() ) :
|
if ( is_single() || ! get_post_gallery() ) {
|
||||||
|
|
||||||
/* translators: %s: Name of current post */
|
/* translators: %s: Name of current post */
|
||||||
the_content( sprintf(
|
the_content( sprintf(
|
||||||
|
@ -74,12 +76,15 @@
|
||||||
'link_after' => '</span>',
|
'link_after' => '</span>',
|
||||||
) );
|
) );
|
||||||
|
|
||||||
endif; ?>
|
};
|
||||||
|
?>
|
||||||
|
|
||||||
</div><!-- .entry-content -->
|
</div><!-- .entry-content -->
|
||||||
|
|
||||||
<?php if ( is_single() ) : ?>
|
<?php
|
||||||
<?php twentyseventeen_entry_footer(); ?>
|
if ( is_single() ) {
|
||||||
<?php endif; ?>
|
twentyseventeen_entry_footer();
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
</article><!-- #post-## -->
|
</article><!-- #post-## -->
|
||||||
|
|
|
@ -9,26 +9,27 @@
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||||
<?php
|
<?php
|
||||||
if ( is_sticky() && is_home() ) :
|
if ( is_sticky() && is_home() ) {
|
||||||
echo twentyseventeen_get_svg( array( 'icon' => 'thumb-tack' ) );
|
echo twentyseventeen_get_svg( array( 'icon' => 'thumb-tack' ) );
|
||||||
endif;
|
}
|
||||||
?>
|
?>
|
||||||
<header class="entry-header">
|
<header class="entry-header">
|
||||||
<?php
|
<?php
|
||||||
if ( 'post' === get_post_type() ) :
|
if ( 'post' === get_post_type() ) {
|
||||||
echo '<div class="entry-meta">';
|
echo '<div class="entry-meta">';
|
||||||
if ( is_single() ) :
|
if ( is_single() ) {
|
||||||
twentyseventeen_posted_on();
|
twentyseventeen_posted_on();
|
||||||
else :
|
} else {
|
||||||
echo twentyseventeen_time_link();
|
echo twentyseventeen_time_link();
|
||||||
twentyseventeen_edit_link();
|
twentyseventeen_edit_link();
|
||||||
endif;
|
};
|
||||||
echo '</div><!-- .entry-meta -->';
|
echo '</div><!-- .entry-meta -->';
|
||||||
endif;
|
};
|
||||||
|
|
||||||
if ( is_single() ) {
|
if ( is_single() ) {
|
||||||
the_title( '<h1 class="entry-title">', '</h1>' );
|
the_title( '<h1 class="entry-title">', '</h1>' );
|
||||||
|
@ -48,7 +49,7 @@
|
||||||
|
|
||||||
<div class="entry-content">
|
<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.
|
// Only show content if is a single post, or if there's no featured image.
|
||||||
/* translators: %s: Name of current post */
|
/* translators: %s: Name of current post */
|
||||||
|
@ -64,12 +65,15 @@
|
||||||
'link_after' => '</span>',
|
'link_after' => '</span>',
|
||||||
) );
|
) );
|
||||||
|
|
||||||
endif; ?>
|
};
|
||||||
|
?>
|
||||||
|
|
||||||
</div><!-- .entry-content -->
|
</div><!-- .entry-content -->
|
||||||
|
|
||||||
<?php if ( is_single() ) : ?>
|
<?php
|
||||||
<?php twentyseventeen_entry_footer(); ?>
|
if ( is_single() ) {
|
||||||
<?php endif; ?>
|
twentyseventeen_entry_footer();
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
</article><!-- #post-## -->
|
</article><!-- #post-## -->
|
||||||
|
|
|
@ -9,26 +9,27 @@
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||||
<?php
|
<?php
|
||||||
if ( is_sticky() && is_home() ) :
|
if ( is_sticky() && is_home() ) {
|
||||||
echo twentyseventeen_get_svg( array( 'icon' => 'thumb-tack' ) );
|
echo twentyseventeen_get_svg( array( 'icon' => 'thumb-tack' ) );
|
||||||
endif;
|
}
|
||||||
?>
|
?>
|
||||||
<header class="entry-header">
|
<header class="entry-header">
|
||||||
<?php
|
<?php
|
||||||
if ( 'post' === get_post_type() ) :
|
if ( 'post' === get_post_type() ) {
|
||||||
echo '<div class="entry-meta">';
|
echo '<div class="entry-meta">';
|
||||||
if ( is_single() ) :
|
if ( is_single() ) {
|
||||||
twentyseventeen_posted_on();
|
twentyseventeen_posted_on();
|
||||||
else :
|
} else {
|
||||||
echo twentyseventeen_time_link();
|
echo twentyseventeen_time_link();
|
||||||
twentyseventeen_edit_link();
|
twentyseventeen_edit_link();
|
||||||
endif;
|
}
|
||||||
echo '</div><!-- .entry-meta -->';
|
echo '</div><!-- .entry-meta -->';
|
||||||
endif;
|
};
|
||||||
|
|
||||||
if ( is_single() ) {
|
if ( is_single() ) {
|
||||||
the_title( '<h1 class="entry-title">', '</h1>' );
|
the_title( '<h1 class="entry-title">', '</h1>' );
|
||||||
|
@ -58,20 +59,21 @@
|
||||||
|
|
||||||
<div class="entry-content">
|
<div class="entry-content">
|
||||||
|
|
||||||
<?php if ( ! is_single() ) :
|
<?php
|
||||||
|
if ( ! is_single() ) {
|
||||||
|
|
||||||
// If not a single post, highlight the video file.
|
// If not a single post, highlight the video file.
|
||||||
if ( ! empty( $video ) ) :
|
if ( ! empty( $video ) ) {
|
||||||
foreach ( $video as $video_html ) {
|
foreach ( $video as $video_html ) {
|
||||||
echo '<div class="entry-video">';
|
echo '<div class="entry-video">';
|
||||||
echo $video_html;
|
echo $video_html;
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
}
|
}
|
||||||
endif;
|
};
|
||||||
|
|
||||||
endif;
|
};
|
||||||
|
|
||||||
if ( is_single() || empty( $video ) ) :
|
if ( is_single() || empty( $video ) ) {
|
||||||
|
|
||||||
/* translators: %s: Name of current post */
|
/* translators: %s: Name of current post */
|
||||||
the_content( sprintf(
|
the_content( sprintf(
|
||||||
|
@ -85,13 +87,15 @@
|
||||||
'link_before' => '<span class="page-number">',
|
'link_before' => '<span class="page-number">',
|
||||||
'link_after' => '</span>',
|
'link_after' => '</span>',
|
||||||
) );
|
) );
|
||||||
|
};
|
||||||
endif; ?>
|
?>
|
||||||
|
|
||||||
</div><!-- .entry-content -->
|
</div><!-- .entry-content -->
|
||||||
|
|
||||||
<?php if ( is_single() ) : ?>
|
<?php
|
||||||
<?php twentyseventeen_entry_footer(); ?>
|
if ( is_single() ) {
|
||||||
<?php endif; ?>
|
twentyseventeen_entry_footer();
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
</article><!-- #post-## -->
|
</article><!-- #post-## -->
|
||||||
|
|
|
@ -14,28 +14,28 @@
|
||||||
|
|
||||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||||
<?php
|
<?php
|
||||||
if ( is_sticky() && is_home() ) :
|
if ( is_sticky() && is_home() ) :
|
||||||
echo twentyseventeen_get_svg( array( 'icon' => 'thumb-tack' ) );
|
echo twentyseventeen_get_svg( array( 'icon' => 'thumb-tack' ) );
|
||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
<header class="entry-header">
|
<header class="entry-header">
|
||||||
<?php
|
<?php
|
||||||
if ( 'post' === get_post_type() ) :
|
if ( 'post' === get_post_type() ) {
|
||||||
echo '<div class="entry-meta">';
|
echo '<div class="entry-meta">';
|
||||||
if ( is_single() ) :
|
if ( is_single() ) {
|
||||||
twentyseventeen_posted_on();
|
twentyseventeen_posted_on();
|
||||||
else :
|
} else {
|
||||||
echo twentyseventeen_time_link();
|
echo twentyseventeen_time_link();
|
||||||
twentyseventeen_edit_link();
|
twentyseventeen_edit_link();
|
||||||
endif;
|
};
|
||||||
echo '</div><!-- .entry-meta -->';
|
echo '</div><!-- .entry-meta -->';
|
||||||
endif;
|
};
|
||||||
|
|
||||||
if ( is_single() ) {
|
if ( is_single() ) {
|
||||||
the_title( '<h1 class="entry-title">', '</h1>' );
|
the_title( '<h1 class="entry-title">', '</h1>' );
|
||||||
} else {
|
} else {
|
||||||
the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
|
the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</header><!-- .entry-header -->
|
</header><!-- .entry-header -->
|
||||||
|
|
||||||
|
@ -49,23 +49,25 @@
|
||||||
|
|
||||||
<div class="entry-content">
|
<div class="entry-content">
|
||||||
<?php
|
<?php
|
||||||
/* translators: %s: Name of current post */
|
/* translators: %s: Name of current post */
|
||||||
the_content( sprintf(
|
the_content( sprintf(
|
||||||
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
|
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
|
||||||
get_the_title()
|
get_the_title()
|
||||||
) );
|
) );
|
||||||
|
|
||||||
wp_link_pages( array(
|
wp_link_pages( array(
|
||||||
'before' => '<div class="page-links">' . __( 'Pages:', 'twentyseventeen' ),
|
'before' => '<div class="page-links">' . __( 'Pages:', 'twentyseventeen' ),
|
||||||
'after' => '</div>',
|
'after' => '</div>',
|
||||||
'link_before' => '<span class="page-number">',
|
'link_before' => '<span class="page-number">',
|
||||||
'link_after' => '</span>',
|
'link_after' => '</span>',
|
||||||
) );
|
) );
|
||||||
?>
|
?>
|
||||||
</div><!-- .entry-content -->
|
</div><!-- .entry-content -->
|
||||||
|
|
||||||
<?php if ( is_single() ) : ?>
|
<?php
|
||||||
<?php twentyseventeen_entry_footer(); ?>
|
if ( is_single() ) {
|
||||||
<?php endif; ?>
|
twentyseventeen_entry_footer();
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
</article><!-- #post-## -->
|
</article><!-- #post-## -->
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.8-alpha-39617';
|
$wp_version = '4.8-alpha-39618';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue