WordPress.org

Make WordPress Core

Ticket #20922: 20922.diff

File 20922.diff, 1.5 KB (added by obenland, 10 months ago)
  • wp-content/themes/twentyeleven/content.php

     
    4545 
    4646                <footer class="entry-meta"> 
    4747                        <?php $show_sep = false; ?> 
    48                         <?php if ( 'post' == get_post_type() ) : // Hide category and tag text for pages on Search ?> 
     48                        <?php if ( is_object_in_taxonomy( get_post_type(), 'category' ) ) : // Hide category text when not supported ?> 
    4949                        <?php 
    5050                                /* translators: used between list items, there is a space after the comma */ 
    5151                                $categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) ); 
     
    5656                                $show_sep = true; ?> 
    5757                        </span> 
    5858                        <?php endif; // End if categories ?> 
     59                        <?php endif; // End if is_object_in_taxonomy( get_post_type(), 'category' ) ?> 
     60                        <?php if ( is_object_in_taxonomy( get_post_type(), 'post_tag' ) ) : // Hide tag text when not supported ?> 
    5961                        <?php 
    6062                                /* translators: used between list items, there is a space after the comma */ 
    6163                                $tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) ); 
     
    6870                                $show_sep = true; ?> 
    6971                        </span> 
    7072                        <?php endif; // End if $tags_list ?> 
    71                         <?php endif; // End if 'post' == get_post_type() ?> 
    72  
     73                        <?php endif; // End if is_object_in_taxonomy( get_post_type(), 'post_tag' ) ?> 
     74                         
    7375                        <?php if ( comments_open() ) : ?> 
    7476                        <?php if ( $show_sep ) : ?> 
    7577                        <span class="sep"> | </span>