public add_layout ( |
||
$layout | ||
return |
public function add_layout($layout)
{
$this->settings['layouts'][] = $layout->get_settings();
return $layout;
}
/** * */ public function set_fields() { $fc = new acf_fields\flexible_content('Modules', 'modules', '1509111554i'); $l = new layout('', 'l1', '1509111555a'); $l->add_brick(new demo_video('video', '1509111556x')); $fc->add_layout($l); $l = new layout('', 'l2', '1509111557u'); $l->add_brick(new demo_button('button', '1509111556s')); $fc->add_layout($l); $this->add_flexible_content($fc); }