%s

', esc_html( $message ) ); } ); } if ( version_compare( PHP_VERSION, FORMWRIGHT_MIN_PHP, '<' ) ) { formwright_bootstrap_notice( sprintf( /* translators: 1: required PHP version, 2: current PHP version. */ __( 'Formwright needs PHP %1$s or newer. You are running PHP %2$s, so the plugin is switched off.', 'formwright' ), FORMWRIGHT_MIN_PHP, PHP_VERSION ) ); return; } if ( version_compare( get_bloginfo( 'version' ), FORMWRIGHT_MIN_WP, '<' ) ) { formwright_bootstrap_notice( sprintf( /* translators: 1: required WordPress version, 2: current WordPress version. */ __( 'Formwright needs WordPress %1$s or newer. You are running WordPress %2$s, so the plugin is switched off.', 'formwright' ), FORMWRIGHT_MIN_WP, get_bloginfo( 'version' ) ) ); return; } // Strauss output (the namespaced frameworks) and Composer's own autoloader (our classes). if ( ! is_readable( __DIR__ . '/vendor-prefixed/autoload.php' ) || ! is_readable( __DIR__ . '/vendor/autoload.php' ) ) { formwright_bootstrap_notice( __( 'Formwright is missing its dependencies. Install the plugin from a release ZIP, or run "composer install" in the plugin folder.', 'formwright' ) ); return; } require_once __DIR__ . '/vendor-prefixed/autoload.php'; require_once __DIR__ . '/vendor/autoload.php'; // Registered here, not in Plugin::boot(): activation runs before plugins_loaded fires. register_activation_hook( FORMWRIGHT_FILE, [ \Formwright\Activator::class, 'activate' ] ); register_deactivation_hook( FORMWRIGHT_FILE, [ \Formwright\Activator::class, 'deactivate' ] ); add_action( 'plugins_loaded', function () { \Formwright\Plugin::instance()->boot(); } );