forked from weblab/cornerstone
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Getting Salman's and Joshs changes into place
- Loading branch information
andrewmbacon
committed
Aug 12, 2014
1 parent
02f8de1
commit d7df22b
Showing
5 changed files
with
452 additions
and
392 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
$absolute_path = explode('wp-content', $_SERVER['SCRIPT_FILENAME']); | ||
$wp_load = $absolute_path[0] . 'wp-load.php'; | ||
require_once($wp_load); | ||
|
||
header("Content-type: text/css; charset: UTF-8"); | ||
header('Cache-control: must-revalidate'); | ||
|
||
$sidebars = wp_get_sidebars_widgets(); | ||
$index = 0; | ||
for ($i=1; $i < 31 ; $i++) { | ||
if( !empty($sidebars['home'.$i]) ){ | ||
if( $i > $index ){ | ||
$index = $i; //$index is the biggest home widget area that has widgets, the next widget area doesn't have widgets | ||
} | ||
} | ||
} | ||
$start = ++$index; | ||
for ($i=$start; $i < 31; $i++) { | ||
echo '#home'.$i.'{ display:none; } '; | ||
} | ||
?> |
Oops, something went wrong.