diff --git a/functions.php b/functions.php index f000731..0a02516 100644 --- a/functions.php +++ b/functions.php @@ -839,26 +839,3 @@ function comicpress_gnav_display_css() { } if (comicpress_check_child_file('childfunctions') == false) {} - -/** - * Render the ComicPress calendar widget. - */ -function comicpress_calendar_embed() { - $calendar = new CalendarWidget(); - - $instance = array(); - foreach (array('before_widget', 'after_widget', 'thumbnail', 'link', 'small', 'medium', 'large') as $field) { - $instance[$field] = ''; - } - - $calendar->widget($instance, array()); -} - -/** - * Render the ComicPress bookmark widget. - */ -function comicpress_comic_bookmark_embed() { - $bookmark = new BookmarkWidget(); - $bookmark->init(); - $bookmark->widget(array(), array()); -} diff --git a/functions/widget-template-tags.php b/functions/widget-template-tags.php new file mode 100644 index 0000000..8b617b7 --- /dev/null +++ b/functions/widget-template-tags.php @@ -0,0 +1,48 @@ +widget($instance, array()); +} + +/** + * Render the ComicPress bookmark widget. + */ +function comicpress_comic_bookmark_embed() { + $bookmark = new BookmarkWidget(); + $bookmark->init(); + $bookmark->widget(array(), array()); +} + +/** + * Render the monthly archive dropdown widget + */ +function comicpress_archive_dropdown() { + $archive = new ArchiveDropdownWidget(); + $archive->widget(array(), array('mode' => 'monthly_archive')); +} + +/** + * Render the comic archive dropdown widget + */ +function comicpress_archive_dropdown_comics() { + $archive = new ArchiveDropdownWidget(); + $archive->widget(array(), array('mode' => 'comic_archive')); +} + +/** + * Render the storyline order dropdown widget + */ +function comicpress_archive_dropdown_storyline() { + $archive = new ArchiveDropdownWidget(); + $archive->widget(array(), array('mode' => 'storyline_order')); +}