quiztech-assessment-platform/quiztech-assessment-platform.php

88 lines
No EOL
2.6 KiB
PHP

<?php
/**
* Plugin Name: Quiztech Assessment Platform
* Plugin URI: https://quiztech.com/
* Description: A platform for creating assessments, inviting applicants, and managing results.
* Version: 0.1.0
* Requires at least: 5.2
* Requires PHP: 7.2
* Author: Your Name / Company Name
* Author URI: https://yourwebsite.com/
* License: GPL v2 or later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: quiztech
* Domain Path: /languages
*/
// If this file is called directly, abort.
if ( ! \defined( 'WPINC' ) ) {
\die;
}
/**
* Define constants
*/
\define( 'QUIZTECH_VERSION', '0.1.0' );
\define( 'QUIZTECH_PLUGIN_DIR', \plugin_dir_path( __FILE__ ) );
\define( 'QUIZTECH_PLUGIN_URL', \plugin_dir_url( __FILE__ ) );
\define( 'QUIZTECH_PLUGIN_FILE', __FILE__ );
/**
* Load Composer autoloader.
*/
require_once __DIR__ . '/vendor/autoload.php';
/**
* Load plugin dependencies. (Now handled by autoloading)
*/
// require_once QUIZTECH_PLUGIN_DIR . 'includes/post-types.php'; // Autoloaded
// require_once QUIZTECH_PLUGIN_DIR . 'includes/taxonomies.php'; // Autoloaded
// require_once QUIZTECH_PLUGIN_DIR . 'includes/roles.php'; // Autoloaded
/**
* The core plugin class that is used to define internationalization,
* admin-specific hooks, and public-facing site hooks.
*/
// require plugin_dir_path( __FILE__ ) . 'includes/class-quiztech.php';
/**
* Begins execution of the plugin.
*
* Since everything within the plugin is registered via hooks,
* then kicking off the plugin from this point in the file does
* not affect the page life cycle.
*
* @since 0.1.0
*/
function run_quiztech() {
// $plugin = new Quiztech();
// $plugin->run();
}
// run_quiztech();
// Placeholder for activation/deactivation hooks
\register_activation_hook( __FILE__, __NAMESPACE__ . '\activate_quiztech' );
\register_deactivation_hook( __FILE__, __NAMESPACE__ . '\deactivate_quiztech' );
/**
* The code that runs during plugin activation.
* This action is documented in includes/class-quiztech-activator.php
*/
function activate_quiztech() {
// Call the namespaced function
\Quiztech\AssessmentPlatform\Includes\quiztech_add_roles_and_capabilities();
\flush_rewrite_rules(); // Ensure rewrite rules are updated for CPTs/taxonomies
}
/**
* The code that runs during plugin deactivation.
* This action is documented in includes/class-quiztech-deactivator.php
*/
function deactivate_quiztech() {
// Call the namespaced function
\Quiztech\AssessmentPlatform\Includes\quiztech_remove_roles_and_capabilities();
\flush_rewrite_rules(); // Clean up rewrite rules
}
?>