WordPress.org

Making WordPress.org

Changeset 9065


Ignore:
Timestamp:
07/19/2019 02:15:32 AM (11 months ago)
Author:
dd32
Message:

Theme Directory: Add a nicer page title for author archives and set the meta description.

Fixes #4550.

File:
1 edited

Legend:

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

    r9064 r9065  
    211211        $title['title']   = __( 'WordPress Themes', 'wporg-themes' );
    212212        $title['tagline'] = __( 'WordPress.org', 'wporg-themes' );
    213     } else if ( is_category() || is_tag() ) {
     213    } elseif ( is_category() || is_tag() ) {
    214214        /* translators: Category or tag name */
    215         $title['title'] = sprintf( __( 'WordPress Themes: %s Free', 'wporg-themes' ), single_term_title( '', false ) );
     215        $title['title'] = sprintf(
     216            __( 'WordPress Themes: %s Free', 'wporg-themes' ),
     217            single_term_title( '', false )
     218        );
     219    } elseif ( is_author() ) {
     220        $title['title'] = sprintf(
     221            __( 'Themes by %s', 'wporg-themes' ),
     222            get_queried_object()->display_name ?: get_queried_object()->user_nicename
     223        );
    216224    }
    217225
     
    244252    if ( is_front_page() ) {
    245253        $tags['description'] = __( 'Find the perfect theme for your WordPress website. Choose from thousands of stunning designs with a wide variety of features and customization options.', 'wporg-themes' );
     254    } elseif ( is_author() ) {
     255        $tags['description'] = sprintf(
     256            __( 'See all WordPress themes developed by %s.', 'wporg-themes' ),
     257            get_queried_object()->display_name ?: get_queried_object()->user_nicename
     258        );
    246259    }
    247260
Note: See TracChangeset for help on using the changeset viewer.