Twenty Twelve: hide author name on single author blogs, using `is_multi_author()` -- fixes #21759, props iamtakashi.

git-svn-id: http://core.svn.wordpress.org/trunk@21761 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Lance Willett 2012-09-05 04:33:55 +00:00
parent 5a9193d6c9
commit 678847e6eb
2 changed files with 9 additions and 3 deletions

View File

@ -336,11 +336,11 @@ function twentytwelve_entry_meta() {
// Translators: 1 is category, 2 is tag, 3 is the date and 4 is the author's name.
if ( $tag_list ) {
$utility_text = __( 'This entry was posted in %1$s and tagged %2$s on %3$s by %4$s.', 'twentytwelve' );
$utility_text = __( 'This entry was posted in %1$s and tagged %2$s on %3$s<span class="by-author"> by %4$s</span>.', 'twentytwelve' );
} elseif ( $categories_list ) {
$utility_text = __( 'This entry was posted in %1$s on %3$s by %4$s.', 'twentytwelve' );
$utility_text = __( 'This entry was posted in %1$s on %3$s<span class="by-author"> by %4$s</span>.', 'twentytwelve' );
} else {
$utility_text = __( 'This entry was posted on %3$s by %4$s.', 'twentytwelve' );
$utility_text = __( 'This entry was posted on %3$s<span class="by-author"> by %4$s</span>.', 'twentytwelve' );
}
printf(
@ -386,6 +386,9 @@ function twentytwelve_body_class( $classes ) {
if ( wp_style_is( 'twentytwelve-fonts', 'queue' ) )
$classes[] = 'custom-font-enabled';
if ( ! is_multi_author() )
$classes[] = 'single-author';
return $classes;
}
add_filter( 'body_class', 'twentytwelve_body_class' );

View File

@ -881,6 +881,9 @@ footer.entry-meta {
line-height: 1.846153846;
color: #777;
}
.single-author .entry-meta .by-author {
display: none;
}
/* =Archives