WP_Widget_Custom_HTML::__construct()publicWP 4.8.1

Sets up a new Custom HTML widget instance.

Метод класса: WP_Widget_Custom_HTML{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$WP_Widget_Custom_HTML = new WP_Widget_Custom_HTML();
$WP_Widget_Custom_HTML->__construct();

Список изменений

С версии 4.8.1 Введена.

Код WP_Widget_Custom_HTML::__construct() WP 6.5.2

public function __construct() {
	$widget_ops  = array(
		'classname'                   => 'widget_custom_html',
		'description'                 => __( 'Arbitrary HTML code.' ),
		'customize_selective_refresh' => true,
		'show_instance_in_rest'       => true,
	);
	$control_ops = array(
		'width'  => 400,
		'height' => 350,
	);
	parent::__construct( 'custom_html', __( 'Custom HTML' ), $widget_ops, $control_ops );
}