From a2dfe18dfd14c6b7885bc25d99d1adaeb3534b1c Mon Sep 17 00:00:00 2001 From: scribu Date: Sat, 13 Nov 2010 14:08:27 +0000 Subject: [PATCH] Add 'get_the_terms' filter. Props filosofo. Fixes #15410 git-svn-id: https://develop.svn.wordpress.org/trunk@16342 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/category-template.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php index aaf2e767d4..f6784986b3 100644 --- a/wp-includes/category-template.php +++ b/wp-includes/category-template.php @@ -1064,6 +1064,8 @@ function get_the_terms( $id = 0, $taxonomy ) { if ( false === $terms ) $terms = wp_get_object_terms( $id, $taxonomy ); + $terms = apply_filters( 'get_the_terms', $terms, $id, $taxonomy ); + if ( empty( $terms ) ) return false;