Title: get_theme_feature_list
Published: April 25, 2014
Last modified: February 24, 2026

---

# get_theme_feature_list( bool $api = true ): array

## In this article

 * [Parameters](https://developer.wordpress.org/reference/functions/get_theme_feature_list/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/get_theme_feature_list/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/get_theme_feature_list/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/get_theme_feature_list/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/get_theme_feature_list/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/get_theme_feature_list/?output_format=md#wp--skip-link--target)

Retrieves list of WordPress theme features (aka theme tags).

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/get_theme_feature_list/?output_format=md#parameters)󠁿

 `$api`booloptional

Whether try to fetch tags from the WordPress.org API. Defaults to true.

Default:`true`

## 󠀁[Return](https://developer.wordpress.org/reference/functions/get_theme_feature_list/?output_format=md#return)󠁿

 array Array of features keyed by category with translations keyed by slug.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/get_theme_feature_list/?output_format=md#source)󠁿

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

[View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/theme.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-admin/includes/theme.php#L314)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-admin/includes/theme.php#L314-L412)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/get_theme_feature_list/?output_format=md#related)󠁿

| Uses | Description | 
| [themes_api()](https://developer.wordpress.org/reference/functions/themes_api/)`wp-admin/includes/theme.php` |

Retrieves theme installer pages from the WordPress.org Themes API.

  | 
| [set_site_transient()](https://developer.wordpress.org/reference/functions/set_site_transient/)`wp-includes/option.php` |

Sets/updates the value of a site transient.

  | 
| [current_user_can()](https://developer.wordpress.org/reference/functions/current_user_can/)`wp-includes/capabilities.php` |

Returns whether the current user has the specified capability.

  | 
| [__()](https://developer.wordpress.org/reference/functions/__/)`wp-includes/l10n.php` |

Retrieves the translation of $text.

  | 
| [get_site_transient()](https://developer.wordpress.org/reference/functions/get_site_transient/)`wp-includes/option.php` |

Retrieves the value of a site transient.

  | 
| [is_wp_error()](https://developer.wordpress.org/reference/functions/is_wp_error/)`wp-includes/load.php` |

Checks whether the given variable is a WordPress Error.

  |

[Show 4 more](https://developer.wordpress.org/reference/functions/get_theme_feature_list/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/functions/get_theme_feature_list/?output_format=md#)

| Used by | Description | 
| [WP_Customize_Themes_Section::filter_drawer_content_template()](https://developer.wordpress.org/reference/classes/wp_customize_themes_section/filter_drawer_content_template/)`wp-includes/customize/class-wp-customize-themes-section.php` |

Renders the filter drawer portion of a themes section as a JS template.

  | 
| [install_themes_dashboard()](https://developer.wordpress.org/reference/functions/install_themes_dashboard/)`wp-admin/includes/theme-install.php` |

Displays tags filter for themes.

  | 
| [WP_Theme::translate_header()](https://developer.wordpress.org/reference/classes/wp_theme/translate_header/)`wp-includes/class-wp-theme.php` |

Translates a theme header.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/get_theme_feature_list/?output_format=md#changelog)󠁿

| Version | Description | 
| [6.2.0](https://developer.wordpress.org/reference/since/6.2.0/) | Added ‘Style Variations’ feature. | 
| [6.1.1](https://developer.wordpress.org/reference/since/6.1.1/) | Replaced ‘Full Site Editing’ feature name with ‘Site Editor’. | 
| [5.8.1](https://developer.wordpress.org/reference/since/5.8.1/) | Added ‘Template Editing’ feature. | 
| [5.5.0](https://developer.wordpress.org/reference/since/5.5.0/) | Added ‘Wide Blocks’ layout option. | 
| [4.9.0](https://developer.wordpress.org/reference/since/4.9.0/) | Removed `'BuddyPress'`, ‘Custom Menu’, ‘Flexible Header’, ‘Front Page Posting’, `'Microformats'`, ‘RTL Language Support’, ‘Threaded Comments’, and ‘Translation Ready’ features. | 
| [4.6.0](https://developer.wordpress.org/reference/since/4.6.0/) | Added `'Blog'`, `'E-Commerce'`, `'Education'`, `'Entertainment'`, ‘Food & Drink’, `'Holiday'`, `'News'`, `'Photography'`, and `'Portfolio'` subjects.
 Removed `'Photoblogging'` and `'Seasonal'` subjects. | 
| [3.9.0](https://developer.wordpress.org/reference/since/3.9.0/) | Combined `'Layout'` and `'Columns'` filters. | 
| [3.8.0](https://developer.wordpress.org/reference/since/3.8.0/) | Added ‘Accessibility Ready’ feature and ‘Responsive Layout’ option. | 
| [3.5.0](https://developer.wordpress.org/reference/since/3.5.0/) | Added ‘Flexible Header’ feature. | 
| [3.2.0](https://developer.wordpress.org/reference/since/3.2.0/) | Added `'Gray'` color and ‘Featured Image Header’, ‘Featured Images’, ‘Full Width Template’, and ‘Post Formats’ features. | 
| [3.1.0](https://developer.wordpress.org/reference/since/3.1.0/) | Introduced. |

[Show 6 more](https://developer.wordpress.org/reference/functions/get_theme_feature_list/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/functions/get_theme_feature_list/?output_format=md#)

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fget_theme_feature_list%2F)
before being able to contribute a note or feedback.