'widget_calendar widget_sp_event_calendar', 'description' => __( 'A calendar of events.', 'sportspress' ) ); parent::__construct('sp_event_calendar', __( 'SportsPress Events Calendar', 'sportspress' ), $widget_ops); } function widget( $args, $instance ) { extract($args); $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base); $id = empty($instance['id']) ? null : $instance['id']; $show_all_events_link = empty($instance['show_all_events_link']) ? false : $instance['show_all_events_link']; echo $before_widget; if ( $title ) echo $before_title . $title . $after_title; echo '
'sp_calendar', 'show_option_all' => __( 'All', 'sportspress' ), 'name' => $this->get_field_name('id'), 'id' => $this->get_field_id('id'), 'selected' => $id, 'values' => 'ID', 'class' => 'sp-event-calendar-select widefat', ); if ( ! sp_dropdown_pages( $args ) ): sp_post_adder( 'sp_calendar', __( 'Add New', 'sportspress' ) ); endif; ?>