WP_Customize_Panel::render_template
An Underscore (JS) template for rendering this panel's container.
Class variables for this panel class are available in the data JS object; export custom variables by overriding WP_Customize_Panel::json().
Метод класса: WP_Customize_Panel{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->render_template();
Заметки
- Смотрите: WP_Customize_Panel::print_template()
Список изменений
| С версии 4.3.0 | Введена. |
Код WP_Customize_Panel::render_template() WP Customize Panel::render template WP 6.9
<?php
protected function render_template() {
?>
<li id="accordion-panel-{{ data.id }}" class="accordion-section control-section control-panel control-panel-{{ data.type }}">
<h3 class="accordion-section-title">
<button type="button" class="accordion-trigger" aria-expanded="false" aria-controls="{{ data.id }}-content">
{{ data.title }}
</button>
</h3>
<ul class="accordion-sub-container control-panel-content" id="{{ data.id }}-content"></ul>
</li>
<?php
}