/** * Create the required attributes for the #primary container * * @since 1.0.0 */ function bavotasan_primary_attr() { $push = ''; if (is_bavotasan_full_width()) { $class = 'col-sm-12'; } else { $bavotasan_theme_options = bavotasan_theme_options(); $primary = str_replace('col-md-', '', $bavotasan_theme_options['primary']); $secondary = is_active_sidebar('second-sidebar') ? str_replace('col-md-', '', $bavotasan_theme_options['secondary']) : 12 - $primary; $tertiary = 12 - $primary - $secondary; $class = $bavotasan_theme_options['primary']; if (is_active_sidebar('second-sidebar')) { $push = 'left' == $bavotasan_theme_options['layout'] ? ' col-md-push-' . ($secondary + $tertiary) : ''; $push = 'separate' == $bavotasan_theme_options['layout'] ? ' col-md-push-' . $secondary : $push; } else { $class = 'left' == $bavotasan_theme_options['layout'] ? $class . ' pull-right' : $class; } } echo 'class="' . esc_attr($class) . esc_attr($push) . '"'; }
<?php /** * The first/left sidebar widgetized area. * * If no active widgets in sidebar, default login widget will appear. * * @since 1.0.0 */ if (!is_bavotasan_full_width()) { ?> <div id="secondary" <?php bavotasan_sidebar_class(); ?> role="complementary"> <?php if (!dynamic_sidebar('sidebar')) { ?> <aside id="meta" class="widget"> <h3 class="widget-title"><?php _e('Default Widget', 'matheson'); ?> </h3> <p><?php printf(__('This is just a default widget. It\'ll disappear as soon as you add your own widgets on the %sWidgets admin page%s.', 'matheson'), '<a href="' . admin_url('widgets.php') . '">', '</a>'); ?> </p> <p><?php _e('Below is an example of an unordered list.', 'matheson'); ?>