esc_html__( 'Contacts widget', 'stm_motors_extends' ) ) // Args. ); } /** * Front-end display of widget. * * @see WP_Widget::widget() * * @param array $args Widget arguments. * @param array $instance Saved values from database. */ public function widget( $args, $instance ) { $title = apply_filters( 'widget_title', $instance['title'] ); echo wp_kses_post( $args['before_widget'] ); if ( ! empty( $title ) ) { echo wp_kses_post( $args['before_title'] ) . esc_html( $title ) . wp_kses_post( $args['after_title'] ); } echo ''; echo wp_kses_post( $args['after_widget'] ); } /** * Back-end widget form. * * @see WP_Widget::form() * * @param array $instance Previously saved values from database. */ public function form( $instance ) { $title = ''; $address = ''; $phone = ''; $fax = ''; $email = ''; if ( isset( $instance['title'] ) ) { $title = $instance['title']; } else { $title = esc_html__( 'Contact', 'stm_motors_extends' ); } if ( isset( $instance['address'] ) ) { $address = $instance['address']; } if ( isset( $instance['phone'] ) ) { $phone = $instance['phone']; } if ( isset( $instance['fax'] ) ) { $fax = $instance['fax']; } if ( isset( $instance['email'] ) ) { $email = $instance['email']; } ?>