'homepage-list-posts', 'description' => __('Displays the latest posts from the selected category as an unordered list with highlighted first post.', 'papercuts') ); $control_ops = array('width' => 200, 'height' => 400); $this->WP_Widget('papercutslist', __('PaperCuts Posts-List', 'papercuts'), $widget_ops, $control_ops); } function form($instance) { // outputs the options form on admin if ( $instance ) { $title = esc_attr( $instance[ 'title' ] ); } else { $title = __( '', 'papercuts' ); } if ( $instance ) { $category = esc_attr( $instance[ 'category' ] ); } else { $category = __( '', 'papercuts' ); } if ( $instance ) { $numberposts = esc_attr( $instance[ 'numberposts' ] ); } else { $numberposts = __( '5', 'papercuts' ); } ?>
$this->get_field_name('category'), 'id' => $this->get_field_id('category'), 'class' => 'widefat', 'selected' => $category, 'show_option_none' => '- not selected -' ) ); ?>