Ticket #30146: 30146.diff
File 30146.diff, 2.4 KB (added by , 10 years ago) |
---|
-
src/wp-content/themes/twentyfifteen/functions.php
58 58 add_theme_support( 'automatic-feed-links' ); 59 59 60 60 /* 61 * Let WordPress manage the document title. 62 * By adding theme support, we declare that this theme does not use a 63 * hard-coded <title> tag in the document head, and expect WordPress to 64 * provide it for us. 65 */ 66 add_theme_support( 'title-tag' ); 67 68 /* 61 69 * Enable support for Post Thumbnails on posts and pages. 62 70 * 63 71 * @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails … … 226 234 add_action( 'wp_enqueue_scripts', 'twentyfifteen_scripts' ); 227 235 228 236 /** 229 * Filters wp_title to print a neat <title> tag based on what is being viewed.230 *231 * @param string $title Default title text for current view.232 * @param string $sep Optional separator.233 * @return string The filtered title.234 */235 function twentyfifteen_wp_title( $title, $sep ) {236 if ( is_feed() ) {237 return $title;238 }239 240 global $page, $paged;241 242 // Add the blog name243 $title .= get_bloginfo( 'name', 'display' );244 245 // Add the blog description for the home/front page.246 $site_description = get_bloginfo( 'description', 'display' );247 if ( $site_description && ( is_home() || is_front_page() ) ) {248 $title .= " $sep $site_description";249 }250 251 // Add a page number if necessary:252 if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) {253 $title .= " $sep " . sprintf( __( 'Page %s', 'twentyfifteen' ), max( $paged, $page ) );254 }255 256 return $title;257 }258 add_filter( 'wp_title', 'twentyfifteen_wp_title', 10, 2 );259 260 /**261 237 * Add featured image as background image to post navs. 262 238 * 263 239 * @since Twenty Fifteen 1.0 -
src/wp-content/themes/twentyfifteen/header.php
13 13 <head> 14 14 <meta charset="<?php bloginfo( 'charset' ); ?>"> 15 15 <meta name="viewport" content="width=device-width, initial-scale=1"> 16 <title><?php wp_title( '|', true, 'right' ); ?></title>17 16 <link rel="profile" href="http://gmpg.org/xfn/11"> 18 17 <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>"> 19 18 <!--[if lt IE 9]>