Make WordPress Core

Ticket #34456: 34456.1.diff

File 34456.1.diff, 1.6 KB (added by Nikschavan, 9 years ago)

The patch fixes only for twentythirteen theme, Once this is reviewed, I will create refresh the patch for all the themes as well.

  • src/wp-content/themes/twentythirteen/functions.php

    diff --git src/wp-content/themes/twentythirteen/functions.php src/wp-content/themes/twentythirteen/functions.php
    index e87761f..8e7965b 100644
    function twentythirteen_setup() { 
    105105
    106106        // This theme uses its own gallery styles.
    107107        add_filter( 'use_default_gallery_style', '__return_false' );
     108
     109
     110        /*
     111         * Let WordPress manage the document title.
     112         * By adding theme support, we declare that this theme does not use a
     113         * hard-coded <title> tag in the document head, and expect WordPress to
     114         * provide it for us.
     115         * Also provides backward compatibility to old versions of WordPress where 'title-tag' was not available.
     116         */
     117        if ( ! function_exists( '_wp_render_title_tag' ) ) {
     118                function theme_slug_render_title() {
     119                        ?>
     120                        <title><?php wp_title( '|', true, 'right' ); ?></title>
     121                        <?php
     122                }
     123                add_action( 'wp_head', 'theme_slug_render_title' );
     124        }
     125
    108126}
    109127add_action( 'after_setup_theme', 'twentythirteen_setup' );
    110128
  • src/wp-content/themes/twentythirteen/header.php

    diff --git src/wp-content/themes/twentythirteen/header.php src/wp-content/themes/twentythirteen/header.php
    index 094f74c..43d90b3 100644
     
    2121<head>
    2222        <meta charset="<?php bloginfo( 'charset' ); ?>">
    2323        <meta name="viewport" content="width=device-width">
    24         <title><?php wp_title( '|', true, 'right' ); ?></title>
    2524        <link rel="profile" href="http://gmpg.org/xfn/11">
    2625        <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
    2726        <!--[if lt IE 9]>