1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| <?php
function optset($var,$val1,$val2='',$val3='',$val4=''){
$vals = array($val1,$val2,$val3,$val4);
if (in_array($var,$vals)): return false; else: return true; endif;
}
function mantra_custom_styles() {
/* This retrieves admin options. */
$mantra_options= mantra_get_theme_options();
foreach ($mantra_options as $key => $value) {
${"$key"} = esc_attr($value) ;
}
if ($mantra_dimselect=="Absolute") {
$totalwidth= $mantra_sidewidth+$mantra_sidebar+50;
$contentSize = $mantra_sidewidth;
$sidebarSize= $mantra_sidebar;
}
else if ($mantra_dimselect=="Relative") {
$totalwidth= $mantra_sidewidthRel+$mantra_sidebarRel;
$contentSize = intval(($mantra_sidewidthRel/$totalwidth*100)-2);
$sidebarSize= intval(($mantra_sidebarRel/$totalwidth*100)-2);
}
ob_start(); ?>
<style type="text/css">
<?php
/*
* LAYOUT CSS
*/ |
Partager