A WordPress-centric search engine for devs and theme authors



install_popular_tags ›

Since2.7.0
Deprecatedn/a
install_popular_tags ( $args = array() )
Parameters:
  • (array) $args
    Required: No
    Default: array()
Returns:
  • (array)
Defined at:
Codex:

Retrieve popular WordPress plugin tags.



Source

function install_popular_tags( $args = array() ) {
	$key = md5( serialize( $args ) );
	if ( false !== ( $tags = get_site_transient( 'poptags_' . $key ) ) ) {
		return $tags;
	}

	$tags = plugins_api( 'hot_tags', $args );

	if ( is_wp_error( $tags ) ) {
		return $tags;
	}

	set_site_transient( 'poptags_' . $key, $tags, 3 * HOUR_IN_SECONDS );

	return $tags;
}