Restituisce i modelli di controllo del modulo del widget nel DOM.

Fonte

File: wp-includes/class-wp-customize-widgets.php

public function output_widget_control_templates() {
		?>
		<divid="widgets-left"><divid="available-widgets"><divclass="customize-section-title"><buttonclass="customize-section-back"tabindex="-1"><spanclass="screen-reader-text">_e('Back');?>span>button><h3><spanclass="customize-action">/* translators: ▸ is the unicode right-pointing triangle. %s: Section title in the Customizer. */printf(__('Customizing ▸ %s'),esc_html($this->manager->get_panel('widgets')->title));?>span>_e('Add a Widget');?>h3>div><divid="available-widgets-filter"><labelclass="screen-reader-text"for="widgets-search">_e('Search Widgets');?>label><inputtype="text"id="widgets-search"placeholder="esc_attr_e('Search widgets…');?>"aria-describedby="widgets-search-desc"/><divclass="search-icon"aria-hidden="true">div><buttontype="button"class="clear-results"><spanclass="screen-reader-text">_e('Clear Results');?>span>button><pclass="screen-reader-text"id="widgets-search-desc">_e('The search results will be updated as you type.');?>p>div><divid="available-widgets-list">foreach($this->get_available_widgets()as$available_widget):?><divid="widget-tpl-echoesc_attr($available_widget['id']);?>"data-widget-id="echoesc_attr($available_widget['id']);?>"class="widget-tpl echoesc_attr($available_widget['id']);?>"tabindex="0">echo$available_widget['control_tpl'];?>div>endforeach;?><pclass="no-widgets-found-message">_e('No widgets found.');?>p>div>div>div>}

Correlato

Utilizzi

Usi Descrizione
wp-includes/l10n.php: _e()

Mostra il testo tradotto.

wp-includes/l10n.php: __()

Recupera la traduzione di $testo.

wp-includes/l10n.php: esc_attr_e()

Mostra il testo tradotto che è stato evaso per un uso sicuro in un attributo.

wp-includes/formatting.php: esc_html()

Escaping per i blocchi HTML.

wp-includes/formatting.php: esc_attr()

Escaping per gli attributi HTML.

wp-includes/class-wp-customize-widgets.php: WP_Customize_Widgets::get_available_widgets()

Costruisce un indice di tutti i widget disponibili da usare nei modelli di Backbone.

Changelog

Versione Descrizione
3.9.0 Introdotto.