869ee77d by Chris Boden

Updated shortcode file to act like a View

1 parent 927f7552
...@@ -33,11 +33,14 @@ function add_shortcodes($class) { ...@@ -33,11 +33,14 @@ function add_shortcodes($class) {
33 } 33 }
34 } 34 }
35 35
36 function getFileContents($file) { 36 function getFileContents($file, Array $args = Array()) {
37 if (!is_file($file)) { 37 if (!is_file($file)) {
38 throw new Exception("$file not found"); 38 throw new Exception("{$file} not found");
39 } 39 }
40 40
41 extract($args);
42 unset($args);
43
41 ob_start(); 44 ob_start();
42 require($file); 45 require($file);
43 $parsed_contents = ob_get_contents(); 46 $parsed_contents = ob_get_contents();
......