', $this->get_field_id( 'title' ), esc_html__( 'Title', 'ac-repair' ), $this->get_field_name( 'title' ), esc_attr( $title ) ); $description = isset ( $instance['description'] ) ? $instance['description'] : esc_html__('If you have any further questions or queries please do not hesitate to get in touch.', 'ac-repair'); $description = esc_attr( $description ); printf( '


', $this->get_field_id( 'description' ), esc_html__( 'Description', 'ac-repair' ), $this->get_field_name( 'description' ), esc_attr( $description ) ); $newslatter_sh = isset ( $instance['newslatter_sh'] ) ? $instance['newslatter_sh'] : ''; $newslatter_sh = esc_attr( $newslatter_sh ); printf( '


', $this->get_field_id( 'newslatter_sh' ), esc_html__( 'Shortcode', 'ac-repair' ), $this->get_field_name( 'newslatter_sh' ), esc_attr( $newslatter_sh ) ); } /** * Renders the output. * * @see WP_Widget::widget() */ public function widget( $args, $instance ){ // Widget output extract($args); $title = isset( $instance['title'] ) ? $instance['title'] : esc_html__('Get In Touch With Us', 'ac-repair'); $desc = isset( $instance['description'] ) ? $instance['description'] : esc_html__('If you have any further questions or queries please do not hesitate to get in touch.', 'ac-repair'); $news_sh = isset( $instance['newslatter_sh'] ) ? $instance['newslatter_sh'] : ''; print $before_widget . '
' . '
' . $before_title . esc_html( $title ) . $after_title . fixit_function_strip_tags( '

'. $desc .'

' ) . '
'; if( shortcode_exists('mc4wp_form') ) print do_shortcode( $news_sh ); print '
' . $after_widget ; } /** * Prepares the content. Not. * * @param array $new_instance New content * @param array $old_instance Old content * @return array New content */ public function update( $new_instance, $old_instance ){ $new_instance_array = array( 'title', 'description', 'newslatter_sh' ); foreach( $new_instance_array as $val ) $old_instance[ $val ] = $new_instance[ $val ]; return $old_instance; } /** * Tell WP we want to use this widget. * * @wp-hook widgets_init * @return void */ public static function register(){ register_widget( __CLASS__ ); } }