'; echo esc_html( sprintf( /* translators: %s: current PHP version */ __( 'AI Rank Suite requires PHP 8.1 or newer. Your server runs PHP %s. The plugin has not been loaded.', 'ai-rank-suite' ), PHP_VERSION ) ); echo '

'; } ); return; } define( 'AIRANKSUITE_VERSION', '0.2.46' ); // The vendor's Google connect service for "Sign in with Google" (Search // Console + Analytics without a customer-side Cloud project). Filled in by // bin/build.sh for a release; may also be defined in wp-config.php. // Sign in with Google runs through the vendor's connect service, which owns // the Google OAuth app so no customer ever creates a Cloud project. A site // can override this in wp-config.php — defining it there wins — or point it // at '' to force the own-credentials path. if ( ! defined( 'AIRANKSUITE_GOOGLE_CONNECT_URL' ) ) { define( 'AIRANKSUITE_GOOGLE_CONNECT_URL', 'https://airanksuite.com/google-connect' ); } define( 'AIRANKSUITE_FILE', __FILE__ ); define( 'AIRANKSUITE_DIR', plugin_dir_path( __FILE__ ) ); define( 'AIRANKSUITE_URL', plugin_dir_url( __FILE__ ) ); /* * Freemius, when there is a Freemius. * * The edition distributed through WordPress.org contains no licensing code at * all — no SDK, no freemius.php, no licence check anywhere in the tree — so * this file is simply absent there and the require would be fatal. Guideline 5 * forbids a hosted plugin from locking any feature behind a licence, and the * least ambiguous way to satisfy that is to ship nothing that could. * * Where it is present (the edition we distribute ourselves) it must be * initialised inline here rather than on a hook, as the SDK requires: * https://freemius.com/help/documentation/wordpress/integration-with-sdk/ */ if ( is_readable( AIRANKSUITE_DIR . 'freemius.php' ) ) { require_once AIRANKSUITE_DIR . 'freemius.php'; } require_once AIRANKSUITE_DIR . 'src/Autoloader.php'; AiRankSuite\Autoloader::register(); register_activation_hook( __FILE__, array( 'AiRankSuite\\Kernel', 'activate' ) ); register_deactivation_hook( __FILE__, array( 'AiRankSuite\\Kernel', 'deactivate' ) ); /* * Uninstall, in the edition that has no Freemius. * * The Pro build wires Uninstaller::run() to the SDK's after_uninstall hook * inside freemius.php, because the SDK owns that lifecycle and refuses a * package that ships an uninstall.php. The free build has no freemius.php, * so until now nothing ran on uninstall at all: the "remove my data" setting * was a switch connected to nothing. WordPress' own hook does the same job * there. Data is still kept unless the customer opted out of keeping it. */ if ( ! is_readable( AIRANKSUITE_DIR . 'freemius.php' ) ) { register_uninstall_hook( __FILE__, array( 'AiRankSuite\\Support\\Uninstaller', 'run' ) ); } add_action( 'plugins_loaded', static function () { AiRankSuite\Kernel::instance()->boot(); // Registered after boot so every command can resolve services from a // fully built container. AiRankSuite\Support\Cli::register(); } );