<?php

namespace core_next;
class stock extends \WP_Widget
{
    function __construct()
    {
        $img_html = Theme::getWidgetIcon();
        parent::__construct(
            'core_next_search',
            $img_html . 'CoreNext股票信息',
            array(
                'description' => '展示指定股票信息'
            )
        );
    }

    public function widget_start($args, $instance)
    {
        $on_top = !empty($instance['on_top']) ? 'checked' : '';
        $html = $args['before_widget'];
        if ($on_top !== '') {
            $html = str_replace('<div', Theme::getWidgetStickyStyle(), $html);
        }
        echo $html;
    }

    public function widget_end($args)
    {
        echo $args['after_widget'];
    }
    function widget($args, $instance)
    {

    }
}