WordPress.org

Making WordPress.org

Changeset 7286


Ignore:
Timestamp:
06/08/2018 10:59:36 PM (2 years ago)
Author:
obenland
Message:

Plugins: Update doc title and front page description

Also add Open Graph data for the front page.

See #3539.

File:
1 edited

Legend:

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

    r7285 r7286  
    218218    if ( is_front_page() ) {
    219219        $title['title']   = __( 'WordPress Plugins', 'wporg-plugins' );
    220         $title['tagline'] = __( 'Plugins extend and expand the functionality of WordPress.', 'wporg-plugins' );
     220        $title['tagline'] = __( 'WordPress.org', 'wporg-plugins' );
    221221    } else {
    222         $title['site'] = __( 'WordPress Plugins', 'wporg-plugins' );
     222        $title['site'] = __( 'WordPress.org', 'wporg-plugins' );
    223223    }
    224224
     
    233233 */
    234234function document_title_separator() {
    235     return ( is_feed() ) ? '—' : '—';
     235    return ( is_feed() ) ? '—' : '|';
    236236}
    237237add_filter( 'document_title_separator', __NAMESPACE__ . '\document_title_separator' );
     
    267267 */
    268268function social_meta_data() {
     269    if ( is_front_page() ) {
     270        foreach ( [
     271            'og:title'       => __( 'WordPress Plugins', 'wporg-plugins' ),
     272            'og:description' => __( 'Choose from thousands of free plugins to build, customize, and enhance your WordPress website.', 'wporg-plugins' ),
     273            'og:site_name'   => 'WordPress.org',
     274            'og:type'        => 'website',
     275            'og:url'         => home_url(),
     276        ] as $property => $content ) {
     277            printf( '<meta property="%1$s" content="%2$s" />' . "\n", esc_attr( $property ), esc_attr( $content ) );
     278        }
     279        return;
     280    }
     281
    269282    if ( ! is_singular( 'plugin' ) ) {
    270283        return;
Note: See TracChangeset for help on using the changeset viewer.