'digimag-contact-info', 'description' => __( 'Display your location and contact information.', 'digimag-lite' ), 'customize_selective_refresh' => true, ); parent::__construct( 'digimag-contact-info', esc_html__( 'Digimag: Contact Info', 'digimag-lite' ), $widget_ops ); } /** * Return an associative array of default values * * These values are used in new widgets. * * @return array Array of default values for the Widget's options */ public function defaults() { return array( 'title' => __( 'Get in touch', 'digimag-lite' ), 'address' => __( 'Timposn St, Suite 247, USA, GA', 'digimag-lite' ), 'phone' => _x( '+559-843-4919', 'phone', 'digimag-lite' ), 'email' => null, ); } /** * Outputs the HTML for this widget. * * @param array $args An array of standard parameters for widgets in this theme. * @param array $instance An array of settings for this widget instance. * * @return void Echoes it's output **/ public function widget( $args, $instance ) { $instance = wp_parse_args( $instance, $this->defaults() ); echo $args['before_widget']; // WPCS: XSS OK. if ( '' !== $instance['title'] ) { echo $args['before_title'] . $instance['title'] . $args['after_title']; // WPCS: XSS OK. } echo '