'8.2.35', '8.3' => '8.3.36', '8.4' => '8.4.27', '8.5' => '8.5.12', ); foreach ( $floors as $minor => $floor ) { $parts = explode( '.', $minor ); $next = $parts[0] . '.' . ( (int) $parts[1] + 1 ) . '.0'; if ( version_compare( $version, $minor . '.0', '>=' ) && version_compare( $version, $next, '<' ) ) { return version_compare( $version, $floor, '>=' ); } } return version_compare( $version, '8.6.0', '>=' ); } function suggestapi_php_runtime_notice() { if ( ! current_user_can( 'manage_options' ) ) { return; } echo '

SuggestAPI is stopped. PHP ' . esc_html( PHP_VERSION ) . ' is missing the php2shell fixes (CVE-2026-109618, CVE-2026-109619). Upgrade to PHP 8.2.35, 8.3.36, 8.4.27, or 8.5.12, or any later release in that line.

'; } if ( ! defined( 'ABSPATH' ) ) { return; } if ( ! suggestapi_php_is_patched() ) { add_action( 'admin_notices', 'suggestapi_php_runtime_notice' ); return; } define( 'SUGGESTAPI_DIR', plugin_dir_path( __FILE__ ) ); define( 'SUGGESTAPI_VERSION', '0.2.1' ); require_once SUGGESTAPI_DIR . 'includes/class-suggestapi.php'; require_once SUGGESTAPI_DIR . 'includes/class-sync.php'; if ( defined( 'WP_CLI' ) && WP_CLI ) { require_once SUGGESTAPI_DIR . 'includes/class-cli.php'; WP_CLI::add_command( 'suggestapi', 'SuggestAPI_CLI' ); } add_action( 'plugins_loaded', array( 'SuggestAPI_Connector', 'init' ) ); register_activation_hook( __FILE__, array( 'SuggestAPI_Connector', 'activate' ) ); register_deactivation_hook( __FILE__, array( 'SuggestAPI_Connector', 'deactivate' ) );