/** Event Calendar module. */ function ec3_k2mod_cal($args) { extract($args); echo $before_module . $before_title . $title . $after_title; ec3_get_calendar(); echo $after_module; }
/** Event Calendar widget. */ function ec3_widget_cal($args) { extract($args); $options = get_option('ec3_widget_cal'); echo $before_widget . $before_title; echo ec3_default_string($options['title'], 'Event Calendar'); echo $after_title; ec3_get_calendar(); echo $after_widget; }
get_header(); ?> <div id="section"><div class="content"><h1 class="entry-title"> Calendar </h1></div></div> <div id="main" class="wide"> <div class="content"> <div id="primary"> hey <div id="post-<?php the_ID(); ?> " <?php post_class(); ?> > <div id="wp-calendar"><?php ec3_get_calendar(); ?> </div> </div> </div> <div class="clear"></div> </div> </div> <?php get_footer();
/** * @desc Output of plugin composing the list_cats function call * @author Georg Leciejewski */ function widget_king_calendar($args, $number = 1) { # $args is an array of strings that help widgets to conform to # the active theme: before_widget, before_title, after_widget, # and after_title are the array keys. Default tags: li and h2. extract($args, EXTR_PREFIX_ALL, "default"); $options = get_option('widget_king_calendar'); $title = $options[$number]['title']; $use_events = $options[$number]['use_events'] ? 1 : 0; $show_category = $options[$number]['show_category'] ? 1 : 0; $category_id = $options[$number]['category_id']; $show_on_site_area = $options[$number]['show_on_site_area'] ? 1 : 0; $site_area_id = $options[$number]['site_area_id']; $site_area = $options[$number]['site_area']; $before_widget = empty($options[$number]['before_widget']) ? $default_before_widget : stripslashes($options[$number]['before_widget']); $before_widget_title = empty($options[$number]['before_widget_title']) ? $default_before_title : stripslashes($options[$number]['before_widget_title']); $after_widget_title = empty($options[$number]['after_widget_title']) ? $default_after_title : stripslashes($options[$number]['after_widget_title']); $after_widget = empty($options[$number]['after_widget']) ? $default_after_widget : stripslashes($options[$number]['after_widget']); # These lines generate our output. if (!empty($use_events)) { #if events calendar mode if (!empty($category_id)) { #if specific category is selected $post = $wp_query->post; if (in_category($category_id)) { echo $before_widget . "\n"; echo $before_widget_title . "\n"; echo $title . "\n"; echo $after_widget_title . "\n"; ec3_get_calendar(); echo $after_widget . "\n"; } #else{} } elseif (!empty($show_on_site_area)) { #if sitearea is selected if ($site_area($site_area_id)) { echo $before_widget . "\n"; echo $before_widget_title . "\n"; echo $title . "\n"; echo $after_widget_title . "\n"; ec3_get_calendar(); echo $after_widget . "\n"; } #else{} } else { #no category id selected echo $before_widget . "\n"; echo $before_widget_title . "\n"; echo $title . "\n"; echo $after_widget_title . "\n"; ec3_get_calendar(); echo $after_widget . "\n"; } } else { #if normal calendar Mode if (!empty($category_id)) { #if specific category is selected $post = $wp_query->post; if (in_category($category_id)) { echo $before_widget . "\n"; echo $before_widget_title . "\n"; echo $title; echo $after_widget_title . "\n"; get_calendar(); echo $after_widget . "\n"; } #else{} } elseif (!empty($show_on_site_area)) { #if sitearea is selected if ($site_area($site_area_id)) { echo $before_widget . "\n"; echo $before_widget_title . "\n"; echo $title; echo $after_widget_title . "\n"; get_calendar(); echo $after_widget . "\n"; } #else{} } else { #no category id selected echo $before_widget . "\n"; echo $before_widget_title . "\n"; echo $title; echo $after_widget_title . "\n"; get_calendar(); echo $after_widget . "\n"; } } #endif normal calendar or events }
/** DO NOT USE. This function is for backwards compatibility. */ function ec2_get_calendar() { ec3_get_calendar(); }