Skip to content
This repository has been archived by the owner on Jan 10, 2018. It is now read-only.

Commit

Permalink
Merge branch 'typo_doc_cleanup' of git://github.com/noplanman/twentys…
Browse files Browse the repository at this point in the history
…eventeen into noplanman-typo_doc_cleanup
  • Loading branch information
davidakennedy committed Oct 18, 2016
2 parents e3e9c24 + 278ea16 commit f8a839f
Show file tree
Hide file tree
Showing 15 changed files with 34 additions and 32 deletions.
8 changes: 4 additions & 4 deletions components/header/header-image.php
Expand Up @@ -15,15 +15,15 @@
// If front page.
if ( twentyseventeen_is_frontpage() || ( is_home() && is_front_page() ) ) :

// Check if Custom Header image has been added
// Check if Custom Header image has been added.
$header_image = get_header_image();
if ( ! empty( $header_image ) ) : ?>

<div class="custom-header-image" style="background-image: url(<?php echo esc_url( $header_image ); ?>)"></div>
<?php get_template_part( 'components/header/site', 'branding' ); ?>

<?php elseif ( twentyseventeen_is_frontpage() && has_post_thumbnail() ) :
// If not, fall back to front page's featured image
// If not, fall back to front page's featured image.
$post_thumbnail_id = get_post_thumbnail_id( $post->ID );
$thumbnail_attributes = wp_get_attachment_image_src( $post_thumbnail_id, 'twentyseventeen-featured-image' );
?>
Expand All @@ -32,13 +32,13 @@
<?php get_template_part( 'components/header/site', 'branding' ); ?>

<?php else : ?>
<?php // Otherwise, show a blank header ?>
<?php // Otherwise, show a blank header. ?>
<div class="custom-header-simple">
<?php get_template_part( 'components/header/site', 'branding' ); ?>
</div><!-- .custom-header-simple -->

<?php endif;
// If not the front page, show a shorter plain header
// If not the front page, show a shorter plain header.
else : ?>
<div class="custom-header-simple">
<?php get_template_part( 'components/header/site', 'branding' ); ?>
Expand Down
4 changes: 2 additions & 2 deletions components/page/content-front-page-panels.php
Expand Up @@ -55,10 +55,10 @@
</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)
// 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
<?php // Show four most recent posts.
$recent_posts = new WP_Query( array(
'posts_per_page' => 3,
'post_status' => 'publish',
Expand Down
5 changes: 3 additions & 2 deletions components/post/content-audio.php
Expand Up @@ -9,6 +9,7 @@
* @since 1.0
* @version 1.0
*/

?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
Expand Down Expand Up @@ -49,7 +50,7 @@

<?php if ( ! is_single() ) :

// If not a single post, highlight the audio file
// If not a single post, highlight the audio file.
$content = apply_filters( 'the_content', get_the_content() );
$audio = get_media_embedded_in_content( $content, array( 'audio' ) );

Expand All @@ -66,7 +67,7 @@
if ( is_single() || empty( $audio ) ) :

the_content( sprintf(
/* translators: %s: Name of current post. */
/* translators: %s: Name of current post */
__( 'Continue reading %s', 'twentyseventeen' ),
the_title( '<span class="screen-reader-text">"', '"</span>', false )
) );
Expand Down
4 changes: 2 additions & 2 deletions components/post/content-gallery.php
Expand Up @@ -49,7 +49,7 @@

<?php if ( ! is_single() ) :

// If not a single post, highlight the gallery
// If not a single post, highlight the gallery.
$content = apply_filters( 'the_content', get_the_content() );

if ( get_post_gallery() ) :
Expand All @@ -63,7 +63,7 @@
if ( is_single() || ! get_post_gallery() ) :

the_content( sprintf(
/* translators: %s: Name of current post. */
/* translators: %s: Name of current post */
__( 'Continue reading %s', 'twentyseventeen' ),
the_title( '<span class="screen-reader-text">"', '"</span>', false )
) );
Expand Down
2 changes: 1 addition & 1 deletion components/post/content-image.php
Expand Up @@ -51,7 +51,7 @@

// Only show content if is a single post, or if there's no featured image.
the_content( sprintf(
/* translators: %s: Name of current post. */
/* translators: %s: Name of current post */
__( 'Continue reading %s', 'twentyseventeen' ),
the_title( '<span class="screen-reader-text">"', '"</span>', false )
) );
Expand Down
6 changes: 3 additions & 3 deletions components/post/content-video.php
Expand Up @@ -54,21 +54,21 @@

<?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 ) ) :
foreach ( $video as $video_html ) {
echo '<div class="entry-video">';
echo $video_html;
echo '</div>';
} // endforeach
}
endif;

endif;

if ( is_single() || empty( $video ) ) :

the_content( sprintf(
/* translators: %s: Name of current post. */
/* translators: %s: Name of current post */
__( 'Continue reading %s', 'twentyseventeen' ),
the_title( '<span class="screen-reader-text">"', '"</span>', false )
) );
Expand Down
2 changes: 1 addition & 1 deletion components/post/content.php
Expand Up @@ -49,7 +49,7 @@
<div class="entry-content">
<?php
the_content( sprintf(
/* translators: %s: Name of current post. */
/* translators: %s: Name of current post */
__( 'Continue reading %s', 'twentyseventeen' ),
the_title( '<span class="screen-reader-text">"', '"</span>', false )
) );
Expand Down
12 changes: 6 additions & 6 deletions functions.php
Expand Up @@ -124,7 +124,7 @@ function twentyseventeen_content_width() {
add_action( 'after_setup_theme', 'twentyseventeen_content_width', 0 );

/**
* Register custom fonts
* Register custom fonts.
*/
function twentyseventeen_fonts_url() {
$fonts_url = '';
Expand Down Expand Up @@ -192,7 +192,7 @@ function twentyseventeen_widgets_init() {

if ( ! function_exists( 'twentyseventeen_excerpt_continue_reading' ) ) :
/**
* Replaces the excerpt "more" text by a link
* Replaces the excerpt "more" text by a link.
*/
function twentyseventeen_excerpt_continue_reading() {
return ' &hellip; <p class="link-more"><a href="' . esc_url( get_permalink() ) . '">' . sprintf( __( 'Continue reading %s', 'twentyseventeen' ), the_title( '<span class="screen-reader-text">"', '"</span>', false ) ) . '</a></p>';
Expand Down Expand Up @@ -288,7 +288,7 @@ function twentyseventeen_scripts() {

/**
* Add custom image sizes attribute to enhance responsive image functionality
* for content images
* for content images.
*
* @since Twenty Seventeen 1.0
*
Expand All @@ -314,13 +314,13 @@ function twentyseventeen_content_image_sizes_attr( $sizes, $size ) {

/**
* Add custom image sizes attribute to enhance responsive image functionality
* for post thumbnails
* for post thumbnails.
*
* @since Twenty Seventeen 1.0
*
* @param array $attr Attributes for the image markup.
* @param array $attr Attributes for the image markup.
* @param int $attachment Image attachment ID.
* @param array $size Registered image size or flat array of height and width dimensions.
* @param array $size Registered image size or flat array of height and width dimensions.
* @return string A source size value for use in a post thumbnail 'sizes' attribute.
*/
function twentyseventeen_post_thumbnail_sizes_attr( $attr, $attachment, $size ) {
Expand Down
2 changes: 1 addition & 1 deletion header.php
Expand Up @@ -39,7 +39,7 @@
</header><!-- #masthead -->

<?php
// If a regular post or page, and not the front page, show the featured image
// If a regular post or page, and not the front page, show the featured image.
if ( has_post_thumbnail() && ( is_single() || ( is_page() && ! twentyseventeen_is_frontpage() ) ) ) :
echo '<div class="single-featured-image-header">';
the_post_thumbnail( 'twentyseventeen-featured-image' );
Expand Down
4 changes: 2 additions & 2 deletions inc/custom-header.php
Expand Up @@ -36,14 +36,14 @@ function twentyseventeen_custom_header_setup() {

if ( ! function_exists( 'twentyseventeen_header_style' ) ) :
/**
* Styles the header image and text displayed on the blog
* 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
// 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;
Expand Down
10 changes: 5 additions & 5 deletions inc/customizer.php
@@ -1,6 +1,6 @@
<?php
/**
* Twenty Seventeen Theme Customizer
* Twenty Seventeen: Theme Customizer
*
* @package WordPress
* @subpackage Twenty_Seventeen
Expand Down Expand Up @@ -53,14 +53,14 @@ function twentyseventeen_customize_register( $wp_customize ) {
),
'section' => 'colors',
'priority' => 6,
'description' => 'Temporary hue slider will be replaced with a visual hue picker that is only shown when a custom scheme is selected', // temporary, intentionally untranslated
// @todo change this to a visual hue picker control, ideally extending the color control and leveraging iris by adding a `hue` mode in core
'description' => 'Temporary hue slider will be replaced with a visual hue picker that is only shown when a custom scheme is selected', // temporary, intentionally untranslated.
// @todo change this to a visual hue picker control, ideally extending the color control and leveraging iris by adding a `hue` mode in core.
// See https://core.trac.wordpress.org/ticket/38263
// @todo only show this control when the colorscheme is custom
// @todo only show this control when the colorscheme is custom.
) );

/**
* Add the Theme Options section
* Add the Theme Options section.
*/
$wp_customize->add_panel( 'options_panel', array(
'title' => __( 'Theme Options', 'twentyseventeen' ),
Expand Down
2 changes: 1 addition & 1 deletion inc/icon-functions.php
@@ -1,6 +1,6 @@
<?php
/**
* SVG icons related functions and filters.
* SVG icons related functions and filters
*
* @package WordPress
* @subpackage Twenty_Seventeen
Expand Down
2 changes: 1 addition & 1 deletion inc/template-functions.php
Expand Up @@ -58,7 +58,7 @@ function twentyseventeen_body_classes( $classes ) {
$classes[] = 'title-tagline-hidden';
}

// Get the colorschme or the default if there isn't one.
// Get the colorscheme or the default if there isn't one.
$colors = twentyseventeen_sanitize_colorscheme( get_theme_mod( 'colorscheme', 'light' ) );
$classes[] = 'colors-' . $colors;

Expand Down
2 changes: 1 addition & 1 deletion search.php
Expand Up @@ -37,7 +37,7 @@
*/
get_template_part( 'components/post/content', 'excerpt' );

endwhile;
endwhile; // End of the loop.

the_posts_pagination( array(
'prev_text' => twentyseventeen_get_svg( array( 'icon' => 'previous' ) ) . '<span class="screen-reader-text">' . __( 'Previous page', 'twentyseventeen' ) . '</span>',
Expand Down
1 change: 1 addition & 0 deletions single.php
Expand Up @@ -17,6 +17,7 @@
<main id="main" class="site-main" role="main">

<?php
/* Start the Loop */
while ( have_posts() ) : the_post();

get_template_part( 'components/post/content', get_post_format() );
Expand Down

0 comments on commit f8a839f

Please sign in to comment.