WordPress at Your Fingertips
function is not described

WP_Customize_Widgets::output_widget_control_templates() public WP 3.9.0

Renders the widget form control templates into the DOM.

{} It's a method of the class: WP_Customize_Widgets{}

No Hooks.


null. Nothing.


$WP_Customize_Widgets = new WP_Customize_Widgets();


Since 3.9.0 Introduced.

Code of WP_Customize_Widgets::output_widget_control_templates() WP 5.8

public function output_widget_control_templates() {
	<div id="widgets-left"><!-- compatibility with JS which looks for widget templates here -->
	<div id="available-widgets">
		<div class="customize-section-title">
			<button class="customize-section-back" tabindex="-1">
				<span class="screen-reader-text"><?php _e( 'Back' ); ?></span>
				<span class="customize-action">
					/* translators: &#9656; is the unicode right-pointing triangle. %s: Section title in the Customizer. */
					printf( __( 'Customizing &#9656; %s' ), esc_html( $this->manager->get_panel( 'widgets' )->title ) );
				<?php _e( 'Add a Widget' ); ?>
		<div id="available-widgets-filter">
			<label class="screen-reader-text" for="widgets-search"><?php _e( 'Search Widgets' ); ?></label>
			<input type="text" id="widgets-search" placeholder="<?php esc_attr_e( 'Search widgets&hellip;' ); ?>" aria-describedby="widgets-search-desc" />
			<div class="search-icon" aria-hidden="true"></div>
			<button type="button" class="clear-results"><span class="screen-reader-text"><?php _e( 'Clear Results' ); ?></span></button>
			<p class="screen-reader-text" id="widgets-search-desc"><?php _e( 'The search results will be updated as you type.' ); ?></p>
		<div id="available-widgets-list">
		<?php foreach ( $this->get_available_widgets() as $available_widget ) : ?>
			<div id="widget-tpl-<?php echo esc_attr( $available_widget['id'] ); ?>" data-widget-id="<?php echo esc_attr( $available_widget['id'] ); ?>" class="widget-tpl <?php echo esc_attr( $available_widget['id'] ); ?>" tabindex="0">
				<?php echo $available_widget['control_tpl']; ?>
		<?php endforeach; ?>
		<p class="no-widgets-found-message"><?php _e( 'No widgets found.' ); ?></p>
		</div><!-- #available-widgets-list -->
	</div><!-- #available-widgets -->
	</div><!-- #widgets-left -->