wphooks.info - get_terms_orderby

get_terms_orderby

The hook occurs in the following file:

wp-includes/class-wp-term-query.php:
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
		/**
		 * Filters the ORDERBY clause of the terms query.
		 *
		 * @since 2.8.0
		 *
		 * @param string $orderby    `ORDERBY` clause of the terms query.
		 * @param array  $args       An array of terms query arguments.
		 * @param array  $taxonomies An array of taxonomies.
		 */
		$orderby = apply_filters( 'get_terms_orderby', $orderby, $this->query_vars, $this->query_vars['taxonomy'] );

		// Run after the 'get_terms_orderby' filter for backward compatibility.
		if ( $maybe_orderby_meta ) {
			$maybe_orderby_meta = $this->parse_orderby_meta( $_orderby );
			if ( $maybe_orderby_meta ) {
				$orderby = $maybe_orderby_meta;
			}
		}