wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema



install_popular_tags › WordPress Function

Desde2.7.0
Obsoleton/a
install_popular_tags ( $args = array() )
Parâmetros:
  • (array) $args
    Required: No
    Padrão: array()
Retorna:
  • (array|WP_Error)
Definido em:
Codex:

Retrieves popular WordPress plugin tags.



Fonte

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