my function is not worked.
$displayon = "display:none !important";
$displayoff = "padding:0";
$displayres = "responsive";
$displayres1 = "responsive1";
function displays($check)
{
if ($display1 OR $display2 OR $display3 OR $display4 == $displayon){
echo $displayres1;
return true;
}
else {
echo $displayres;
}
}
and
<div class="<?php if (displays($check) == true){echo $check;};?>"style="<?php echo $display1;?>">
<div class="<?php if (displays($check) == true){echo $check;};?>"style="<?php echo $display2;?>">
<div class="<?php if (displays($check) == true){echo $check;};?>"style="<?php echo $display3;?>">
<div class="<?php if (displays($check) == true){echo $check;};?>"style="<?php echo $display4;?>">
But not worked.
I want if "$display1 or $display2 or ..." was equal to "$displayon" , Use responsive1. Otherwise, use responsive.
I have a photo gallery of 4 columns.
In the module, you can disable each column.
I want the responsive to become 3 columns if a column is disabled.
And if two columns are disabled, responsive becomes 2 columns.
Each display (display1,2,3,4) represents a column.