' . 'Clusterlane requires PHP 8.0 or higher. ' . 'You are running PHP ' . esc_html( PHP_VERSION ) . '. Please upgrade PHP or contact your host.

'; } ); return; } /* ------------------------------------------------------------------ One copy at a time (1.2.0) Clusterlane Pro installs in its own folder (clusterlane-premium), so the free version and Pro can both be installed. Only one runs: if another copy is already loaded in this request, this one stays out of the way. Both use the same tables and settings, so nothing is lost either way. (Pro's own handling of a free copy lives in its premium folder.) ------------------------------------------------------------------ */ if ( defined( 'CLUSTERLANE_VERSION' ) ) { if ( is_readable( __DIR__ . '/intelligence/pro__premium_only/coexist.php' ) ) { require __DIR__ . '/intelligence/pro__premium_only/coexist.php'; } return; } /* ------------------------------------------------------------------ Constants ------------------------------------------------------------------ */ define( 'CLUSTERLANE_VERSION', '1.3.2' ); define( 'CLUSTERLANE_FILE', __FILE__ ); define( 'CLUSTERLANE_DIR', plugin_dir_path( __FILE__ ) ); define( 'CLUSTERLANE_URL', plugin_dir_url( __FILE__ ) ); define( 'CLUSTERLANE_SLUG', 'clusterlane' ); /* ------------------------------------------------------------------ Autoloader — maps Clusterlane\Foo\Bar to intelligence/foo/class-bar.php ------------------------------------------------------------------ */ spl_autoload_register( function ( string $class ): void { if ( strpos( $class, 'Clusterlane\\' ) !== 0 ) return; $relative = substr( $class, 12 ); // strip "Clusterlane\" $parts = explode( '\\', $relative ); $filename = 'class-' . strtolower( str_replace( '_', '-', array_pop( $parts ) ) ) . '.php'; $subpath = implode( DIRECTORY_SEPARATOR, array_map( 'strtolower', $parts ) ); $file = CLUSTERLANE_DIR . ( $subpath ? $subpath . DIRECTORY_SEPARATOR : '' ) . $filename; if ( file_exists( $file ) ) require_once $file; } ); /* ------------------------------------------------------------------ Licensing (Pro build only — the file is not in the free version) ------------------------------------------------------------------ */ if ( is_readable( CLUSTERLANE_DIR . 'intelligence/pro__premium_only/freemius-init.php' ) ) { require_once CLUSTERLANE_DIR . 'intelligence/pro__premium_only/freemius-init.php'; } /* ------------------------------------------------------------------ Activation / deactivation / uninstall hooks ------------------------------------------------------------------ */ register_activation_hook( __FILE__, function( $network_wide = false ) { require_once CLUSTERLANE_DIR . 'intelligence/core/class-multisite.php'; // Single site → Installer::activate(); network activation → every site. \Clusterlane\Core\Multisite::activate( (bool) $network_wide ); } ); register_deactivation_hook( __FILE__, function( $network_wide = false ) { require_once CLUSTERLANE_DIR . 'intelligence/core/class-multisite.php'; // Single site → Installer::deactivate(); network deactivation → every site (0.98.175). \Clusterlane\Core\Multisite::deactivate( (bool) $network_wide ); } ); /* ------------------------------------------------------------------ Boot ------------------------------------------------------------------ */ add_action( 'plugins_loaded', function (): void { require_once CLUSTERLANE_DIR . 'intelligence/core/class-plugin.php'; ( new Clusterlane\Core\Plugin() )->boot(); } );