示例#1
0
 public static function run()
 {
     //check dependency
     require_once ABSPATH . 'wp-admin/includes/plugin.php';
     foreach (static::$dependencies as $item) {
         if (!is_plugin_active($item . "/{$item}.php")) {
             //plugin is not activated
             echo 'Qdmvc: require plugin ' . $item;
             return;
         }
     }
     //require global index
     //Index must be loaded before Model
     //Reason: QdRoot->getDefaultLookupPage
     Qdmvc::loadIndex('index');
     //Script and CSS
     if (is_admin()) {
         if (Qdmvc::IS_QDMVC_PAGE()) {
             //register all jqwidget
             QdJqwidgets::registerAll();
             //load all jqwidget
             QdJqwidgets::loadAll();
         }
     }
     //load phpActiveRecord Model
     Qdmvc::loadModel();
 }