Esempio n. 1
0
 function __call($name, $arguments)
 {
     $page_file = pb_backupbuddy::plugin_path() . '/controllers/pages/' . $name . '.php';
     if ($name == 'getting_started') {
         $page_file = pb_backupbuddy::plugin_path() . '/pluginbuddy/_' . $name . '.php';
     }
     if (file_exists($page_file)) {
         // Load from /controllers/pages/PAGE.php if it exists.
         //pb_backupbuddy::load();
         //pb_backupbuddy::init_class_controller(); // Adds ui controller if it doesnt exist yet. EDIT: now handled in pb_backupbuddy::__construct().
         // Display page.
         pb_backupbuddy::load_script('admin.js', true);
         pb_backupbuddy::load_style('admin.css', true);
         pb_backupbuddy::load_script('tooltip.js', true);
         echo '<div class="wrap">';
         require_once $page_file;
         echo '</div>';
         // After page.
         if (pb_backupbuddy::$options['log_level'] == '3' || defined('PB_DEBUG') && PB_DEBUG === true) {
             pb_backupbuddy::debug();
         }
     } else {
         // Not found
         echo '{Missing pages method `' . $name . '`.}';
     }
 }