wphooks.info - get_terms_args

get_terms_args

The hook occurs in the following file:

wp-includes/class-wp-term-query.php:
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
		}

		/**
		 * Filters the terms query arguments.
		 *
		 * @since 3.1.0
		 *
		 * @param array $args       An array of get_terms() arguments.
		 * @param array $taxonomies An array of taxonomies.
		 */
		$args = apply_filters( 'get_terms_args', $args, $taxonomies );

		// Avoid the query if the queried parent/child_of term has no descendants.
		$child_of = $args['child_of'];
		$parent   = $args['parent'];

		if ( $child_of ) {
			$_parent = $child_of;
		} elseif ( $parent ) {
			$_parent = $parent;