. * * @since 4.0.0 * @author All in One SEO Team * @package AIOSEO\Plugin * @license GPL-3.0+ * @copyright Copyright © 2025, All in One SEO */ // Exit if accessed directly. if ( ! defined( 'ABSPATH' ) ) { exit; } require_once dirname( __FILE__ ) . '/app/init/init.php'; // Check if this plugin should be disabled. if ( aioseoMaybePluginIsDisabled( __FILE__ ) ) { return; } if ( ! defined( 'AIOSEO_PHP_VERSION_DIR' ) ) { define( 'AIOSEO_PHP_VERSION_DIR', basename( dirname( __FILE__ ) ) ); } require_once dirname( __FILE__ ) . '/app/init/notices.php'; require_once dirname( __FILE__ ) . '/app/init/activation.php'; // We require PHP 7.1 or higher for the whole plugin to work. if ( version_compare( PHP_VERSION, '7.1', '<' ) ) { add_action( 'admin_notices', 'aioseo_php_notice' ); // Do not process the plugin code further. return; } // We require WordPress 5.7 or higher for the whole plugin to work. global $wp_version; // phpcs:ignore Squiz.NamingConventions.ValidVariableName if ( version_compare( $wp_version, '5.7', '<' ) ) { // phpcs:ignore Squiz.NamingConventions.ValidVariableName add_action( 'admin_notices', 'aioseo_wordpress_notice' ); // Do not process the plugin code further. return; } if ( ! defined( 'AIOSEO_DIR' ) ) { define( 'AIOSEO_DIR', __DIR__ ); } if ( ! defined( 'AIOSEO_FILE' ) ) { define( 'AIOSEO_FILE', __FILE__ ); } // Don't allow multiple versions to be active. if ( function_exists( 'aioseo' ) ) { add_action( 'activate_all-in-one-seo-pack/all_in_one_seo_pack.php', 'aioseo_lite_just_activated' ); add_action( 'deactivate_all-in-one-seo-pack/all_in_one_seo_pack.php', 'aioseo_lite_just_deactivated' ); add_action( 'activate_all-in-one-seo-pack-pro/all_in_one_seo_pack.php', 'aioseo_pro_just_activated' ); add_action( 'admin_notices', 'aioseo_lite_notice' ); // Do not process the plugin code further. return; } // We will be deprecating these versions of PHP in the future, so we'll let the user know. // We flag deprecated WP versions in the DeprecatedWordPress class. if ( version_compare( PHP_VERSION, '7.4', '<' ) ) { add_action( 'admin_notices', 'aioseo_php_notice_deprecated' ); } // Define the class and the function. // The AIOSEOAbstract class is required here because it can't be autoloaded. require_once dirname( __FILE__ ) . '/app/AIOSEOAbstract.php'; require_once dirname( __FILE__ ) . '/app/AIOSEO.php'; aioseo();