Make WordPress Core

Ticket #34456: 34456.3.diff

File 34456.3.diff, 1.9 KB (added by Nikschavan, 9 years ago)

Refreshed the patch

  • 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..0bd2283 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         * Let WordPress manage the document title.
     111         * By adding theme support, we declare that this theme does not use a
     112         * hard-coded <title> tag in the document head, and expect WordPress to
     113         * provide it for us.
     114         */
     115        if ( function_exists( '_wp_render_title_tag' ) ) {
     116                add_theme_support( 'title-tag' );
     117        } else {
     118                add_action( 'wp_head', 'twentythirteen_render_title' );
     119        }
     120
    108121}
    109122add_action( 'after_setup_theme', 'twentythirteen_setup' );
    110123
    function twentythirteen_scripts_styles() { 
    188201add_action( 'wp_enqueue_scripts', 'twentythirteen_scripts_styles' );
    189202
    190203/**
     204 * Provide backwords compatibility for the title-tag theme support.
     205 *
     206 * Adds <title> tags in the head of the document.
     207 *
     208 * @since Twenty Thirteen 1.7
     209 */
     210function twentythirteen_render_title() {
     211        ?>
     212        <title><?php wp_title( '|', true, 'right' ); ?></title>
     213        <?php
     214}
     215
     216/**
    191217 * Filter the page title.
    192218 *
    193219 * Creates a nicely formatted and more specific title element text for output
  • 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]>