add option for layout

This commit is contained in:
John Bintz 2009-07-23 11:43:15 -07:00
parent 49f1b79ae4
commit 3e7e892e02
2 changed files with 16 additions and 0 deletions

View File

@ -456,6 +456,14 @@ class ComicPressAddonCore extends ComicPressAddon {
}
return $layouts;
}
function create_layout_options($layouts, $current_layout) {
$output = array();
foreach ($layouts as $layout_filename => $name) {
$output[] = '<option value="' . $layout_filename . '"' . (($layout_filename == $current_layout) ? ' selected="selected"' : '') . '>' . $name . '</option>';
}
return implode("\n", $output);
}
}
?>

View File

@ -11,6 +11,14 @@
</select>
</td>
</tr>
<tr>
<th scope="row" valign="top"><?php _e('Layout', 'comicpress') ?></th>
<td>
<select name="cp[layout]">
<?php echo $this->create_layout_options($this->get_layout_choices(), $this->comicpress->comicpress_options['layout']) ?>
</select>
</td>
</tr>
<?php foreach (array(
'comic_dimensions' => __('Comic Image Dimensions', 'comicpress'),
'rss_dimensions' => __('RSS Feed Image Dimensions', 'comicpress'),