コード例 #1
0
ファイル: bootstrap.php プロジェクト: outlinez/Unyson
 function _action_init_framework()
 {
     remove_action('after_setup_theme', '_action_init_framework');
     include dirname(__FILE__) . '/bootstrap-helpers.php';
     include dirname(__FILE__) . '/deprecated-constants.php';
     require fw_get_framework_directory('/core/Fw.php');
     fw();
     /**
      * Load helpers
      */
     foreach (array('meta', 'class-fw-access-key', 'class-fw-dumper', 'general', 'class-fw-wp-filesystem', 'class-fw-cache', 'class-fw-form', 'class-fw-request', 'class-fw-session', 'class-fw-wp-option', 'class-fw-wp-post-meta', 'database', 'class-fw-flash-messages', 'class-fw-resize') as $file) {
         require fw_get_framework_directory('/helpers/' . $file . '.php');
     }
     /**
      * Load (includes) other functionality
      */
     foreach (array('hooks', 'option-types') as $file) {
         require fw_get_framework_directory('/includes/' . $file . '.php');
     }
     /**
      * Init components
      */
     foreach (fw() as $component_name => $component) {
         if ($component_name === 'manifest') {
             continue;
         }
         /** @var FW_Component $component */
         $component->_call_init();
     }
     /**
      * For Flash Message Helper:
      * just start session before headers sent
      * to prevent: Warning: session_start(): Cannot send session cookie - headers already sent, if flash added to late
      */
     FW_Session::get(-1);
     do_action('fw_init');
 }
コード例 #2
0
 private static function set_messages(array $messages)
 {
     FW_Session::set(self::$session_key, $messages);
 }
コード例 #3
0
ファイル: bootstrap.php プロジェクト: AdsonCicilioti/Unyson
}
fw();
/**
 * Load helpers
 */
foreach (array('post-meta', 'class-fw-access-key', 'class-fw-dumper', 'general', 'class-fw-wp-filesystem', 'class-fw-cache', 'class-fw-form', 'class-fw-request', 'class-fw-session', 'class-fw-wp-option', 'class-fw-wp-post-meta', 'database', 'class-fw-flash-messages', 'class-fw-resize') as $file) {
    require FW_DIR . '/helpers/' . $file . '.php';
}
/**
 * Load (includes) other functionality
 */
foreach (array('hooks', 'option-types') as $file) {
    require FW_DIR . '/includes/' . $file . '.php';
}
/**
 * Init components
 */
foreach (fw() as $component_name => $component) {
    if ($component_name === 'manifest') {
        continue;
    }
    /** @var FW_Component $component */
    $component->_call_init();
}
/**
 * For Flash Message Helper:
 * just start session before headers sent
 * to prevent: Warning: session_start(): Cannot send session cookie - headers already sent if flash added to late
 */
FW_Session::get(-1);
do_action('fw_init');