path = dirname(__file__); $this->cssclass = 'link-details'; $this->description = __('Quickly add Links in widget e.g. link text, link url.','spyropress'); $this->id_base = 'spyropress_links'; $this->name = __('Spyropress: Links ', 'spyropress'); //fields $this->fields = array(array( 'label' => __('title', 'spyropress'), 'id' => 'title', 'type' => 'text', ), array( 'label' => __('Likes', 'spyropress'), 'id' => 'links', 'type' => 'repeater', 'item_title' => 'heading', 'fields' => array(array( 'label' => __('Like Text', 'spyropress'), 'id' => 'link_text', 'type' => 'text', ), array( 'label' => __('Link Url', 'spyropress'), 'id' => 'link_url', 'type' => 'text', )))); $this->create_widget(); } function widget($args, $instance) { // extracting info extract($args); extract($instance); // get view to render require( $this->get_view() ); } } // class SpyroPress_Widget_Links register_widget('SpyroPress_Widget_Links'); ?>