Skip to content

Instantly share code, notes, and snippets.

@Firestorm-Graphics
Created February 26, 2012 10:07
Show Gist options
  • Save Firestorm-Graphics/1915798 to your computer and use it in GitHub Desktop.
Save Firestorm-Graphics/1915798 to your computer and use it in GitHub Desktop.
group-radio-wp-alchemy
// from sidebar-meta.php
<?php $sidebar_mb = array(
'default.css',
'2c-l-fixed.css',
'2c-r-fixed.css',
'1col-fixed.css'
);
?>
<?php foreach ($sidebar_mb as $i => $sidebar): ?>
<?php $mb->the_field('s_bar'); ?>
<input type="radio" name="<?php $mb->the_name(); ?>" value="<?php echo $sidebar; ?>"<?php $mb->the_radio_state($sidebar); ?>/>
<img src="<?php bloginfo('template_directory');?>/admin/images/<?php echo $sidebar; ?>.png"/>
<?php endforeach; ?>
// from sidebar-spec.php
$sidebar_mb = new WPAlchemy_MetaBox(array
(
'id' => '_sidebar_meta',
'title' => $shortname. ' Sidebar Options',
'types' => array('page'), // added only for pages
'context' => 'normal', // same as above, defaults to "normal"
'priority' => 'high', // same as above, defaults to "high"
'hide_title' => TRUE, // defaults to NULL
'template' => get_template_directory() . '/admin/lib/meta/sidebar-meta.php',
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment