🔐 Sid Gifari File Manager Pro
v8.0.5 | 2026-06-19 03:02:38 | PHP 8.1.34
📂
/ (Root)
/
home
/
therahul
/
reenrihair.com
/
wp-content
/
plugins
/
wordpress-seo
/
src
/
conditionals
📍 /home/therahul/reenrihair.com/wp-content/plugins/wordpress-seo/src/conditionals
🔄 Refresh
✏️
Editing: new-premium-or-free-ai-conditional.php
Writable
<?php namespace Yoast\WP\SEO\Conditionals; use Yoast\WP\SEO\Helpers\Product_Helper; /** * Conditional that is met when the new AI module code paths should load. * * Used to gate the `src/ai/*` integrations and routes so they only run when there is either no Premium or a Premium that ships with the new AI module structure. * * @phpcs:disable Yoast.NamingConventions.ObjectNameDepth.MaxExceeded */ class New_Premium_Or_Free_AI_Conditional implements Conditional { /** * The Premium version that ships with the new AI module structure. * * @var string */ private const NEW_AI_STRUCTURE_PREMIUM_VERSION = '27.5-RC0'; /** * Holds the Product_Helper. * * @var Product_Helper */ private $product_helper; /** * Constructs New_Premium_Or_Free_AI_Conditional. * * @param Product_Helper $product_helper The Product_Helper. */ public function __construct( Product_Helper $product_helper ) { $this->product_helper = $product_helper; } /** * Returns whether the new AI code paths should load. * * @return bool `true` when Premium is absent or its version ships with the new AI structure. */ public function is_met() { if ( ! $this->product_helper->is_premium() ) { return true; } $premium_version = $this->product_helper->get_premium_version(); if ( $premium_version === null ) { return true; } return \version_compare( $premium_version, self::NEW_AI_STRUCTURE_PREMIUM_VERSION, '>=' ); } }
💾 Save Changes
❌ Cancel