Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: tag_cloud_sort

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
708
709      /**
710       * Filter how the items in a tag cloud are sorted.
711       *
712       * @since 2.8.0
713       *
714       * @param array $tags Ordered array of terms.
715       * @param array $args An array of tag cloud arguments.
716       */
717      $tags_sorted = apply_filters( 'tag_cloud_sort', $tags, $args );
718      if ( empty( $tags_sorted ) ) {
719           return $return;
720      }
721
722      if ( $tags_sorted !== $tags ) {
723           $tags = $tags_sorted;
724           unset( $tags_sorted );
725      } else {
726           if ( 'RAND' === $order ) {