WordPress.org

Making WordPress.org

Changeset 7290


Ignore:
Timestamp:
06/09/2018 04:41:44 AM (22 months ago)
Author:
obenland
Message:

Showcase: Update site titles and add description.

See #3539.

Location:
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-showcase
Files:
3 edited

Legend:

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

    r7116 r7290  
    257257    if ( is_front_page() ) {
    258258        // 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' );
    268277    }
    269278
     
    273282
    274283// Change the document title separator.
    275 add_filter( 'document_title_separator', create_function( '$separator', 'return "›";' ) );
     284add_filter( 'document_title_separator', function() {
     285    return "|";
     286} );
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-showcase/header.php

    r6457 r7290  
    1010    <div class="wrapper">
    1111        <a id="wpsc-mobile-menu-button" class="" href="#" onclick="toggle_wpsc_mobile_menu();"></a>
    12         <h2><?php _e( 'Showcase', 'wporg-showcase' ); ?></h2>
     12        <h2><?php _e( 'WordPress Website Showcase', 'wporg-showcase' ); ?></h2>
    1313    </div>
    1414</div>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-showcase/page-home.php

    r7115 r7290  
    33Template Name: Home
    44*/
     5
     6/**
     7 * Adds a custom description meta tag.
     8 */
     9add_action( 'wp_head', function() {
     10    printf( '<meta name="description" content="%s" />' . "\n", esc_attr__( 'Discover inspiration in some of the most beautiful, best designed WordPress websites.', 'wporg-showcase' ) );
     11} );
    512
    613get_header();
Note: See TracChangeset for help on using the changeset viewer.