Skip to content

Commit

Permalink
Updated to Widgets standards
Browse files Browse the repository at this point in the history
  • Loading branch information
simplethemes committed Feb 25, 2014
1 parent 8b306ab commit a897626
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
18 changes: 9 additions & 9 deletions smpl-skeleton/sidebar-footer.php
Expand Up @@ -8,7 +8,7 @@
*/

// count the active widgets to determine column sizes
$footerwidgets = is_active_sidebar('first-footer-widget-area') + is_active_sidebar('second-footer-widget-area') + is_active_sidebar('third-footer-widget-area') + is_active_sidebar('fourth-footer-widget-area');
$footerwidgets = is_active_sidebar('footer-widget-area-1') + is_active_sidebar('footer-widget-area-2') + is_active_sidebar('footer-widget-area-3') + is_active_sidebar('footer-widget-area-4');
// default
$footergrid = "one_fourth";
// if only one
Expand All @@ -29,27 +29,27 @@

<?php if ($footerwidgets) : ?>

<?php if (is_active_sidebar('first-footer-widget-area')) : ?>
<?php if (is_active_sidebar('footer-widget-area-1')) : ?>
<div class="<?php echo $footergrid;?>">
<?php dynamic_sidebar('first-footer-widget-area'); ?>
<?php dynamic_sidebar('footer-widget-area-1'); ?>
</div>
<?php endif;?>

<?php if (is_active_sidebar('second-footer-widget-area')) : $last = ($footerwidgets == '2' ? ' last' : false);?>
<?php if (is_active_sidebar('footer-widget-area-2')) : $last = ($footerwidgets == '2' ? ' last' : false);?>
<div class="<?php echo $footergrid.$last;?>">
<?php dynamic_sidebar('second-footer-widget-area'); ?>
<?php dynamic_sidebar('footer-widget-area-2'); ?>
</div>
<?php endif;?>

<?php if (is_active_sidebar('third-footer-widget-area')) : $last = ($footerwidgets == '3' ? ' last' : false);?>
<?php if (is_active_sidebar('footer-widget-area-3')) : $last = ($footerwidgets == '3' ? ' last' : false);?>
<div class="<?php echo $footergrid.$last;?>">
<?php dynamic_sidebar('third-footer-widget-area'); ?>
<?php dynamic_sidebar('footer-widget-area-3'); ?>
</div>
<?php endif;?>

<?php if (is_active_sidebar('fourth-footer-widget-area')) : $last = ($footerwidgets == '4' ? ' last' : false);?>
<?php if (is_active_sidebar('footer-widget-area-4')) : $last = ($footerwidgets == '4' ? ' last' : false);?>
<div class="<?php echo $footergrid.$last;?>">
<?php dynamic_sidebar('fourth-footer-widget-area'); ?>
<?php dynamic_sidebar('footer-widget-area-4'); ?>
</div>
<?php endif;?>
<div class="clear"></div>
Expand Down
4 changes: 2 additions & 2 deletions smpl-skeleton/sidebar-page.php
Expand Up @@ -7,11 +7,11 @@
* @since skeleton 0.1
*/

if ( is_active_sidebar( 'secondary-widget-area' ) ) {
if ( is_active_sidebar( 'sidebar-2' ) ) {

do_action('skeleton_before_sidebar');

dynamic_sidebar( 'secondary-widget-area' );
dynamic_sidebar( 'sidebar-2' );

do_action('skeleton_after_sidebar');

Expand Down
4 changes: 2 additions & 2 deletions smpl-skeleton/sidebar.php
Expand Up @@ -12,9 +12,9 @@
return;
}

if ( is_active_sidebar( 'primary-widget-area' ) ) {
if ( is_active_sidebar( 'sidebar-1' ) ) {
do_action('skeleton_before_sidebar');
dynamic_sidebar( 'primary-widget-area' );
dynamic_sidebar( 'sidebar-1' );
do_action('skeleton_after_sidebar');
}

Expand Down

0 comments on commit a897626

Please sign in to comment.