' . esc_html( sprintf( __( 'Blocklingo needs PHP 8.1 or newer. This server runs PHP %s.', 'blocklingo' ), PHP_VERSION ) ) . '

'; } ); return; } define( 'BLOCKLINGO_VERSION', '0.14.1' ); define( 'BLOCKLINGO_FILE', __FILE__ ); define( 'BLOCKLINGO_DIR', plugin_dir_path( __FILE__ ) ); define( 'BLOCKLINGO_URL', plugin_dir_url( __FILE__ ) ); // PSR-4: AddBlack\Lang\Foo\Bar -> src/Foo/Bar.php. No Composer at runtime. spl_autoload_register( static function ( $class_name ) { $prefix = 'AddBlack\\Lang\\'; if ( 0 !== strpos( $class_name, $prefix ) ) { return; } $file = BLOCKLINGO_DIR . 'src/' . str_replace( '\\', '/', substr( $class_name, strlen( $prefix ) ) ) . '.php'; if ( is_file( $file ) ) { require $file; } } ); define( 'BLOCKLINGO_DB_VERSION', '2' ); // Same as Install\Installer::DB_VERSION; a literal, so a missing file cannot stop the site here. // Start inside Failsafe: if anything fails here (a missing file after a broken // upload, a conflict), the plugin unhooks itself and shows an admin notice // instead of taking the site down. Errors in hooks later are caught too. require_once BLOCKLINGO_DIR . 'src/Failsafe.php'; AddBlack\Lang\Failsafe::boot( static function () { ( new AddBlack\Lang\Install\LegacyPrefix( $GLOBALS['wpdb'] ) )->run(); // Sites from 0.13.0 and earlier: abl_ names -> blocklingo_. require_once BLOCKLINGO_DIR . 'includes/functions.php'; // Public API: blocklingo_* functions for themes and other plugins. register_activation_hook( BLOCKLINGO_FILE, array( AddBlack\Lang\Plugin::instance()->installer(), 'activate' ) ); AddBlack\Lang\Plugin::instance()->boot(); } ); if ( is_admin() ) { add_action( 'admin_notices', array( AddBlack\Lang\Failsafe::class, 'runtime_notice' ) ); }