W3cubDocs

/WordPress

default_topic_count_scale( int $count ): int

Default topic count scaling for tag links.

Parameters

$countintrequired
Number of posts with that tag.

Return

int Scaled count.

Source

function default_topic_count_scale( $count ) {
	return round( log10( $count + 1 ) * 100 );
}

Changelog

Version Description
2.9.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/default_topic_count_scale