Warning: This function has been deprecated. Use get_theme_feature_list() instead.
install_themes_feature_list() WordPress Function
The install_themes_feature_list() function installs the default themes for a given Feature List. This function is useful for installing the default themes for a new WordPress site. It can also be used to install the default themes for a WordPress site that has been upgraded from an older version. The install_themes_feature_list() function takes two arguments: 1. The Feature List to install the themes for. 2. A boolean value that indicates whether to install the default themes for the current site or for a new WordPress site. If set to true, the default themes for the current site will be installed. If set to false, the default themes for a new WordPress site will be installed. The install_themes_feature_list() function returns an array of theme data objects on success, or false on failure.
install_themes_feature_list() #
Retrieves the list of WordPress theme features (aka theme tags).
Return
(array)
Source
File: wp-admin/includes/theme-install.php
function install_themes_feature_list() {
_deprecated_function( __FUNCTION__, '3.1.0', 'get_theme_feature_list()' );
$cache = get_transient( 'wporg_theme_feature_list' );
if ( ! $cache ) {
set_transient( 'wporg_theme_feature_list', array(), 3 * HOUR_IN_SECONDS );
}
if ( $cache ) {
return $cache;
}
$feature_list = themes_api( 'feature_list', array() );
if ( is_wp_error( $feature_list ) ) {
return array();
}
set_transient( 'wporg_theme_feature_list', $feature_list, 3 * HOUR_IN_SECONDS );
return $feature_list;
}
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
| Version | Description |
|---|---|
| 3.1.0 | Use get_theme_feature_list() instead. |
| 2.8.0 | Introduced. |