web/wp-content/themes/twentyeleven/content.php
changeset 204 09a1c134465b
parent 194 32102edaa81b
--- a/web/wp-content/themes/twentyeleven/content.php	Wed Dec 19 12:35:13 2012 -0800
+++ b/web/wp-content/themes/twentyeleven/content.php	Wed Dec 19 17:46:52 2012 -0800
@@ -12,11 +12,11 @@
 		<header class="entry-header">
 			<?php if ( is_sticky() ) : ?>
 				<hgroup>
-					<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
+					<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
 					<h3 class="entry-format"><?php _e( 'Featured', 'twentyeleven' ); ?></h3>
 				</hgroup>
 			<?php else : ?>
-			<h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
+			<h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
 			<?php endif; ?>
 
 			<?php if ( 'post' == get_post_type() ) : ?>
@@ -45,7 +45,7 @@
 
 		<footer class="entry-meta">
 			<?php $show_sep = false; ?>
-			<?php if ( 'post' == get_post_type() ) : // Hide category and tag text for pages on Search ?>
+			<?php if ( is_object_in_taxonomy( get_post_type(), 'category' ) ) : // Hide category text when not supported ?>
 			<?php
 				/* translators: used between list items, there is a space after the comma */
 				$categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) );
@@ -56,6 +56,8 @@
 				$show_sep = true; ?>
 			</span>
 			<?php endif; // End if categories ?>
+			<?php endif; // End if is_object_in_taxonomy( get_post_type(), 'category' ) ?>
+			<?php if ( is_object_in_taxonomy( get_post_type(), 'post_tag' ) ) : // Hide tag text when not supported ?>
 			<?php
 				/* translators: used between list items, there is a space after the comma */
 				$tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
@@ -68,7 +70,7 @@
 				$show_sep = true; ?>
 			</span>
 			<?php endif; // End if $tags_list ?>
-			<?php endif; // End if 'post' == get_post_type() ?>
+			<?php endif; // End if is_object_in_taxonomy( get_post_type(), 'post_tag' ) ?>
 
 			<?php if ( comments_open() ) : ?>
 			<?php if ( $show_sep ) : ?>
@@ -78,5 +80,5 @@
 			<?php endif; // End if comments_open() ?>
 
 			<?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
-		</footer><!-- #entry-meta -->
+		</footer><!-- .entry-meta -->
 	</article><!-- #post-<?php the_ID(); ?> -->