# wordpress-seo/trunk/src/conditionals/myyoast-connection-conditional.php

Yoast SEO – Advanced SEO with real-time guidance and built-in AI, version trunk. 36 lines.

- Page: https://pluginprobe.com/plugins/wordpress-seo/trunk/code/src/conditionals/myyoast-connection-conditional.php
- Raw: https://pluginprobe.com/plugins/wordpress-seo/trunk/raw/src/conditionals/myyoast-connection-conditional.php
- Modified: 2026-07-28T12:18:34+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wordpress-seo/trunk/code/src/conditionals/myyoast-connection-conditional.php#L10-L20`.

```php
<?php

namespace Yoast\WP\SEO\Conditionals;

/**
 * Feature flag conditional for the MyYoast connection (OAuth client, WP-CLI
 * commands, and the key-rotation cron, etc.).
 *
 * Enable by defining `YOAST_SEO_MYYOAST_CONNECTION` as `true` in wp-config.php.
 * On top of the flag, the connection is rolled out gradually to a deterministic
 * share of sites — see {@see Gradual_Rollout_Conditional}.
 */
class MyYoast_Connection_Conditional extends Gradual_Rollout_Conditional {

	/**
	 * Returns the name of the feature flag.
	 *
	 * @return string The name of the feature flag.
	 */
	protected function get_feature_flag(): string {
		return 'MYYOAST_CONNECTION';
	}

	/**
	 * The share of sites the connection is rolled out to, in per-mille (0-1000).
	 *
	 * Ships at 1%; raised release over release as the rollout widens.
	 *
	 * @return int The rollout share in per-mille.
	 */
	protected function get_rollout_share(): int {
		// 20%.
		return 200;
	}
}

```
