generate(); } echo $after_widget; } /** Event Calendar widget - control. */ function ec3_widget_cal_control() { $options = $newopts = get_option('ec3_widget_cal'); if( $_POST["ec3_cal_submit"] ) { $newopts['title']=strip_tags(stripslashes($_POST["ec3_cal_title"])); $newopts['num_months'] =max(1,intval($_POST["ec3_cal_num_months"])); $newopts['day_length'] =abs(intval($_POST["ec3_cal_day_length"])); $newopts['navigation'] =intval($_POST["ec3_cal_navigation"]); $newopts['show_only_events']=!empty($_POST["ec3_cal_show_only_events"]); $newopts['hide_logo'] =empty($_POST["ec3_cal_show_logo"]); $newopts['disable_popups'] =empty($_POST["ec3_cal_show_popups"]); } if( $options != $newopts ) { $options = $newopts; update_option('ec3_widget_cal', $options); } require_once(dirname(__FILE__).'/calendar-sidebar.php'); $title = ec3_widget_title($options['title'],'Event Calendar'); $cal = new ec3_SidebarCalendar($options); // Use this to get defaults. ?>

__( 'Display upcoming events in a dynamic calendar.','ec3') . ' (Event-Calendar '. __('Plugin') .')' ) ); register_widget_control('event-calendar','ec3_widget_cal_control'); } add_action('widgets_init', 'ec3_action_widgets_init_cal'); ?>