__( 'Tips Widget', 'text_domain' ), ) // Args ); } public function widget( $args, $instance ) { extract( $args ); $title = apply_filters( 'widget_title', $instance['title'] ); $tip_box = apply_filters( 'widget_title', $instance['tip_box'] ); echo $before_widget; //if ( ! empty( $title ) ) //echo $before_title . $title . $after_title; if( $tip_box != '' ){ echo do_shortcode('[show_tip id="'.$tip_box.'"]'); } echo $after_widget; } public function update( $new_instance, $old_instance ) { $instance = array(); $instance['title'] = strip_tags( $new_instance['title'] ); $instance['tip_box'] = strip_tags( $new_instance['tip_box'] ); return $instance; } public function form( $instance ) { if ( isset( $instance[ 'title' ] ) ) { $title = $instance[ 'title' ]; } else { $title = __( 'New title', 'text_domain' ); } $tip_box = $instance[ 'tip_box' ]; ?>