| 1 |
<?php |
| 2 |
|
| 3 |
namespace ResponsiveMenu\View; |
| 4 |
|
| 5 |
class FrontView implements View |
| 6 |
{ |
| 7 |
|
| 8 |
public function render($location, $l = []) |
| 9 |
{ |
| 10 |
add_action('wp_footer', function() use ($location, $l) { |
| 11 |
include dirname(dirname(dirname(__FILE__))) . '/views/' . $location . '.phtml'; |
| 12 |
}); |
| 13 |
} |
| 14 |
|
| 15 |
public function make($location, $l = []) |
| 16 |
{ |
| 17 |
ob_start(); |
| 18 |
include dirname(dirname(dirname(__FILE__))) . '/views/' . $location . '.phtml'; |
| 19 |
$output = ob_get_contents(); |
| 20 |
ob_end_clean(); |
| 21 |
return $output; |
| 22 |
} |
| 23 |
|
| 24 |
} |
| 25 |
|