move widget template tags to separate file and build tags for archive dropdown

This commit is contained in:
John Bintz 2009-12-15 06:34:26 -05:00
parent 6eeed97896
commit cb83eeb049
2 changed files with 48 additions and 23 deletions

View File

@ -839,26 +839,3 @@ function comicpress_gnav_display_css() {
} }
if (comicpress_check_child_file('childfunctions') == false) {} 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());
}

View File

@ -0,0 +1,48 @@
<?php
/**
* 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());
}
/**
* 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'));
}