999c2cc866
dry up redundencies
66 lines
2.1 KiB
PHP
66 lines
2.1 KiB
PHP
<?php
|
|
/**
|
|
* Plugin Name: Hi-School Slide Manager
|
|
* Plugin URI: https://hi-school.com/slide-manager
|
|
* Description: Multi-site slide management system for Hi-School websites. Allows staff to create and schedule slides on the main site, display them as headers on companion sites via REST API, with advanced preview and editing capabilities.
|
|
* Version: 1.1.1
|
|
* Author: Hi-School Development Team
|
|
* Author URI: https://hi-school.com
|
|
* License: GPL v2 or later
|
|
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
|
* Text Domain: hi-school-slide-manager
|
|
* Domain Path: /languages
|
|
* Network: false
|
|
* Requires at least: 5.0
|
|
* Tested up to: 6.4
|
|
* Requires PHP: 7.4
|
|
*/
|
|
|
|
// Prevent direct access
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
exit( 'Direct access forbidden.' );
|
|
}
|
|
|
|
// Plugin constants
|
|
define( 'HSSM_VERSION', '1.1.1' );
|
|
define( 'HSSM_PLUGIN_FILE', __FILE__ );
|
|
define( 'HSSM_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
|
define( 'HSSM_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
|
define( 'HSSM_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
|
|
|
// Database table names (if needed for future features)
|
|
// define( 'HSSM_SLIDES_TABLE', 'hssm_slides' );
|
|
// define( 'HSSM_SITES_TABLE', 'hssm_companion_sites' );
|
|
|
|
// Include core files
|
|
require_once HSSM_PLUGIN_DIR . 'includes/class-hssm-autoloader.php';
|
|
require_once HSSM_PLUGIN_DIR . 'includes/class-hssm-main.php';
|
|
|
|
|
|
/**
|
|
* Initialize the Hi-School Slide Manager plugin
|
|
*
|
|
* @since 1.0.0
|
|
*/
|
|
function hssm_init() {
|
|
// Check if we're on the main site (this plugin should only run on main site)
|
|
if ( is_multisite() && ! is_main_site() ) {
|
|
return;
|
|
}
|
|
|
|
// Initialize autoloader
|
|
HSSM_Autoloader::init();
|
|
|
|
// Get the main plugin instance and initialize
|
|
$hssm = HSSM_Main::get_instance();
|
|
$hssm->init();
|
|
}
|
|
|
|
// Hook into WordPress
|
|
add_action( 'plugins_loaded', 'hssm_init' );
|
|
|
|
// Activation and deactivation hooks
|
|
register_activation_hook( __FILE__, array( 'HSSM_Main', 'activate' ) );
|
|
register_deactivation_hook( __FILE__, array( 'HSSM_Main', 'deactivate' ) );
|
|
register_uninstall_hook( __FILE__, array( 'HSSM_Main', 'uninstall' ) );
|