protected function get_brick_html()
{
// Some stuff just to show off features
$this->set_data_item('demo_data_item', 'I am some test data set on the fly by the brick.');
$this->set_data_item('demo_data_item', 'I am some test data set on the fly by the brick in a group.', true, 'demo_group');
$this->set_data_item('demo_data_item_2', 'I am some _more_ test data set on the fly by the brick in a group.', true, 'demo_group');
// Example of how to check if brick has layout
// var_dump($this->has_brick_layout('demo-layout-1'));
// Example of how to get all layouts
// var_dump($this->get_brick_layouts());
$bg_img = $this->get_field('bg_img');
if (!empty($bg_img)) {
$this->set_inline_css('padding-top', '50px');
$this->set_inline_css('background-image', 'url(' . wp_get_attachment_image_url($bg_img, 'full') . ')', 'inner');
}
$this->set_inline_css('border', 'solid 2px #000', 'inner');
$html = '
<div class="row">
<div class="col-xs-12">
<h2>' . $this->get_field('headline') . '</h2>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<ul>';
if ($this->have_rows('buttons')) {
while ($this->have_rows('buttons')) {
$this->the_row();
$html .= '<li>' . $this->get_child_brick_in_repeater('buttons', 'button', 'demo_button')->get_html() . '</li>';
}
}
$html .= '
</ul>
</div>
</div>
';
return $html;
}