Advertisements

install_popular_tags

Definition:
function install_popular_tags( $args = array() {}

Retrieve popular WordPress plugin tags.

Parameters

  • array $args

Source code

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, 10800); // 3 * 60 * 60 = 10800



	return $tags;

}

2045

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: