$block_content = $custom_block->content; } } else { $block_content = ''; } } else { if (empty($block_content)) { $class_containg_block = new $records->reference_table(); $method_name = $records->name . '_block'; $parameters['block_id'] = $records->block_id; $block_content = call_user_func(array($class_containg_block, $method_name), $parameters); } } if ($block_cache && !empty($block_content)) { $bc->block_data = serialize($block_content); $bc->create(); } if (!empty($block_content) && $show_block_flag == 1) { foreach (block::$position_array as $key => $value) { if ($position == $value) { if ($value == 'footer_top') { $block_value = '<div class="col-sm-3 blog-sidebar">'; $block_value .= "<div class=\"block {$position} {$reference_table} block_{$block_count} \">"; if (!empty($records->show_title_cb) && $records->show_title_cb == true) { $block_value .= "<div class=\"headerBgColor title {$reference_table}\" > {$title} </div>"; } $block_value .= "<div class=\"content {$reference_table} \" > {$block_content} </div>"; $block_value .= "</div></div>"; } else { if ($value == 'header_top') { $block_value = "<div class=\"block {$position} {$reference_table} block_{$block_count} \">";