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. git-svn-id: https://develop.svn.wordpress.org/trunk@27118 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
dfb4b73fbe
commit
cb8654eade
|
@ -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