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 et_core_intentionally_unescaped( $before_widget, 'html' ); if ( $title ) { echo et_core_intentionally_unescaped( $before_title . $title . $after_title, 'html' ); } ?>
esc_html__( 'Adsense', 'Divi' ), 'adsenseCode'=>'' ) ); $title = $instance['title']; $adsenseCode = $instance['adsenseCode']; # Title echo ''; # Adsense Code echo ''; } }// end AdsenseWidget class function AdsenseWidgetInit() { register_widget('AdsenseWidget'); } add_action('widgets_init', 'AdsenseWidgetInit');