Make WordPress Core

Ticket #58102: 58102-twentysixteen.diff

File 58102-twentysixteen.diff, 5.7 KB (added by viralsampat, 3 years ago)

I have checked another file and added my patch

  • src/wp-content/themes/twentysixteen/404.php

    diff --git a/src/wp-content/themes/twentysixteen/404.php b/src/wp-content/themes/twentysixteen/404.php
    index bb122f2f41..9bf9376e66 100644
    a b get_header(); ?>  
    1414
    1515                        <section class="error-404 not-found">
    1616                                <header class="page-header">
    17                                         <h1 class="page-title"><?php _e( 'Oops! That page can&rsquo;t be found.', 'twentysixteen' ); ?></h1>
     17                                        <h1 class="page-title"><?php esc_html_e( 'Oops! That page can&rsquo;t be found.', 'twentysixteen' ); ?></h1>
    1818                                </header><!-- .page-header -->
    1919
    2020                                <div class="page-content">
    21                                         <p><?php _e( 'It looks like nothing was found at this location. Maybe try a search?', 'twentysixteen' ); ?></p>
     21                                        <p><?php esc_html_e( 'It looks like nothing was found at this location. Maybe try a search?', 'twentysixteen' ); ?></p>
    2222
    2323                                        <?php get_search_form(); ?>
    2424                                </div><!-- .page-content -->
  • src/wp-content/themes/twentysixteen/functions.php

    diff --git a/src/wp-content/themes/twentysixteen/functions.php b/src/wp-content/themes/twentysixteen/functions.php
    index d098a1ebde..86dcaaf703 100644
    a b if ( ! function_exists( 'twentysixteen_setup' ) ) :  
    226226                // Add support for custom line height controls.
    227227                add_theme_support( 'custom-line-height' );
    228228        }
    229 endif; // twentysixteen_setup()
     229endif;
    230230add_action( 'after_setup_theme', 'twentysixteen_setup' );
    231231
    232232/**
    function twentysixteen_content_width() {  
    243243}
    244244add_action( 'after_setup_theme', 'twentysixteen_content_width', 0 );
    245245
    246 /**
    247  * Add preconnect for Google Fonts.
    248  *
    249  * @since Twenty Sixteen 1.6
    250  * @deprecated Twenty Sixteen 2.9 Disabled filter because, by default, fonts are self-hosted.
    251  *
    252  * @param array  $urls          URLs to print for resource hints.
    253  * @param string $relation_type The relation type the URLs are printed.
    254  * @return array URLs to print for resource hints.
    255  */
    256 function twentysixteen_resource_hints( $urls, $relation_type ) {
    257         if ( wp_style_is( 'twentysixteen-fonts', 'queue' ) && 'preconnect' === $relation_type ) {
    258                 $urls[] = array(
    259                         'href' => 'https://fonts.gstatic.com',
    260                         'crossorigin',
    261                 );
    262         }
    263 
    264         return $urls;
    265 }
    266 // add_filter( 'wp_resource_hints', 'twentysixteen_resource_hints', 10, 2 );
    267246
    268247/**
    269248 * Registers a widget area.
  • src/wp-content/themes/twentysixteen/header.php

    diff --git a/src/wp-content/themes/twentysixteen/header.php b/src/wp-content/themes/twentysixteen/header.php
    index 2ad0f66c67..d95a67c787 100644
    a b  
    2828                <a class="skip-link screen-reader-text" href="#content">
    2929                        <?php
    3030                        /* translators: Hidden accessibility text. */
    31                         _e( 'Skip to content', 'twentysixteen' );
     31                        esc_html_e( 'Skip to content', 'twentysixteen' );
    3232                        ?>
    3333                </a>
    3434
     
    4747                                        $description = get_bloginfo( 'description', 'display' );
    4848                                        if ( $description || is_customize_preview() ) :
    4949                                                ?>
    50                                                 <p class="site-description"><?php echo $description; ?></p>
     50                                                <p class="site-description"><?php echo wp_kses_post( $description ); ?></p>
    5151                                        <?php endif; ?>
    5252                                </div><!-- .site-branding -->
    5353
    5454                                <?php if ( has_nav_menu( 'primary' ) || has_nav_menu( 'social' ) ) : ?>
    55                                         <button id="menu-toggle" class="menu-toggle"><?php _e( 'Menu', 'twentysixteen' ); ?></button>
     55                                        <button id="menu-toggle" class="menu-toggle"><?php esc_html_e( 'Menu', 'twentysixteen' ); ?></button>
    5656
    5757                                        <div id="site-header-menu" class="site-header-menu">
    5858                                                <?php if ( has_nav_menu( 'primary' ) ) : ?>
  • src/wp-content/themes/twentysixteen/template-parts/content-none.php

    diff --git a/src/wp-content/themes/twentysixteen/template-parts/content-none.php b/src/wp-content/themes/twentysixteen/template-parts/content-none.php
    index ad401cf9ec..2a78bccf0d 100644
    a b  
    1010
    1111<section class="no-results not-found">
    1212        <header class="page-header">
    13                 <h1 class="page-title"><?php _e( 'Nothing Found', 'twentysixteen' ); ?></h1>
     13                <h1 class="page-title"><?php esc_html_e( 'Nothing Found', 'twentysixteen' ); ?></h1>
    1414        </header><!-- .page-header -->
    1515
    1616        <div class="page-content">
     
    2525
    2626                <?php elseif ( is_search() ) : ?>
    2727
    28                         <p><?php _e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'twentysixteen' ); ?></p>
     28                        <p><?php esc_html_e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'twentysixteen' ); ?></p>
    2929                        <?php get_search_form(); ?>
    3030
    3131                <?php else : ?>
    3232
    33                         <p><?php _e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'twentysixteen' ); ?></p>
     33                        <p><?php esc_html_e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'twentysixteen' ); ?></p>
    3434                        <?php get_search_form(); ?>
    3535
    3636                <?php endif; ?>
  • src/wp-content/themes/twentysixteen/template-parts/content.php

    diff --git a/src/wp-content/themes/twentysixteen/template-parts/content.php b/src/wp-content/themes/twentysixteen/template-parts/content.php
    index bd2ee145c4..660dafe96d 100644
    a b  
    1111<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    1212        <header class="entry-header">
    1313                <?php if ( is_sticky() && is_home() && ! is_paged() ) : ?>
    14                         <span class="sticky-post"><?php _e( 'Featured', 'twentysixteen' ); ?></span>
     14                        <span class="sticky-post"><?php esc_html_e( 'Featured', 'twentysixteen' ); ?></span>
    1515                <?php endif; ?>
    1616
    1717                <?php the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' ); ?>