'Google Map SRM' //widget description ); public function __construct() { parent::__construct( $this->base_id, $this->widget_name, $this->widget_options ); add_action( 'widgets_init', function() { register_widget( 'srmgmap_widget' ); }); } // Map display in front public function widget( $args, $instance ) { $title = apply_filters( 'widget_title', $instance['title'] ); extract( $args ); extract( $instance ); echo $before_widget; if ( ! empty( $title ) ) { echo $before_title . $title . $after_title; } echo do_shortcode( $instance['srmgmap_shortcode'] ); echo $after_widget; } /** * Google Map Widget * @return String $instance */ public function form( $instance ) { $title = ! empty( $instance['title'] ) ? $instance['title'] : esc_html__( '', 'text_domain' ); $text = ! empty( $instance['srmgmap_shortcode'] ) ? $instance['srmgmap_shortcode'] : esc_html__( '', 'text_domain' ); ?>
' type="text" class="widefat">