get_theme_feature_list

The timeline below displays how wordpress function get_theme_feature_list has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.2

/**
 * Retrieves list of WordPress theme features (aka theme tags).
 *
 * @since 3.1.0
 * @since 3.2.0 Added 'Gray' color and 'Featured Image Header', 'Featured Images',
 *              'Full Width Template', and 'Post Formats' features.
 * @since 3.5.0 Added 'Flexible Header' feature.
 * @since 3.8.0 Renamed 'Width' filter to 'Layout'.
 * @since 3.8.0 Renamed 'Fixed Width' and 'Flexible Width' options
 *              to 'Fixed Layout' and 'Fluid Layout'.
 * @since 3.8.0 Added 'Accessibility Ready' feature and 'Responsive Layout' option.
 * @since 3.9.0 Combined 'Layout' and 'Columns' filters.
 * @since 4.6.0 Removed 'Colors' filter.
 * @since 4.6.0 Added 'Grid Layout' option.
 *              Removed 'Fixed Layout', 'Fluid Layout', and 'Responsive Layout' options.
 * @since 4.6.0 Added 'Custom Logo' and 'Footer Widgets' features.
 *              Removed 'Blavatar' feature.
 * @since 4.6.0 Added 'Blog', 'E-Commerce', 'Education', 'Entertainment', 'Food & Drink',
 *              'Holiday', 'News', 'Photography', and 'Portfolio' subjects.
 *              Removed 'Photoblogging' and 'Seasonal' subjects.
 * @since 4.9.0 Reordered the filters from 'Layout', 'Features', 'Subject'
 *              to 'Subject', 'Features', 'Layout'.
 * @since 4.9.0 Removed 'BuddyPress', 'Custom Menu', 'Flexible Header',
 *              'Front Page Posting', 'Microformats', 'RTL Language Support',
 *              'Threaded Comments', and 'Translation Ready' features.
 * @since 5.5.0 Added 'Block Editor Patterns', 'Block Editor Styles',
 *              and 'Full Site Editing' features.
 * @since 5.5.0 Added 'Wide Blocks' layout option.
 * @since 5.8.1 Added 'Template Editing' feature.
 * @since 6.1.1 Replaced 'Full Site Editing' feature name with 'Site Editor'.
 * @since 6.2.0 Added 'Style Variations' feature.
 *
 * @param bool $api Optional. Whether try to fetch tags from the WordPress.org API. Defaults to true.
 * @return array Array of features keyed by category with translations keyed by slug.
 */
function get_theme_feature_list($api = true)
{
    // Hard-coded list is used if API is not accessible.
    $features = array(__('Subject') => array('blog' => __('Blog'), 'e-commerce' => __('E-Commerce'), 'education' => __('Education'), 'entertainment' => __('Entertainment'), 'food-and-drink' => __('Food & Drink'), 'holiday' => __('Holiday'), 'news' => __('News'), 'photography' => __('Photography'), 'portfolio' => __('Portfolio')), __('Features') => array('accessibility-ready' => __('Accessibility Ready'), 'block-patterns' => __('Block Editor Patterns'), 'block-styles' => __('Block Editor Styles'), 'custom-background' => __('Custom Background'), 'custom-colors' => __('Custom Colors'), 'custom-header' => __('Custom Header'), 'custom-logo' => __('Custom Logo'), 'editor-style' => __('Editor Style'), 'featured-image-header' => __('Featured Image Header'), 'featured-images' => __('Featured Images'), 'footer-widgets' => __('Footer Widgets'), 'full-site-editing' => __('Site Editor'), 'full-width-template' => __('Full Width Template'), 'post-formats' => __('Post Formats'), 'sticky-post' => __('Sticky Post'), 'style-variations' => __('Style Variations'), 'template-editing' => __('Template Editing'), 'theme-options' => __('Theme Options')), __('Layout') => array('grid-layout' => __('Grid Layout'), 'one-column' => __('One Column'), 'two-columns' => __('Two Columns'), 'three-columns' => __('Three Columns'), 'four-columns' => __('Four Columns'), 'left-sidebar' => __('Left Sidebar'), 'right-sidebar' => __('Right Sidebar'), 'wide-blocks' => __('Wide Blocks')));
    if (!$api || !current_user_can('install_themes')) {
        return $features;
    }
    $feature_list = get_site_transient('wporg_theme_feature_list');
    if (!$feature_list) {
        set_site_transient('wporg_theme_feature_list', array(), 3 * HOUR_IN_SECONDS);
    }
    if (!$feature_list) {
        $feature_list = themes_api('feature_list', array());
        if (is_wp_error($feature_list)) {
            return $features;
        }
    }
    if (!$feature_list) {
        return $features;
    }
    set_site_transient('wporg_theme_feature_list', $feature_list, 3 * HOUR_IN_SECONDS);
    $category_translations = array('Layout' => __('Layout'), 'Features' => __('Features'), 'Subject' => __('Subject'));
    $wporg_features = array();
    // Loop over the wp.org canonical list and apply translations.
    foreach ((array) $feature_list as $feature_category => $feature_items) {
        if (isset($category_translations[$feature_category])) {
            $feature_category = $category_translations[$feature_category];
        }
        $wporg_features[$feature_category] = array();
        foreach ($feature_items as $feature) {
            if (isset($features[$feature_category][$feature])) {
                $wporg_features[$feature_category][$feature] = $features[$feature_category][$feature];
            } else {
                $wporg_features[$feature_category][$feature] = $feature;
            }
        }
    }
    return $wporg_features;
}

WordPress Version: 1.1

/**
 * Retrieves list of WordPress theme features (aka theme tags).
 *
 * @since 3.1.0
 * @since 3.2.0 Added 'Gray' color and 'Featured Image Header', 'Featured Images',
 *              'Full Width Template', and 'Post Formats' features.
 * @since 3.5.0 Added 'Flexible Header' feature.
 * @since 3.8.0 Renamed 'Width' filter to 'Layout'.
 * @since 3.8.0 Renamed 'Fixed Width' and 'Flexible Width' options
 *              to 'Fixed Layout' and 'Fluid Layout'.
 * @since 3.8.0 Added 'Accessibility Ready' feature and 'Responsive Layout' option.
 * @since 3.9.0 Combined 'Layout' and 'Columns' filters.
 * @since 4.6.0 Removed 'Colors' filter.
 * @since 4.6.0 Added 'Grid Layout' option.
 *              Removed 'Fixed Layout', 'Fluid Layout', and 'Responsive Layout' options.
 * @since 4.6.0 Added 'Custom Logo' and 'Footer Widgets' features.
 *              Removed 'Blavatar' feature.
 * @since 4.6.0 Added 'Blog', 'E-Commerce', 'Education', 'Entertainment', 'Food & Drink',
 *              'Holiday', 'News', 'Photography', and 'Portfolio' subjects.
 *              Removed 'Photoblogging' and 'Seasonal' subjects.
 * @since 4.9.0 Reordered the filters from 'Layout', 'Features', 'Subject'
 *              to 'Subject', 'Features', 'Layout'.
 * @since 4.9.0 Removed 'BuddyPress', 'Custom Menu', 'Flexible Header',
 *              'Front Page Posting', 'Microformats', 'RTL Language Support',
 *              'Threaded Comments', and 'Translation Ready' features.
 * @since 5.5.0 Added 'Block Editor Patterns', 'Block Editor Styles',
 *              and 'Full Site Editing' features.
 * @since 5.5.0 Added 'Wide Blocks' layout option.
 * @since 5.8.1 Added 'Template Editing' feature.
 * @since 6.1.1 Replaced 'Full Site Editing' feature name with 'Site Editor'.
 *
 * @param bool $api Optional. Whether try to fetch tags from the WordPress.org API. Defaults to true.
 * @return array Array of features keyed by category with translations keyed by slug.
 */
function get_theme_feature_list($api = true)
{
    // Hard-coded list is used if API is not accessible.
    $features = array(__('Subject') => array('blog' => __('Blog'), 'e-commerce' => __('E-Commerce'), 'education' => __('Education'), 'entertainment' => __('Entertainment'), 'food-and-drink' => __('Food & Drink'), 'holiday' => __('Holiday'), 'news' => __('News'), 'photography' => __('Photography'), 'portfolio' => __('Portfolio')), __('Features') => array('accessibility-ready' => __('Accessibility Ready'), 'block-patterns' => __('Block Editor Patterns'), 'block-styles' => __('Block Editor Styles'), 'custom-background' => __('Custom Background'), 'custom-colors' => __('Custom Colors'), 'custom-header' => __('Custom Header'), 'custom-logo' => __('Custom Logo'), 'editor-style' => __('Editor Style'), 'featured-image-header' => __('Featured Image Header'), 'featured-images' => __('Featured Images'), 'footer-widgets' => __('Footer Widgets'), 'full-site-editing' => __('Site Editor'), 'full-width-template' => __('Full Width Template'), 'post-formats' => __('Post Formats'), 'sticky-post' => __('Sticky Post'), 'template-editing' => __('Template Editing'), 'theme-options' => __('Theme Options')), __('Layout') => array('grid-layout' => __('Grid Layout'), 'one-column' => __('One Column'), 'two-columns' => __('Two Columns'), 'three-columns' => __('Three Columns'), 'four-columns' => __('Four Columns'), 'left-sidebar' => __('Left Sidebar'), 'right-sidebar' => __('Right Sidebar'), 'wide-blocks' => __('Wide Blocks')));
    if (!$api || !current_user_can('install_themes')) {
        return $features;
    }
    $feature_list = get_site_transient('wporg_theme_feature_list');
    if (!$feature_list) {
        set_site_transient('wporg_theme_feature_list', array(), 3 * HOUR_IN_SECONDS);
    }
    if (!$feature_list) {
        $feature_list = themes_api('feature_list', array());
        if (is_wp_error($feature_list)) {
            return $features;
        }
    }
    if (!$feature_list) {
        return $features;
    }
    set_site_transient('wporg_theme_feature_list', $feature_list, 3 * HOUR_IN_SECONDS);
    $category_translations = array('Layout' => __('Layout'), 'Features' => __('Features'), 'Subject' => __('Subject'));
    $wporg_features = array();
    // Loop over the wp.org canonical list and apply translations.
    foreach ((array) $feature_list as $feature_category => $feature_items) {
        if (isset($category_translations[$feature_category])) {
            $feature_category = $category_translations[$feature_category];
        }
        $wporg_features[$feature_category] = array();
        foreach ($feature_items as $feature) {
            if (isset($features[$feature_category][$feature])) {
                $wporg_features[$feature_category][$feature] = $features[$feature_category][$feature];
            } else {
                $wporg_features[$feature_category][$feature] = $feature;
            }
        }
    }
    return $wporg_features;
}

WordPress Version: 6.1

/**
 * Retrieves list of WordPress theme features (aka theme tags).
 *
 * @since 3.1.0
 * @since 3.2.0 Added 'Gray' color and 'Featured Image Header', 'Featured Images',
 *              'Full Width Template', and 'Post Formats' features.
 * @since 3.5.0 Added 'Flexible Header' feature.
 * @since 3.8.0 Renamed 'Width' filter to 'Layout'.
 * @since 3.8.0 Renamed 'Fixed Width' and 'Flexible Width' options
 *              to 'Fixed Layout' and 'Fluid Layout'.
 * @since 3.8.0 Added 'Accessibility Ready' feature and 'Responsive Layout' option.
 * @since 3.9.0 Combined 'Layout' and 'Columns' filters.
 * @since 4.6.0 Removed 'Colors' filter.
 * @since 4.6.0 Added 'Grid Layout' option.
 *              Removed 'Fixed Layout', 'Fluid Layout', and 'Responsive Layout' options.
 * @since 4.6.0 Added 'Custom Logo' and 'Footer Widgets' features.
 *              Removed 'Blavatar' feature.
 * @since 4.6.0 Added 'Blog', 'E-Commerce', 'Education', 'Entertainment', 'Food & Drink',
 *              'Holiday', 'News', 'Photography', and 'Portfolio' subjects.
 *              Removed 'Photoblogging' and 'Seasonal' subjects.
 * @since 4.9.0 Reordered the filters from 'Layout', 'Features', 'Subject'
 *              to 'Subject', 'Features', 'Layout'.
 * @since 4.9.0 Removed 'BuddyPress', 'Custom Menu', 'Flexible Header',
 *              'Front Page Posting', 'Microformats', 'RTL Language Support',
 *              'Threaded Comments', and 'Translation Ready' features.
 * @since 5.5.0 Added 'Block Editor Patterns', 'Block Editor Styles',
 *              and 'Full Site Editing' features.
 * @since 5.5.0 Added 'Wide Blocks' layout option.
 * @since 5.8.1 Added 'Template Editing' feature.
 *
 * @param bool $api Optional. Whether try to fetch tags from the WordPress.org API. Defaults to true.
 * @return array Array of features keyed by category with translations keyed by slug.
 */
function get_theme_feature_list($api = true)
{
    // Hard-coded list is used if API is not accessible.
    $features = array(__('Subject') => array('blog' => __('Blog'), 'e-commerce' => __('E-Commerce'), 'education' => __('Education'), 'entertainment' => __('Entertainment'), 'food-and-drink' => __('Food & Drink'), 'holiday' => __('Holiday'), 'news' => __('News'), 'photography' => __('Photography'), 'portfolio' => __('Portfolio')), __('Features') => array('accessibility-ready' => __('Accessibility Ready'), 'block-patterns' => __('Block Editor Patterns'), 'block-styles' => __('Block Editor Styles'), 'custom-background' => __('Custom Background'), 'custom-colors' => __('Custom Colors'), 'custom-header' => __('Custom Header'), 'custom-logo' => __('Custom Logo'), 'editor-style' => __('Editor Style'), 'featured-image-header' => __('Featured Image Header'), 'featured-images' => __('Featured Images'), 'footer-widgets' => __('Footer Widgets'), 'full-site-editing' => __('Full Site Editing'), 'full-width-template' => __('Full Width Template'), 'post-formats' => __('Post Formats'), 'sticky-post' => __('Sticky Post'), 'template-editing' => __('Template Editing'), 'theme-options' => __('Theme Options')), __('Layout') => array('grid-layout' => __('Grid Layout'), 'one-column' => __('One Column'), 'two-columns' => __('Two Columns'), 'three-columns' => __('Three Columns'), 'four-columns' => __('Four Columns'), 'left-sidebar' => __('Left Sidebar'), 'right-sidebar' => __('Right Sidebar'), 'wide-blocks' => __('Wide Blocks')));
    if (!$api || !current_user_can('install_themes')) {
        return $features;
    }
    $feature_list = get_site_transient('wporg_theme_feature_list');
    if (!$feature_list) {
        set_site_transient('wporg_theme_feature_list', array(), 3 * HOUR_IN_SECONDS);
    }
    if (!$feature_list) {
        $feature_list = themes_api('feature_list', array());
        if (is_wp_error($feature_list)) {
            return $features;
        }
    }
    if (!$feature_list) {
        return $features;
    }
    set_site_transient('wporg_theme_feature_list', $feature_list, 3 * HOUR_IN_SECONDS);
    $category_translations = array('Layout' => __('Layout'), 'Features' => __('Features'), 'Subject' => __('Subject'));
    $wporg_features = array();
    // Loop over the wp.org canonical list and apply translations.
    foreach ((array) $feature_list as $feature_category => $feature_items) {
        if (isset($category_translations[$feature_category])) {
            $feature_category = $category_translations[$feature_category];
        }
        $wporg_features[$feature_category] = array();
        foreach ($feature_items as $feature) {
            if (isset($features[$feature_category][$feature])) {
                $wporg_features[$feature_category][$feature] = $features[$feature_category][$feature];
            } else {
                $wporg_features[$feature_category][$feature] = $feature;
            }
        }
    }
    return $wporg_features;
}

WordPress Version: 8.1

/**
 * Retrieve list of WordPress theme features (aka theme tags).
 *
 * @since 3.1.0
 * @since 3.2.0 Added 'Gray' color and 'Featured Image Header', 'Featured Images',
 *              'Full Width Template', and 'Post Formats' features.
 * @since 3.5.0 Added 'Flexible Header' feature.
 * @since 3.8.0 Renamed 'Width' filter to 'Layout'.
 * @since 3.8.0 Renamed 'Fixed Width' and 'Flexible Width' options
 *              to 'Fixed Layout' and 'Fluid Layout'.
 * @since 3.8.0 Added 'Accessibility Ready' feature and 'Responsive Layout' option.
 * @since 3.9.0 Combined 'Layout' and 'Columns' filters.
 * @since 4.6.0 Removed 'Colors' filter.
 * @since 4.6.0 Added 'Grid Layout' option.
 *              Removed 'Fixed Layout', 'Fluid Layout', and 'Responsive Layout' options.
 * @since 4.6.0 Added 'Custom Logo' and 'Footer Widgets' features.
 *              Removed 'Blavatar' feature.
 * @since 4.6.0 Added 'Blog', 'E-Commerce', 'Education', 'Entertainment', 'Food & Drink',
 *              'Holiday', 'News', 'Photography', and 'Portfolio' subjects.
 *              Removed 'Photoblogging' and 'Seasonal' subjects.
 * @since 4.9.0 Reordered the filters from 'Layout', 'Features', 'Subject'
 *              to 'Subject', 'Features', 'Layout'.
 * @since 4.9.0 Removed 'BuddyPress', 'Custom Menu', 'Flexible Header',
 *              'Front Page Posting', 'Microformats', 'RTL Language Support',
 *              'Threaded Comments', and 'Translation Ready' features.
 * @since 5.5.0 Added 'Block Editor Patterns', 'Block Editor Styles',
 *              and 'Full Site Editing' features.
 * @since 5.5.0 Added 'Wide Blocks' layout option.
 * @since 5.8.1 Added 'Template Editing' feature.
 *
 * @param bool $api Optional. Whether try to fetch tags from the WordPress.org API. Defaults to true.
 * @return array Array of features keyed by category with translations keyed by slug.
 */
function get_theme_feature_list($api = true)
{
    // Hard-coded list is used if API is not accessible.
    $features = array(__('Subject') => array('blog' => __('Blog'), 'e-commerce' => __('E-Commerce'), 'education' => __('Education'), 'entertainment' => __('Entertainment'), 'food-and-drink' => __('Food & Drink'), 'holiday' => __('Holiday'), 'news' => __('News'), 'photography' => __('Photography'), 'portfolio' => __('Portfolio')), __('Features') => array('accessibility-ready' => __('Accessibility Ready'), 'block-patterns' => __('Block Editor Patterns'), 'block-styles' => __('Block Editor Styles'), 'custom-background' => __('Custom Background'), 'custom-colors' => __('Custom Colors'), 'custom-header' => __('Custom Header'), 'custom-logo' => __('Custom Logo'), 'editor-style' => __('Editor Style'), 'featured-image-header' => __('Featured Image Header'), 'featured-images' => __('Featured Images'), 'footer-widgets' => __('Footer Widgets'), 'full-site-editing' => __('Full Site Editing'), 'full-width-template' => __('Full Width Template'), 'post-formats' => __('Post Formats'), 'sticky-post' => __('Sticky Post'), 'template-editing' => __('Template Editing'), 'theme-options' => __('Theme Options')), __('Layout') => array('grid-layout' => __('Grid Layout'), 'one-column' => __('One Column'), 'two-columns' => __('Two Columns'), 'three-columns' => __('Three Columns'), 'four-columns' => __('Four Columns'), 'left-sidebar' => __('Left Sidebar'), 'right-sidebar' => __('Right Sidebar'), 'wide-blocks' => __('Wide Blocks')));
    if (!$api || !current_user_can('install_themes')) {
        return $features;
    }
    $feature_list = get_site_transient('wporg_theme_feature_list');
    if (!$feature_list) {
        set_site_transient('wporg_theme_feature_list', array(), 3 * HOUR_IN_SECONDS);
    }
    if (!$feature_list) {
        $feature_list = themes_api('feature_list', array());
        if (is_wp_error($feature_list)) {
            return $features;
        }
    }
    if (!$feature_list) {
        return $features;
    }
    set_site_transient('wporg_theme_feature_list', $feature_list, 3 * HOUR_IN_SECONDS);
    $category_translations = array('Layout' => __('Layout'), 'Features' => __('Features'), 'Subject' => __('Subject'));
    $wporg_features = array();
    // Loop over the wp.org canonical list and apply translations.
    foreach ((array) $feature_list as $feature_category => $feature_items) {
        if (isset($category_translations[$feature_category])) {
            $feature_category = $category_translations[$feature_category];
        }
        $wporg_features[$feature_category] = array();
        foreach ($feature_items as $feature) {
            if (isset($features[$feature_category][$feature])) {
                $wporg_features[$feature_category][$feature] = $features[$feature_category][$feature];
            } else {
                $wporg_features[$feature_category][$feature] = $feature;
            }
        }
    }
    return $wporg_features;
}

WordPress Version: 5.5

/**
 * Retrieve list of WordPress theme features (aka theme tags).
 *
 * @since 3.1.0
 * @since 3.2.0 Added 'Gray' color and 'Featured Image Header', 'Featured Images',
 *              'Full Width Template', and 'Post Formats' features.
 * @since 3.5.0 Added 'Flexible Header' feature.
 * @since 3.8.0 Renamed 'Width' filter to 'Layout'.
 * @since 3.8.0 Renamed 'Fixed Width' and 'Flexible Width' options
 *              to 'Fixed Layout' and 'Fluid Layout'.
 * @since 3.8.0 Added 'Accessibility Ready' feature and 'Responsive Layout' option.
 * @since 3.9.0 Combined 'Layout' and 'Columns' filters.
 * @since 4.6.0 Removed 'Colors' filter.
 * @since 4.6.0 Added 'Grid Layout' option.
 *              Removed 'Fixed Layout', 'Fluid Layout', and 'Responsive Layout' options.
 * @since 4.6.0 Added 'Custom Logo' and 'Footer Widgets' features.
 *              Removed 'Blavatar' feature.
 * @since 4.6.0 Added 'Blog', 'E-Commerce', 'Education', 'Entertainment', 'Food & Drink',
 *              'Holiday', 'News', 'Photography', and 'Portfolio' subjects.
 *              Removed 'Photoblogging' and 'Seasonal' subjects.
 * @since 4.9.0 Reordered the filters from 'Layout', 'Features', 'Subject'
 *              to 'Subject', 'Features', 'Layout'.
 * @since 4.9.0 Removed 'BuddyPress', 'Custom Menu', 'Flexible Header',
 *              'Front Page Posting', 'Microformats', 'RTL Language Support',
 *              'Threaded Comments', and 'Translation Ready' features.
 * @since 5.5.0 Added 'Block Editor Patterns', 'Block Editor Styles',
 *              and 'Full Site Editing' features.
 * @since 5.5.0 Added 'Wide Blocks' layout option.
 *
 * @param bool $api Optional. Whether try to fetch tags from the WordPress.org API. Defaults to true.
 * @return array Array of features keyed by category with translations keyed by slug.
 */
function get_theme_feature_list($api = true)
{
    // Hard-coded list is used if API is not accessible.
    $features = array(__('Subject') => array('blog' => __('Blog'), 'e-commerce' => __('E-Commerce'), 'education' => __('Education'), 'entertainment' => __('Entertainment'), 'food-and-drink' => __('Food & Drink'), 'holiday' => __('Holiday'), 'news' => __('News'), 'photography' => __('Photography'), 'portfolio' => __('Portfolio')), __('Features') => array('accessibility-ready' => __('Accessibility Ready'), 'block-patterns' => __('Block Editor Patterns'), 'block-styles' => __('Block Editor Styles'), 'custom-background' => __('Custom Background'), 'custom-colors' => __('Custom Colors'), 'custom-header' => __('Custom Header'), 'custom-logo' => __('Custom Logo'), 'editor-style' => __('Editor Style'), 'featured-image-header' => __('Featured Image Header'), 'featured-images' => __('Featured Images'), 'footer-widgets' => __('Footer Widgets'), 'full-site-editing' => __('Full Site Editing'), 'full-width-template' => __('Full Width Template'), 'post-formats' => __('Post Formats'), 'sticky-post' => __('Sticky Post'), 'theme-options' => __('Theme Options')), __('Layout') => array('grid-layout' => __('Grid Layout'), 'one-column' => __('One Column'), 'two-columns' => __('Two Columns'), 'three-columns' => __('Three Columns'), 'four-columns' => __('Four Columns'), 'left-sidebar' => __('Left Sidebar'), 'right-sidebar' => __('Right Sidebar'), 'wide-blocks' => __('Wide Blocks')));
    if (!$api || !current_user_can('install_themes')) {
        return $features;
    }
    $feature_list = get_site_transient('wporg_theme_feature_list');
    if (!$feature_list) {
        set_site_transient('wporg_theme_feature_list', array(), 3 * HOUR_IN_SECONDS);
    }
    if (!$feature_list) {
        $feature_list = themes_api('feature_list', array());
        if (is_wp_error($feature_list)) {
            return $features;
        }
    }
    if (!$feature_list) {
        return $features;
    }
    set_site_transient('wporg_theme_feature_list', $feature_list, 3 * HOUR_IN_SECONDS);
    $category_translations = array('Layout' => __('Layout'), 'Features' => __('Features'), 'Subject' => __('Subject'));
    $wporg_features = array();
    // Loop over the wp.org canonical list and apply translations.
    foreach ((array) $feature_list as $feature_category => $feature_items) {
        if (isset($category_translations[$feature_category])) {
            $feature_category = $category_translations[$feature_category];
        }
        $wporg_features[$feature_category] = array();
        foreach ($feature_items as $feature) {
            if (isset($features[$feature_category][$feature])) {
                $wporg_features[$feature_category][$feature] = $features[$feature_category][$feature];
            } else {
                $wporg_features[$feature_category][$feature] = $feature;
            }
        }
    }
    return $wporg_features;
}

WordPress Version: .10

/**
 * Retrieve list of WordPress theme features (aka theme tags).
 *
 * @since 3.1.0
 *
 * @param bool $api Optional. Whether try to fetch tags from the WordPress.org API. Defaults to true.
 * @return array Array of features keyed by category with translations keyed by slug.
 */
function get_theme_feature_list($api = true)
{
    // Hard-coded list is used if API is not accessible.
    $features = array(__('Subject') => array('blog' => __('Blog'), 'e-commerce' => __('E-Commerce'), 'education' => __('Education'), 'entertainment' => __('Entertainment'), 'food-and-drink' => __('Food & Drink'), 'holiday' => __('Holiday'), 'news' => __('News'), 'photography' => __('Photography'), 'portfolio' => __('Portfolio')), __('Features') => array('accessibility-ready' => __('Accessibility Ready'), 'block-styles' => __('Block Editor Styles'), 'custom-background' => __('Custom Background'), 'custom-colors' => __('Custom Colors'), 'custom-header' => __('Custom Header'), 'custom-logo' => __('Custom Logo'), 'editor-style' => __('Editor Style'), 'featured-image-header' => __('Featured Image Header'), 'featured-images' => __('Featured Images'), 'footer-widgets' => __('Footer Widgets'), 'full-width-template' => __('Full Width Template'), 'post-formats' => __('Post Formats'), 'sticky-post' => __('Sticky Post'), 'theme-options' => __('Theme Options')), __('Layout') => array('grid-layout' => __('Grid Layout'), 'one-column' => __('One Column'), 'two-columns' => __('Two Columns'), 'three-columns' => __('Three Columns'), 'four-columns' => __('Four Columns'), 'left-sidebar' => __('Left Sidebar'), 'right-sidebar' => __('Right Sidebar'), 'wide-blocks' => __('Wide Blocks')));
    if (!$api || !current_user_can('install_themes')) {
        return $features;
    }
    $feature_list = get_site_transient('wporg_theme_feature_list');
    if (!$feature_list) {
        set_site_transient('wporg_theme_feature_list', array(), 3 * HOUR_IN_SECONDS);
    }
    if (!$feature_list) {
        $feature_list = themes_api('feature_list', array());
        if (is_wp_error($feature_list)) {
            return $features;
        }
    }
    if (!$feature_list) {
        return $features;
    }
    set_site_transient('wporg_theme_feature_list', $feature_list, 3 * HOUR_IN_SECONDS);
    $category_translations = array('Layout' => __('Layout'), 'Features' => __('Features'), 'Subject' => __('Subject'));
    // Loop over the wp.org canonical list and apply translations.
    $wporg_features = array();
    foreach ((array) $feature_list as $feature_category => $feature_items) {
        if (isset($category_translations[$feature_category])) {
            $feature_category = $category_translations[$feature_category];
        }
        $wporg_features[$feature_category] = array();
        foreach ($feature_items as $feature) {
            if (isset($features[$feature_category][$feature])) {
                $wporg_features[$feature_category][$feature] = $features[$feature_category][$feature];
            } else {
                $wporg_features[$feature_category][$feature] = $feature;
            }
        }
    }
    return $wporg_features;
}

WordPress Version: 5.4

/**
 * Retrieve list of WordPress theme features (aka theme tags).
 *
 * @since 3.1.0
 *
 * @param bool $api Optional. Whether try to fetch tags from the WordPress.org API. Defaults to true.
 * @return array Array of features keyed by category with translations keyed by slug.
 */
function get_theme_feature_list($api = true)
{
    // Hard-coded list is used if API is not accessible.
    $features = array(__('Subject') => array('blog' => __('Blog'), 'e-commerce' => __('E-Commerce'), 'education' => __('Education'), 'entertainment' => __('Entertainment'), 'food-and-drink' => __('Food & Drink'), 'holiday' => __('Holiday'), 'news' => __('News'), 'photography' => __('Photography'), 'portfolio' => __('Portfolio')), __('Features') => array('accessibility-ready' => __('Accessibility Ready'), 'custom-background' => __('Custom Background'), 'custom-colors' => __('Custom Colors'), 'custom-header' => __('Custom Header'), 'custom-logo' => __('Custom Logo'), 'editor-style' => __('Editor Style'), 'featured-image-header' => __('Featured Image Header'), 'featured-images' => __('Featured Images'), 'footer-widgets' => __('Footer Widgets'), 'full-width-template' => __('Full Width Template'), 'post-formats' => __('Post Formats'), 'sticky-post' => __('Sticky Post'), 'theme-options' => __('Theme Options')), __('Layout') => array('grid-layout' => __('Grid Layout'), 'one-column' => __('One Column'), 'two-columns' => __('Two Columns'), 'three-columns' => __('Three Columns'), 'four-columns' => __('Four Columns'), 'left-sidebar' => __('Left Sidebar'), 'right-sidebar' => __('Right Sidebar')));
    if (!$api || !current_user_can('install_themes')) {
        return $features;
    }
    $feature_list = get_site_transient('wporg_theme_feature_list');
    if (!$feature_list) {
        set_site_transient('wporg_theme_feature_list', array(), 3 * HOUR_IN_SECONDS);
    }
    if (!$feature_list) {
        $feature_list = themes_api('feature_list', array());
        if (is_wp_error($feature_list)) {
            return $features;
        }
    }
    if (!$feature_list) {
        return $features;
    }
    set_site_transient('wporg_theme_feature_list', $feature_list, 3 * HOUR_IN_SECONDS);
    $category_translations = array('Layout' => __('Layout'), 'Features' => __('Features'), 'Subject' => __('Subject'));
    // Loop over the wp.org canonical list and apply translations.
    $wporg_features = array();
    foreach ((array) $feature_list as $feature_category => $feature_items) {
        if (isset($category_translations[$feature_category])) {
            $feature_category = $category_translations[$feature_category];
        }
        $wporg_features[$feature_category] = array();
        foreach ($feature_items as $feature) {
            if (isset($features[$feature_category][$feature])) {
                $wporg_features[$feature_category][$feature] = $features[$feature_category][$feature];
            } else {
                $wporg_features[$feature_category][$feature] = $feature;
            }
        }
    }
    return $wporg_features;
}

WordPress Version: 3.4

/**
 * Retrieve list of WordPress theme features (aka theme tags).
 *
 * @since 3.1.0
 *
 * @param bool $api Optional. Whether try to fetch tags from the WordPress.org API. Defaults to true.
 * @return array Array of features keyed by category with translations keyed by slug.
 */
function get_theme_feature_list($api = true)
{
    // Hard-coded list is used if api not accessible.
    $features = array(__('Subject') => array('blog' => __('Blog'), 'e-commerce' => __('E-Commerce'), 'education' => __('Education'), 'entertainment' => __('Entertainment'), 'food-and-drink' => __('Food & Drink'), 'holiday' => __('Holiday'), 'news' => __('News'), 'photography' => __('Photography'), 'portfolio' => __('Portfolio')), __('Features') => array('accessibility-ready' => __('Accessibility Ready'), 'block-styles' => __('Block Editor Styles'), 'custom-background' => __('Custom Background'), 'custom-colors' => __('Custom Colors'), 'custom-header' => __('Custom Header'), 'custom-logo' => __('Custom Logo'), 'editor-style' => __('Editor Style'), 'featured-image-header' => __('Featured Image Header'), 'featured-images' => __('Featured Images'), 'footer-widgets' => __('Footer Widgets'), 'full-width-template' => __('Full Width Template'), 'post-formats' => __('Post Formats'), 'sticky-post' => __('Sticky Post'), 'theme-options' => __('Theme Options')), __('Layout') => array('grid-layout' => __('Grid Layout'), 'one-column' => __('One Column'), 'two-columns' => __('Two Columns'), 'three-columns' => __('Three Columns'), 'four-columns' => __('Four Columns'), 'left-sidebar' => __('Left Sidebar'), 'right-sidebar' => __('Right Sidebar'), 'wide-blocks' => __('Wide Blocks')));
    if (!$api || !current_user_can('install_themes')) {
        return $features;
    }
    $feature_list = get_site_transient('wporg_theme_feature_list');
    if (!$feature_list) {
        set_site_transient('wporg_theme_feature_list', array(), 3 * HOUR_IN_SECONDS);
    }
    if (!$feature_list) {
        $feature_list = themes_api('feature_list', array());
        if (is_wp_error($feature_list)) {
            return $features;
        }
    }
    if (!$feature_list) {
        return $features;
    }
    set_site_transient('wporg_theme_feature_list', $feature_list, 3 * HOUR_IN_SECONDS);
    $category_translations = array('Layout' => __('Layout'), 'Features' => __('Features'), 'Subject' => __('Subject'));
    // Loop over the wporg canonical list and apply translations
    $wporg_features = array();
    foreach ((array) $feature_list as $feature_category => $feature_items) {
        if (isset($category_translations[$feature_category])) {
            $feature_category = $category_translations[$feature_category];
        }
        $wporg_features[$feature_category] = array();
        foreach ($feature_items as $feature) {
            if (isset($features[$feature_category][$feature])) {
                $wporg_features[$feature_category][$feature] = $features[$feature_category][$feature];
            } else {
                $wporg_features[$feature_category][$feature] = $feature;
            }
        }
    }
    return $wporg_features;
}

WordPress Version: 3.2

/**
 * Retrieve list of WordPress theme features (aka theme tags).
 *
 * @since 3.1.0
 *
 * @param bool $api Optional. Whether try to fetch tags from the WordPress.org API. Defaults to true.
 * @return array Array of features keyed by category with translations keyed by slug.
 */
function get_theme_feature_list($api = true)
{
    // Hard-coded list is used if api not accessible.
    $features = array(__('Subject') => array('blog' => __('Blog'), 'e-commerce' => __('E-Commerce'), 'education' => __('Education'), 'entertainment' => __('Entertainment'), 'food-and-drink' => __('Food & Drink'), 'holiday' => __('Holiday'), 'news' => __('News'), 'photography' => __('Photography'), 'portfolio' => __('Portfolio')), __('Features') => array('accessibility-ready' => __('Accessibility Ready'), 'custom-background' => __('Custom Background'), 'custom-colors' => __('Custom Colors'), 'custom-header' => __('Custom Header'), 'custom-logo' => __('Custom Logo'), 'editor-style' => __('Editor Style'), 'featured-image-header' => __('Featured Image Header'), 'featured-images' => __('Featured Images'), 'footer-widgets' => __('Footer Widgets'), 'full-width-template' => __('Full Width Template'), 'post-formats' => __('Post Formats'), 'sticky-post' => __('Sticky Post'), 'theme-options' => __('Theme Options')), __('Layout') => array('grid-layout' => __('Grid Layout'), 'one-column' => __('One Column'), 'two-columns' => __('Two Columns'), 'three-columns' => __('Three Columns'), 'four-columns' => __('Four Columns'), 'left-sidebar' => __('Left Sidebar'), 'right-sidebar' => __('Right Sidebar')));
    if (!$api || !current_user_can('install_themes')) {
        return $features;
    }
    $feature_list = get_site_transient('wporg_theme_feature_list');
    if (!$feature_list) {
        set_site_transient('wporg_theme_feature_list', array(), 3 * HOUR_IN_SECONDS);
    }
    if (!$feature_list) {
        $feature_list = themes_api('feature_list', array());
        if (is_wp_error($feature_list)) {
            return $features;
        }
    }
    if (!$feature_list) {
        return $features;
    }
    set_site_transient('wporg_theme_feature_list', $feature_list, 3 * HOUR_IN_SECONDS);
    $category_translations = array('Layout' => __('Layout'), 'Features' => __('Features'), 'Subject' => __('Subject'));
    // Loop over the wporg canonical list and apply translations
    $wporg_features = array();
    foreach ((array) $feature_list as $feature_category => $feature_items) {
        if (isset($category_translations[$feature_category])) {
            $feature_category = $category_translations[$feature_category];
        }
        $wporg_features[$feature_category] = array();
        foreach ($feature_items as $feature) {
            if (isset($features[$feature_category][$feature])) {
                $wporg_features[$feature_category][$feature] = $features[$feature_category][$feature];
            } else {
                $wporg_features[$feature_category][$feature] = $feature;
            }
        }
    }
    return $wporg_features;
}

WordPress Version: .10

/**
 * Retrieve list of WordPress theme features (aka theme tags).
 *
 * @since 3.1.0
 *
 * @param bool $api Optional. Whether try to fetch tags from the WordPress.org API. Defaults to true.
 * @return array Array of features keyed by category with translations keyed by slug.
 */
function get_theme_feature_list($api = true)
{
    // Hard-coded list is used if api not accessible.
    $features = array(__('Subject') => array('blog' => __('Blog'), 'e-commerce' => __('E-Commerce'), 'education' => __('Education'), 'entertainment' => __('Entertainment'), 'food-and-drink' => __('Food & Drink'), 'holiday' => __('Holiday'), 'news' => __('News'), 'photography' => __('Photography'), 'portfolio' => __('Portfolio')), __('Features') => array('accessibility-ready' => __('Accessibility Ready'), 'block-styles' => __('Block Editor Styles'), 'custom-background' => __('Custom Background'), 'custom-colors' => __('Custom Colors'), 'custom-header' => __('Custom Header'), 'custom-logo' => __('Custom Logo'), 'editor-style' => __('Editor Style'), 'featured-image-header' => __('Featured Image Header'), 'featured-images' => __('Featured Images'), 'footer-widgets' => __('Footer Widgets'), 'full-width-template' => __('Full Width Template'), 'post-formats' => __('Post Formats'), 'sticky-post' => __('Sticky Post'), 'theme-options' => __('Theme Options')), __('Layout') => array('grid-layout' => __('Grid Layout'), 'one-column' => __('One Column'), 'two-columns' => __('Two Columns'), 'three-columns' => __('Three Columns'), 'four-columns' => __('Four Columns'), 'left-sidebar' => __('Left Sidebar'), 'right-sidebar' => __('Right Sidebar'), 'wide-blocks' => __('Wide Blocks')));
    if (!$api || !current_user_can('install_themes')) {
        return $features;
    }
    $feature_list = get_site_transient('wporg_theme_feature_list');
    if (!$feature_list) {
        set_site_transient('wporg_theme_feature_list', array(), 3 * HOUR_IN_SECONDS);
    }
    if (!$feature_list) {
        $feature_list = themes_api('feature_list', array());
        if (is_wp_error($feature_list)) {
            return $features;
        }
    }
    if (!$feature_list) {
        return $features;
    }
    set_site_transient('wporg_theme_feature_list', $feature_list, 3 * HOUR_IN_SECONDS);
    $category_translations = array('Layout' => __('Layout'), 'Features' => __('Features'), 'Subject' => __('Subject'));
    // Loop over the wporg canonical list and apply translations
    $wporg_features = array();
    foreach ((array) $feature_list as $feature_category => $feature_items) {
        if (isset($category_translations[$feature_category])) {
            $feature_category = $category_translations[$feature_category];
        }
        $wporg_features[$feature_category] = array();
        foreach ($feature_items as $feature) {
            if (isset($features[$feature_category][$feature])) {
                $wporg_features[$feature_category][$feature] = $features[$feature_category][$feature];
            } else {
                $wporg_features[$feature_category][$feature] = $feature;
            }
        }
    }
    return $wporg_features;
}

WordPress Version: 5.3

/**
 * Retrieve list of WordPress theme features (aka theme tags).
 *
 * @since 3.1.0
 *
 * @param bool $api Optional. Whether try to fetch tags from the WordPress.org API. Defaults to true.
 * @return array Array of features keyed by category with translations keyed by slug.
 */
function get_theme_feature_list($api = true)
{
    // Hard-coded list is used if api not accessible.
    $features = array(__('Subject') => array('blog' => __('Blog'), 'e-commerce' => __('E-Commerce'), 'education' => __('Education'), 'entertainment' => __('Entertainment'), 'food-and-drink' => __('Food & Drink'), 'holiday' => __('Holiday'), 'news' => __('News'), 'photography' => __('Photography'), 'portfolio' => __('Portfolio')), __('Features') => array('accessibility-ready' => __('Accessibility Ready'), 'custom-background' => __('Custom Background'), 'custom-colors' => __('Custom Colors'), 'custom-header' => __('Custom Header'), 'custom-logo' => __('Custom Logo'), 'editor-style' => __('Editor Style'), 'featured-image-header' => __('Featured Image Header'), 'featured-images' => __('Featured Images'), 'footer-widgets' => __('Footer Widgets'), 'full-width-template' => __('Full Width Template'), 'post-formats' => __('Post Formats'), 'sticky-post' => __('Sticky Post'), 'theme-options' => __('Theme Options')), __('Layout') => array('grid-layout' => __('Grid Layout'), 'one-column' => __('One Column'), 'two-columns' => __('Two Columns'), 'three-columns' => __('Three Columns'), 'four-columns' => __('Four Columns'), 'left-sidebar' => __('Left Sidebar'), 'right-sidebar' => __('Right Sidebar')));
    if (!$api || !current_user_can('install_themes')) {
        return $features;
    }
    $feature_list = get_site_transient('wporg_theme_feature_list');
    if (!$feature_list) {
        set_site_transient('wporg_theme_feature_list', array(), 3 * HOUR_IN_SECONDS);
    }
    if (!$feature_list) {
        $feature_list = themes_api('feature_list', array());
        if (is_wp_error($feature_list)) {
            return $features;
        }
    }
    if (!$feature_list) {
        return $features;
    }
    set_site_transient('wporg_theme_feature_list', $feature_list, 3 * HOUR_IN_SECONDS);
    $category_translations = array('Layout' => __('Layout'), 'Features' => __('Features'), 'Subject' => __('Subject'));
    // Loop over the wporg canonical list and apply translations
    $wporg_features = array();
    foreach ((array) $feature_list as $feature_category => $feature_items) {
        if (isset($category_translations[$feature_category])) {
            $feature_category = $category_translations[$feature_category];
        }
        $wporg_features[$feature_category] = array();
        foreach ($feature_items as $feature) {
            if (isset($features[$feature_category][$feature])) {
                $wporg_features[$feature_category][$feature] = $features[$feature_category][$feature];
            } else {
                $wporg_features[$feature_category][$feature] = $feature;
            }
        }
    }
    return $wporg_features;
}

WordPress Version: 2.7

/**
 * Retrieve list of WordPress theme features (aka theme tags).
 *
 * @since 3.1.0
 *
 * @param bool $api Optional. Whether try to fetch tags from the WordPress.org API. Defaults to true.
 * @return array Array of features keyed by category with translations keyed by slug.
 */
function get_theme_feature_list($api = true)
{
    // Hard-coded list is used if api not accessible.
    $features = array(__('Subject') => array('blog' => __('Blog'), 'e-commerce' => __('E-Commerce'), 'education' => __('Education'), 'entertainment' => __('Entertainment'), 'food-and-drink' => __('Food & Drink'), 'holiday' => __('Holiday'), 'news' => __('News'), 'photography' => __('Photography'), 'portfolio' => __('Portfolio')), __('Features') => array('accessibility-ready' => __('Accessibility Ready'), 'block-styles' => __('Block Editor Styles'), 'custom-background' => __('Custom Background'), 'custom-colors' => __('Custom Colors'), 'custom-header' => __('Custom Header'), 'custom-logo' => __('Custom Logo'), 'editor-style' => __('Editor Style'), 'featured-image-header' => __('Featured Image Header'), 'featured-images' => __('Featured Images'), 'footer-widgets' => __('Footer Widgets'), 'full-width-template' => __('Full Width Template'), 'post-formats' => __('Post Formats'), 'sticky-post' => __('Sticky Post'), 'theme-options' => __('Theme Options')), __('Layout') => array('grid-layout' => __('Grid Layout'), 'one-column' => __('One Column'), 'two-columns' => __('Two Columns'), 'three-columns' => __('Three Columns'), 'four-columns' => __('Four Columns'), 'left-sidebar' => __('Left Sidebar'), 'right-sidebar' => __('Right Sidebar'), 'wide-blocks' => __('Wide Blocks')));
    if (!$api || !current_user_can('install_themes')) {
        return $features;
    }
    if (!$feature_list = get_site_transient('wporg_theme_feature_list')) {
        set_site_transient('wporg_theme_feature_list', array(), 3 * HOUR_IN_SECONDS);
    }
    if (!$feature_list) {
        $feature_list = themes_api('feature_list', array());
        if (is_wp_error($feature_list)) {
            return $features;
        }
    }
    if (!$feature_list) {
        return $features;
    }
    set_site_transient('wporg_theme_feature_list', $feature_list, 3 * HOUR_IN_SECONDS);
    $category_translations = array('Layout' => __('Layout'), 'Features' => __('Features'), 'Subject' => __('Subject'));
    // Loop over the wporg canonical list and apply translations
    $wporg_features = array();
    foreach ((array) $feature_list as $feature_category => $feature_items) {
        if (isset($category_translations[$feature_category])) {
            $feature_category = $category_translations[$feature_category];
        }
        $wporg_features[$feature_category] = array();
        foreach ($feature_items as $feature) {
            if (isset($features[$feature_category][$feature])) {
                $wporg_features[$feature_category][$feature] = $features[$feature_category][$feature];
            } else {
                $wporg_features[$feature_category][$feature] = $feature;
            }
        }
    }
    return $wporg_features;
}

WordPress Version: 2.3

/**
 * Retrieve list of WordPress theme features (aka theme tags).
 *
 * @since 3.1.0
 *
 * @param bool $api Optional. Whether try to fetch tags from the WordPress.org API. Defaults to true.
 * @return array Array of features keyed by category with translations keyed by slug.
 */
function get_theme_feature_list($api = true)
{
    // Hard-coded list is used if api not accessible.
    $features = array(__('Subject') => array('blog' => __('Blog'), 'e-commerce' => __('E-Commerce'), 'education' => __('Education'), 'entertainment' => __('Entertainment'), 'food-and-drink' => __('Food & Drink'), 'holiday' => __('Holiday'), 'news' => __('News'), 'photography' => __('Photography'), 'portfolio' => __('Portfolio')), __('Features') => array('accessibility-ready' => __('Accessibility Ready'), 'custom-background' => __('Custom Background'), 'custom-colors' => __('Custom Colors'), 'custom-header' => __('Custom Header'), 'custom-logo' => __('Custom Logo'), 'editor-style' => __('Editor Style'), 'featured-image-header' => __('Featured Image Header'), 'featured-images' => __('Featured Images'), 'footer-widgets' => __('Footer Widgets'), 'full-width-template' => __('Full Width Template'), 'post-formats' => __('Post Formats'), 'sticky-post' => __('Sticky Post'), 'theme-options' => __('Theme Options')), __('Layout') => array('grid-layout' => __('Grid Layout'), 'one-column' => __('One Column'), 'two-columns' => __('Two Columns'), 'three-columns' => __('Three Columns'), 'four-columns' => __('Four Columns'), 'left-sidebar' => __('Left Sidebar'), 'right-sidebar' => __('Right Sidebar')));
    if (!$api || !current_user_can('install_themes')) {
        return $features;
    }
    if (!$feature_list = get_site_transient('wporg_theme_feature_list')) {
        set_site_transient('wporg_theme_feature_list', array(), 3 * HOUR_IN_SECONDS);
    }
    if (!$feature_list) {
        $feature_list = themes_api('feature_list', array());
        if (is_wp_error($feature_list)) {
            return $features;
        }
    }
    if (!$feature_list) {
        return $features;
    }
    set_site_transient('wporg_theme_feature_list', $feature_list, 3 * HOUR_IN_SECONDS);
    $category_translations = array('Layout' => __('Layout'), 'Features' => __('Features'), 'Subject' => __('Subject'));
    // Loop over the wporg canonical list and apply translations
    $wporg_features = array();
    foreach ((array) $feature_list as $feature_category => $feature_items) {
        if (isset($category_translations[$feature_category])) {
            $feature_category = $category_translations[$feature_category];
        }
        $wporg_features[$feature_category] = array();
        foreach ($feature_items as $feature) {
            if (isset($features[$feature_category][$feature])) {
                $wporg_features[$feature_category][$feature] = $features[$feature_category][$feature];
            } else {
                $wporg_features[$feature_category][$feature] = $feature;
            }
        }
    }
    return $wporg_features;
}

WordPress Version: .20

/**
 * Retrieve list of WordPress theme features (aka theme tags).
 *
 * @since 3.1.0
 *
 * @param bool $api Optional. Whether try to fetch tags from the WordPress.org API. Defaults to true.
 * @return array Array of features keyed by category with translations keyed by slug.
 */
function get_theme_feature_list($api = true)
{
    // Hard-coded list is used if api not accessible.
    $features = array(__('Subject') => array('blog' => __('Blog'), 'e-commerce' => __('E-Commerce'), 'education' => __('Education'), 'entertainment' => __('Entertainment'), 'food-and-drink' => __('Food & Drink'), 'holiday' => __('Holiday'), 'news' => __('News'), 'photography' => __('Photography'), 'portfolio' => __('Portfolio')), __('Features') => array('accessibility-ready' => __('Accessibility Ready'), 'block-styles' => __('Block Editor Styles'), 'custom-background' => __('Custom Background'), 'custom-colors' => __('Custom Colors'), 'custom-header' => __('Custom Header'), 'custom-logo' => __('Custom Logo'), 'editor-style' => __('Editor Style'), 'featured-image-header' => __('Featured Image Header'), 'featured-images' => __('Featured Images'), 'footer-widgets' => __('Footer Widgets'), 'full-width-template' => __('Full Width Template'), 'post-formats' => __('Post Formats'), 'sticky-post' => __('Sticky Post'), 'theme-options' => __('Theme Options')), __('Layout') => array('grid-layout' => __('Grid Layout'), 'one-column' => __('One Column'), 'two-columns' => __('Two Columns'), 'three-columns' => __('Three Columns'), 'four-columns' => __('Four Columns'), 'left-sidebar' => __('Left Sidebar'), 'right-sidebar' => __('Right Sidebar'), 'wide-blocks' => __('Wide Blocks')));
    if (!$api || !current_user_can('install_themes')) {
        return $features;
    }
    if (!$feature_list = get_site_transient('wporg_theme_feature_list')) {
        set_site_transient('wporg_theme_feature_list', array(), 3 * HOUR_IN_SECONDS);
    }
    if (!$feature_list) {
        $feature_list = themes_api('feature_list', array());
        if (is_wp_error($feature_list)) {
            return $features;
        }
    }
    if (!$feature_list) {
        return $features;
    }
    set_site_transient('wporg_theme_feature_list', $feature_list, 3 * HOUR_IN_SECONDS);
    $category_translations = array('Layout' => __('Layout'), 'Features' => __('Features'), 'Subject' => __('Subject'));
    // Loop over the wporg canonical list and apply translations
    $wporg_features = array();
    foreach ((array) $feature_list as $feature_category => $feature_items) {
        if (isset($category_translations[$feature_category])) {
            $feature_category = $category_translations[$feature_category];
        }
        $wporg_features[$feature_category] = array();
        foreach ($feature_items as $feature) {
            if (isset($features[$feature_category][$feature])) {
                $wporg_features[$feature_category][$feature] = $features[$feature_category][$feature];
            } else {
                $wporg_features[$feature_category][$feature] = $feature;
            }
        }
    }
    return $wporg_features;
}

WordPress Version: 2.2

/**
 * Retrieve list of WordPress theme features (aka theme tags).
 *
 * @since 3.1.0
 *
 * @param bool $api Optional. Whether try to fetch tags from the WordPress.org API. Defaults to true.
 * @return array Array of features keyed by category with translations keyed by slug.
 */
function get_theme_feature_list($api = true)
{
    // Hard-coded list is used if api not accessible.
    $features = array(__('Subject') => array('blog' => __('Blog'), 'e-commerce' => __('E-Commerce'), 'education' => __('Education'), 'entertainment' => __('Entertainment'), 'food-and-drink' => __('Food & Drink'), 'holiday' => __('Holiday'), 'news' => __('News'), 'photography' => __('Photography'), 'portfolio' => __('Portfolio')), __('Features') => array('accessibility-ready' => __('Accessibility Ready'), 'custom-background' => __('Custom Background'), 'custom-colors' => __('Custom Colors'), 'custom-header' => __('Custom Header'), 'custom-logo' => __('Custom Logo'), 'editor-style' => __('Editor Style'), 'featured-image-header' => __('Featured Image Header'), 'featured-images' => __('Featured Images'), 'footer-widgets' => __('Footer Widgets'), 'full-width-template' => __('Full Width Template'), 'post-formats' => __('Post Formats'), 'sticky-post' => __('Sticky Post'), 'theme-options' => __('Theme Options')), __('Layout') => array('grid-layout' => __('Grid Layout'), 'one-column' => __('One Column'), 'two-columns' => __('Two Columns'), 'three-columns' => __('Three Columns'), 'four-columns' => __('Four Columns'), 'left-sidebar' => __('Left Sidebar'), 'right-sidebar' => __('Right Sidebar')));
    if (!$api || !current_user_can('install_themes')) {
        return $features;
    }
    if (!$feature_list = get_site_transient('wporg_theme_feature_list')) {
        set_site_transient('wporg_theme_feature_list', array(), 3 * HOUR_IN_SECONDS);
    }
    if (!$feature_list) {
        $feature_list = themes_api('feature_list', array());
        if (is_wp_error($feature_list)) {
            return $features;
        }
    }
    if (!$feature_list) {
        return $features;
    }
    set_site_transient('wporg_theme_feature_list', $feature_list, 3 * HOUR_IN_SECONDS);
    $category_translations = array('Layout' => __('Layout'), 'Features' => __('Features'), 'Subject' => __('Subject'));
    // Loop over the wporg canonical list and apply translations
    $wporg_features = array();
    foreach ((array) $feature_list as $feature_category => $feature_items) {
        if (isset($category_translations[$feature_category])) {
            $feature_category = $category_translations[$feature_category];
        }
        $wporg_features[$feature_category] = array();
        foreach ($feature_items as $feature) {
            if (isset($features[$feature_category][$feature])) {
                $wporg_features[$feature_category][$feature] = $features[$feature_category][$feature];
            } else {
                $wporg_features[$feature_category][$feature] = $feature;
            }
        }
    }
    return $wporg_features;
}

WordPress Version: .10

/**
 * Retrieve list of WordPress theme features (aka theme tags).
 *
 * @since 3.1.0
 *
 * @param bool $api Optional. Whether try to fetch tags from the WordPress.org API. Defaults to true.
 * @return array Array of features keyed by category with translations keyed by slug.
 */
function get_theme_feature_list($api = true)
{
    // Hard-coded list is used if api not accessible.
    $features = array(__('Subject') => array('blog' => __('Blog'), 'e-commerce' => __('E-Commerce'), 'education' => __('Education'), 'entertainment' => __('Entertainment'), 'food-and-drink' => __('Food & Drink'), 'holiday' => __('Holiday'), 'news' => __('News'), 'photography' => __('Photography'), 'portfolio' => __('Portfolio')), __('Features') => array('accessibility-ready' => __('Accessibility Ready'), 'block-styles' => __('Block Editor Styles'), 'custom-background' => __('Custom Background'), 'custom-colors' => __('Custom Colors'), 'custom-header' => __('Custom Header'), 'custom-logo' => __('Custom Logo'), 'editor-style' => __('Editor Style'), 'featured-image-header' => __('Featured Image Header'), 'featured-images' => __('Featured Images'), 'footer-widgets' => __('Footer Widgets'), 'full-width-template' => __('Full Width Template'), 'post-formats' => __('Post Formats'), 'sticky-post' => __('Sticky Post'), 'theme-options' => __('Theme Options')), __('Layout') => array('grid-layout' => __('Grid Layout'), 'one-column' => __('One Column'), 'two-columns' => __('Two Columns'), 'three-columns' => __('Three Columns'), 'four-columns' => __('Four Columns'), 'left-sidebar' => __('Left Sidebar'), 'right-sidebar' => __('Right Sidebar'), 'wide-blocks' => __('Wide Blocks')));
    if (!$api || !current_user_can('install_themes')) {
        return $features;
    }
    if (!$feature_list = get_site_transient('wporg_theme_feature_list')) {
        set_site_transient('wporg_theme_feature_list', array(), 3 * HOUR_IN_SECONDS);
    }
    if (!$feature_list) {
        $feature_list = themes_api('feature_list', array());
        if (is_wp_error($feature_list)) {
            return $features;
        }
    }
    if (!$feature_list) {
        return $features;
    }
    set_site_transient('wporg_theme_feature_list', $feature_list, 3 * HOUR_IN_SECONDS);
    $category_translations = array('Layout' => __('Layout'), 'Features' => __('Features'), 'Subject' => __('Subject'));
    // Loop over the wporg canonical list and apply translations
    $wporg_features = array();
    foreach ((array) $feature_list as $feature_category => $feature_items) {
        if (isset($category_translations[$feature_category])) {
            $feature_category = $category_translations[$feature_category];
        }
        $wporg_features[$feature_category] = array();
        foreach ($feature_items as $feature) {
            if (isset($features[$feature_category][$feature])) {
                $wporg_features[$feature_category][$feature] = $features[$feature_category][$feature];
            } else {
                $wporg_features[$feature_category][$feature] = $feature;
            }
        }
    }
    return $wporg_features;
}

WordPress Version: 5.1

/**
 * Retrieve list of WordPress theme features (aka theme tags).
 *
 * @since 3.1.0
 *
 * @param bool $api Optional. Whether try to fetch tags from the WordPress.org API. Defaults to true.
 * @return array Array of features keyed by category with translations keyed by slug.
 */
function get_theme_feature_list($api = true)
{
    // Hard-coded list is used if api not accessible.
    $features = array(__('Subject') => array('blog' => __('Blog'), 'e-commerce' => __('E-Commerce'), 'education' => __('Education'), 'entertainment' => __('Entertainment'), 'food-and-drink' => __('Food & Drink'), 'holiday' => __('Holiday'), 'news' => __('News'), 'photography' => __('Photography'), 'portfolio' => __('Portfolio')), __('Features') => array('accessibility-ready' => __('Accessibility Ready'), 'custom-background' => __('Custom Background'), 'custom-colors' => __('Custom Colors'), 'custom-header' => __('Custom Header'), 'custom-logo' => __('Custom Logo'), 'editor-style' => __('Editor Style'), 'featured-image-header' => __('Featured Image Header'), 'featured-images' => __('Featured Images'), 'footer-widgets' => __('Footer Widgets'), 'full-width-template' => __('Full Width Template'), 'post-formats' => __('Post Formats'), 'sticky-post' => __('Sticky Post'), 'theme-options' => __('Theme Options')), __('Layout') => array('grid-layout' => __('Grid Layout'), 'one-column' => __('One Column'), 'two-columns' => __('Two Columns'), 'three-columns' => __('Three Columns'), 'four-columns' => __('Four Columns'), 'left-sidebar' => __('Left Sidebar'), 'right-sidebar' => __('Right Sidebar')));
    if (!$api || !current_user_can('install_themes')) {
        return $features;
    }
    if (!$feature_list = get_site_transient('wporg_theme_feature_list')) {
        set_site_transient('wporg_theme_feature_list', array(), 3 * HOUR_IN_SECONDS);
    }
    if (!$feature_list) {
        $feature_list = themes_api('feature_list', array());
        if (is_wp_error($feature_list)) {
            return $features;
        }
    }
    if (!$feature_list) {
        return $features;
    }
    set_site_transient('wporg_theme_feature_list', $feature_list, 3 * HOUR_IN_SECONDS);
    $category_translations = array('Layout' => __('Layout'), 'Features' => __('Features'), 'Subject' => __('Subject'));
    // Loop over the wporg canonical list and apply translations
    $wporg_features = array();
    foreach ((array) $feature_list as $feature_category => $feature_items) {
        if (isset($category_translations[$feature_category])) {
            $feature_category = $category_translations[$feature_category];
        }
        $wporg_features[$feature_category] = array();
        foreach ($feature_items as $feature) {
            if (isset($features[$feature_category][$feature])) {
                $wporg_features[$feature_category][$feature] = $features[$feature_category][$feature];
            } else {
                $wporg_features[$feature_category][$feature] = $feature;
            }
        }
    }
    return $wporg_features;
}

WordPress Version: 4.9

/**
 * Retrieve list of WordPress theme features (aka theme tags)
 *
 * @since 3.1.0
 *
 * @param bool $api Optional. Whether try to fetch tags from the WordPress.org API. Defaults to true.
 * @return array Array of features keyed by category with translations keyed by slug.
 */
function get_theme_feature_list($api = true)
{
    // Hard-coded list is used if api not accessible.
    $features = array(__('Subject') => array('blog' => __('Blog'), 'e-commerce' => __('E-Commerce'), 'education' => __('Education'), 'entertainment' => __('Entertainment'), 'food-and-drink' => __('Food & Drink'), 'holiday' => __('Holiday'), 'news' => __('News'), 'photography' => __('Photography'), 'portfolio' => __('Portfolio')), __('Features') => array('accessibility-ready' => __('Accessibility Ready'), 'custom-background' => __('Custom Background'), 'custom-colors' => __('Custom Colors'), 'custom-header' => __('Custom Header'), 'custom-logo' => __('Custom Logo'), 'editor-style' => __('Editor Style'), 'featured-image-header' => __('Featured Image Header'), 'featured-images' => __('Featured Images'), 'footer-widgets' => __('Footer Widgets'), 'full-width-template' => __('Full Width Template'), 'post-formats' => __('Post Formats'), 'sticky-post' => __('Sticky Post'), 'theme-options' => __('Theme Options')), __('Layout') => array('grid-layout' => __('Grid Layout'), 'one-column' => __('One Column'), 'two-columns' => __('Two Columns'), 'three-columns' => __('Three Columns'), 'four-columns' => __('Four Columns'), 'left-sidebar' => __('Left Sidebar'), 'right-sidebar' => __('Right Sidebar')));
    if (!$api || !current_user_can('install_themes')) {
        return $features;
    }
    if (!$feature_list = get_site_transient('wporg_theme_feature_list')) {
        set_site_transient('wporg_theme_feature_list', array(), 3 * HOUR_IN_SECONDS);
    }
    if (!$feature_list) {
        $feature_list = themes_api('feature_list', array());
        if (is_wp_error($feature_list)) {
            return $features;
        }
    }
    if (!$feature_list) {
        return $features;
    }
    set_site_transient('wporg_theme_feature_list', $feature_list, 3 * HOUR_IN_SECONDS);
    $category_translations = array('Layout' => __('Layout'), 'Features' => __('Features'), 'Subject' => __('Subject'));
    // Loop over the wporg canonical list and apply translations
    $wporg_features = array();
    foreach ((array) $feature_list as $feature_category => $feature_items) {
        if (isset($category_translations[$feature_category])) {
            $feature_category = $category_translations[$feature_category];
        }
        $wporg_features[$feature_category] = array();
        foreach ($feature_items as $feature) {
            if (isset($features[$feature_category][$feature])) {
                $wporg_features[$feature_category][$feature] = $features[$feature_category][$feature];
            } else {
                $wporg_features[$feature_category][$feature] = $feature;
            }
        }
    }
    return $wporg_features;
}

WordPress Version: 4.6

/**
 * Retrieve list of WordPress theme features (aka theme tags)
 *
 * @since 3.1.0
 *
 * @param bool $api Optional. Whether try to fetch tags from the WordPress.org API. Defaults to true.
 * @return array Array of features keyed by category with translations keyed by slug.
 */
function get_theme_feature_list($api = true)
{
    // Hard-coded list is used if api not accessible.
    $features = array(__('Layout') => array('grid-layout' => __('Grid Layout'), 'one-column' => __('One Column'), 'two-columns' => __('Two Columns'), 'three-columns' => __('Three Columns'), 'four-columns' => __('Four Columns'), 'left-sidebar' => __('Left Sidebar'), 'right-sidebar' => __('Right Sidebar')), __('Features') => array('accessibility-ready' => __('Accessibility Ready'), 'buddypress' => __('BuddyPress'), 'custom-background' => __('Custom Background'), 'custom-colors' => __('Custom Colors'), 'custom-header' => __('Custom Header'), 'custom-logo' => __('Custom Logo'), 'custom-menu' => __('Custom Menu'), 'editor-style' => __('Editor Style'), 'featured-image-header' => __('Featured Image Header'), 'featured-images' => __('Featured Images'), 'flexible-header' => __('Flexible Header'), 'footer-widgets' => __('Footer Widgets'), 'front-page-post-form' => __('Front Page Posting'), 'full-width-template' => __('Full Width Template'), 'microformats' => __('Microformats'), 'post-formats' => __('Post Formats'), 'rtl-language-support' => __('RTL Language Support'), 'sticky-post' => __('Sticky Post'), 'theme-options' => __('Theme Options'), 'threaded-comments' => __('Threaded Comments'), 'translation-ready' => __('Translation Ready')), __('Subject') => array('blog' => __('Blog'), 'e-commerce' => __('E-Commerce'), 'education' => __('Education'), 'entertainment' => __('Entertainment'), 'food-and-drink' => __('Food & Drink'), 'holiday' => __('Holiday'), 'news' => __('News'), 'photography' => __('Photography'), 'portfolio' => __('Portfolio')));
    if (!$api || !current_user_can('install_themes')) {
        return $features;
    }
    if (!$feature_list = get_site_transient('wporg_theme_feature_list')) {
        set_site_transient('wporg_theme_feature_list', array(), 3 * HOUR_IN_SECONDS);
    }
    if (!$feature_list) {
        $feature_list = themes_api('feature_list', array());
        if (is_wp_error($feature_list)) {
            return $features;
        }
    }
    if (!$feature_list) {
        return $features;
    }
    set_site_transient('wporg_theme_feature_list', $feature_list, 3 * HOUR_IN_SECONDS);
    $category_translations = array('Layout' => __('Layout'), 'Features' => __('Features'), 'Subject' => __('Subject'));
    // Loop over the wporg canonical list and apply translations
    $wporg_features = array();
    foreach ((array) $feature_list as $feature_category => $feature_items) {
        if (isset($category_translations[$feature_category])) {
            $feature_category = $category_translations[$feature_category];
        }
        $wporg_features[$feature_category] = array();
        foreach ($feature_items as $feature) {
            if (isset($features[$feature_category][$feature])) {
                $wporg_features[$feature_category][$feature] = $features[$feature_category][$feature];
            } else {
                $wporg_features[$feature_category][$feature] = $feature;
            }
        }
    }
    return $wporg_features;
}

WordPress Version: 4.4

/**
 * Retrieve list of WordPress theme features (aka theme tags)
 *
 * @since 3.1.0
 *
 * @param bool $api Optional. Whether try to fetch tags from the WordPress.org API. Defaults to true.
 * @return array Array of features keyed by category with translations keyed by slug.
 */
function get_theme_feature_list($api = true)
{
    // Hard-coded list is used if api not accessible.
    $features = array(__('Colors') => array('black' => __('Black'), 'blue' => __('Blue'), 'brown' => __('Brown'), 'gray' => __('Gray'), 'green' => __('Green'), 'orange' => __('Orange'), 'pink' => __('Pink'), 'purple' => __('Purple'), 'red' => __('Red'), 'silver' => __('Silver'), 'tan' => __('Tan'), 'white' => __('White'), 'yellow' => __('Yellow'), 'dark' => __('Dark'), 'light' => __('Light')), __('Layout') => array('fixed-layout' => __('Fixed Layout'), 'fluid-layout' => __('Fluid Layout'), 'responsive-layout' => __('Responsive Layout'), 'one-column' => __('One Column'), 'two-columns' => __('Two Columns'), 'three-columns' => __('Three Columns'), 'four-columns' => __('Four Columns'), 'left-sidebar' => __('Left Sidebar'), 'right-sidebar' => __('Right Sidebar')), __('Features') => array('accessibility-ready' => __('Accessibility Ready'), 'blavatar' => __('Blavatar'), 'buddypress' => __('BuddyPress'), 'custom-background' => __('Custom Background'), 'custom-colors' => __('Custom Colors'), 'custom-header' => __('Custom Header'), 'custom-menu' => __('Custom Menu'), 'editor-style' => __('Editor Style'), 'featured-image-header' => __('Featured Image Header'), 'featured-images' => __('Featured Images'), 'flexible-header' => __('Flexible Header'), 'front-page-post-form' => __('Front Page Posting'), 'full-width-template' => __('Full Width Template'), 'microformats' => __('Microformats'), 'post-formats' => __('Post Formats'), 'rtl-language-support' => __('RTL Language Support'), 'sticky-post' => __('Sticky Post'), 'theme-options' => __('Theme Options'), 'threaded-comments' => __('Threaded Comments'), 'translation-ready' => __('Translation Ready')), __('Subject') => array('holiday' => __('Holiday'), 'photoblogging' => __('Photoblogging'), 'seasonal' => __('Seasonal')));
    if (!$api || !current_user_can('install_themes')) {
        return $features;
    }
    if (!$feature_list = get_site_transient('wporg_theme_feature_list')) {
        set_site_transient('wporg_theme_feature_list', array(), 3 * HOUR_IN_SECONDS);
    }
    if (!$feature_list) {
        $feature_list = themes_api('feature_list', array());
        if (is_wp_error($feature_list)) {
            return $features;
        }
    }
    if (!$feature_list) {
        return $features;
    }
    set_site_transient('wporg_theme_feature_list', $feature_list, 3 * HOUR_IN_SECONDS);
    $category_translations = array('Colors' => __('Colors'), 'Layout' => __('Layout'), 'Features' => __('Features'), 'Subject' => __('Subject'));
    // Loop over the wporg canonical list and apply translations
    $wporg_features = array();
    foreach ((array) $feature_list as $feature_category => $feature_items) {
        if (isset($category_translations[$feature_category])) {
            $feature_category = $category_translations[$feature_category];
        }
        $wporg_features[$feature_category] = array();
        foreach ($feature_items as $feature) {
            if (isset($features[$feature_category][$feature])) {
                $wporg_features[$feature_category][$feature] = $features[$feature_category][$feature];
            } else {
                $wporg_features[$feature_category][$feature] = $feature;
            }
        }
    }
    return $wporg_features;
}

WordPress Version: 4.0

/**
 * Retrieve list of WordPress theme features (aka theme tags)
 *
 * @since 3.1.0
 *
 * @param bool $api Optional. Whether try to fetch tags from the WP.org API. Defaults to true.
 * @return array Array of features keyed by category with translations keyed by slug.
 */
function get_theme_feature_list($api = true)
{
    // Hard-coded list is used if api not accessible.
    $features = array(__('Colors') => array('black' => __('Black'), 'blue' => __('Blue'), 'brown' => __('Brown'), 'gray' => __('Gray'), 'green' => __('Green'), 'orange' => __('Orange'), 'pink' => __('Pink'), 'purple' => __('Purple'), 'red' => __('Red'), 'silver' => __('Silver'), 'tan' => __('Tan'), 'white' => __('White'), 'yellow' => __('Yellow'), 'dark' => __('Dark'), 'light' => __('Light')), __('Layout') => array('fixed-layout' => __('Fixed Layout'), 'fluid-layout' => __('Fluid Layout'), 'responsive-layout' => __('Responsive Layout'), 'one-column' => __('One Column'), 'two-columns' => __('Two Columns'), 'three-columns' => __('Three Columns'), 'four-columns' => __('Four Columns'), 'left-sidebar' => __('Left Sidebar'), 'right-sidebar' => __('Right Sidebar')), __('Features') => array('accessibility-ready' => __('Accessibility Ready'), 'blavatar' => __('Blavatar'), 'buddypress' => __('BuddyPress'), 'custom-background' => __('Custom Background'), 'custom-colors' => __('Custom Colors'), 'custom-header' => __('Custom Header'), 'custom-menu' => __('Custom Menu'), 'editor-style' => __('Editor Style'), 'featured-image-header' => __('Featured Image Header'), 'featured-images' => __('Featured Images'), 'flexible-header' => __('Flexible Header'), 'front-page-post-form' => __('Front Page Posting'), 'full-width-template' => __('Full Width Template'), 'microformats' => __('Microformats'), 'post-formats' => __('Post Formats'), 'rtl-language-support' => __('RTL Language Support'), 'sticky-post' => __('Sticky Post'), 'theme-options' => __('Theme Options'), 'threaded-comments' => __('Threaded Comments'), 'translation-ready' => __('Translation Ready')), __('Subject') => array('holiday' => __('Holiday'), 'photoblogging' => __('Photoblogging'), 'seasonal' => __('Seasonal')));
    if (!$api || !current_user_can('install_themes')) {
        return $features;
    }
    if (!$feature_list = get_site_transient('wporg_theme_feature_list')) {
        set_site_transient('wporg_theme_feature_list', array(), 3 * HOUR_IN_SECONDS);
    }
    if (!$feature_list) {
        $feature_list = themes_api('feature_list', array());
        if (is_wp_error($feature_list)) {
            return $features;
        }
    }
    if (!$feature_list) {
        return $features;
    }
    set_site_transient('wporg_theme_feature_list', $feature_list, 3 * HOUR_IN_SECONDS);
    $category_translations = array('Colors' => __('Colors'), 'Layout' => __('Layout'), 'Features' => __('Features'), 'Subject' => __('Subject'));
    // Loop over the wporg canonical list and apply translations
    $wporg_features = array();
    foreach ((array) $feature_list as $feature_category => $feature_items) {
        if (isset($category_translations[$feature_category])) {
            $feature_category = $category_translations[$feature_category];
        }
        $wporg_features[$feature_category] = array();
        foreach ($feature_items as $feature) {
            if (isset($features[$feature_category][$feature])) {
                $wporg_features[$feature_category][$feature] = $features[$feature_category][$feature];
            } else {
                $wporg_features[$feature_category][$feature] = $feature;
            }
        }
    }
    return $wporg_features;
}

WordPress Version: 3.9

/**
 * Retrieve list of WordPress theme features (aka theme tags)
 *
 * @since 3.1.0
 *
 * @param bool $api Optional. Whether try to fetch tags from the WP.org API. Defaults to true.
 * @return array Array of features keyed by category with translations keyed by slug.
 */
function get_theme_feature_list($api = true)
{
    // Hard-coded list is used if api not accessible.
    $features = array(__('Colors') => array('black' => __('Black'), 'blue' => __('Blue'), 'brown' => __('Brown'), 'gray' => __('Gray'), 'green' => __('Green'), 'orange' => __('Orange'), 'pink' => __('Pink'), 'purple' => __('Purple'), 'red' => __('Red'), 'silver' => __('Silver'), 'tan' => __('Tan'), 'white' => __('White'), 'yellow' => __('Yellow'), 'dark' => __('Dark'), 'light' => __('Light')), __('Layout') => array('fixed-layout' => __('Fixed Layout'), 'fluid-layout' => __('Fluid Layout'), 'responsive-layout' => __('Responsive Layout'), 'one-column' => __('One Column'), 'two-columns' => __('Two Columns'), 'three-columns' => __('Three Columns'), 'four-columns' => __('Four Columns'), 'left-sidebar' => __('Left Sidebar'), 'right-sidebar' => __('Right Sidebar')), __('Features') => array('accessibility-ready' => __('Accessibility Ready'), 'blavatar' => __('Blavatar'), 'buddypress' => __('BuddyPress'), 'custom-background' => __('Custom Background'), 'custom-colors' => __('Custom Colors'), 'custom-header' => __('Custom Header'), 'custom-menu' => __('Custom Menu'), 'editor-style' => __('Editor Style'), 'featured-image-header' => __('Featured Image Header'), 'featured-images' => __('Featured Images'), 'flexible-header' => __('Flexible Header'), 'front-page-post-form' => __('Front Page Posting'), 'full-width-template' => __('Full Width Template'), 'microformats' => __('Microformats'), 'post-formats' => __('Post Formats'), 'rtl-language-support' => __('RTL Language Support'), 'sticky-post' => __('Sticky Post'), 'theme-options' => __('Theme Options'), 'threaded-comments' => __('Threaded Comments'), 'translation-ready' => __('Translation Ready')), __('Subject') => array('holiday' => __('Holiday'), 'photoblogging' => __('Photoblogging'), 'seasonal' => __('Seasonal')));
    if (!$api || !current_user_can('install_themes')) {
        return $features;
    }
    if (!$feature_list = get_site_transient('wporg_theme_feature_list')) {
        set_site_transient('wporg_theme_feature_list', array(), 10800);
    }
    if (!$feature_list) {
        $feature_list = themes_api('feature_list', array());
        if (is_wp_error($feature_list)) {
            return $features;
        }
    }
    if (!$feature_list) {
        return $features;
    }
    set_site_transient('wporg_theme_feature_list', $feature_list, 10800);
    $category_translations = array('Colors' => __('Colors'), 'Layout' => __('Layout'), 'Features' => __('Features'), 'Subject' => __('Subject'));
    // Loop over the wporg canonical list and apply translations
    $wporg_features = array();
    foreach ((array) $feature_list as $feature_category => $feature_items) {
        if (isset($category_translations[$feature_category])) {
            $feature_category = $category_translations[$feature_category];
        }
        $wporg_features[$feature_category] = array();
        foreach ($feature_items as $feature) {
            if (isset($features[$feature_category][$feature])) {
                $wporg_features[$feature_category][$feature] = $features[$feature_category][$feature];
            } else {
                $wporg_features[$feature_category][$feature] = $feature;
            }
        }
    }
    return $wporg_features;
}

WordPress Version: 8.1

/**
 * Retrieve list of WordPress theme features (aka theme tags)
 *
 * @since 3.1.0
 *
 * @param bool $api Optional. Whether try to fetch tags from the WP.org API. Defaults to true.
 * @return array Array of features keyed by category with translations keyed by slug.
 */
function get_theme_feature_list($api = true)
{
    // Hard-coded list is used if api not accessible.
    $features = array(__('Colors') => array('black' => __('Black'), 'blue' => __('Blue'), 'brown' => __('Brown'), 'gray' => __('Gray'), 'green' => __('Green'), 'orange' => __('Orange'), 'pink' => __('Pink'), 'purple' => __('Purple'), 'red' => __('Red'), 'silver' => __('Silver'), 'tan' => __('Tan'), 'white' => __('White'), 'yellow' => __('Yellow'), 'dark' => __('Dark'), 'light' => __('Light')), __('Columns') => array('one-column' => __('One Column'), 'two-columns' => __('Two Columns'), 'three-columns' => __('Three Columns'), 'four-columns' => __('Four Columns'), 'left-sidebar' => __('Left Sidebar'), 'right-sidebar' => __('Right Sidebar')), __('Layout') => array('fixed-layout' => __('Fixed Layout'), 'fluid-layout' => __('Fluid Layout'), 'responsive-layout' => __('Responsive Layout')), __('Features') => array('accessibility-ready' => __('Accessibility Ready'), 'blavatar' => __('Blavatar'), 'buddypress' => __('BuddyPress'), 'custom-background' => __('Custom Background'), 'custom-colors' => __('Custom Colors'), 'custom-header' => __('Custom Header'), 'custom-menu' => __('Custom Menu'), 'editor-style' => __('Editor Style'), 'featured-image-header' => __('Featured Image Header'), 'featured-images' => __('Featured Images'), 'flexible-header' => __('Flexible Header'), 'front-page-post-form' => __('Front Page Posting'), 'full-width-template' => __('Full Width Template'), 'microformats' => __('Microformats'), 'post-formats' => __('Post Formats'), 'rtl-language-support' => __('RTL Language Support'), 'sticky-post' => __('Sticky Post'), 'theme-options' => __('Theme Options'), 'threaded-comments' => __('Threaded Comments'), 'translation-ready' => __('Translation Ready')), __('Subject') => array('holiday' => __('Holiday'), 'photoblogging' => __('Photoblogging'), 'seasonal' => __('Seasonal')));
    if (!$api || !current_user_can('install_themes')) {
        return $features;
    }
    if (!$feature_list = get_site_transient('wporg_theme_feature_list')) {
        set_site_transient('wporg_theme_feature_list', array(), 10800);
    }
    if (!$feature_list) {
        $feature_list = themes_api('feature_list', array());
        if (is_wp_error($feature_list)) {
            return $features;
        }
    }
    if (!$feature_list) {
        return $features;
    }
    set_site_transient('wporg_theme_feature_list', $feature_list, 10800);
    $category_translations = array('Colors' => __('Colors'), 'Columns' => __('Columns'), 'Layout' => __('Layout'), 'Features' => __('Features'), 'Subject' => __('Subject'));
    // Loop over the wporg canonical list and apply translations
    $wporg_features = array();
    foreach ((array) $feature_list as $feature_category => $feature_items) {
        if (isset($category_translations[$feature_category])) {
            $feature_category = $category_translations[$feature_category];
        }
        $wporg_features[$feature_category] = array();
        foreach ($feature_items as $feature) {
            if (isset($features[$feature_category][$feature])) {
                $wporg_features[$feature_category][$feature] = $features[$feature_category][$feature];
            } else {
                $wporg_features[$feature_category][$feature] = $feature;
            }
        }
    }
    return $wporg_features;
}

WordPress Version: 3.8

/**
 * Retrieve list of WordPress theme features (aka theme tags)
 *
 * @since 3.1.0
 *
 * @param bool $api Optional. Whether try to fetch tags from the WP.org API. Defaults to true.
 * @return array Array of features keyed by category with translations keyed by slug.
 */
function get_theme_feature_list($api = true)
{
    // Hard-coded list is used if api not accessible.
    $features = array(__('Colors') => array('black' => __('Black'), 'blue' => __('Blue'), 'brown' => __('Brown'), 'gray' => __('Gray'), 'green' => __('Green'), 'orange' => __('Orange'), 'pink' => __('Pink'), 'purple' => __('Purple'), 'red' => __('Red'), 'silver' => __('Silver'), 'tan' => __('Tan'), 'white' => __('White'), 'yellow' => __('Yellow'), 'dark' => __('Dark'), 'light' => __('Light')), __('Columns') => array('one-column' => __('One Column'), 'two-columns' => __('Two Columns'), 'three-columns' => __('Three Columns'), 'four-columns' => __('Four Columns'), 'left-sidebar' => __('Left Sidebar'), 'right-sidebar' => __('Right Sidebar')), __('Layout') => array('fixed-layout' => __('Fixed Layout'), 'fluid-layout' => __('Fluid Layout'), 'responsive-layout' => __('Responsive Layout')), __('Features') => array('accessibility-ready' => __('Accessibility Ready'), 'blavatar' => __('Blavatar'), 'buddypress' => __('BuddyPress'), 'custom-background' => __('Custom Background'), 'custom-colors' => __('Custom Colors'), 'custom-header' => __('Custom Header'), 'custom-menu' => __('Custom Menu'), 'editor-style' => __('Editor Style'), 'featured-image-header' => __('Featured Image Header'), 'featured-images' => __('Featured Images'), 'flexible-header' => __('Flexible Header'), 'front-page-post-form' => __('Front Page Posting'), 'full-width-template' => __('Full Width Template'), 'microformats' => __('Microformats'), 'post-formats' => __('Post Formats'), 'rtl-language-support' => __('RTL Language Support'), 'sticky-post' => __('Sticky Post'), 'theme-options' => __('Theme Options'), 'threaded-comments' => __('Threaded Comments'), 'translation-ready' => __('Translation Ready')), __('Subject') => array('holiday' => __('Holiday'), 'photoblogging' => __('Photoblogging'), 'seasonal' => __('Seasonal')));
    if (!$api || !current_user_can('install_themes')) {
        return $features;
    }
    if (!$feature_list = get_site_transient('wporg_theme_feature_list')) {
        set_site_transient('wporg_theme_feature_list', array(), 10800);
    }
    if (!$feature_list) {
        $feature_list = themes_api('feature_list', array());
        if (is_wp_error($feature_list)) {
            return $features;
        }
    }
    if (!$feature_list) {
        return $features;
    }
    set_site_transient('wporg_theme_feature_list', $feature_list, 10800);
    $category_translations = array('Colors' => __('Colors'), 'Columns' => __('Columns'), 'Width' => __('Width'), 'Features' => __('Features'), 'Subject' => __('Subject'));
    // Loop over the wporg canonical list and apply translations
    $wporg_features = array();
    foreach ((array) $feature_list as $feature_category => $feature_items) {
        if (isset($category_translations[$feature_category])) {
            $feature_category = $category_translations[$feature_category];
        }
        $wporg_features[$feature_category] = array();
        foreach ($feature_items as $feature) {
            if (isset($features[$feature_category][$feature])) {
                $wporg_features[$feature_category][$feature] = $features[$feature_category][$feature];
            } else {
                $wporg_features[$feature_category][$feature] = $feature;
            }
        }
    }
    return $wporg_features;
}

WordPress Version: 3.7

/**
 * Retrieve list of WordPress theme features (aka theme tags)
 *
 * @since 3.1.0
 *
 * @param bool $api Optional. Whether try to fetch tags from the WP.org API. Defaults to true.
 * @return array Array of features keyed by category with translations keyed by slug.
 */
function get_theme_feature_list($api = true)
{
    // Hard-coded list is used if api not accessible.
    $features = array(__('Colors') => array('black' => __('Black'), 'blue' => __('Blue'), 'brown' => __('Brown'), 'gray' => __('Gray'), 'green' => __('Green'), 'orange' => __('Orange'), 'pink' => __('Pink'), 'purple' => __('Purple'), 'red' => __('Red'), 'silver' => __('Silver'), 'tan' => __('Tan'), 'white' => __('White'), 'yellow' => __('Yellow'), 'dark' => __('Dark'), 'light' => __('Light')), __('Columns') => array('one-column' => __('One Column'), 'two-columns' => __('Two Columns'), 'three-columns' => __('Three Columns'), 'four-columns' => __('Four Columns'), 'left-sidebar' => __('Left Sidebar'), 'right-sidebar' => __('Right Sidebar')), __('Width') => array('fixed-width' => __('Fixed Width'), 'flexible-width' => __('Flexible Width')), __('Features') => array('blavatar' => __('Blavatar'), 'buddypress' => __('BuddyPress'), 'custom-background' => __('Custom Background'), 'custom-colors' => __('Custom Colors'), 'custom-header' => __('Custom Header'), 'custom-menu' => __('Custom Menu'), 'editor-style' => __('Editor Style'), 'featured-image-header' => __('Featured Image Header'), 'featured-images' => __('Featured Images'), 'flexible-header' => __('Flexible Header'), 'front-page-post-form' => __('Front Page Posting'), 'full-width-template' => __('Full Width Template'), 'microformats' => __('Microformats'), 'post-formats' => __('Post Formats'), 'rtl-language-support' => __('RTL Language Support'), 'sticky-post' => __('Sticky Post'), 'theme-options' => __('Theme Options'), 'threaded-comments' => __('Threaded Comments'), 'translation-ready' => __('Translation Ready')), __('Subject') => array('holiday' => __('Holiday'), 'photoblogging' => __('Photoblogging'), 'seasonal' => __('Seasonal')));
    if (!$api || !current_user_can('install_themes')) {
        return $features;
    }
    if (!$feature_list = get_site_transient('wporg_theme_feature_list')) {
        set_site_transient('wporg_theme_feature_list', array(), 10800);
    }
    if (!$feature_list) {
        $feature_list = themes_api('feature_list', array());
        if (is_wp_error($feature_list)) {
            return $features;
        }
    }
    if (!$feature_list) {
        return $features;
    }
    set_site_transient('wporg_theme_feature_list', $feature_list, 10800);
    $category_translations = array('Colors' => __('Colors'), 'Columns' => __('Columns'), 'Width' => __('Width'), 'Features' => __('Features'), 'Subject' => __('Subject'));
    // Loop over the wporg canonical list and apply translations
    $wporg_features = array();
    foreach ((array) $feature_list as $feature_category => $feature_items) {
        if (isset($category_translations[$feature_category])) {
            $feature_category = $category_translations[$feature_category];
        }
        $wporg_features[$feature_category] = array();
        foreach ($feature_items as $feature) {
            if (isset($features[$feature_category][$feature])) {
                $wporg_features[$feature_category][$feature] = $features[$feature_category][$feature];
            } else {
                $wporg_features[$feature_category][$feature] = $feature;
            }
        }
    }
    return $wporg_features;
}