'adplugg', 'description' => 'A widget for displaying ads.', ); parent::__construct( 'adplugg', 'AdPlugg', $widget_options ); } /** * Widget form creation. Displays the form in the widget admin. * * @param array $instance Current settings. */ public function form( $instance ) { // Check values. $title = ( ( $instance ) && ( isset( $instance['title'] ) ) ) ? $instance['title'] : ''; $zone = ( ( $instance ) && ( isset( $instance['zone'] ) ) ) ? $instance['zone'] : ''; $width = ( ( $instance ) && ( isset( $instance['width'] ) ) ) ? $instance['width'] : ''; $height = ( ( $instance ) && ( isset( $instance['height'] ) ) ) ? $instance['height'] : ''; $default = ( ( $instance ) && ( isset( $instance['default'] ) ) ) ? $instance['default'] : 0; // This is used below to set the title of the widget that is displayed // within the admin. It is passed to widgets.js based on the '-title' id // suffix. $widget_title = ( '' !== $zone ) ? $zone : ''; // Render the form. // Note: we always render all fields but sometimes hide certain fields // via css (admin.css) if they aren't relevant to the widget area. ?>

Configure at adplugg.com | Help

Optional Settings Settings
get_field_id( 'title' ) ) . '" name="' . esc_attr( $this->get_field_name( 'title' ) ) . '" type="text" value="' . esc_attr( $title ) . '" />'; ?> Enter a title for the widget.
get_field_id( 'zone' ) ) . '" name="' . esc_attr( $this->get_field_name( 'zone' ) ) . '" type="text" value="' . esc_attr( $zone ) . '" />'; ?> Enter the zone machine name.
get_field_id( 'width' ) ) . '" name="' . esc_attr( $this->get_field_name( 'width' ) ) . '" type="text" value="' . esc_attr( $width ) . '" />'; ?> Enter the width.
get_field_id( 'height' ) ) . '" name="' . esc_attr( $this->get_field_name( 'height' ) ) . '" type="text" value="' . esc_attr( $height ) . '" />'; ?> Enter the height.

Check to make this zone the default.
\n"; echo '' . "\n"; echo "\n"; } } else { // --------------------- NORMAL OUTPUT -------------------// echo $args['before_widget']; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped // Render the title (if there is one). if ( $title ) { echo $args['before_title'] . $title . $args['after_title']; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped } // Add the AdPlugg tag. echo '
'; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped echo $args['before_widget']; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped } } }