'Popup Maker', 'slug' => 'popup-maker', 'version' => '1.21.5', 'option_prefix' => 'popup_maker', 'text_domain' => 'popup-maker', 'fullname' => 'Popup Maker', 'min_wp_ver' => '6.6.0', 'min_php_ver' => '7.4.0', 'future_wp_req' => '6.6.0', 'future_php_req' => '7.4.0', 'file' => __FILE__, 'basename' => plugin_basename( __FILE__ ), 'url' => plugin_dir_url( __FILE__ ), 'path' => plugin_dir_path( __FILE__ ), 'api_url' => 'https://wppopupmaker.com/', ]; } if ( ! isset( $key ) ) { return $config; } return isset( $config[ $key ] ) ? $config[ $key ] : false; } /** * Early autoloader registration. * * Load the autoloader before any other code to ensure all classes are available * to extensions and legacy code that may load early. */ // TODO This is redundant. It vendor files exist, then clearly the autoloader is working. This class either needs to be local or just bypass for autoload.php directly. Only really useful on dev sites where composer hasn't been init. require_once __DIR__ . '/vendor-prefixed/code-atlantic/wp-autoloader/src/Autoloader.php'; if ( ! class_exists( '\PopupMaker\Vendor\CodeAtlantic\Autoloader\Autoloader' ) || ! \PopupMaker\Vendor\CodeAtlantic\Autoloader\Autoloader::init( popup_maker_config( 'name' ), popup_maker_config( 'path' ) . '/vendor-prefixed/autoload.php' ) ) { // Autoloader failed - cannot continue as classes won't be available add_action( 'admin_notices', function () { echo '

' . esc_html__( 'Popup Maker: Failed to initialize autoloader. The plugin cannot load.', 'popup-maker' ) . '

'; } ); return; } /** * Legacy bootstrap. * * Includes a non composer autoloader for backwards compatibility. * This self unregisters itself if no autoloaders are present. * * This loads after the main autoloader to ensure modern classes are available. */ require_once __DIR__ . '/bootstrap.legacy.php'; /** * Load the main plugin bootstrap. * This handles the main initialization logic. */ require_once __DIR__ . '/bootstrap.php'; // Register activation, deactivation & uninstall hooks. register_activation_hook( __FILE__, [ 'PUM_Install', 'activate_plugin' ] ); register_deactivation_hook( __FILE__, [ 'PUM_Install', 'deactivate_plugin' ] ); register_uninstall_hook( __FILE__, [ 'PUM_Install', 'uninstall_plugin' ] );