<?php
class Widget_Html extends Widget
{
public function __construct() {
parent::__construct(array(
'title' => __('HTML код'),
'icon' => '<i class="fa fa-html5" aria-hidden="true"></i>',
));
}
public function form($instance)
{
?>
<p><textarea type="text" name="html" placeholder="<?php echo __('HTML код'); ?>"><?php echo $this->get_field('html'); ?></textarea></p>
<?
}
public function widget($instance)
{
echo $this->get_field('html');
}
}