Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
42ed949a36
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
31 lines (28 sloc) 855 Bytes
<?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');
$rows = get_theme_mod('homepagerows', '2');
$count = 1;
for($i=0; $i<$rows; $i++){
$widths = get_theme_mod('homepage_'.$i, '12');
$widths = explode(',',$widths);
if(count($widths) == 1) $widths[0] = 12;
foreach($widths as $width){
if($width == 0) break;
$count++;
}
}
$hidehomes = array();
$showhomes = array();
for ($i=$count; $i < 61; $i++) {
$hidehomes[] = '#home'.$i;
}
for ($i=1; $i < $count; $i++) {
$showhomes[] = '#home'.$i;
}
echo implode(', ',$hidehomes).' { display:none; } ';
echo implode(', ',$showhomes).' { display:block; } ';
?>