PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / trunk
Yoast SEO – Advanced SEO with real-time guidance and built-in AI vtrunk
28.5 28.4 28.3 28.2 28.1 28.0 27.9 27.8 27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 19.0 All 129 releases
← All changes | admin/views/class-yoast-feature-toggle.php +47 -12 18.6 → trunk View file →
@@ -31,8 +31,32 @@
31 31 */
32 32 protected $premium = false;
33 33
34 34 /**
35 + * Whether the feature is in beta or not.
36 + *
37 + * @var bool
38 + */
39 + protected $in_beta = false;
40 +
41 + /**
42 + * The Premium version in which this feature has been added.
43 + *
44 + * @var string
45 + */
46 + protected $premium_version = '';
47 +
48 + /**
49 + * The languages in which this feature is supported.
50 + * E.g. for language specific analysis support.
51 + *
52 + * If empty, the feature is considered to have support in all languages.
53 + *
54 + * @var string[]
55 + */
56 + protected $supported_languages = [];
57 +
58 + /**
35 59 * Feature toggle label.
36 60 *
37 61 * @var string
38 62 */
@@ -52,8 +76,15 @@
52 76 */
53 77 protected $premium_url = '';
54 78
55 79 /**
80 + * URL to buy premium.
81 + *
82 + * @var string
83 + */
84 + protected $premium_upsell_url = '';
85 +
86 + /**
56 87 * Label for the learn more link.
57 88 *
58 89 * @var string
59 90 */
@@ -75,9 +106,9 @@
75 106
76 107 /**
77 108 * Value to specify the feature toggle order.
78 109 *
79 - * @var string
110 + * @var int
80 111 */
81 112 protected $order = 100;
82 113
83 114 /**
@@ -101,19 +132,23 @@
101 132 *
102 133 * @param array $args {
103 134 * Feature toggle arguments.
104 135 *
105 - * @type string $name Required. Feature toggle identifier.
106 - * @type string $setting Required. Name of the setting the feature toggle is associated with.
107 - * @type string $disabled Whether the feature is premium or not.
108 - * @type string $label Feature toggle label.
109 - * @type string $read_more_url URL to learn more about the feature. Default empty string.
110 - * @type string $read_more_label Label for the learn more link. Default empty string.
111 - * @type string $extra Additional help content for the feature. Default empty string.
112 - * @type int $order Value to specify the feature toggle order. A lower value indicates
113 - * a higher priority. Default 100.
114 - * @type bool $disabled Disable the integration toggle. Default false.
115 - * @type string $new Whether the feature is new or not.
136 + * @type string $name Required. Feature toggle identifier.
137 + * @type string $setting Required. Name of the setting the feature toggle is associated with.
138 + * @type string $disabled Whether the feature is premium or not.
139 + * @type string $label Feature toggle label.
140 + * @type string $read_more_url URL to learn more about the feature. Default empty string.
141 + * @type string $premium_upsell_url URL to buy premium. Default empty string.
142 + * @type string $read_more_label Label for the learn more link. Default empty string.
143 + * @type string $extra Additional help content for the feature. Default empty string.
144 + * @type int $order Value to specify the feature toggle order. A lower value indicates
145 + * a higher priority. Default 100.
146 + * @type bool $disabled Disable the integration toggle. Default false.
147 + * @type string $new Whether the feature is new or not.
148 + * @type bool $in_beta Whether the feature is in beta or not.
149 + * @type array $supported_languages The languages that this feature supports.
150 + * @type string $premium_version The Premium version in which this feature was added.
116 151 * }
117 152 *
118 153 * @throws InvalidArgumentException Thrown when a required argument is missing.
119 154 */