'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.
?>