/**
* Adds the field/container template(s) to the templates stack.
*
* @param object $object field or container object
**/
public function add_templates($object)
{
$templates = $object->get_templates();
if (!$templates) {
return false;
}
foreach ($templates as $name => $callback) {
ob_start();
call_user_func($callback);
$html = ob_get_clean();
// Add the template to the stack
Templater::add_template($name, $html);
}
}