'; echo esc_html( sprintf( /* translators: %s: current PHP version. */ __( 'Agentyllo requires PHP 8.2 or newer. This server runs PHP %s, so the plugin stays inactive.', 'agentyllo' ), PHP_VERSION ) ); echo '

'; } ); return; } global $wp_version; if ( isset( $wp_version ) && version_compare( $wp_version, '6.8', '<' ) ) { add_action( 'admin_notices', static function () { global $wp_version; echo '

'; echo esc_html( sprintf( /* translators: %s: current WordPress version. */ __( 'Agentyllo requires WordPress 6.8 or newer. This site runs WordPress %s, so the plugin stays inactive.', 'agentyllo' ), $wp_version ) ); echo '

'; } ); return; } /* * Action Scheduler must load before `plugins_loaded` so its internal version * registry can elect the newest copy present on the site (ours or e.g. * WooCommerce's). Never scope or rename this library. */ if ( file_exists( __DIR__ . '/lib/action-scheduler/action-scheduler.php' ) ) { require_once __DIR__ . '/lib/action-scheduler/action-scheduler.php'; } /* * ── Freemius SDK slot ──────────────────────────────────────────────────────── * When enabling Freemius, require lib/freemius/start.php and paste the * fs_dynamic_init() snippet from the Freemius dashboard RIGHT HERE — after the * guards above, before any other Agentyllo code, so it runs ahead of * `plugins_loaded` as the SDK requires. Until then, feature gating goes through * the `agyl_feature_enabled` filter (see Agentyllo\Plugin::feature_enabled()). * ───────────────────────────────────────────────────────────────────────────── */ require_once __DIR__ . '/src/autoload.php'; register_activation_hook( __FILE__, array( 'Agentyllo\\Install\\Activator', 'run' ) ); register_deactivation_hook( __FILE__, array( 'Agentyllo\\Install\\Deactivator', 'run' ) ); add_action( 'plugins_loaded', array( 'Agentyllo\\Plugin', 'boot' ), 5 );