Ticket #30724: twentyfifteen.patch
File twentyfifteen.patch, 23.1 KB (added by , 6 years ago) |
---|
-
src/wp-content/themes/twentyfifteen/404.php
14 14 15 15 <section class="error-404 not-found"> 16 16 <header class="page-header"> 17 <h1 class="page-title"><?php esc_html_e( 'Oops! That page can’t be found.', 'twentyfifteen' ); ?></h1>17 <h1 class="page-title"><?php _e( 'Oops! That page can’t be found.', 'twentyfifteen' ); ?></h1> 18 18 </header><!-- .page-header --> 19 19 20 20 <div class="page-content"> 21 <p><?php esc_html_e( 'It looks like nothing was found at this location. Maybe try a search?', 'twentyfifteen' ); ?></p>21 <p><?php _e( 'It looks like nothing was found at this location. Maybe try a search?', 'twentyfifteen' ); ?></p> 22 22 23 23 <?php get_search_form(); ?> 24 24 </div><!-- .page-content --> -
src/wp-content/themes/twentyfifteen/author-bio.php
9 9 ?> 10 10 11 11 <div class="author-info"> 12 <h2 class="author-heading"><?php esc_html_e( 'Published by', 'twentyfifteen' ); ?></h2>12 <h2 class="author-heading"><?php _e( 'Published by', 'twentyfifteen' ); ?></h2> 13 13 <div class="author-avatar"> 14 14 <?php 15 15 /** -
src/wp-content/themes/twentyfifteen/comments.php
50 50 // If comments are closed and there are comments, let's leave a little note, shall we? 51 51 if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) : 52 52 ?> 53 <p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'twentyfifteen' ); ?></p>53 <p class="no-comments"><?php _e( 'Comments are closed.', 'twentyfifteen' ); ?></p> 54 54 <?php endif; ?> 55 55 56 56 <?php comment_form(); ?> -
src/wp-content/themes/twentyfifteen/content-link.php
28 28 <?php 29 29 /* translators: %s: Name of current post */ 30 30 the_content( sprintf( 31 esc_html__( 'Continue reading %s', 'twentyfifteen' ),31 _e( 'Continue reading %s', 'twentyfifteen' ), 32 32 the_title( '<span class="screen-reader-text">', '</span>', false ) 33 33 ) ); 34 34 35 35 wp_link_pages( array( 36 'before' => '<div class="page-links"><span class="page-links-title">' . esc_html__( 'Pages:', 'twentyfifteen' ) . '</span>',36 'before' => '<div class="page-links"><span class="page-links-title">' . _e( 'Pages:', 'twentyfifteen' ) . '</span>', 37 37 'after' => '</div>', 38 38 'link_before' => '<span>', 39 39 'link_after' => '</span>', 40 'pagelink' => '<span class="screen-reader-text">' . esc_html__( 'Page', 'twentyfifteen' ) . ' </span>%',40 'pagelink' => '<span class="screen-reader-text">' . _e( 'Page', 'twentyfifteen' ) . ' </span>%', 41 41 'separator' => '<span class="screen-reader-text">, </span>', 42 42 ) ); 43 43 ?> … … 53 53 54 54 <footer class="entry-footer"> 55 55 <?php twentyfifteen_entry_meta(); ?> 56 <?php edit_post_link( esc_html__( 'Edit', 'twentyfifteen' ), '<span class="edit-link">', '</span>' ); ?>56 <?php edit_post_link( _e( 'Edit', 'twentyfifteen' ), '<span class="edit-link">', '</span>' ); ?> 57 57 </footer> 58 58 <!-- .entry-footer --> 59 59 -
src/wp-content/themes/twentyfifteen/content-none.php
12 12 13 13 <section class="no-results not-found"> 14 14 <header class="page-header"> 15 <h1 class="page-title"><?php esc_html_e( 'Nothing Found', 'twentyfifteen' ); ?></h1>15 <h1 class="page-title"><?php _e( 'Nothing Found', 'twentyfifteen' ); ?></h1> 16 16 </header><!-- .page-header --> 17 17 18 18 <div class="page-content"> … … 23 23 24 24 <?php elseif ( is_search() ) : ?> 25 25 26 <p><?php esc_html_e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'twentyfifteen' ); ?></p>26 <p><?php _e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'twentyfifteen' ); ?></p> 27 27 <?php get_search_form(); ?> 28 28 29 29 <?php else : ?> 30 30 31 <p><?php esc_html_e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', 'twentyfifteen' ); ?></p>31 <p><?php _e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', 'twentyfifteen' ); ?></p> 32 32 <?php get_search_form(); ?> 33 33 34 34 <?php endif; ?> -
src/wp-content/themes/twentyfifteen/content-page.php
22 22 <?php the_content(); ?> 23 23 <?php 24 24 wp_link_pages( array( 25 'before' => '<div class="page-links"><span class="page-links-title">' . esc_html__( 'Pages:', 'twentyfifteen' ) . '</span>',25 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfifteen' ) . '</span>', 26 26 'after' => '</div>', 27 27 'link_before' => '<span>', 28 28 'link_after' => '</span>', 29 'pagelink' => '<span class="screen-reader-text">' . esc_html__( 'Page', 'twentyfifteen' ) . ' </span>%',29 'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>%', 30 30 'separator' => '<span class="screen-reader-text">, </span>', 31 31 ) ); 32 32 ?> 33 33 </div><!-- .entry-content --> 34 34 35 <?php edit_post_link( esc_html__( 'Edit', 'twentyfifteen' ), '<footer class="entry-footer"><span class="edit-link">', '</span></footer><!-- .entry-footer -->' ); ?>35 <?php edit_post_link( __( 'Edit', 'twentyfifteen' ), '<footer class="entry-footer"><span class="edit-link">', '</span></footer><!-- .entry-footer -->' ); ?> 36 36 37 37 </article><!-- #post-## --> -
src/wp-content/themes/twentyfifteen/content-search.php
25 25 26 26 <footer class="entry-footer"> 27 27 <?php twentyfifteen_entry_meta(); ?> 28 <?php edit_post_link( esc_html__( 'Edit', 'twentyfifteen' ), '<span class="edit-link">', '</span>' ); ?>28 <?php edit_post_link( __( 'Edit', 'twentyfifteen' ), '<span class="edit-link">', '</span>' ); ?> 29 29 </footer><!-- .entry-footer --> 30 30 31 31 <?php else : ?> 32 32 33 <?php edit_post_link( esc_html__( 'Edit', 'twentyfifteen' ), '<footer class="entry-footer"><span class="edit-link">', '</span></footer><!-- .entry-footer -->' ); ?>33 <?php edit_post_link( __( 'Edit', 'twentyfifteen' ), '<footer class="entry-footer"><span class="edit-link">', '</span></footer><!-- .entry-footer -->' ); ?> 34 34 35 35 <?php endif; ?> 36 36 -
src/wp-content/themes/twentyfifteen/content.php
30 30 <?php 31 31 /* translators: %s: Name of current post */ 32 32 the_content( sprintf( 33 esc_html__( 'Continue reading %s', 'twentyfifteen' ),33 __( 'Continue reading %s', 'twentyfifteen' ), 34 34 the_title( '<span class="screen-reader-text">', '</span>', false ) 35 35 ) ); 36 36 37 37 wp_link_pages( array( 38 'before' => '<div class="page-links"><span class="page-links-title">' . esc_html__( 'Pages:', 'twentyfifteen' ) . '</span>',38 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfifteen' ) . '</span>', 39 39 'after' => '</div>', 40 40 'link_before' => '<span>', 41 41 'link_after' => '</span>', 42 'pagelink' => '<span class="screen-reader-text">' . esc_html__( 'Page', 'twentyfifteen' ) . ' </span>%',42 'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>%', 43 43 'separator' => '<span class="screen-reader-text">, </span>', 44 44 ) ); 45 45 ?> … … 54 54 55 55 <footer class="entry-footer"> 56 56 <?php twentyfifteen_entry_meta(); ?> 57 <?php edit_post_link( esc_html__( 'Edit', 'twentyfifteen' ), '<span class="edit-link">', '</span>' ); ?>57 <?php edit_post_link( __( 'Edit', 'twentyfifteen' ), '<span class="edit-link">', '</span>' ); ?> 58 58 </footer><!-- .entry-footer --> 59 59 60 60 </article><!-- #post-## --> -
src/wp-content/themes/twentyfifteen/footer.php
22 22 */ 23 23 do_action( 'twentyfifteen_credits' ); 24 24 ?> 25 <a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentyfifteen' ) ); ?>"><?php printf( esc_html__( 'Proudly powered by %s', 'twentyfifteen' ), 'WordPress' ); ?></a>25 <a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentyfifteen' ) ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentyfifteen' ), 'WordPress' ); ?></a> 26 26 </div><!-- .site-info --> 27 27 </footer><!-- .site-footer --> 28 28 -
src/wp-content/themes/twentyfifteen/functions.php
223 223 224 224 wp_enqueue_script( 'twentyfifteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20141010', true ); 225 225 wp_localize_script( 'twentyfifteen-script', 'screenReaderText', array( 226 'expand' => '<span class="screen-reader-text">' . esc_html__( 'expand child menu', 'twentyfifteen' ) . '</span>',227 'collapse' => '<span class="screen-reader-text">' . esc_html__( 'collapse child menu', 'twentyfifteen' ) . '</span>',226 'expand' => '<span class="screen-reader-text">' . __( 'expand child menu', 'twentyfifteen' ) . '</span>', 227 'collapse' => '<span class="screen-reader-text">' . __( 'collapse child menu', 'twentyfifteen' ) . '</span>', 228 228 ) ); 229 229 } 230 230 add_action( 'wp_enqueue_scripts', 'twentyfifteen_scripts' ); -
src/wp-content/themes/twentyfifteen/header.php
38 38 39 39 $description = get_bloginfo( 'description', 'display' ); 40 40 if ( ! empty( $description ) || is_customize_preview() ) : ?> 41 <p class="site-description"><?php echo esc_html( $description ); ?></p>41 <p class="site-description"><?php echo $description; ?></p> 42 42 <?php endif; 43 43 ?> 44 <button class="secondary-toggle"><?php esc_html_e( 'Menu and widgets', 'twentyfifteen' ); ?></button>44 <button class="secondary-toggle"><?php _e( 'Menu and widgets', 'twentyfifteen' ); ?></button> 45 45 </div><!-- .site-branding --> 46 46 </header><!-- .site-header --> 47 47 -
src/wp-content/themes/twentyfifteen/image.php
21 21 22 22 <nav id="image-navigation" class="navigation image-navigation"> 23 23 <div class="nav-links"> 24 <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>24 <div class="nav-previous"><?php previous_image_link( false, __( 'Previous Image', 'twentyfifteen' ) ); ?></div><div class="nav-next"><?php next_image_link( false, __( 'Next Image', 'twentyfifteen' ) ); ?></div> 25 25 </div><!-- .nav-links --> 26 26 </nav><!-- .image-navigation --> 27 27 … … 56 56 <?php 57 57 the_content(); 58 58 wp_link_pages( array( 59 'before' => '<div class="page-links"><span class="page-links-title">' . esc_html__( 'Pages:', 'twentyfifteen' ) . '</span>',59 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfifteen' ) . '</span>', 60 60 'after' => '</div>', 61 61 'link_before' => '<span>', 62 62 'link_after' => '</span>', 63 'pagelink' => '<span class="screen-reader-text">' . esc_html__( 'Page', 'twentyfifteen' ) . ' </span>%',63 'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>%', 64 64 'separator' => '<span class="screen-reader-text">, </span>', 65 65 ) ); 66 66 ?> … … 68 68 69 69 <footer class="entry-footer"> 70 70 <?php twentyfifteen_entry_meta(); ?> 71 <?php edit_post_link( esc_html__( 'Edit', 'twentyfifteen' ), '<span class="edit-link">', '</span>' ); ?>71 <?php edit_post_link( __( 'Edit', 'twentyfifteen' ), '<span class="edit-link">', '</span>' ); ?> 72 72 </footer><!-- .entry-footer --> 73 73 74 74 </article><!-- #post-## --> -
src/wp-content/themes/twentyfifteen/inc/customizer.php
33 33 ) ); 34 34 35 35 $wp_customize->add_control( 'color_scheme', array( 36 'label' => esc_html__( 'Base Color Scheme', 'twentyfifteen' ),36 'label' => __( 'Base Color Scheme', 'twentyfifteen' ), 37 37 'section' => 'colors', 38 38 'type' => 'select', 39 39 'choices' => twentyfifteen_get_color_scheme_choices(), … … 48 48 ) ); 49 49 50 50 $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'sidebar_textcolor', array( 51 'label' => esc_html__( 'Header and Sidebar Text Color', 'twentyfifteen' ),52 'description' => esc_html__( 'Applied to the header on small screens and the sidebar on wide screens.', 'twentyfifteen' ),51 'label' => __( 'Header and Sidebar Text Color', 'twentyfifteen' ), 52 'description' => __( 'Applied to the header on small screens and the sidebar on wide screens.', 'twentyfifteen' ), 53 53 'section' => 'colors', 54 54 ) ) ); 55 55 … … 64 64 ) ); 65 65 66 66 $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'header_background_color', array( 67 'label' => esc_html__( 'Header and Sidebar Background Color', 'twentyfifteen' ),68 'description' => esc_html__( 'Applied to the header on small screens and the sidebar on wide screens.', 'twentyfifteen' ),67 'label' => __( 'Header and Sidebar Background Color', 'twentyfifteen' ), 68 'description' => __( 'Applied to the header on small screens and the sidebar on wide screens.', 'twentyfifteen' ), 69 69 'section' => 'colors', 70 70 ) ) ); 71 71 72 72 // Add an additional description to the header image section. 73 $wp_customize->get_section( 'header_image' )->description = esc_html__( 'Applied to the header on small screens and the sidebar on wide screens.', 'twentyfifteen' );73 $wp_customize->get_section( 'header_image' )->description = __( 'Applied to the header on small screens and the sidebar on wide screens.', 'twentyfifteen' ); 74 74 } 75 75 add_action( 'customize_register', 'twentyfifteen_customize_register', 11 ); 76 76 … … 94 94 function twentyfifteen_get_color_schemes() { 95 95 return apply_filters( 'twentyfifteen_color_schemes', array( 96 96 'default' => array( 97 'label' => esc_html__( 'Default', 'twentyfifteen' ),97 'label' => __( 'Default', 'twentyfifteen' ), 98 98 'colors' => array( 99 99 '#f1f1f1', 100 100 '#ffffff', … … 105 105 ), 106 106 ), 107 107 'dark' => array( 108 'label' => esc_html__( 'Dark', 'twentyfifteen' ),108 'label' => __( 'Dark', 'twentyfifteen' ), 109 109 'colors' => array( 110 110 '#111111', 111 111 '#202020', … … 116 116 ), 117 117 ), 118 118 'yellow' => array( 119 'label' => esc_html__( 'Yellow', 'twentyfifteen' ),119 'label' => __( 'Yellow', 'twentyfifteen' ), 120 120 'colors' => array( 121 121 '#f4ca16', 122 122 '#ffdf00', … … 127 127 ), 128 128 ), 129 129 'pink' => array( 130 'label' => esc_html__( 'Pink', 'twentyfifteen' ),130 'label' => __( 'Pink', 'twentyfifteen' ), 131 131 'colors' => array( 132 132 '#ffe5d1', 133 133 '#e53b51', … … 138 138 ), 139 139 ), 140 140 'purple' => array( 141 'label' => esc_html__( 'Purple', 'twentyfifteen' ),141 'label' => __( 'Purple', 'twentyfifteen' ), 142 142 'colors' => array( 143 143 '#674970', 144 144 '#2e2256', … … 149 149 ), 150 150 ), 151 151 'blue' => array( 152 'label' => esc_html__( 'Blue', 'twentyfifteen' ),152 'label' => __( 'Blue', 'twentyfifteen' ), 153 153 'colors' => array( 154 154 '#e9f2f9', 155 155 '#55c3dc', -
src/wp-content/themes/twentyfifteen/inc/template-tags.php
20 20 if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : 21 21 ?> 22 22 <nav class="navigation comment-navigation" role="navigation"> 23 <h2 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', 'twentyfifteen' ); ?></h2>23 <h2 class="screen-reader-text"><?php _e( 'Comment navigation', 'twentyfifteen' ); ?></h2> 24 24 <div class="nav-links"> 25 25 <?php 26 if ( $prev_link = get_previous_comments_link( esc_html__( 'Older Comments', 'twentyfifteen' ) ) ) :26 if ( $prev_link = get_previous_comments_link( __( 'Older Comments', 'twentyfifteen' ) ) ) : 27 27 printf( '<div class="nav-previous">%s</div>', $prev_link ); 28 28 endif; 29 29 30 if ( $next_link = get_next_comments_link( esc_html__( 'Newer Comments', 'twentyfifteen' ) ) ) :30 if ( $next_link = get_next_comments_link( __( 'Newer Comments', 'twentyfifteen' ) ) ) : 31 31 printf( '<div class="nav-next">%s</div>', $next_link ); 32 32 endif; 33 33 ?> … … 46 46 */ 47 47 function twentyfifteen_entry_meta() { 48 48 if ( is_sticky() && is_home() && ! is_paged() ) { 49 printf( '<span class="sticky-post">%s</span>', esc_html__( 'Featured', 'twentyfifteen' ) );49 printf( '<span class="sticky-post">%s</span>', __( 'Featured', 'twentyfifteen' ) ); 50 50 } 51 51 52 52 $format = get_post_format(); 53 53 if ( current_theme_supports( 'post-formats', $format ) ) { 54 54 printf( '<span class="entry-format">%1$s<a href="%2$s">%3$s</a></span>', 55 sprintf( '<span class="screen-reader-text">%s </span>', esc_html_x( 'Format', 'Used before post format.', 'twentyfifteen' ) ),55 sprintf( '<span class="screen-reader-text">%s </span>', _x( 'Format', 'Used before post format.', 'twentyfifteen' ) ), 56 56 esc_url( get_post_format_link( $format ) ), 57 57 get_post_format_string( $format ) 58 58 ); … … 67 67 68 68 $time_string = sprintf( $time_string, 69 69 esc_attr( get_the_date( 'c' ) ), 70 esc_html( get_the_date()),70 get_the_date(), 71 71 esc_attr( get_the_modified_date( 'c' ) ), 72 esc_html( get_the_modified_date())72 get_the_modified_date() 73 73 ); 74 74 75 75 printf( '<span class="posted-on"><span class="screen-reader-text">%1$s </span><a href="%2$s" rel="bookmark">%3$s</a></span>', 76 esc_html_x( 'Posted on', 'Used before publish date.', 'twentyfifteen' ),76 _x( 'Posted on', 'Used before publish date.', 'twentyfifteen' ), 77 77 esc_url( get_permalink() ), 78 78 $time_string 79 79 ); … … 82 82 if ( 'post' == get_post_type() ) { 83 83 if ( is_singular() || is_multi_author() ) { 84 84 printf( '<span class="byline"><span class="author vcard"><span class="screen-reader-text">%1$s </span><a class="url fn n" href="%2$s">%3$s</a></span></span>', 85 esc_html_x( 'Author', 'Used before post author name.', 'twentyfifteen' ),85 _x( 'Author', 'Used before post author name.', 'twentyfifteen' ), 86 86 esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), 87 87 esc_html( get_the_author() ) 88 88 ); … … 91 91 $categories_list = get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfifteen' ) ); 92 92 if ( $categories_list && twentyfifteen_categorized_blog() ) { 93 93 printf( '<span class="cat-links"><span class="screen-reader-text">%1$s </span>%2$s</span>', 94 esc_html_x( 'Categories', 'Used before category names.', 'twentyfifteen' ),94 _x( 'Categories', 'Used before category names.', 'twentyfifteen' ), 95 95 $categories_list 96 96 ); 97 97 } … … 99 99 $tags_list = get_the_tag_list( '', _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfifteen' ) ); 100 100 if ( $tags_list ) { 101 101 printf( '<span class="tags-links"><span class="screen-reader-text">%1$s </span>%2$s</span>', 102 esc_html_x( 'Tags', 'Used before tag names.', 'twentyfifteen' ),102 _x( 'Tags', 'Used before tag names.', 'twentyfifteen' ), 103 103 $tags_list 104 104 ); 105 105 } … … 110 110 $metadata = wp_get_attachment_metadata(); 111 111 112 112 printf( '<span class="full-size-link"><span class="screen-reader-text">%1$s </span><a href="%2$s">%3$s × %4$s</a></span>', 113 esc_html_x( 'Full size', 'Used before full size attachment link.', 'twentyfifteen' ),113 _x( 'Full size', 'Used before full size attachment link.', 'twentyfifteen' ), 114 114 esc_url( wp_get_attachment_url() ), 115 115 $metadata['width'], 116 116 $metadata['height'] … … 119 119 120 120 if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) { 121 121 echo '<span class="comments-link">'; 122 comments_popup_link( esc_html__( 'Leave a comment', 'twentyfifteen' ), esc_html__( '1 Comment', 'twentyfifteen' ), esc_html__( '% Comments', 'twentyfifteen' ) );122 comments_popup_link( __( 'Leave a comment', 'twentyfifteen' ), __( '1 Comment', 'twentyfifteen' ), __( '% Comments', 'twentyfifteen' ) ); 123 123 echo '</span>'; 124 124 } 125 125 } … … 234 234 $link = sprintf( '<a href="%1$s" class="more-link">%2$s</a>', 235 235 esc_url( get_permalink( get_the_ID() ) ), 236 236 /* translators: %s: Name of current post */ 237 sprintf( esc_html__( 'Continue reading %s', 'twentyfifteen' ), '<span class="screen-reader-text">' . get_the_title( get_the_ID() ) . '</span>' )237 sprintf( __( 'Continue reading %s', 'twentyfifteen' ), '<span class="screen-reader-text">' . get_the_title( get_the_ID() ) . '</span>' ) 238 238 ); 239 239 return ' … ' . $link; 240 240 } -
src/wp-content/themes/twentyfifteen/search.php
15 15 <?php if ( have_posts() ) : ?> 16 16 17 17 <header class="page-header"> 18 <h1 class="page-title"><?php printf( esc_html__( 'Search Results for: %s', 'twentyfifteen' ), get_search_query() ); ?></h1>18 <h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'twentyfifteen' ), get_search_query() ); ?></h1> 19 19 </header><!-- .page-header --> 20 20 21 21 <?php