Skip to content

Instantly share code, notes, and snippets.

@Firestorm-Graphics
Created February 26, 2012 10:04
Show Gist options
  • Select an option

  • Save Firestorm-Graphics/1915791 to your computer and use it in GitHub Desktop.

Select an option

Save Firestorm-Graphics/1915791 to your computer and use it in GitHub Desktop.
layout radio function
// This sets up the layouts and styles selected from the devins options panel (old version)
if (!function_exists('genevai7framework_wp_head')) {
function genevai7framework_wp_head() {
global $data;
// Layouts
$layout = $data['layout'];
if ($layout == '') {
$layout = '2c-r-fixed.css';
}
wp_register_style('layout', GENEVA_I7_CSS_LAYOUT_DIRECTORY . $layout );
wp_enqueue_style('layout');
// Kills sidebar if single column layout is selected
if ($layout == '1col-fixed.css'){
add_action('genevai7_sidebar', 'fd_kill_sidebar');
}
// Alt Styles
$alt_style = $data['alt_stylesheet'];
if ($alt_style == '') {
$alt_style = 'default.css';
}
wp_register_style('alt_style',GENEVA_I7_CSS_STYLES_DIRECTORY . $alt_style);
wp_enqueue_style('alt_style');
}
}
add_action('wp_print_styles', 'genevai7framework_wp_head');
function fd_kill_sidebar() {
return FALSE;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment