Add filter for terms list on term image ID

This commit is contained in:
Robin Cornett
2017-02-07 16:47:41 -05:00
parent 5bd8d9b910
commit 460a492acf
+5 -2
View File
@@ -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;