Changeset 7290 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-showcase/functions.php
- Timestamp:
- 06/09/2018 04:41:44 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-showcase/functions.php
r7116 r7290 257 257 if ( is_front_page() ) { 258 258 // Omit page name from the home page. 259 $parts['title'] = ''; 260 } elseif ( is_category() ) { 261 // Prepend 'Flavor: ' to category document titles. 262 /* translators: %s: category name */ 263 $parts['title'] = sprintf( __( 'Flavor: %s', 'wporg-showcase' ), $parts['title'] ); 264 } elseif ( is_tag() ) { 265 // Prepend 'Tag: ' to tag document titles. 266 /* translators: %s: tag name */ 267 $parts['title'] = sprintf( __( 'Tag: %s', 'wporg-showcase' ), $parts['title'] ); 259 $parts['title'] = $parts['tagline']; 260 $parts['tagline'] = __( 'WordPress.org', 'wporg-showcase' ); 261 } else { 262 if ( is_category() ) { 263 // Prepend 'Flavor: ' to category document titles. 264 /* translators: %s: category name */ 265 $parts['title'] = sprintf( esc_attr__( 'Flavor: %s', 'wporg-showcase' ), esc_attr( $parts['title'] ) ); 266 } elseif ( is_tag() ) { 267 // Prepend 'Tag: ' to tag document titles. 268 /* translators: %s: tag name */ 269 $parts['title'] = sprintf( esc_attr__( 'Tag: %s', 'wporg-showcase' ), esc_attr( $parts['title'] ) ); 270 } elseif ( is_single() ) { 271 // Apend ' Showcase' to single document titles. 272 /* translators: %s: Name of showcased site */ 273 $parts['title'] = sprintf( esc_attr__( '%s Showcase', 'wporg-showcase' ), esc_attr( $parts['title'] ) ); 274 } 275 276 $parts['site'] = __( 'WordPress.org', 'wporg-showcase' ); 268 277 } 269 278 … … 273 282 274 283 // Change the document title separator. 275 add_filter( 'document_title_separator', create_function( '$separator', 'return "›";' ) ); 284 add_filter( 'document_title_separator', function() { 285 return "|"; 286 } );
Note: See TracChangeset
for help on using the changeset viewer.