//Table generator require_once 'components/table-packages.php'; //Table generator packages /**************************** LOAD CORE CONTROLLERS ***************************/ require_once 'core/CTXPS_App.php'; //Common, reusable classes, methods, functions require_once 'core/CTXPS_Security.php'; //Most of the permissions-checking code is here require_once 'core/CTXPS_Ajax.php'; //AJAX-specific methods require_once 'core/CTXPS_Router.php'; //All requests for views are sent through here /********************** SPARTAN REQUIREMENT CHECK *****************************/ if (is_admin()) { //If we're accessing a WP admin page, check PHP requirements CTXPS_Queries::check_php_version(); //And check that WP 3.2+ is being used CTXPS_Queries::check_wp_version(); } /******************************** HOOKS ***************************************/ // Install new tables (on activate) register_activation_hook(__FILE__, array('CTXPS_Queries', 'plugin_install')); // Remove tables from db (on delete) register_uninstall_hook(__FILE__, array('CTXPS_Queries', 'plugin_delete')); // Add "Groups" option to "Users" in admin add_action('admin_menu', array('CTXPS_App', 'admin_screens_init')); // Add a "Groups" view to a user's user-edit.php page add_action('edit_user_profile', array('CTXPS_Router', 'user_groups')); // Add a "Groups" view to a user's profile.php page add_action('show_user_profile', array('CTXPS_Router', 'user_groups')); //Add the security box sidebar to the pages section