Make WordPress Core

Changeset 27118 for trunk


Ignore:
Timestamp:
02/07/2014 05:16:53 PM (11 years ago)
Author:
lancewillett
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyfourteen/inc/featured-content.php

    r26556 r27118  
    330330        }
    331331
     332        $settings = self::get_setting();
    332333        foreach( $terms as $order => $term ) {
    333             if ( self::get_setting( 'tag-id' ) == $term->term_id && 'post_tag' == $term->taxonomy ) {
     334            if ( ( $settings['tag-id'] === $term->term_id || $settings['tag-name'] === $term->name ) && 'post_tag' === $term->taxonomy ) {
    334335                unset( $terms[ $order ] );
    335336            }
     
    373374        }
    374375
     376        $settings = self::get_setting();
    375377        foreach( $terms as $order => $term ) {
    376             if ( self::get_setting( 'tag-id' ) == $term->term_id ) {
     378            if ( ( $settings['tag-id'] === $term->term_id || $settings['tag-name'] === $term->name ) && 'post_tag' === $term->taxonomy ) {
    377379                unset( $terms[ $term->term_id ] );
    378380            }
Note: See TracChangeset for help on using the changeset viewer.