]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-content/themes/twentyeleven/content.php
Wordpress 3.5.2
[autoinstalls/wordpress.git] / wp-content / themes / twentyeleven / content.php
index 3631e786fc8e76bc5beb13bab222e6c74b004d8e..f245ebf5bffd14647cd69f0bf37699ac2faa8a60 100644 (file)
                <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(); ?> -->