Example #1
0
 function render_area($area = 'nonarea')
 {
     if (!file_exists(WIDGET_FOLDER . $area) || !file_exists(WIDGET_FOLDER . $area . DIRECTORY_SEPARATOR . 'index.json')) {
         return false;
     }
     $files = json_decode(file_get_contents(WIDGET_FOLDER . $area . DIRECTORY_SEPARATOR . 'index.json'), true);
     $output = '';
     foreach ($files as $file) {
         $output .= render_instance($file, $area);
     }
     return $output;
 }
Example #2
0
 function instance($slug = false, $area = "nonarea")
 {
     return render_instance($slug, $area);
 }