From 460a492acf8ecf32437631346a739a4e43644723 Mon Sep 17 00:00:00 2001 From: Robin Cornett Date: Tue, 7 Feb 2017 16:47:41 -0500 Subject: [PATCH] Add filter for terms list on term image ID --- includes/helper-functions.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/includes/helper-functions.php b/includes/helper-functions.php index 12c4872..f413488 100644 --- a/includes/helper-functions.php +++ b/includes/helper-functions.php @@ -43,8 +43,11 @@ function display_featured_image_genesis_get_term_image_id( $image_id = '' ) { foreach ( get_object_taxonomies( $post, 'names' ) as $taxonomy ) { $taxonomies[] = $taxonomy; } - $args = array( 'orderby' => 'count', 'order' => 'DESC' ); - $terms = wp_get_object_terms( get_the_ID(), $taxonomies, $args ); + $args = array( + 'orderby' => 'count', + 'order' => 'DESC', + ); + $terms = apply_filters( 'displayfeaturedimagegenesis_object_terms', wp_get_object_terms( get_the_ID(), $taxonomies, $args ), $taxonomies, $args ); foreach ( $terms as $term ) { $term_id = $term->term_id;