path = dirname( __file__ ); $this->cssclass = 'call-out'; $this->description = __('Show text Though call out .', 'spyropress'); $this->id_base = 'call-out'; $this->name = __( 'Call Out', 'spyropress' ); // Templates $this->templates['view-one'] = array( 'view' => 'view-one.php', 'label' =>__( 'Style One','spyropress' ) ); $this->templates['view-two'] = array( 'view' => 'view-two.php', 'label' =>__( 'Style Two','spyropress' ) ); // Fields $this->fields = array( array( 'label' => __( 'Template','spyropress' ), 'id' => 'template', 'type' => 'select', 'options' => $this->get_option_templates(), 'std' => 'view-one' ), array( 'label' => __( 'Content', 'spyropress' ), 'id' => 'teaser', 'type' => 'textarea', 'rows' => 5 ), array( 'label' => __( 'Link Text', 'spyropress' ), 'id' => 'link_txt', '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 ); $template = isset( $instance['template'] ) ? $instance['template'] : ''; // get view to render require( $this->get_view( $template ) ); } } //register class Spyropress_Module_Call_Out spyropress_builder_register_module('Spyropress_Module_Call_Out'); ?>