path = dirname( __file__ ); $this->description = __( 'List Items.', 'spyropress' ); $this->id_base = 'list-item'; $this->name = __( 'List Items', 'spyropress' ); // Fields $this->fields = array( array( 'label' => __( 'title', 'spyropress' ), 'id' => 'title', 'type' => 'text', ), array( 'label' => __( 'List Item', 'spyropress' ), 'id' => 'lists', 'type' => 'repeater', 'item_title' => 'item', 'fields' => array( array( 'label' => __( 'Items', 'spyropress' ), 'id' => 'item', 'type' => 'text' ) ) ), array( 'label' => __( 'List Description', 'spyropress' ), 'type' => 'toggle' ), array( 'label' => __( 'Description', 'spyropress' ), 'id' => 'description', 'type' => 'textarea', 'rows' => 4 ), array( 'type' => 'toggle_end' ), array( 'label' => __( 'Button Setting', 'spyropress' ), 'class' => 'template view-one view-four', 'type' => 'toggle', ), array( 'label' => __( 'Button Text', 'spyropress' ), 'id' => 'btn_text', 'class' => 'template view-one view-four', 'type' => 'text' ), array( 'label' => __( 'Button Link', 'spyropress' ), 'id' => 'btn_link', 'class' => 'template view-one view-four', 'type' => 'text' ), array( 'type' => 'toggle_end' ), ); $this->create_widget(); } function widget( $args, $instance ){ // extracting info extract( $args ); extract( $instance ); // get view to render require( $this->get_view() ); } } //register class Spyropress_Module_List_Item spyropress_builder_register_module( 'Spyropress_Module_List_Item' ); ?>