public static function output_fd_page()
 {
     $get_pluginData = get_plugin_data(plugin_dir_path(__FILE__) . '../index.php');
     $plugin_version = get_option('ULTIMATE_CSV_IMPORTER_UPGRADE_FREE_VERSION');
     if (!$plugin_version) {
         $plugin_version = get_option('ULTIMATE_CSV_IMP_FREE_VERSION');
     }
     if ($get_pluginData['Version'] == '3.6' && $plugin_version == '') {
         if (file_exists(WP_CONST_ULTIMATE_CSV_IMP_DIRECTORY . '/upgrade/migrationfreev3.6.php')) {
             require_once WP_CONST_ULTIMATE_CSV_IMP_DIRECTORY . '/upgrade/migrationfreev3.6.php';
             die;
         }
     } else {
         if (!isset($_REQUEST['__module'])) {
             if (!isset($_REQUEST['__module'])) {
                 wp_redirect(get_admin_url() . 'admin.php?page=' . WP_CONST_ULTIMATE_CSV_IMP_SLUG . '/index.php&__module=dashboard');
             }
         }
     }
     require_once WP_CONST_ULTIMATE_CSV_IMP_DIRECTORY . 'config/settings.php';
     require_once WP_CONST_ULTIMATE_CSV_IMP_DIRECTORY . 'lib/skinnymvc/controller/SkinnyController.php';
     $c = new SkinnyControllerWPCsvFree();
     $c->main();
 }
예제 #2
0
 /**
  * Makes a call to the specified module+action and returns back to the caller
  * @param string $module
  * @param string $action
  * @param array $request
  * @return array
  */
 public function call($module = 'default', $action = 'index', $request = array('GET' => array(), 'POST' => array()))
 {
     $moduleClass = SkinnyControllerWPCsvFree::camelize($module) . 'Actions';
     $actionMethod = 'execute' . SkinnyControllerWPCsvFree::camelize($action);
     $moduleObj = new $moduleClass();
     if ($moduleObj->authenticatedOnly()) {
         if (!$this->skinnyUser->isAuthenticated()) {
             //Not authenticated!
             return null;
         }
     }
     if (is_callable(array($moduleObj, $actionMethod))) {
         $data = call_user_func_array(array($moduleObj, $actionMethod), array($request));
         if (SkinnySettings::$CONFIG['debug']) {
             global $__DEBUG;
             array_push($__DEBUG['data'], $data);
         }
     }
     return $data;
 }