$default_sidebar = false; } // general blog sidebars if ($avia_config['currently_viewing'] == 'blog' && dynamic_sidebar('Sidebar Blog (' . $sidebar . ')')) { $default_sidebar = false; } // general pages sidebars if ($avia_config['currently_viewing'] == 'page' && dynamic_sidebar('Sidebar Pages (' . $sidebar . ')')) { $default_sidebar = false; } $custom_widget_area = avia_check_custom_widget('page'); //unique Page sidebars: if (function_exists('dynamic_sidebar') && dynamic_sidebar('Page: ' . $custom_widget_area . ' (' . $sidebar . ')')) { $default_sidebar = false; } $custom_widget_area = avia_check_custom_widget('cat'); //unique Category sidebars: if (function_exists('dynamic_sidebar') && dynamic_sidebar('Category: ' . $custom_widget_area . ' (' . $sidebar . ')')) { $default_sidebar = false; } //sidebar area displayed everywhere if (function_exists('dynamic_sidebar') && dynamic_sidebar('Displayed Everywhere (' . $sidebar . ')')) { $default_sidebar = false; } //default dummy sidebar if ($default_sidebar) { avia_dummy_widget(2); avia_dummy_widget(3); avia_dummy_widget(4); } echo "</div>";
} } } #extra widgets for categories $id_array = avia_check_custom_widget('cat', 'ids'); if (isset($id_array[0])) { foreach ($id_array as $cat_id) { foreach ($sidebars_to_show as $sidebar) { if ($cat_id != "") { register_sidebar(array('name' => 'Category: ' . get_the_category_by_ID($cat_id) . ' (' . $sidebar . ')', 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3 class="widgettitle">', 'after_title' => '</h3>')); } } } } #extra widgets for categories $name_array = avia_check_custom_widget('dynamic_template'); if (isset($name_array)) { foreach ($name_array as $name) { if ($name != "") { register_sidebar(array('name' => 'Dynamic Template: Widget ' . $name, 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3 class="widgettitle">', 'after_title' => '</h3>')); } } } } function avia_dummy_widget($number) { switch ($number) { case 1: ?> <div class='widget'> <h3 class='widgettitle'><?php