diff --git a/wp-includes/class-wp-term.php b/wp-includes/class-wp-term.php index 7c17130120..f170dcf3b5 100644 --- a/wp-includes/class-wp-term.php +++ b/wp-includes/class-wp-term.php @@ -139,7 +139,10 @@ final class WP_Term { wp_cache_add( $term_id, $_term, 'terms' ); } - return new WP_Term( $_term ); + $term_obj = new WP_Term( $_term ); + $term_obj->filter( $term_obj->filter ); + + return $term_obj; } /** @@ -165,11 +168,6 @@ final class WP_Term { * @param string $filter Filter context. Accepts 'edit', 'db', 'display', 'attribute', 'js', 'raw'. */ public function filter( $filter ) { - // Term has already been filtered - nothing more to do. - if ( isset( $this->filter ) && $this->filter === $filter ) { - return; - } - sanitize_term( $this, $this->taxonomy, $filter ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 0562d9c914..bddd3ce602 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-35030'; +$wp_version = '4.4-alpha-35031'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.