Making WordPress.org


Ignore:
Timestamp:
11/11/2015 08:18:51 PM (9 years ago)
Author:
coffee2code
Message:

W.org Showcase: Handle deprecation of wp_title().

  • Get title via wp_get_document_title() instead of wp_title().
  • Hook 'document_title_parts' to customize document title rather than doing so in header.php.
  • Adjust breadcrumb to use wp_get_document_title() instead of wp_title().
  • Filter 'document_title_separator' to customize the title separator.
  • Omit front page's title ('Home') from front page document title.

See #1353.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-showcase/header.php

    r1902 r2077  
    11<?php
    2 global $pagetitle;
    3 
    4 if ( is_single() )
    5     $pagetitle = 'Showcase &raquo; ' . wp_title( '', false );
    6 elseif ( is_category() )
    7     $pagetitle = 'Showcase &raquo; Flavor &raquo; ' . wp_title( '', false );
    8 elseif ( is_tag() )
    9     $pagetitle = 'Showcase &raquo; Tag &raquo; ' . wp_title( '', false );
     2$GLOBALS['pagetitle'] = wp_get_document_title();
    103
    114$prefix = is_ssl() ? 'https://' : 'http://s.';
Note: See TracChangeset for help on using the changeset viewer.