wphooks.info - tag_cloud_sort

tag_cloud_sort

(trunk - 5.1-alpha-44286)

The hook occurs in the following file:

wp-includes/category-template.php:
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
	}

	/**
	 * Filters how the items in a tag cloud are sorted.
	 *
	 * @since 2.8.0
	 *
	 * @param WP_Term[] $tags Ordered array of terms.
	 * @param array     $args An array of tag cloud arguments.
	 */
	$tags_sorted = apply_filters( 'tag_cloud_sort', $tags, $args );
	if ( empty( $tags_sorted ) ) {
		return $return;
	}

	if ( $tags_sorted !== $tags ) {
		$tags = $tags_sorted;
		unset( $tags_sorted );
	} else {
		if ( 'RAND' === $args['order'] ) {