wpseek.com
A WordPress-centric search engine for devs and theme authors



install_popular_tags › WordPress Function

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

Retrieves popular WordPress plugin tags.



Source

function install_popular_tags( $args = array() ) {
	$key  = md5( serialize( $args ) );
	$tags = get_site_transient( 'poptags_' . $key );
	if ( false !== $tags ) {
		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;
}