Make WordPress Core

Ticket #58102: 58102-twentyfourteen.diff

File 58102-twentyfourteen.diff, 9.1 KB (added by viralsampat, 3 years ago)

I have checked another theme and founds few file. Here, I have added its patch.

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

    diff --git a/src/wp-content/themes/twentyfourteen/404.php b/src/wp-content/themes/twentyfourteen/404.php
    index 7f5bef8412..4eecbd33af 100644
    a b get_header(); ?>  
    1414                <div id="content" class="site-content" role="main">
    1515
    1616                        <header class="page-header">
    17                                 <h1 class="page-title"><?php _e( 'Not Found', 'twentyfourteen' ); ?></h1>
     17                                <h1 class="page-title"><?php esc_html_e( 'Not Found', 'twentyfourteen' ); ?></h1>
    1818                        </header>
    1919
    2020                        <div class="page-content">
    21                                 <p><?php _e( 'It looks like nothing was found at this location. Maybe try a search?', 'twentyfourteen' ); ?></p>
     21                                <p><?php esc_html_e( 'It looks like nothing was found at this location. Maybe try a search?', 'twentyfourteen' ); ?></p>
    2222
    2323                                <?php get_search_form(); ?>
    2424                        </div><!-- .page-content -->
  • src/wp-content/themes/twentyfourteen/comments.php

    diff --git a/src/wp-content/themes/twentyfourteen/comments.php b/src/wp-content/themes/twentyfourteen/comments.php
    index fdeaf767a5..07cf3c0256 100644
    a b if ( post_password_required() ) {  
    5050                <h1 class="screen-reader-text">
    5151                        <?php
    5252                        /* translators: Hidden accessibility text. */
    53                         _e( 'Comment navigation', 'twentyfourteen' );
     53                        esc_html_e( 'Comment navigation', 'twentyfourteen' );
    5454                        ?>
    5555                </h1>
    5656                <div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'twentyfourteen' ) ); ?></div>
    if ( post_password_required() ) {  
    7575                <h1 class="screen-reader-text">
    7676                        <?php
    7777                        /* translators: Hidden accessibility text. */
    78                         _e( 'Comment navigation', 'twentyfourteen' );
     78                        esc_html_e( 'Comment navigation', 'twentyfourteen' );
    7979                        ?>
    8080                </h1>
    8181                <div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'twentyfourteen' ) ); ?></div>
    if ( post_password_required() ) {  
    8484        <?php endif; // Check for comment navigation. ?>
    8585
    8686                <?php if ( ! comments_open() ) : ?>
    87         <p class="no-comments"><?php _e( 'Comments are closed.', 'twentyfourteen' ); ?></p>
     87        <p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'twentyfourteen' ); ?></p>
    8888        <?php endif; ?>
    8989
    90         <?php endif; // have_comments() ?>
     90        <?php endif; ?>
    9191
    9292        <?php comment_form(); ?>
    9393
  • src/wp-content/themes/twentyfourteen/content-none.php

    diff --git a/src/wp-content/themes/twentyfourteen/content-none.php b/src/wp-content/themes/twentyfourteen/content-none.php
    index 7e35a72071..1982080f25 100644
    a b  
    99?>
    1010
    1111<header class="page-header">
    12         <h1 class="page-title"><?php _e( 'Nothing Found', 'twentyfourteen' ); ?></h1>
     12        <h1 class="page-title"><?php esc_html_e( 'Nothing Found', 'twentyfourteen' ); ?></h1>
    1313</header>
    1414
    1515<div class="page-content">
     
    2424
    2525        <?php elseif ( is_search() ) : ?>
    2626
    27         <p><?php _e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'twentyfourteen' ); ?></p>
     27        <p><?php esc_html_e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'twentyfourteen' ); ?></p>
    2828                <?php get_search_form(); ?>
    2929
    3030        <?php else : ?>
    3131
    32         <p><?php _e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'twentyfourteen' ); ?></p>
     32        <p><?php esc_html_e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'twentyfourteen' ); ?></p>
    3333                <?php get_search_form(); ?>
    3434
    3535        <?php endif; ?>
  • src/wp-content/themes/twentyfourteen/functions.php

    diff --git a/src/wp-content/themes/twentyfourteen/functions.php b/src/wp-content/themes/twentyfourteen/functions.php
    index 22305e5b97..107277743f 100644
    a b if ( ! function_exists( 'twentyfourteen_setup' ) ) :  
    212212                // Indicate widget sidebars can use selective refresh in the Customizer.
    213213                add_theme_support( 'customize-selective-refresh-widgets' );
    214214        }
    215 endif; // twentyfourteen_setup()
     215endif;
    216216add_action( 'after_setup_theme', 'twentyfourteen_setup' );
    217217
    218218/**
  • src/wp-content/themes/twentyfourteen/header.php

    diff --git a/src/wp-content/themes/twentyfourteen/header.php b/src/wp-content/themes/twentyfourteen/header.php
    index ad3e128b0c..3cbbc99514 100644
    a b  
    2424        <title><?php wp_title( '|', true, 'right' ); ?></title>
    2525        <link rel="profile" href="https://gmpg.org/xfn/11">
    2626        <link rel="pingback" href="<?php echo esc_url( get_bloginfo( 'pingback_url' ) ); ?>">
    27         <!--[if lt IE 9]>
    28         <script src="<?php echo esc_url( get_template_directory_uri() ); ?>/js/html5.js?ver=3.7.0"></script>
    29         <![endif]-->
    3027        <?php wp_head(); ?>
    3128</head>
    3229
     
    3633        <?php if ( get_header_image() ) : ?>
    3734        <div id="site-header">
    3835                <a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
    39                         <img src="<?php header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" />
     36                        <img src="<?php header_image(); ?>" width="<?php echo esc_attr( get_custom_header()->width ); ?>" height="<?php echo esc_attr( get_custom_header()->height ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" />
    4037                </a>
    4138        </div>
    4239        <?php endif; ?>
     
    4946                                <a href="#search-container" class="screen-reader-text" aria-expanded="false" aria-controls="search-container">
    5047                                        <?php
    5148                                        /* translators: Hidden accessibility text. */
    52                                         _e( 'Search', 'twentyfourteen' );
     49                                        esc_html_e( 'Search', 'twentyfourteen' );
    5350                                        ?>
    5451                                </a>
    5552                        </div>
    5653
    5754                        <nav id="primary-navigation" class="site-navigation primary-navigation">
    58                                 <button class="menu-toggle"><?php _e( 'Primary Menu', 'twentyfourteen' ); ?></button>
     55                                <button class="menu-toggle"><?php esc_html_e( 'Primary Menu', 'twentyfourteen' ); ?></button>
    5956                                <a class="screen-reader-text skip-link" href="#content">
    6057                                        <?php
    6158                                        /* translators: Hidden accessibility text. */
    62                                         _e( 'Skip to content', 'twentyfourteen' );
     59                                        esc_html_e( 'Skip to content', 'twentyfourteen' );
    6360                                        ?>
    6461                                </a>
    6562                                <?php
  • src/wp-content/themes/twentyfourteen/image.php

    diff --git a/src/wp-content/themes/twentyfourteen/image.php b/src/wp-content/themes/twentyfourteen/image.php
    index ed5a9f2e65..5ddb63b3e3 100644
    a b  
    99
    1010// Retrieve attachment metadata.
    1111$metadata = wp_get_attachment_metadata();
     12global $post;
    1213
    1314get_header();
    1415?>
  • src/wp-content/themes/twentyfourteen/inc/custom-header.php

    diff --git a/src/wp-content/themes/twentyfourteen/inc/custom-header.php b/src/wp-content/themes/twentyfourteen/inc/custom-header.php
    index d6692dbb41..0cdd876bb8 100644
    a b if ( ! function_exists( 'twentyfourteen_header_style' ) ) :  
    9191        </style>
    9292                <?php
    9393        }
    94 endif; // twentyfourteen_header_style()
     94endif;
    9595
    9696
    9797if ( ! function_exists( 'twentyfourteen_admin_header_style' ) ) :
    if ( ! function_exists( 'twentyfourteen_admin_header_style' ) ) :  
    130130        </style>
    131131                <?php
    132132        }
    133 endif; // twentyfourteen_admin_header_style()
     133endif;
    134134
    135135if ( ! function_exists( 'twentyfourteen_admin_header_image' ) ) :
    136136        /**
    if ( ! function_exists( 'twentyfourteen_admin_header_image' ) ) :  
    150150        </div>
    151151                <?php
    152152        }
    153 endif; // twentyfourteen_admin_header_image()
     153endif;
  • src/wp-content/themes/twentyfourteen/taxonomy-post_format.php

    diff --git a/src/wp-content/themes/twentyfourteen/taxonomy-post_format.php b/src/wp-content/themes/twentyfourteen/taxonomy-post_format.php
    index 9cf9083cee..1441ab8b7e 100644
    a b get_header(); ?>  
    2727                                <h1 class="archive-title">
    2828                                        <?php
    2929                                        if ( is_tax( 'post_format', 'post-format-aside' ) ) :
    30                                                 _e( 'Asides', 'twentyfourteen' );
     30                                                esc_html_e( 'Asides', 'twentyfourteen' );
    3131
    3232                                                elseif ( is_tax( 'post_format', 'post-format-image' ) ) :
    33                                                         _e( 'Images', 'twentyfourteen' );
     33                                                        esc_html_e( 'Images', 'twentyfourteen' );
    3434
    3535                                                elseif ( is_tax( 'post_format', 'post-format-video' ) ) :
    36                                                         _e( 'Videos', 'twentyfourteen' );
     36                                                        esc_html_e( 'Videos', 'twentyfourteen' );
    3737
    3838                                                elseif ( is_tax( 'post_format', 'post-format-audio' ) ) :
    39                                                         _e( 'Audio', 'twentyfourteen' );
     39                                                        esc_html_e( 'Audio', 'twentyfourteen' );
    4040
    4141                                                elseif ( is_tax( 'post_format', 'post-format-quote' ) ) :
    42                                                         _e( 'Quotes', 'twentyfourteen' );
     42                                                        esc_html_e( 'Quotes', 'twentyfourteen' );
    4343
    4444                                                elseif ( is_tax( 'post_format', 'post-format-link' ) ) :
    45                                                         _e( 'Links', 'twentyfourteen' );
     45                                                        esc_html_e( 'Links', 'twentyfourteen' );
    4646
    4747                                                elseif ( is_tax( 'post_format', 'post-format-gallery' ) ) :
    48                                                         _e( 'Galleries', 'twentyfourteen' );
     48                                                        esc_html_e( 'Galleries', 'twentyfourteen' );
    4949
    5050                                                else :
    51                                                         _e( 'Archives', 'twentyfourteen' );
     51                                                        esc_html_e( 'Archives', 'twentyfourteen' );
    5252
    5353                                                endif;
    5454                                                ?>