esc_html__( 'Displays Adsense Ads', 'Divi' ) ); $control_ops = array( 'width' => 400, 'height' => 500 ); parent::__construct( false, $name = esc_html__( 'ET Adsense Widget', 'Divi' ), $widget_ops, $control_ops ); } /* Displays the Widget in the front-end */ function widget( $args, $instance ){ extract($args); $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? esc_html__( 'Adsense', 'Divi' ) : esc_html( $instance['title'] ) ); $adsenseCode = empty( $instance['adsenseCode'] ) ? '' : $instance['adsenseCode']; echo $before_widget; if ( $title ) echo $before_title . $title . $after_title; ?>
esc_html__( 'Adsense', 'Divi' ), 'adsenseCode'=>'' ) ); $title = esc_attr( $instance['title'] ); $adsenseCode = esc_textarea( $instance['adsenseCode'] ); # Title echo '

'; # Adsense Code echo '

'; } }// end AdsenseWidget class function AdsenseWidgetInit() { register_widget('AdsenseWidget'); } add_action('widgets_init', 'AdsenseWidgetInit');