mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 17:48:01 +01:00
Twenty Fourteen: make sure featured
tag is hidden on front-end views as expected. Add a check for the tag name in case we're using default values and the default ID of 0
does not match the term id of the featured
tag.
Props obenland, fixes #26732. Built from https://develop.svn.wordpress.org/trunk@27118 git-svn-id: http://core.svn.wordpress.org/trunk@26985 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ab9e603c00
commit
31e9d97412
@ -329,8 +329,9 @@ class Featured_Content {
|
|||||||
return $terms;
|
return $terms;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$settings = self::get_setting();
|
||||||
foreach( $terms as $order => $term ) {
|
foreach( $terms as $order => $term ) {
|
||||||
if ( self::get_setting( 'tag-id' ) == $term->term_id && 'post_tag' == $term->taxonomy ) {
|
if ( ( $settings['tag-id'] === $term->term_id || $settings['tag-name'] === $term->name ) && 'post_tag' === $term->taxonomy ) {
|
||||||
unset( $terms[ $order ] );
|
unset( $terms[ $order ] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -372,8 +373,9 @@ class Featured_Content {
|
|||||||
return $terms;
|
return $terms;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$settings = self::get_setting();
|
||||||
foreach( $terms as $order => $term ) {
|
foreach( $terms as $order => $term ) {
|
||||||
if ( self::get_setting( 'tag-id' ) == $term->term_id ) {
|
if ( ( $settings['tag-id'] === $term->term_id || $settings['tag-name'] === $term->name ) && 'post_tag' === $term->taxonomy ) {
|
||||||
unset( $terms[ $term->term_id ] );
|
unset( $terms[ $term->term_id ] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user