コード例 #1
0
ファイル: loader.php プロジェクト: rebeccayshen/kitlist
 public static function doAutoLoad()
 {
     // allow deps for plugins loaded before cred
     $extra_deps = apply_filters('cred_loader_dependencies', array());
     if (!empty($extra_deps)) {
         self::$__dependencies__ = self::merge(self::$__dependencies__, $extra_deps);
     }
     // allow deps for plugins loaded before cred
     $extra_assets = apply_filters('cred_loader_assets', array());
     if (!empty($extra_assets)) {
         self::$__assets__ = self::merge(self::$__assets__, $extra_assets);
     }
     // auto load dependencies that have registered and need to auto load
     do_action('cred_loader_auto_load');
 }
コード例 #2
0
ファイル: loader.php プロジェクト: adisonc/MaineLearning
 public static function init($deps = false)
 {
     // init dependencies paths, if any
     self::$__dependencies__ = array(self::_CONTROLLER_ => array(self::_PREFIX_ => CRED_NAME . '_', self::_SUFFIX_ => '_Controller', self::_PARENT_ => array('class' => 'CRED_Abstract_Controller', 'path' => CRED_CONTROLLERS_PATH . '/Abstract_Controller.php'), 'Forms' => array(array('class' => 'CRED_Forms_Controller', 'path' => CRED_CONTROLLERS_PATH . '/Forms_Controller.php')), 'Posts' => array(array('class' => 'CRED_Posts_Controller', 'path' => CRED_CONTROLLERS_PATH . '/Posts_Controller.php')), 'Settings' => array(array('class' => 'CRED_Settings_Controller', 'path' => CRED_CONTROLLERS_PATH . '/Settings_Controller.php')), 'Generic_Fields' => array(array('class' => 'CRED_Generic_Fields_Controller', 'path' => CRED_CONTROLLERS_PATH . '/Generic_Fields_Controller.php'))), self::_MODEL_ => array(self::_PREFIX_ => CRED_NAME . '_', self::_SUFFIX_ => '_Model', self::_PARENT_ => array('class' => 'CRED_Abstract_Model', 'path' => CRED_MODELS_PATH . '/Abstract_Model.php'), 'Forms' => array(array('class' => 'CRED_Forms_Model', 'path' => CRED_MODELS_PATH . '/Forms_Model.php')), 'Settings' => array(array('class' => 'CRED_Settings_Model', 'path' => CRED_MODELS_PATH . '/Settings_Model.php')), 'Fields' => array(array('class' => 'CRED_Fields_Model', 'path' => CRED_MODELS_PATH . '/Fields_Model.php'))), self::_LIST_TABLE_ => array(self::_PREFIX_ => CRED_NAME . '_', self::_SUFFIX_ => '_List_Table', self::_PARENT_ => array('class' => 'WP_List_Table', 'path' => ABSPATH . '/wp-admin/includes/class-wp-list-table.php'), 'Forms' => array(array('class' => 'CRED_Forms_List_Table', 'path' => CRED_TABLES_PATH . '/Forms_List_Table.php')), 'Custom_Fields' => array(array('class' => 'CRED_Custom_Fields_List_Table', 'path' => CRED_TABLES_PATH . '/Custom_Fields_List_Table.php'))), self::_CLASS_ => array(self::_PREFIX_ => CRED_NAME . '_', self::_SUFFIX_ => '', 'CRED' => array(array('class' => 'CRED_CRED', 'path' => CRED_CLASSES_PATH . '/CRED.php')), 'Form_Builder' => array(array('class' => 'CRED_Form_Builder', 'path' => CRED_CLASSES_PATH . '/Form_Builder.php')), 'Form_Processor' => array(array('class' => 'CRED_Form_Processor', 'path' => CRED_CLASSES_PATH . '/Form_Processor.php')), 'XML_Processor' => array(array('class' => 'CRED_XML_Processor', 'path' => CRED_CLASSES_PATH . '/XML_Processor.php')), 'Mail_Handler' => array(array('class' => 'CRED_Mail_Handler', 'path' => CRED_CLASSES_PATH . '/Mail_Handler.php')), 'Shortcode_Parser' => array(array('class' => 'CRED_Shortcode_Parser', 'path' => CRED_CLASSES_PATH . '/Shortcode_Parser.php')), 'Router' => array(array('class' => 'CRED_Router', 'path' => CRED_CLASSES_PATH . '/Router.php')), 'Ajax_Router' => array(array('class' => 'CRED_Ajax_Router', 'path' => CRED_CLASSES_PATH . '/Ajax_Router.php'))), self::_THIRDPARTY_ => array(self::_PREFIX_ => '', self::_SUFFIX_ => '', 'MyZebra_Form' => array(array('class' => 'MyZebra_Form', 'path' => CRED_THIRDPARTY_PATH . '/zebra_form/MyZebra_Form.php')), 'MyZebra_Parser' => array(array('class' => 'MyZebra_Parser', 'path' => CRED_THIRDPARTY_PATH . '/zebra_form/MyZebra_Parser.php'))), self::_VIEW_ => array(self::_PREFIX_ => '', self::_SUFFIX_ => '', 'custom_fields' => array(array('path' => CRED_VIEWS_PATH . '/custom_fields.php')), 'forms' => array(array('path' => CRED_VIEWS_PATH . '/forms.php')), 'settings' => array(array('path' => CRED_VIEWS_PATH . '/settings.php')), 'help' => array(array('path' => CRED_VIEWS_PATH . '/help.php'))));
 }