PluginProbe
Parse.ly / 3.24.2
Parse.ly v3.24.2
3.24.3 3.24.2 3.24.1 3.24.0 3.23.7 3.23.6 3.23.5 3.23.4 3.23.3 3.16.0 3.16.1 3.16.2 3.16.3 3.16.4 3.17.0 3.18.0 3.18.1 3.19.0 3.19.1 3.19.2 3.19.3 3.2.0 3.2.1 3.20.0 3.20.1 All 107 releases
← All changes | src/rest-api/settings/class-endpoint-editor-sidebar-settings.php +41 -0 3.24.0 → 3.24.2 View file →
@@ -174,8 +174,49 @@
174 174 );
175 175 }
176 176
177 177 /**
178 + * Returns the composite keys of the settings that inherit their default.
179 + *
180 + * These are the settings whose default the plugin's settings page makes
181 + * configurable.
182 + *
183 + * @since 3.24.1
184 + *
185 + * @return array<string> The composite keys.
186 + */
187 + protected function get_inheritable_keys(): array {
188 + return array(
189 + 'ExcerptSuggestions.Length',
190 + 'ExcerptSuggestions.Persona',
191 + 'ExcerptSuggestions.Tone',
192 + 'TitleSuggestions.Persona',
193 + 'TitleSuggestions.Tone',
194 + );
195 + }
196 +
197 + /**
198 + * Returns the defaults that the inheritable settings had before 3.24.0 made
199 + * them configurable.
200 + *
201 + * Spelled out rather than taken from Suggestion_Defaults, whose constants
202 + * describe the present rather than the past. `Length` is absent, as it did
203 + * not exist before it became configurable.
204 + *
205 + * @since 3.24.1
206 + *
207 + * @return array<string, mixed> The defaults, as composite key => value pairs.
208 + */
209 + protected function get_legacy_defaults(): array {
210 + return array(
211 + 'ExcerptSuggestions.Persona' => 'journalist',
212 + 'ExcerptSuggestions.Tone' => 'neutral',
213 + 'TitleSuggestions.Persona' => 'journalist',
214 + 'TitleSuggestions.Tone' => 'neutral',
215 + );
216 + }
217 +
218 + /**
178 219 * Sanitizes the passed subvalue.
179 220 *
180 221 * Extends the parent implementation with a range check for the desired
181 222 * excerpt length, which the enumerated valid values cannot express.