install_popular_tags
Retrieve popular WordPress plugin tags.
Description
(array) install_popular_tags( (array) $args = array() );
Returns (array)
Parameters (1)
- 0. $args — Optional. (array) =>
array()
- The args.
Usage
if ( !function_exists( 'install_popular_tags' ) ) { require_once ABSPATH . '/wp-admin/includes/plugin-install.php'; } // The args. $args = array(); // NOTICE! Understand what this does before running. $result = install_popular_tags($args);
Defined (1)
The function is defined in the following location(s).
- /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;
- }