Make WordPress Core

Ticket #40661: wp_term_query_filter.diff

File wp_term_query_filter.diff, 575 bytes (added by mpol, 8 years ago)

Add filter get_terms to WP_Term_Query->parse_query()

  • .php

    old new  
    682682                                $cache = array_map( 'get_term', $cache );
    683683                        }
    684684
     685                        $cache = apply_filters( 'get_terms', $cache, $taxonomies, $this->query_vars, $this );
     686
    685687                        $this->terms = $cache;
    686688                        return $this->terms;
    687689                }
     
    814816                        $terms = array_map( 'get_term', $terms );
    815817                }
    816818
     819                $terms = apply_filters( 'get_terms', $terms, $taxonomies, $this->query_vars, $this );
     820
    817821                $this->terms = $terms;
    818822                return $this->terms;
    819823        }