WP_Customize_Widgets::get_widget_control
Retrieves the widget control markup.
Метод класса: WP_Customize_Widgets{}
Хуков нет.
Возвращает
Строку. Widget control form HTML markup.
Использование
$WP_Customize_Widgets = new WP_Customize_Widgets(); $WP_Customize_Widgets->get_widget_control( $args );
- $args(массив) (обязательный)
- Widget control arguments.
Список изменений
| С версии 3.9.0 | Введена. |
Код WP_Customize_Widgets::get_widget_control() WP Customize Widgets::get widget control WP 6.9.1
public function get_widget_control( $args ) {
$args[0]['before_form'] = '<div class="form">';
$args[0]['after_form'] = '</div><!-- .form -->';
$args[0]['before_widget_content'] = '<div class="widget-content">';
$args[0]['after_widget_content'] = '</div><!-- .widget-content -->';
ob_start();
wp_widget_control( ...$args );
$control_tpl = ob_get_clean();
return $control_tpl;
}