mirror of
git://develop.git.wordpress.org/
synced 2025-02-27 10:02:43 +01:00
Twenty Eleven: show categories and tags only when supported by post type, using is_object_in_taxonomy()
instead of only checking for 'post' post types. Props obenland, fixes #20922.
git-svn-id: https://develop.svn.wordpress.org/trunk@22193 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
167cc00a84
commit
51a14e8247
@ -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 ) : ?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user