W3cubDocs

/WordPress

install_popular_tags( array $args = array() )

Retrieve popular WordPress plugin tags.

Description

Parameters

$args

(array) (Optional)

Default value: array()

Return

(array)

Source

File: wp-admin/includes/plugin-install.php

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;
}

Changelog

Version Description
2.7.0 Introduced.

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