Changeset 39618
- Timestamp:
- 12/16/2016 10:07:41 PM (8 years ago)
- Location:
- trunk/src/wp-content/themes/twentyseventeen
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentyseventeen/comments.php
r39072 r39618 31 31 <h2 class="comments-title"> 32 32 <?php 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 33 $comments_number = get_comments_number(); 34 if ( '1' === $comments_number ) { 35 /* translators: %s: post title */ 36 printf( _x( 'One Reply to “%s”', 'comments title', 'twentyseventeen' ), get_the_title() ); 37 } else { 38 printf( 39 /* translators: 1: number of comments, 2: post title */ 40 _nx( 41 '%1$s Reply to “%2$s”', 42 '%1$s Replies to “%2$s”', 43 $comments_number, 44 'comments title', 45 'twentyseventeen' 46 ), 47 number_format_i18n( $comments_number ), 48 get_the_title() 49 ); 50 } 51 51 ?> 52 52 </h2> -
trunk/src/wp-content/themes/twentyseventeen/functions.php
r39561 r39618 311 311 * @since Twenty Seventeen 1.0 312 312 * 313 * @param string $link Link to single post/page. 313 314 * @return string 'Continue reading' link prepended with an ellipsis. 314 315 */ -
trunk/src/wp-content/themes/twentyseventeen/inc/color-patterns.php
r39413 r39618 96 96 .colors-custom .posts-navigation a, 97 97 .colors-custom .widget_authors a strong { 98 -webkit-box-shadow: inset 0 -1px 0 hsl( ' . $hue . ', ' . $saturation 98 -webkit-box-shadow: inset 0 -1px 0 hsl( ' . $hue . ', ' . $saturation . ', 6% ); /* base: rgba(15, 15, 15, 1); */ 99 99 box-shadow: inset 0 -1px 0 hsl( ' . $hue . ', ' . $saturation . ', 6% ); /* base: rgba(15, 15, 15, 1); */ 100 100 } … … 202 202 .colors-custom .widget ul li a:hover { 203 203 -webkit-box-shadow: inset 0 0 0 hsl( ' . $hue . ', ' . $saturation . ', 13% ), 0 3px 0 hsl( ' . $hue . ', ' . $saturation . ', 13% ); 204 box-shadow: inset 0 0 0 hsl( ' . $hue . ', ' . $saturation . ' , 13% ), 0 3px 0 hsl( ' . $hue . ', ' . $saturation . ', 13% );204 box-shadow: inset 0 0 0 hsl( ' . $hue . ', ' . $saturation . ' , 13% ), 0 3px 0 hsl( ' . $hue . ', ' . $saturation . ', 13% ); 205 205 } 206 206 … … 561 561 }'; 562 562 563 564 563 /** 565 564 * Filters Twenty Seventeen custom colors CSS. -
trunk/src/wp-content/themes/twentyseventeen/inc/custom-header.php
r39447 r39618 112 112 /** 113 113 * Customize video play/pause button in the custom header. 114 * 115 * @param array $settings Video settings. 114 116 */ 115 117 function twentyseventeen_video_controls( $settings ) { -
trunk/src/wp-content/themes/twentyseventeen/inc/customizer.php
r39227 r39618 124 124 /** 125 125 * Sanitize the page layout options. 126 * 127 * @param string $input Page layout. 126 128 */ 127 129 function twentyseventeen_sanitize_page_layout( $input ) { … … 140 142 /** 141 143 * Sanitize the colorscheme. 144 * 145 * @param string $input Color scheme. 142 146 */ 143 147 function twentyseventeen_sanitize_colorscheme( $input ) { 144 148 $valid = array( 'light', 'dark', 'custom' ); 145 149 146 if ( in_array( $input, $valid ) ) {150 if ( in_array( $input, $valid, true ) ) { 147 151 return $input; 148 152 } -
trunk/src/wp-content/themes/twentyseventeen/inc/template-tags.php
r39094 r39618 129 129 * Display a front page section. 130 130 * 131 * @param $partial WP_Customize_Partial Partial associated with a selective refresh request.132 * @param $id integerFront page section to display.131 * @param WP_Customize_Partial $partial Partial associated with a selective refresh request. 132 * @param integer $id Front page section to display. 133 133 */ 134 134 function twentyseventeen_front_page_section( $partial = null, $id = 0 ) { -
trunk/src/wp-content/themes/twentyseventeen/searchform.php
r38833 r39618 8 8 * @version 1.0 9 9 */ 10 10 11 ?> 11 12 -
trunk/src/wp-content/themes/twentyseventeen/single.php
r39072 r39618 18 18 19 19 <?php 20 21 20 /* Start the Loop */ 21 while ( have_posts() ) : the_post(); 22 22 23 23 get_template_part( 'template-parts/post/content', get_post_format() ); 24 24 25 26 27 28 25 // If comments are open or we have at least one comment, load up the comment template. 26 if ( comments_open() || get_comments_number() ) : 27 comments_template(); 28 endif; 29 29 30 31 32 33 30 the_post_navigation( array( 31 '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>', 32 '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>', 33 ) ); 34 34 35 35 endwhile; // End of the loop. 36 36 ?> 37 37 -
trunk/src/wp-content/themes/twentyseventeen/template-parts/header/site-branding.php
r39384 r39618 22 22 <?php endif; ?> 23 23 24 <?php $description = get_bloginfo( 'description', 'display' ); 25 if ( $description || is_customize_preview() ) : ?> 26 <p class="site-description"><?php echo $description; ?></p> 27 <?php endif; ?> 24 <?php 25 $description = get_bloginfo( 'description', 'display' ); 26 27 if ( $description || is_customize_preview() ) : 28 ?> 29 <p class="site-description"><?php echo $description; ?></p> 30 <?php endif; ?> 28 31 </div><!-- .site-branding-text --> 29 32 -
trunk/src/wp-content/themes/twentyseventeen/template-parts/navigation/navigation-top.php
r39384 r39618 11 11 ?> 12 12 <nav id="site-navigation" class="main-navigation" role="navigation" aria-label="<?php _e( 'Top Menu', 'twentyseventeen' ); ?>"> 13 <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> 13 <button class="menu-toggle" aria-controls="top-menu" aria-expanded="false"> 14 <?php 15 echo twentyseventeen_get_svg( array( 'icon' => 'bars' ) ); 16 echo twentyseventeen_get_svg( array( 'icon' => 'close' ) ); 17 _e( 'Menu', 'twentyseventeen' ); 18 ?> 19 </button> 20 14 21 <?php wp_nav_menu( array( 15 22 'theme_location' => 'top', -
trunk/src/wp-content/themes/twentyseventeen/template-parts/post/content-audio.php
r39146 r39618 15 15 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 16 16 <?php 17 if ( is_sticky() && is_home() ) :17 if ( is_sticky() && is_home() ) { 18 18 echo twentyseventeen_get_svg( array( 'icon' => 'thumb-tack' ) ); 19 endif;19 } 20 20 ?> 21 21 <header class="entry-header"> 22 22 <?php 23 if ( 'post' === get_post_type() ) :23 if ( 'post' === get_post_type() ) { 24 24 echo '<div class="entry-meta">'; 25 if ( is_single() ) :25 if ( is_single() ) { 26 26 twentyseventeen_posted_on(); 27 else :27 } else { 28 28 echo twentyseventeen_time_link(); 29 29 twentyseventeen_edit_link(); 30 endif;30 }; 31 31 echo '</div><!-- .entry-meta -->'; 32 endif;32 }; 33 33 34 34 if ( is_single() ) { … … 61 61 <div class="entry-content"> 62 62 63 <?php if ( ! is_single() ) : 63 <?php 64 if ( ! is_single() ) { 64 65 65 66 // If not a single post, highlight the audio file. 66 if ( ! empty( $audio ) ) :67 if ( ! empty( $audio ) ) { 67 68 foreach ( $audio as $audio_html ) { 68 69 echo '<div class="entry-audio">'; … … 70 71 echo '</div><!-- .entry-audio -->'; 71 72 } 72 endif;73 }; 73 74 74 endif;75 }; 75 76 76 if ( is_single() || empty( $audio ) ) :77 if ( is_single() || empty( $audio ) ) { 77 78 78 79 /* translators: %s: Name of current post */ … … 89 90 ) ); 90 91 91 endif; ?> 92 }; 93 ?> 92 94 93 95 </div><!-- .entry-content --> 94 96 95 <?php if ( is_single() ) : ?> 96 <?php twentyseventeen_entry_footer(); ?> 97 <?php endif; ?> 97 <?php 98 if ( is_single() ) { 99 twentyseventeen_entry_footer(); 100 } 101 ?> 98 102 99 103 </article><!-- #post-## --> -
trunk/src/wp-content/themes/twentyseventeen/template-parts/post/content-excerpt.php
r38833 r39618 21 21 <div class="entry-meta"> 22 22 <?php 23 24 23 echo twentyseventeen_time_link(); 24 twentyseventeen_edit_link(); 25 25 ?> 26 26 </div><!-- .entry-meta --> -
trunk/src/wp-content/themes/twentyseventeen/template-parts/post/content-gallery.php
r39072 r39618 10 10 * @version 1.0 11 11 */ 12 12 13 ?> 13 14 14 15 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 15 16 <?php 16 if ( is_sticky() && is_home() ) :17 18 endif;17 if ( is_sticky() && is_home() ) { 18 echo twentyseventeen_get_svg( array( 'icon' => 'thumb-tack' ) ); 19 } 19 20 ?> 20 21 <header class="entry-header"> 21 22 <?php 22 if ( 'post' === get_post_type() ) :23 24 if ( is_single() ) :25 26 else :27 28 29 endif;30 31 endif;23 if ( 'post' === get_post_type() ) { 24 echo '<div class="entry-meta">'; 25 if ( is_single() ) { 26 twentyseventeen_posted_on(); 27 } else { 28 echo twentyseventeen_time_link(); 29 twentyseventeen_edit_link(); 30 }; 31 echo '</div><!-- .entry-meta -->'; 32 }; 32 33 33 34 35 36 37 34 if ( is_single() ) { 35 the_title( '<h1 class="entry-title">', '</h1>' ); 36 } else { 37 the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' ); 38 } 38 39 ?> 39 40 </header><!-- .entry-header --> … … 49 50 <div class="entry-content"> 50 51 51 <?php if ( ! is_single() ) : 52 <?php 53 if ( ! is_single() ) { 52 54 53 55 // If not a single post, highlight the gallery. 54 if ( get_post_gallery() ) :56 if ( get_post_gallery() ) { 55 57 echo '<div class="entry-gallery">'; 56 58 echo get_post_gallery(); 57 59 echo '</div>'; 58 endif;60 }; 59 61 60 endif;62 }; 61 63 62 if ( is_single() || ! get_post_gallery() ) :64 if ( is_single() || ! get_post_gallery() ) { 63 65 64 66 /* translators: %s: Name of current post */ … … 75 77 ) ); 76 78 77 endif; ?> 79 }; 80 ?> 78 81 79 82 </div><!-- .entry-content --> 80 83 81 <?php if ( is_single() ) : ?> 82 <?php twentyseventeen_entry_footer(); ?> 83 <?php endif; ?> 84 <?php 85 if ( is_single() ) { 86 twentyseventeen_entry_footer(); 87 } 88 ?> 84 89 85 90 </article><!-- #post-## --> -
trunk/src/wp-content/themes/twentyseventeen/template-parts/post/content-image.php
r39072 r39618 10 10 * @version 1.0 11 11 */ 12 12 13 ?> 13 14 14 15 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 15 16 <?php 16 if ( is_sticky() && is_home() ) :17 if ( is_sticky() && is_home() ) { 17 18 echo twentyseventeen_get_svg( array( 'icon' => 'thumb-tack' ) ); 18 endif;19 } 19 20 ?> 20 21 <header class="entry-header"> 21 22 <?php 22 if ( 'post' === get_post_type() ) :23 if ( 'post' === get_post_type() ) { 23 24 echo '<div class="entry-meta">'; 24 if ( is_single() ) :25 if ( is_single() ) { 25 26 twentyseventeen_posted_on(); 26 else :27 } else { 27 28 echo twentyseventeen_time_link(); 28 29 twentyseventeen_edit_link(); 29 endif;30 }; 30 31 echo '</div><!-- .entry-meta -->'; 31 endif;32 }; 32 33 33 34 if ( is_single() ) { … … 49 50 <div class="entry-content"> 50 51 51 <?php if ( is_single() || '' === get_the_post_thumbnail() ) :52 <?php if ( is_single() || '' === get_the_post_thumbnail() ) { 52 53 53 54 // Only show content if is a single post, or if there's no featured image. … … 65 66 ) ); 66 67 67 endif; ?> 68 }; 69 ?> 68 70 69 71 </div><!-- .entry-content --> 70 72 71 <?php if ( is_single() ) : ?> 72 <?php twentyseventeen_entry_footer(); ?> 73 <?php endif; ?> 73 <?php 74 if ( is_single() ) { 75 twentyseventeen_entry_footer(); 76 } 77 ?> 74 78 75 79 </article><!-- #post-## --> -
trunk/src/wp-content/themes/twentyseventeen/template-parts/post/content-video.php
r39146 r39618 10 10 * @version 1.0 11 11 */ 12 12 13 ?> 13 14 14 15 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 15 16 <?php 16 if ( is_sticky() && is_home() ) :17 if ( is_sticky() && is_home() ) { 17 18 echo twentyseventeen_get_svg( array( 'icon' => 'thumb-tack' ) ); 18 endif;19 } 19 20 ?> 20 21 <header class="entry-header"> 21 22 <?php 22 if ( 'post' === get_post_type() ) :23 if ( 'post' === get_post_type() ) { 23 24 echo '<div class="entry-meta">'; 24 if ( is_single() ) :25 if ( is_single() ) { 25 26 twentyseventeen_posted_on(); 26 else :27 } else { 27 28 echo twentyseventeen_time_link(); 28 29 twentyseventeen_edit_link(); 29 endif;30 } 30 31 echo '</div><!-- .entry-meta -->'; 31 endif;32 }; 32 33 33 34 if ( is_single() ) { … … 59 60 <div class="entry-content"> 60 61 61 <?php if ( ! is_single() ) : 62 <?php 63 if ( ! is_single() ) { 62 64 63 65 // If not a single post, highlight the video file. 64 if ( ! empty( $video ) ) :66 if ( ! empty( $video ) ) { 65 67 foreach ( $video as $video_html ) { 66 68 echo '<div class="entry-video">'; … … 68 70 echo '</div>'; 69 71 } 70 endif;72 }; 71 73 72 endif;74 }; 73 75 74 if ( is_single() || empty( $video ) ) :76 if ( is_single() || empty( $video ) ) { 75 77 76 78 /* translators: %s: Name of current post */ … … 86 88 'link_after' => '</span>', 87 89 ) ); 88 89 endif;?>90 }; 91 ?> 90 92 91 93 </div><!-- .entry-content --> 92 94 93 <?php if ( is_single() ) : ?> 94 <?php twentyseventeen_entry_footer(); ?> 95 <?php endif; ?> 95 <?php 96 if ( is_single() ) { 97 twentyseventeen_entry_footer(); 98 } 99 ?> 96 100 97 101 </article><!-- #post-## --> -
trunk/src/wp-content/themes/twentyseventeen/template-parts/post/content.php
r39072 r39618 15 15 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 16 16 <?php 17 18 19 17 if ( is_sticky() && is_home() ) : 18 echo twentyseventeen_get_svg( array( 'icon' => 'thumb-tack' ) ); 19 endif; 20 20 ?> 21 21 <header class="entry-header"> 22 22 <?php 23 if ( 'post' === get_post_type() ) :24 25 if ( is_single() ) :26 27 else :28 29 30 endif;31 32 endif;23 if ( 'post' === get_post_type() ) { 24 echo '<div class="entry-meta">'; 25 if ( is_single() ) { 26 twentyseventeen_posted_on(); 27 } else { 28 echo twentyseventeen_time_link(); 29 twentyseventeen_edit_link(); 30 }; 31 echo '</div><!-- .entry-meta -->'; 32 }; 33 33 34 35 36 37 38 34 if ( is_single() ) { 35 the_title( '<h1 class="entry-title">', '</h1>' ); 36 } else { 37 the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' ); 38 } 39 39 ?> 40 40 </header><!-- .entry-header --> … … 50 50 <div class="entry-content"> 51 51 <?php 52 53 54 55 56 52 /* translators: %s: Name of current post */ 53 the_content( sprintf( 54 __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ), 55 get_the_title() 56 ) ); 57 57 58 59 60 61 62 63 58 wp_link_pages( array( 59 'before' => '<div class="page-links">' . __( 'Pages:', 'twentyseventeen' ), 60 'after' => '</div>', 61 'link_before' => '<span class="page-number">', 62 'link_after' => '</span>', 63 ) ); 64 64 ?> 65 65 </div><!-- .entry-content --> 66 66 67 <?php if ( is_single() ) : ?> 68 <?php twentyseventeen_entry_footer(); ?> 69 <?php endif; ?> 67 <?php 68 if ( is_single() ) { 69 twentyseventeen_entry_footer(); 70 } 71 ?> 70 72 71 73 </article><!-- #post-## -->
Note: See TracChangeset
for help on using the changeset viewer.