# wordpress-seo/27.8/src/conditionals/feature-flag-conditional.php

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

- Page: https://pluginprobe.com/plugins/wordpress-seo/27.8/code/src/conditionals/feature-flag-conditional.php
- Raw: https://pluginprobe.com/plugins/wordpress-seo/27.8/raw/src/conditionals/feature-flag-conditional.php
- Modified: 2021-06-28T14:59:06+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/27.8/code/src/conditionals/feature-flag-conditional.php#L10-L20`.

```php
<?php

namespace Yoast\WP\SEO\Conditionals;

/**
 * Abstract class for creating conditionals based on feature flags.
 */
abstract class Feature_Flag_Conditional implements Conditional {

	/**
	 * Returns whether or not this conditional is met.
	 *
	 * @return bool Whether or not the conditional is met.
	 */
	public function is_met() {
		$feature_flag = \strtoupper( $this->get_feature_flag() );

		return \defined( 'YOAST_SEO_' . $feature_flag ) && \constant( 'YOAST_SEO_' . $feature_flag ) === true;
	}

	/**
	 * Returns the name of the feature flag.
	 * 'YOAST_SEO_' is automatically prepended to it and it will be uppercased.
	 *
	 * @return string the name of the feature flag.
	 */
	abstract protected function get_feature_flag();

	/**
	 * Returns the feature name.
	 *
	 * @return string the name of the feature flag.
	 */
	public function get_feature_name() {
		return $this->get_feature_flag();
	}
}

```
