Source code quote in PHPn° 177
July 21, 2014 am31 11:31
foreach($menus as &$menu) {
$column_count = $menu['count'] / $columns;
$column = 1;
$blocks = array();
foreach($menu['data'] as $md) {
if($md['cumulative_count'] > ( ($column_count * $column) * 1.15 ) ) { /* 15% more height... because fuck you, that's why ! */
$column++;
}
$blocks[$column][] = $md;
}
$menu['blocks'] = $blocks;
}