| 1 |
<?php |
| 2 |
/** |
| 3 |
* Experiment category constants. |
| 4 |
* |
| 5 |
* Defines the categories an experiment can belong to. |
| 6 |
* |
| 7 |
* @package WordPress\AI\Experiments |
| 8 |
* |
| 9 |
* @since 0.6.0 |
| 10 |
*/ |
| 11 |
|
| 12 |
declare( strict_types=1 ); |
| 13 |
|
| 14 |
namespace WordPress\AI\Experiments; |
| 15 |
|
| 16 |
use WordPress\AI\Features\Feature_Category; |
| 17 |
|
| 18 |
// Exit if accessed directly. |
| 19 |
defined( 'ABSPATH' ) || exit; |
| 20 |
|
| 21 |
/** |
| 22 |
* Experiment category constants. |
| 23 |
* |
| 24 |
* Provides type-safe-ish constants for experiment categorization. |
| 25 |
* These values correspond to where experiments are displayed in the settings UI. |
| 26 |
* |
| 27 |
* @since 0.6.0 |
| 28 |
*/ |
| 29 |
class Experiment_Category extends Feature_Category { |
| 30 |
|
| 31 |
/** |
| 32 |
* Editor category constant. |
| 33 |
* |
| 34 |
* Experiments in this category appear in the Editor Experiments. |
| 35 |
* |
| 36 |
* @since 0.6.0 |
| 37 |
* |
| 38 |
* @var string |
| 39 |
*/ |
| 40 |
public const EDITOR = 'editor'; |
| 41 |
|
| 42 |
/** |
| 43 |
* Admin category constant. |
| 44 |
* |
| 45 |
* Experiments in this category appear in the WordPress admin context. |
| 46 |
* |
| 47 |
* @since 0.6.0 |
| 48 |
* |
| 49 |
* @var string |
| 50 |
*/ |
| 51 |
public const ADMIN = 'admin'; |
| 52 |
} |
| 53 |
|