|
|
@ -6,13 +6,13 @@ use Sober\Controller\Controller; |
|
|
|
|
|
|
|
|
|
|
|
class Home extends Controller |
|
|
|
class Home extends Controller |
|
|
|
{ |
|
|
|
{ |
|
|
|
function sidebar_count() { |
|
|
|
function block_count() { |
|
|
|
$c = 0; |
|
|
|
$c = 0; |
|
|
|
foreach(['home-block-one', 'home-block-two', 'home-block-three', 'home-block-four', 'home-block-five'] as $block) { |
|
|
|
foreach(['home-block-one', 'home-block-two', 'home-block-three', 'home-block-four', 'home-block-five'] as $block) { |
|
|
|
if (is_active_sidebar($block)) { |
|
|
|
if (is_active_sidebar($block)) { |
|
|
|
$c++; |
|
|
|
$c++; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return $c; |
|
|
|
return $c; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|