fix: neutral hint form for remaining client-facing tool mentions, Limits bounds accessor
Fix round 1 (task 10 review): - FieldValidator's "unknown field" validation error (reaches the client via validation_failed's fields) and PostPresenter's DIVI_HINT (surfaced in the result's hints array) still named lit-content-types/lit-content-update as plain lit-<name>; converted both to the neutral "lit/<name> (direkt: lit-<name>)" form like the other hints from task 10. Re-grepped src/ for any other client-facing error/field/hints text naming a direct-by-default tool as lit-<name> (descriptions/schemas excluded per Q11c) - none left. - Added Limits::bounds() (field => [min, max]) and made LimitsTab use it for the number inputs' min/max instead of a second, hardcoded copy of the same bounds. - LimitsTab now shows a description note when the configured upload_mb exceeds wp_max_upload_size() (PHP's upload_max_filesize/post_max_size), since WordPress would refuse a larger upload before this limit ever applies. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01At3V6SjwbMe6eMzVGW3Hs7
This commit is contained in:
@@ -39,6 +39,17 @@ final class Limits
|
||||
return self::sanitize(get_option(self::OPTION, []));
|
||||
}
|
||||
|
||||
/**
|
||||
* The [min, max] each field is clamped to by sanitize() – for admin UI form attributes,
|
||||
* so they can't drift from the actual bounds.
|
||||
*
|
||||
* @return array<string, array{int, int}>
|
||||
*/
|
||||
public static function bounds(): array
|
||||
{
|
||||
return self::BOUNDS;
|
||||
}
|
||||
|
||||
/**
|
||||
* Settings API sanitize callback: always returns all keys, clamped to their bounds.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user