protected function get_template(\Twig_Environment $env, $context, $type, $name = null)
{
try {
$return = twig_include($env, $context, $this->get_templates($type, $name));
do_action('get_' . $type, $name);
} catch (\Twig_Error_Loader $e) {
ob_start();
call_user_func('get_' . $type, $name);
$return = ob_get_clean();
}
return $return;
}