wphooks.info - get_terms_fields

get_terms_fields

The hook occurs in the following file:

wp-includes/class-wp-term-query.php:
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
		 * parameter alone.
		 *
		 * Use of this filter can result in unpredictable behavior, and is not recommended.
		 *
		 * @since 2.8.0
		 *
		 * @param array $selects    An array of fields to select for the terms query.
		 * @param array $args       An array of term query arguments.
		 * @param array $taxonomies An array of taxonomies.
		 */
		$fields = implode( ', ', apply_filters( 'get_terms_fields', $selects, $args, $taxonomies ) );

		$join .= " INNER JOIN $wpdb->term_taxonomy AS tt ON t.term_id = tt.term_id";

		if ( ! empty( $this->query_vars['object_ids'] ) ) {
			$join .= " INNER JOIN {$wpdb->term_relationships} AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id";
		}

		$where = implode( ' AND ', $this->sql_clauses['where'] );