for child themes, setting:

global $avail_layouts;
$avail_layouts = '3c,standard,v';

in the childfunctions.php file in the childtheme directory will set what layouts are available.

Signed-off-by: Philip M. Hofer (Frumph) <frumph_dragon@yahoo.com>
This commit is contained in:
Philip M. Hofer (Frumph) 2009-12-31 00:35:29 -08:00
parent 2297c16ea9
commit 5de0427d66
2 changed files with 4 additions and 8 deletions

View File

@ -30,14 +30,10 @@ function comicpress_admin() {
<div class="clear"></div>
<?php
$tab = '';
if ( isset($_POST['_wponce']) && wp_verify_nonce($_POST['_wpnonce'], 'update-options') ) {
if ( wp_verify_nonce($_POST['_wpnonce'], 'update-options') ) {
if ($_REQUEST['action'] == 'comicpress_save_layout') {
foreach (array(
'cp_theme_layout'
) as $key) {
$comicpress_options[$key] = wp_filter_nohtml_kses($_REQUEST[$key]);
}
$comicpress_options['cp_theme_layout'] = wp_filter_nohtml_kses($_REQUEST['cp_theme_layout']);
$tab = 'themestyle';
update_option('comicpress_options',$comicpress_options);
}

View File

@ -20,9 +20,9 @@
<th colspan="4"><?php _e('Layout','comicpress'); ?></th>
</tr>
</thead>
<?php $avail_layouts = ''; ?>
<?php global $avail_layouts; ?>
<tr class="alternate">
<th scope="row" style="width:250px" valign="top"><label for="cp_theme_layout" style="text-align:left"><?php _e('Choose Your Website Layout','comicpress'); ?></label>
<th scope="row" style="width:250px"><label for="cp_theme_layout" style="text-align:left"><?php _e('Choose Your Website Layout','comicpress'); ?></label>
<select name="cp_theme_layout" id="cp_theme_layout" onchange="showimage(this,'cpthemestyle')">
<?php if (is_cp_layout_avail('standard',$avail_layouts)) { ?>
<option class="level-0" value="standard" <?php if ($comicpress_options['cp_theme_layout'] == 'standard') { ?>selected="selected" <?php } ?>><?php _e('2 Column - Standard','comicpress'); ?></option>