+ // Juggle topic count tooltips:
+ if ( isset( $args['topic_count_text'] ) ) {
+ // First look for nooped plural support via topic_count_text.
+ $translate_nooped_plural = $args['topic_count_text'];
+ } elseif ( ! empty( $args['topic_count_text_callback'] ) ) {
+ // Look for the alternative callback style. Ignore the previous default.
+ if ( $args['topic_count_text_callback'] === 'default_topic_count_text' ) {
+ $translate_nooped_plural = _n_noop( '%s topic', '%s topics' );
+ } else {
+ $translate_nooped_plural = false;
+ }
+ } elseif ( isset( $args['single_text'] ) && isset( $args['multiple_text'] ) ) {
+ // If no callback exists, look for the old-style single_text and multiple_text arguments.
+ $translate_nooped_plural = _n_noop( $args['single_text'], $args['multiple_text'] );
+ } else {
+ // This is the default for when no callback, plural, or argument is passed in.
+ $translate_nooped_plural = _n_noop( '%s topic', '%s topics' );
+ }
+
+ /**
+ * Filter how the items in a tag cloud are sorted.
+ *
+ * @since 2.8.0
+ *
+ * @param array $tags Ordered array of terms.
+ * @param array $args An array of tag cloud arguments.
+ */