Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document meta: Improve the consistency of <title>s #253

Merged
merged 1 commit into from
Oct 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions source/wp-content/themes/wporg-showcase-2022/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -406,15 +406,18 @@ function document_title( $parts ) {
$parts['title'] = sprintf( __( '%s - WordPress Showcase', 'wporg' ), $parts['title'] );
} elseif ( is_tag() ) {
// translators: %s: The name of the tag
$parts['title'] = sprintf( __( 'Sites tagged as "%s"', 'wporg' ), strtolower( $parts['title'] ) );
$parts['title'] = sprintf( __( 'Showcase sites tagged as "%s"', 'wporg' ), strtolower( $parts['title'] ) );
} elseif ( is_category() ) {
// translators: %s: The name of the tag
$parts['title'] = sprintf( __( 'Sites categorized as "%s"', 'wporg' ), strtolower( $parts['title'] ) );
$parts['title'] = sprintf( __( 'Showcase sites categorized as "%s"', 'wporg' ), strtolower( $parts['title'] ) );
} elseif ( is_author() ) {
// translators: %s: Author name
$parts['title'] = sprintf( __( 'Showcase sites by %s', 'wporg' ), $parts['title'] );
} else {
$term_names = wp_list_pluck( get_applied_filter_list(), 'name' );
if ( $term_names ) {
// translators: %s list of terms used for filtering.
$parts['title'] = sprintf( __( 'Sites filtered by: %s', 'wporg' ), implode( ', ', $term_names ) );
// translators: %s: list of terms used for filtering
$parts['title'] = sprintf( __( 'Showcase sites filtered by: %s', 'wporg' ), implode( ', ', $term_names ) );
}
}

Expand Down
Loading