path = dirname( __file__ ); $this->description = __( 'Toggle Content Builder', 'spyropress' ); $this->id_base = 'toggle'; $this->cssclass = 'toogle'; $this->name = __( 'Toggle Content', 'spyropress' ); $this->fields = array( array( 'label' => __( 'Toggles', 'spyropress' ), 'id' => 'toggles', 'type' => 'repeater', 'item_title' => 'title', 'fields' => array( array( 'label' => __( 'Title', 'spyropress' ), 'id' => 'title', 'type' => 'text'), array( 'label' => __( 'Bucket', 'spyropress' ), 'id' => 'bucket', 'type' => 'select', 'desc' => __( 'If you want to use html instead of plain text.','spyropress' ), 'options' => spyropress_get_buckets() ), array( 'label' => __( 'Content', 'spyropress' ), 'id' => 'content', 'type' => 'textarea', 'rows' => 7 ) ) ) ); $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_Toggle spyropress_builder_register_module( 'Spyropress_Module_Toggle' ); ?>