__( 'Show Ad on website via Widget on Sidebar', 'adfoxly' ), ) ); } /** * display widget ad */ public function widget( $args, $instance ) { $id = $instance[ 'adfoxly_place' ]; echo $args[ 'before_widget' ]; if ( ! empty( $instance['title'] ) ) { echo $args[ 'before_title' ] . apply_filters( 'widget_title', $instance[ 'title' ] ) . $args[ 'after_title' ]; } $places = new AdfoxlyPlacesController(); echo $places->renderPlace( $id ); echo $args[ 'after_widget' ]; } /** * widget form */ public function form( $instance ) { if ( isset( $instance[ 'adfoxly_place' ] ) ) { $widgetAdzone = $instance[ 'adfoxly_place' ]; } else { $widgetAdzone = __( 'Select Ad', 'adfoxly' ); } $title = ! empty( $instance['title'] ) ? $instance['title'] : esc_html__( 'Advertisement', 'adfoxly' ); ?>