PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.7.1
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.7.1
1.7.1 1.7.0 1.6.6 1.6.5 1.6.4 1.6.3 1.6.2 1.6.1 1.6.0 1.5.4 1.5.5 1.5.3 1.5.2 1.5.1 1.5.0 1.4.2 1.4.1 1.4.0 1.3.28 1.3.27 1.3.26 1.3.25 1.3.23 1.3.22 1.3.21 All 51 releases
← All changes | app/Http/Requests/FluentMetaRequest.php +14 -0 1.7.0 → 1.7.1 View file →
@@ -5,8 +5,9 @@
5 5 use FluentCart\Framework\Foundation\RequestGuard;
6 6 use FluentCart\Framework\Support\Arr;
7 7 use FluentCart\App\Services\Permission\PermissionManager;
8 8 use FluentCart\App\Services\Theme\ColorPalette;
9 +use FluentCart\App\Services\Theme\RadiusPalette;
9 10
10 11 class FluentMetaRequest extends RequestGuard
11 12 {
12 13
@@ -26,8 +27,14 @@
26 27 ]
27 28 ];
28 29
29 30 $rules = Arr::get($rulesMap, $this->get('settings_name'), []);
31 +
32 + // The radius fields only show under Customize; a value hidden under
33 + // another source is dropped by the sanitiser rather than blocking the save.
34 + if ($this->get('settings_name') === 'appearance' && $this->get('appearance_source') === ColorPalette::SOURCE_CUSTOM) {
35 + $rules = array_merge($rules, RadiusPalette::validationRules());
36 + }
30 37 // $rules = [
31 38 // 'object_id' => 'integer|min:1',
32 39 // 'object_type' => 'nullable|sanitizeText|max:50',
33 40 // 'meta_key' => 'nullable|sanitizeText|max:50',
@@ -206,8 +213,15 @@
206 213 }
207 214 }
208 215
209 216 return $colors;
217 + },
218 + 'appearance_radius' => function ($value) {
219 + // Registry-driven like the colours: only the known roles, each
220 + // one length. A bare number means pixels; px, rem and em are
221 + // kept as typed. An empty field means "not set", so the
222 + // stylesheet's own fallback applies; 0 is a real value.
223 + return RadiusPalette::sanitizeOwnerMap($value);
210 224 },
211 225 'theme_setup' => function ($value) {
212 226 if (!is_array($value)) {
213 227 return [];