path = dirname(__file__); $this->cssclass = 'contact_us'; $this->description = __('Quickly add Contact Us Details in widget e.g. link heading ,Cotent button','spyropress'); $this->id_base = 'spyropress_contact_us'; $this->name = __('Spyropress: Contact Us ', 'spyropress'); $this->fields = array( array( 'label' => __('Heading', 'spyropress'), 'id' => 'heading', 'type' => 'text', ), array( 'label' => __('Content', 'spyropress'), 'id' => 'content', 'type' => 'textarea', 'rows' => 4), array('label' => __('Button', 'spyropress'), 'type' => 'toggle'), array( 'label' => __('Button Text', 'spyropress'), 'id' => 'btn_text', 'type' => 'text', ), array( 'label' => __('Button Link', 'spyropress'), 'id' => 'btn_link', 'type' => 'text', ), array('type' => 'toggle_end'), ); $this->create_widget(); } function widget($args, $instance) { // extracting info extract($args); extract($instance); // get view to render include $this->get_view(); } } // class SpyroPress_Widget_Contact_Us register_widget('SpyroPress_Widget_Contact_Us'); ?>