Changeset 2077
- Timestamp:
- 11/11/2015 08:18:51 PM (9 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-showcase
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-showcase/functions.php
r1709 r2077 152 152 <?php endif; // is_category ?> 153 153 154 <?php echo wp_title(); ?>154 » <?php echo wp_get_document_title(); ?> 155 155 <?php endif; // is_search ?> 156 156 … … 231 231 add_filter( 'excerpt_more', create_function( '$more', 'return "...";' ) ); 232 232 233 233 /** 234 * Filters document title to add context based on what is being viewed. 235 * 236 * @param array $parts The document title parts. 237 * @return array The document title parts. 238 */ 239 function wporg_showcase_document_title( $parts ) { 240 // wp_get_document_title() is used by the theme in breadcrumb(), whereby it 241 // only really needs the title. 242 if ( did_action( 'wp_head' ) ) { 243 return array( 'title' => $parts['title'] ); 244 } 245 246 if ( is_front_page() ) { 247 // Omit page name from the home page. 248 $parts['title'] = ''; 249 } elseif ( is_category() ) { 250 // Prepend 'Flavor: ' to category document titles. 251 $parts['title'] = 'Flavor: ' . $parts['title']; 252 } elseif ( is_tag() ) { 253 // Prepend 'Tag: ' to tag document titles. 254 $parts['title'] = 'Tag: ' . $parts['title']; 255 } 256 257 return $parts; 258 } 259 add_filter( 'document_title_parts', 'wporg_showcase_document_title' ); 260 261 // Change the document title separator. 262 add_filter( 'document_title_separator', create_function( '$separator', 'return "›";' ) ); -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-showcase/header.php
r1902 r2077 1 1 <?php 2 global $pagetitle; 3 4 if ( is_single() ) 5 $pagetitle = 'Showcase » ' . wp_title( '', false ); 6 elseif ( is_category() ) 7 $pagetitle = 'Showcase » Flavor » ' . wp_title( '', false ); 8 elseif ( is_tag() ) 9 $pagetitle = 'Showcase » Tag » ' . wp_title( '', false ); 2 $GLOBALS['pagetitle'] = wp_get_document_title(); 10 3 11 4 $prefix = is_ssl() ? 'https://' : 'http://s.';
Note: See TracChangeset
for help on using the changeset viewer.