コード例 #1
0
 /**
  * This is the registered function calls for the Connections admin pages as registered
  * using the add_menu_page() and add_submenu_page() WordPress functions.
  *
  * @access private
  * @since unknown
  */
 public static function showPage()
 {
     // Grab an instance of the Connections object.
     $instance = Connections_Directory();
     if ($instance->dbUpgrade) {
         include_once CN_PATH . 'includes/inc.upgrade.php';
         connectionsShowUpgradePage();
         return;
     }
     switch ($_GET['page']) {
         case 'connections_dashboard':
             include_once CN_PATH . 'includes/admin/pages/dashboard.php';
             connectionsShowDashboardPage();
             break;
         case 'connections_manage':
             include_once CN_PATH . 'includes/admin/pages/manage.php';
             $action = isset($_GET['cn-action']) && !empty($_GET['cn-action']) ? $_GET['cn-action'] : '';
             connectionsShowViewPage(esc_attr($action));
             break;
         case 'connections_add':
             include_once CN_PATH . 'includes/admin/pages/manage.php';
             connectionsShowViewPage('add_entry');
             break;
         case 'connections_categories':
             include_once CN_PATH . 'includes/admin/pages/categories.php';
             connectionsShowCategoriesPage();
             break;
         case 'connections_settings':
             include_once CN_PATH . 'includes/admin/pages/settings.php';
             connectionsShowSettingsPage();
             break;
         case 'connections_tools':
             include_once CN_PATH . 'includes/admin/pages/tools.php';
             connectionsShowToolsPage();
             break;
         case 'connections_templates':
             include_once CN_PATH . 'includes/admin/pages/templates.php';
             connectionsShowTemplatesPage();
             break;
         case 'connections_roles':
             include_once CN_PATH . 'includes/admin/pages/roles.php';
             connectionsShowRolesPage();
             break;
     }
 }
コード例 #2
0
ファイル: connections.php プロジェクト: realfluid/umbaugh
 /**
  * This is the registered function calls for the Connections admin pages as registered
  * using the add_menu_page() and add_submenu_page() WordPress functions.
  */
 public function showPage()
 {
     if ($this->options->getVersion() < CN_CURRENT_VERSION) {
         //echo $this->options->getVersion() . '<div id="message" class="error"><p><strong>ERROR: </strong>The version of Connections installed is newer than the version last activated. Please deactive and then reactivate Connections.</p></div>';
         //return;
         $this->initOptions();
         $this->options->setVersion(CN_CURRENT_VERSION);
     }
     if ($this->options->getDBVersion() < CN_DB_VERSION) {
         include_once dirname(__FILE__) . '/includes/inc.upgrade.php';
         connectionsShowUpgradePage();
         return;
     }
     //if ( get_option('connections_activated') )
     //{
     //echo '<div id="message" class="updated fade"><p><strong>' . get_option('connections_activated') . '</strong></p></div>';
     // Remove the admin install message set during activation.
     //delete_option('connections_installed');
     //}
     switch ($_GET['page']) {
         case 'connections':
             include_once dirname(__FILE__) . '/submenus/view.php';
             connectionsShowViewPage();
             break;
             //case 'connections&action=add_new':
             //include_once ( dirname (__FILE__) . '/submenus/view.php' );
             //connectionsShowAddPage();
             //connectionsShowViewPage();
             //break;
         //case 'connections&action=add_new':
         //include_once ( dirname (__FILE__) . '/submenus/view.php' );
         //connectionsShowAddPage();
         //connectionsShowViewPage();
         //break;
         case 'connections_categories':
             include_once dirname(__FILE__) . '/submenus/categories.php';
             connectionsShowCategoriesPage();
             break;
         case 'connections_settings':
             include_once dirname(__FILE__) . '/submenus/settings.php';
             connectionsShowSettingsPage();
             break;
         case 'connections_templates':
             include_once dirname(__FILE__) . '/submenus/templates.php';
             connectionsShowTemplatesPage();
             break;
         case 'connections_roles':
             include_once dirname(__FILE__) . '/submenus/roles.php';
             connectionsShowRolesPage();
             break;
         case 'connections_help':
             include_once dirname(__FILE__) . '/submenus/help.php';
             connectionsShowHelpPage();
             break;
     }
 }