Make WordPress Core

Ticket #58102: 58102-twentytwelve.diff

File 58102-twentytwelve.diff, 15.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/twentytwelve/404.php

    diff --git a/src/wp-content/themes/twentytwelve/404.php b/src/wp-content/themes/twentytwelve/404.php
    index 8b039ecee4..75e6479d09 100644
    a b get_header(); ?>  
    1414
    1515                        <article id="post-0" class="post error404 no-results not-found">
    1616                                <header class="entry-header">
    17                                         <h1 class="entry-title"><?php _e( 'This is somewhat embarrassing, isn&rsquo;t it?', 'twentytwelve' ); ?></h1>
     17                                        <h1 class="entry-title"><?php esc_html_e( 'This is somewhat embarrassing, isn&rsquo;t it?', 'twentytwelve' ); ?></h1>
    1818                                </header>
    1919
    2020                                <div class="entry-content">
    21                                         <p><?php _e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'twentytwelve' ); ?></p>
     21                                        <p><?php esc_html_e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'twentytwelve' ); ?></p>
    2222                                        <?php get_search_form(); ?>
    2323                                </div><!-- .entry-content -->
    2424                        </article><!-- #post-0 -->
  • src/wp-content/themes/twentytwelve/comments.php

    diff --git a/src/wp-content/themes/twentytwelve/comments.php b/src/wp-content/themes/twentytwelve/comments.php
    index a7aa3f21a5..c810d7cca2 100644
    a b if ( post_password_required() ) {  
    5959
    6060                <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
    6161                <nav id="comment-nav-below" class="navigation">
    62                         <h1 class="assistive-text section-heading"><?php _e( 'Comment navigation', 'twentytwelve' ); ?></h1>
     62                        <h1 class="assistive-text section-heading"><?php esc_html_e( 'Comment navigation', 'twentytwelve' ); ?></h1>
    6363                        <div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'twentytwelve' ) ); ?></div>
    6464                        <div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'twentytwelve' ) ); ?></div>
    6565                </nav>
    if ( post_password_required() ) {  
    7272                 */
    7373                if ( ! comments_open() && get_comments_number() ) :
    7474                        ?>
    75                 <p class="nocomments"><?php _e( 'Comments are closed.', 'twentytwelve' ); ?></p>
     75                <p class="nocomments"><?php esc_html_e( 'Comments are closed.', 'twentytwelve' ); ?></p>
    7676                <?php endif; ?>
    7777
    78         <?php endif; // have_comments() ?>
     78        <?php endif; ?>
    7979
    8080        <?php comment_form(); ?>
    8181
  • src/wp-content/themes/twentytwelve/content-aside.php

    diff --git a/src/wp-content/themes/twentytwelve/content-aside.php b/src/wp-content/themes/twentytwelve/content-aside.php
    index 52990b2bff..205a49ba63 100644
    a b $post_title = sprintf( __( 'Permalink to %s', 'twentytwelve' ), the_title_attrib  
    2525                        <div class="comments-link">
    2626                                <?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentytwelve' ) . '</span>', __( '1 Reply', 'twentytwelve' ), __( '% Replies', 'twentytwelve' ) ); ?>
    2727                        </div><!-- .comments-link -->
    28                         <?php endif; // comments_open() ?>
     28                        <?php endif; ?>
    2929                        <?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?>
    3030                </footer><!-- .entry-meta -->
    3131        </article><!-- #post -->
  • src/wp-content/themes/twentytwelve/content-image.php

    diff --git a/src/wp-content/themes/twentytwelve/content-image.php b/src/wp-content/themes/twentytwelve/content-image.php
    index a683b83cfc..01a9faa116 100644
    a b  
    2222                        <div class="comments-link">
    2323                                <?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentytwelve' ) . '</span>', __( '1 Reply', 'twentytwelve' ), __( '% Replies', 'twentytwelve' ) ); ?>
    2424                        </div><!-- .comments-link -->
    25                         <?php endif; // comments_open() ?>
     25                        <?php endif; ?>
    2626                        <?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?>
    2727                </footer><!-- .entry-meta -->
    2828        </article><!-- #post -->
  • src/wp-content/themes/twentytwelve/content-link.php

    diff --git a/src/wp-content/themes/twentytwelve/content-link.php b/src/wp-content/themes/twentytwelve/content-link.php
    index 743cef91ee..ee95c51f0d 100644
    a b $post_title = sprintf( __( 'Permalink to %s', 'twentytwelve' ), the_title_attrib  
    1212?>
    1313
    1414        <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    15                 <header><?php _e( 'Link', 'twentytwelve' ); ?></header>
     15                <header><?php esc_html_e( 'Link', 'twentytwelve' ); ?></header>
    1616                <div class="entry-content">
    1717                        <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentytwelve' ) ); ?>
    1818                </div><!-- .entry-content -->
    $post_title = sprintf( __( 'Permalink to %s', 'twentytwelve' ), the_title_attrib  
    2323                        <div class="comments-link">
    2424                                <?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentytwelve' ) . '</span>', __( '1 Reply', 'twentytwelve' ), __( '% Replies', 'twentytwelve' ) ); ?>
    2525                        </div><!-- .comments-link -->
    26                         <?php endif; // comments_open() ?>
     26                        <?php endif; ?>
    2727                        <?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?>
    2828                </footer><!-- .entry-meta -->
    2929        </article><!-- #post -->
  • src/wp-content/themes/twentytwelve/content-none.php

    diff --git a/src/wp-content/themes/twentytwelve/content-none.php b/src/wp-content/themes/twentytwelve/content-none.php
    index b7757821c6..aa6de55d24 100644
    a b  
    1010
    1111        <article id="post-0" class="post no-results not-found">
    1212                <header class="entry-header">
    13                         <h1 class="entry-title"><?php _e( 'Nothing Found', 'twentytwelve' ); ?></h1>
     13                        <h1 class="entry-title"><?php esc_html_e( 'Nothing Found', 'twentytwelve' ); ?></h1>
    1414                </header>
    1515
    1616                <div class="entry-content">
    17                         <p><?php _e( 'Apologies, but no results were found. Perhaps searching will help find a related post.', 'twentytwelve' ); ?></p>
     17                        <p><?php esc_html_e( 'Apologies, but no results were found. Perhaps searching will help find a related post.', 'twentytwelve' ); ?></p>
    1818                        <?php get_search_form(); ?>
    1919                </div><!-- .entry-content -->
    2020        </article><!-- #post-0 -->
  • src/wp-content/themes/twentytwelve/content-quote.php

    diff --git a/src/wp-content/themes/twentytwelve/content-quote.php b/src/wp-content/themes/twentytwelve/content-quote.php
    index e599444852..4112cee376 100644
    a b $post_title = sprintf( __( 'Permalink to %s', 'twentytwelve' ), the_title_attrib  
    2222                        <div class="comments-link">
    2323                                <?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentytwelve' ) . '</span>', __( '1 Reply', 'twentytwelve' ), __( '% Replies', 'twentytwelve' ) ); ?>
    2424                        </div><!-- .comments-link -->
    25                         <?php endif; // comments_open() ?>
     25                        <?php endif; ?>
    2626                        <?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?>
    2727                </footer><!-- .entry-meta -->
    2828        </article><!-- #post -->
  • src/wp-content/themes/twentytwelve/content-status.php

    diff --git a/src/wp-content/themes/twentytwelve/content-status.php b/src/wp-content/themes/twentytwelve/content-status.php
    index 8e62944203..d07623cba1 100644
    a b $post_title = sprintf( __( 'Permalink to %s', 'twentytwelve' ), the_title_attrib  
    3939                        <div class="comments-link">
    4040                                <?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentytwelve' ) . '</span>', __( '1 Reply', 'twentytwelve' ), __( '% Replies', 'twentytwelve' ) ); ?>
    4141                        </div><!-- .comments-link -->
    42                         <?php endif; // comments_open() ?>
     42                        <?php endif; ?>
    4343                        <?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?>
    4444                </footer><!-- .entry-meta -->
    4545        </article><!-- #post -->
  • src/wp-content/themes/twentytwelve/content.php

    diff --git a/src/wp-content/themes/twentytwelve/content.php b/src/wp-content/themes/twentytwelve/content.php
    index 102f0f814d..54bfc0cf1c 100644
    a b  
    1313        <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    1414                <?php if ( is_sticky() && is_home() && ! is_paged() ) : ?>
    1515                <div class="featured-post">
    16                         <?php _e( 'Featured post', 'twentytwelve' ); ?>
     16                        <?php esc_html_e( 'Featured post', 'twentytwelve' ); ?>
    1717                </div>
    1818                <?php endif; ?>
    1919                <header class="entry-header">
     
    2929                        <h1 class="entry-title">
    3030                                <a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a>
    3131                        </h1>
    32                         <?php endif; // is_single() ?>
     32                        <?php endif; ?>
    3333                        <?php if ( comments_open() ) : ?>
    3434                                <div class="comments-link">
    3535                                        <?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentytwelve' ) . '</span>', __( '1 Reply', 'twentytwelve' ), __( '% Replies', 'twentytwelve' ) ); ?>
    3636                                </div><!-- .comments-link -->
    37                         <?php endif; // comments_open() ?>
     37                        <?php endif; ?>
    3838                </header><!-- .entry-header -->
    3939
    4040                <?php if ( is_search() ) : // Only display excerpts for search. ?>
  • src/wp-content/themes/twentytwelve/functions.php

    diff --git a/src/wp-content/themes/twentytwelve/functions.php b/src/wp-content/themes/twentytwelve/functions.php
    index de535ac5f2..49c60527d1 100644
    a b if ( ! function_exists( 'twentytwelve_content_nav' ) ) :  
    394394
    395395                if ( $wp_query->max_num_pages > 1 ) : ?>
    396396                        <nav id="<?php echo esc_attr( $html_id ); ?>" class="navigation">
    397                                 <h3 class="assistive-text"><?php _e( 'Post navigation', 'twentytwelve' ); ?></h3>
     397                                <h3 class="assistive-text"><?php esc_html_e( 'Post navigation', 'twentytwelve' ); ?></h3>
    398398                                <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'twentytwelve' ) ); ?></div>
    399399                                <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'twentytwelve' ) ); ?></div>
    400400                        </nav><!-- .navigation -->
    if ( ! function_exists( 'twentytwelve_comment' ) ) :  
    424424                                // Display trackbacks differently than normal comments.
    425425                                ?>
    426426                <li <?php comment_class(); ?> id="comment-<?php comment_ID(); ?>">
    427                 <p><?php _e( 'Pingback:', 'twentytwelve' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( '(Edit)', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?></p>
     427                <p><?php esc_html_e( 'Pingback:', 'twentytwelve' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( '(Edit)', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?></p>
    428428                                <?php
    429429                                break;
    430430                        default:
    if ( ! function_exists( 'twentytwelve_comment' ) ) :  
    440440                                                '<cite><b class="fn">%1$s</b> %2$s</cite>',
    441441                                                get_comment_author_link(),
    442442                                                // If current post author is also comment author, make it known visually.
    443                                                 ( $comment->user_id === $post->post_author ) ? '<span>' . __( 'Post author', 'twentytwelve' ) . '</span>' : ''
     443                                                ( $comment->user_id === $post->post_author ) ? '<span>' . esc_html_e( 'Post author', 'twentytwelve' ) . '</span>' : ''
    444444                                        );
    445445                                        printf(
    446446                                                '<a href="%1$s"><time datetime="%2$s">%3$s</time></a>',
  • src/wp-content/themes/twentytwelve/header.php

    diff --git a/src/wp-content/themes/twentytwelve/header.php b/src/wp-content/themes/twentytwelve/header.php
    index 0d4cf9441a..5f47f8f149 100644
    a b  
    4141                </hgroup>
    4242
    4343                <nav id="site-navigation" class="main-navigation">
    44                         <button class="menu-toggle"><?php _e( 'Menu', 'twentytwelve' ); ?></button>
    45                         <a class="assistive-text" href="#content"><?php _e( 'Skip to content', 'twentytwelve' ); ?></a>
     44                        <button class="menu-toggle"><?php esc_html_e( 'Menu', 'twentytwelve' ); ?></button>
     45                        <a class="assistive-text" href="#content"><?php esc_html_e( 'Skip to content', 'twentytwelve' ); ?></a>
    4646                        <?php
    4747                        wp_nav_menu(
    4848                                array(
  • src/wp-content/themes/twentytwelve/index.php

    diff --git a/src/wp-content/themes/twentytwelve/index.php b/src/wp-content/themes/twentytwelve/index.php
    index 98649a8413..e6b523ec45 100644
    a b get_header(); ?>  
    3939                                // Show a different message to a logged-in user who can add posts.
    4040                                ?>
    4141                                <header class="entry-header">
    42                                         <h1 class="entry-title"><?php _e( 'No posts to display', 'twentytwelve' ); ?></h1>
     42                                        <h1 class="entry-title"><?php esc_html_e( 'No posts to display', 'twentytwelve' ); ?></h1>
    4343                                </header>
    4444
    4545                                <div class="entry-content">
    get_header(); ?>  
    5656                                // Show the default message to everyone else.
    5757                                ?>
    5858                                <header class="entry-header">
    59                                         <h1 class="entry-title"><?php _e( 'Nothing Found', 'twentytwelve' ); ?></h1>
     59                                        <h1 class="entry-title"><?php esc_html_e( 'Nothing Found', 'twentytwelve' ); ?></h1>
    6060                                </header>
    6161
    6262                                <div class="entry-content">
    63                                         <p><?php _e( 'Apologies, but no results were found. Perhaps searching will help find a related post.', 'twentytwelve' ); ?></p>
     63                                        <p><?php esc_html_e( 'Apologies, but no results were found. Perhaps searching will help find a related post.', 'twentytwelve' ); ?></p>
    6464                                        <?php get_search_form(); ?>
    6565                                </div><!-- .entry-content -->
    6666                        <?php endif; // End current_user_can() check. ?>
  • src/wp-content/themes/twentytwelve/search.php

    diff --git a/src/wp-content/themes/twentytwelve/search.php b/src/wp-content/themes/twentytwelve/search.php
    index 99acfe4034..bafaeada71 100644
    a b get_header(); ?>  
    3939
    4040                        <article id="post-0" class="post no-results not-found">
    4141                                <header class="entry-header">
    42                                         <h1 class="entry-title"><?php _e( 'Nothing Found', 'twentytwelve' ); ?></h1>
     42                                        <h1 class="entry-title"><?php esc_html_e( 'Nothing Found', 'twentytwelve' ); ?></h1>
    4343                                </header>
    4444
    4545                                <div class="entry-content">
    46                                         <p><?php _e( 'Sorry, but nothing matched your search criteria. Please try again with some different keywords.', 'twentytwelve' ); ?></p>
     46                                        <p><?php esc_html_e( 'Sorry, but nothing matched your search criteria. Please try again with some different keywords.', 'twentytwelve' ); ?></p>
    4747                                        <?php get_search_form(); ?>
    4848                                </div><!-- .entry-content -->
    4949                        </article><!-- #post-0 -->
  • src/wp-content/themes/twentytwelve/single.php

    diff --git a/src/wp-content/themes/twentytwelve/single.php b/src/wp-content/themes/twentytwelve/single.php
    index 4cc6a43a4b..c9dd57fafd 100644
    a b get_header(); ?>  
    2020                                <?php get_template_part( 'content', get_post_format() ); ?>
    2121
    2222                                <nav class="nav-single">
    23                                         <h3 class="assistive-text"><?php _e( 'Post navigation', 'twentytwelve' ); ?></h3>
     23                                        <h3 class="assistive-text"><?php esc_html_e( 'Post navigation', 'twentytwelve' ); ?></h3>
    2424                                        <span class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'twentytwelve' ) . '</span> %title' ); ?></span>
    2525                                        <span class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'twentytwelve' ) . '</span>' ); ?></span>
    2626                                </nav><!-- .nav-single -->