Title: WP_Customize_Themes_Section::filter_drawer_content_template
Published: November 20, 2017
Last modified: August 20, 2026

---

# WP_Customize_Themes_Section::filter_drawer_content_template()

## In this article

 * [Description](https://developer.wordpress.org/reference/classes/wp_customize_themes_section/filter_drawer_content_template/?output_format=md#description)
 * [Source](https://developer.wordpress.org/reference/classes/wp_customize_themes_section/filter_drawer_content_template/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/wp_customize_themes_section/filter_drawer_content_template/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/classes/wp_customize_themes_section/filter_drawer_content_template/?output_format=md#changelog)

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

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

## 󠀁[Description](https://developer.wordpress.org/reference/classes/wp_customize_themes_section/filter_drawer_content_template/?output_format=md#description)󠁿

The filter bar container is rendered by [render_template()](https://developer.wordpress.org/reference/functions/render_template/).

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

    ```php
    protected function filter_drawer_content_template() {
    	/*
    	 * @todo Use the .org API instead of the local core feature list.
    	 * The .org API is currently outdated and will be reconciled when the .org themes directory is next redesigned.
    	 */
    	$feature_list = get_theme_feature_list( false );
    	?>
    	<# if ( 'wporg' === data.action ) { #>
    		<div class="filter-drawer filter-details">
    			<?php foreach ( $feature_list as $feature_name => $features ) : ?>
    				<fieldset class="filter-group">
    					<legend><?php echo esc_html( $feature_name ); ?></legend>
    					<div class="filter-group-feature">
    						<?php foreach ( $features as $feature => $feature_name ) : ?>
    							<input type="checkbox" id="filter-id-<?php echo esc_attr( $feature ); ?>" value="<?php echo esc_attr( $feature ); ?>" />
    							<label for="filter-id-<?php echo esc_attr( $feature ); ?>"><?php echo esc_html( $feature_name ); ?></label>
    						<?php endforeach; ?>
    					</div>
    				</fieldset>
    			<?php endforeach; ?>
    		</div>
    	<# } #>
    	<?php
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/customize/class-wp-customize-themes-section.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-includes/customize/class-wp-customize-themes-section.php#L184)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/customize/class-wp-customize-themes-section.php#L184-L207)

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

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

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

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

Escaping for HTML blocks.

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

Escaping for HTML attributes.

  |

[Show 1 more](https://developer.wordpress.org/reference/classes/wp_customize_themes_section/filter_drawer_content_template/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/classes/wp_customize_themes_section/filter_drawer_content_template/?output_format=md#)

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

Renders a themes section as a JS template.

  |

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

| Version | Description | 
| [4.9.0](https://developer.wordpress.org/reference/since/4.9.0/) | Introduced. |

## User Contributed Notes

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