'widget_archive', 'description' => __( 'An archive of your site’s posts') ); $this->WP_Widget( 'archivist_archives', 'Archivist', $widget_ops ); } function widget( $args, $instance ) { extract( $args ); $args = wp_parse_args( (array) $args, array( 'title' => '', 'count' => 0, 'dropdown' => '', 'limit' => 0, 'type' => 'monthly' ) ); $c = $instance['count'] ? '1' : '0'; $d = $instance['dropdown'] ? '1' : '0'; $l = $instance['limit']; $t = $instance['type']; $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? __( 'Archives' ) : $instance['title'], $instance, $this->id_base ); echo $before_widget; if ( $title ) echo $before_title . $title . $after_title; $archive_args = array( 'type' => $t, 'show_post_count' => $c ); if ( $l > 0 ) $archive_args['limit'] = $l; if ( $d ) { $archive_args['format'] = 'option'; ?>
id="get_field_id( 'count' ); ?>" name="get_field_name('count'); ?>" />
id="get_field_id( 'dropdown' ); ?>" name="get_field_name( 'dropdown' ); ?>" />