Ticket #39152: 39152.2.diff
| File 39152.2.diff, 22.6 KB (added by , 10 years ago) |
|---|
-
src/wp-content/themes/twentyseventeen/comments.php
30 30 if ( have_comments() ) : ?> 31 31 <h2 class="comments-title"> 32 32 <?php 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 }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> 53 53 -
src/wp-content/themes/twentyseventeen/functions.php
310 310 * 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 */ 315 316 function twentyseventeen_excerpt_more( $link ) { -
src/wp-content/themes/twentyseventeen/inc/color-patterns.php
95 95 .colors-custom .site-footer .widget-area a, 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 . ', 6% ); /* base: rgba(15, 15, 15, 1); */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 } 101 101 … … 201 201 .colors-custom .widget ul li a:focus, 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 207 207 body.colors-custom, … … 560 560 } 561 561 }'; 562 562 563 564 563 /** 565 564 * Filters Twenty Seventeen custom colors CSS. 566 565 * -
src/wp-content/themes/twentyseventeen/inc/custom-header.php
111 111 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 ) { 116 118 $settings['l10n']['play'] = '<span class="screen-reader-text">' . __( 'Play background video', 'twentyseventeen' ) . '</span>' . twentyseventeen_get_svg( array( 'icon' => 'play' ) ); -
src/wp-content/themes/twentyseventeen/inc/customizer.php
123 123 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 ) { 128 130 $valid = array( … … 139 141 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 } 149 153 -
src/wp-content/themes/twentyseventeen/inc/template-tags.php
128 128 /** 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 ) { 135 135 if ( is_a( $partial, 'WP_Customize_Partial' ) ) { -
src/wp-content/themes/twentyseventeen/searchform.php
7 7 * @since 1.0 8 8 * @version 1.0 9 9 */ 10 10 11 ?> 11 12 12 13 <?php $unique_id = esc_attr( uniqid( 'search-form-' ) ); ?> -
src/wp-content/themes/twentyseventeen/single.php
17 17 <main id="main" class="site-main" role="main"> 18 18 19 19 <?php 20 /* Start the Loop */21 while ( have_posts() ) : the_post();20 /* Start the Loop */ 21 while ( have_posts() ) : the_post(); 22 22 23 get_template_part( 'template-parts/post/content', get_post_format() );23 get_template_part( 'template-parts/post/content', get_post_format() ); 24 24 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;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 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 ) );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 endwhile; // End of the loop.35 endwhile; // End of the loop. 36 36 ?> 37 37 38 38 </main><!-- #main --> -
src/wp-content/themes/twentyseventeen/template-parts/header/site-branding.php
21 21 <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p> 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 30 33 <?php if ( ( twentyseventeen_is_frontpage() || ( is_home() && is_front_page() ) ) && ! has_nav_menu( 'top' ) ) : ?> -
src/wp-content/themes/twentyseventeen/template-parts/navigation/navigation-top.php
10 10 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', 16 23 'menu_id' => 'top-menu', -
src/wp-content/themes/twentyseventeen/template-parts/post/content-audio.php
14 14 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() ) { 35 35 the_title( '<h1 class="entry-title">', '</h1>' ); … … 60 60 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">'; 69 70 echo $audio_html; 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 */ 79 80 the_content( sprintf( … … 88 89 'link_after' => '</span>', 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-## --> -
src/wp-content/themes/twentyseventeen/template-parts/post/content-excerpt.php
20 20 <?php if ( 'post' === get_post_type() ) : ?> 21 21 <div class="entry-meta"> 22 22 <?php 23 echo twentyseventeen_time_link();24 twentyseventeen_edit_link();23 echo twentyseventeen_time_link(); 24 twentyseventeen_edit_link(); 25 25 ?> 26 26 </div><!-- .entry-meta --> 27 27 <?php elseif ( 'page' === get_post_type() && get_edit_post_link() ) : ?> -
src/wp-content/themes/twentyseventeen/template-parts/post/content-gallery.php
9 9 * @since 1.0 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 echo twentyseventeen_get_svg( array( 'icon' => 'thumb-tack' ) );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 echo '<div class="entry-meta">';24 if ( is_single() ) :25 twentyseventeen_posted_on();26 else :27 echo twentyseventeen_time_link();28 twentyseventeen_edit_link();29 endif;30 echo '</div><!-- .entry-meta -->';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 if ( is_single() ) {34 the_title( '<h1 class="entry-title">', '</h1>' );35 } else {36 the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );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 --> 40 41 … … 48 49 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 */ 65 67 the_content( sprintf( … … 74 76 'link_after' => '</span>', 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-## --> -
src/wp-content/themes/twentyseventeen/template-parts/post/content-image.php
13 13 14 14 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 15 15 <?php 16 if ( is_sticky() && is_home() ) :16 if ( is_sticky() && is_home() ) { 17 17 echo twentyseventeen_get_svg( array( 'icon' => 'thumb-tack' ) ); 18 endif;18 } 19 19 ?> 20 20 <header class="entry-header"> 21 21 <?php 22 if ( 'post' === get_post_type() ) :22 if ( 'post' === get_post_type() ) { 23 23 echo '<div class="entry-meta">'; 24 if ( is_single() ) :24 if ( is_single() ) { 25 25 twentyseventeen_posted_on(); 26 else :26 } else { 27 27 echo twentyseventeen_time_link(); 28 28 twentyseventeen_edit_link(); 29 endif;29 }; 30 30 echo '</div><!-- .entry-meta -->'; 31 endif;31 }; 32 32 33 33 if ( is_single() ) { 34 34 the_title( '<h1 class="entry-title">', '</h1>' ); … … 48 48 49 49 <div class="entry-content"> 50 50 51 <?php if ( is_single() || '' === get_the_post_thumbnail() ) :51 <?php if ( is_single() || '' === get_the_post_thumbnail() ) { 52 52 53 53 // Only show content if is a single post, or if there's no featured image. 54 54 /* translators: %s: Name of current post */ … … 64 64 'link_after' => '</span>', 65 65 ) ); 66 66 67 endif; ?> 67 }; 68 ?> 68 69 69 70 </div><!-- .entry-content --> 70 71 71 <?php if ( is_single() ) : ?> 72 <?php twentyseventeen_entry_footer(); ?> 73 <?php endif; ?> 72 <?php 73 if ( is_single() ) { 74 twentyseventeen_entry_footer(); 75 } 76 ?> 74 77 75 78 </article><!-- #post-## --> -
src/wp-content/themes/twentyseventeen/template-parts/post/content-video.php
13 13 14 14 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 15 15 <?php 16 if ( is_sticky() && is_home() ) :16 if ( is_sticky() && is_home() ) { 17 17 echo twentyseventeen_get_svg( array( 'icon' => 'thumb-tack' ) ); 18 endif;18 } 19 19 ?> 20 20 <header class="entry-header"> 21 21 <?php 22 if ( 'post' === get_post_type() ) :22 if ( 'post' === get_post_type() ) { 23 23 echo '<div class="entry-meta">'; 24 if ( is_single() ) :24 if ( is_single() ) { 25 25 twentyseventeen_posted_on(); 26 else :26 } else { 27 27 echo twentyseventeen_time_link(); 28 28 twentyseventeen_edit_link(); 29 endif;29 } 30 30 echo '</div><!-- .entry-meta -->'; 31 endif;31 }; 32 32 33 33 if ( is_single() ) { 34 34 the_title( '<h1 class="entry-title">', '</h1>' ); … … 58 58 59 59 <div class="entry-content"> 60 60 61 <?php if ( ! is_single() ) : 61 <?php 62 if ( ! is_single() ) { 62 63 63 64 // If not a single post, highlight the video file. 64 if ( ! empty( $video ) ) :65 if ( ! empty( $video ) ) { 65 66 foreach ( $video as $video_html ) { 66 67 echo '<div class="entry-video">'; 67 68 echo $video_html; 68 69 echo '</div>'; 69 70 } 70 endif;71 }; 71 72 72 endif;73 }; 73 74 74 if ( is_single() || empty( $video ) ) :75 if ( is_single() || empty( $video ) ) { 75 76 76 77 /* translators: %s: Name of current post */ 77 78 the_content( sprintf( … … 85 86 'link_before' => '<span class="page-number">', 86 87 'link_after' => '</span>', 87 88 ) ); 89 }; 90 ?> 88 91 89 endif; ?>90 91 92 </div><!-- .entry-content --> 92 93 93 <?php if ( is_single() ) : ?> 94 <?php twentyseventeen_entry_footer(); ?> 95 <?php endif; ?> 94 <?php 95 if ( is_single() ) { 96 twentyseventeen_entry_footer(); 97 } 98 ?> 96 99 97 100 </article><!-- #post-## --> -
src/wp-content/themes/twentyseventeen/template-parts/post/content.php
14 14 15 15 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 16 16 <?php 17 if ( is_sticky() && is_home() ) :18 echo twentyseventeen_get_svg( array( 'icon' => 'thumb-tack' ) );19 endif;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 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 endif;31 echo '</div><!-- .entry-meta -->';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 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 }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 --> 41 41 … … 49 49 50 50 <div class="entry-content"> 51 51 <?php 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 ) );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 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 ) );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-## -->
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)