set_basename( true, __FILE__ ); return; } define( 'FEHU_AP_VERSION', '0.1.1' ); define( 'FEHU_AP_FILE', __FILE__ ); define( 'FEHU_AP_DIR', plugin_dir_path( __FILE__ ) ); define( 'FEHU_AP_URL', plugin_dir_url( __FILE__ ) ); require_once FEHU_AP_DIR . 'includes/class-autoloader.php'; \Fehu\Autopilot\Autoloader::register(); // Origin-lock probe and PHP-level lock must run before anything else renders. \Fehu\Autopilot\Early::run(); if ( ! function_exists( 'fehu_ap_fs' ) ) { // Must stay conditional: an unconditional function is declared before the check above runs. /** * Freemius SDK instance: opt-in, checkout, licenses and updates of the Pro build. * * @return Freemius */ function fehu_ap_fs() { global $fehu_ap_fs; if ( ! isset( $fehu_ap_fs ) ) { require_once __DIR__ . '/vendor/freemius/start.php'; $fehu_ap_fs = fs_dynamic_init( array( 'id' => '46380', 'slug' => 'zonepilot', 'type' => 'plugin', 'public_key' => 'pk_f1bd1dd7d05c71bf3c4e28b8daa35', 'is_premium' => false, 'premium_suffix' => 'Pro', 'has_premium_version' => true, 'has_addons' => false, 'has_paid_plans' => true, 'is_org_compliant' => true, 'menu' => array( 'slug' => 'zonepilot', 'first-path' => 'admin.php?page=zonepilot', 'support' => false, 'contact' => false, ), ) ); } return $fehu_ap_fs; } } fehu_ap_fs(); // Product icon on the Freemius screens (opt-in, account, pricing). fehu_ap_fs()->add_filter( 'plugin_icon', static function () { return FEHU_AP_DIR . 'assets/logo.svg'; } ); do_action( 'fehu_ap_fs_loaded' ); register_activation_hook( __FILE__, array( '\Fehu\Autopilot\Plugin', 'activate' ) ); register_deactivation_hook( __FILE__, array( '\Fehu\Autopilot\Plugin', 'deactivate' ) ); // Freemius owns the uninstall hook (no uninstall.php allowed), so clean-up runs from its after_uninstall action. fehu_ap_fs()->add_action( 'after_uninstall', array( '\Fehu\Autopilot\Uninstall', 'run' ) ); add_action( 'plugins_loaded', array( '\Fehu\Autopilot\Plugin', 'instance' ) );