path = dirname( __file__ ); $this->description = __( 'Separate sections of the layout.', 'spyropress' ); $this->id_base = 'spyropress_divider'; $this->name = __( 'Divider', 'spyropress' ); // Fields $this->fields = array( array( 'type' => 'select', 'id' => 'style', 'label' => __( 'Gap', 'spyropress' ), 'options' => array( 'hr_shadow' =>__( 'Shadow Line', 'spyropress' ), 'hr_dash' => __( 'Dashed Line', 'spyropress' ), '10' => __( '10', 'spyropress' ), '20' => __( '20', 'spyropress' ), '30' => __( '30', 'spyropress' ), '40' => __( '40', 'spyropress' ), '50' => __( '50', 'spyropress' ), ),'std' => '10' ) ); $this->create_widget(); } function widget( $args, $instance ){ // outputs the content of the widget extract( $args );extract( $instance ); if ( empty( $style ) )return; echo $before_widget; // outputs the content of Shadow line if ( $style == 'hr_shadow' ) echo '
'; // outputs the content of dash line elseif ( $style == 'hr_dash' ) echo '
'; // outputs the content of bottom margin divider else echo '
'; echo $after_widget; } } //register class Spyropress_Module_Divider spyropress_builder_register_module('Spyropress_Module_Divider'); ?>