PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 28.5
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v28.5
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 +61 -9 18.228.5 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,13 +106,27 @@
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 /**
115 + * Disable the integration toggle.
116 + *
117 + * @var bool
118 + */
119 + protected $disabled = false;
120 +
121 + /**
122 + * Whether the feature is new or not.
123 + *
124 + * @var bool
125 + */
126 + protected $new = false;
127 +
128 + /**
84 129 * Constructor.
85 130 *
86 131 * Sets the feature toggle arguments.
87 132 *
@@ -87,16 +132,23 @@
87 132 *
88 133 * @param array $args {
89 134 * Feature toggle arguments.
90 135 *
91 - * @type string $name Required. Feature toggle identifier.
92 - * @type string $setting Required. Name of the setting the feature toggle is associated with.
93 - * @type string $label Feature toggle label.
94 - * @type string $read_more_url URL to learn more about the feature. Default empty string.
95 - * @type string $read_more_label Label for the learn more link. Default empty string.
96 - * @type string $extra Additional help content for the feature. Default empty string.
97 - * @type int $order Value to specify the feature toggle order. A lower value indicates
98 - * a higher priority. Default 100.
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.
99 151 * }
100 152 *
101 153 * @throws InvalidArgumentException Thrown when a required argument is missing.
102 154 */