feat(widgets): render icon fields with the universal icon picker
The widget FormRenderer icon case and the nav-menu item icon field now emit the shared picker (preview + choose/clear + editable text input, delegated events so lazy forms and repeater rows work). Icon values are sanitized through aksrt_sanitize_icon_value on both save paths so inline customsvg- markup survives; the widget admin screen enqueues the picker.
This commit is contained in:
@@ -802,6 +802,10 @@ class SchemaProvider {
|
||||
}
|
||||
}
|
||||
return $out;
|
||||
case 'icon':
|
||||
return function_exists('aksrt_sanitize_icon_value')
|
||||
? aksrt_sanitize_icon_value((string) $value)
|
||||
: sanitize_text_field((string) $value);
|
||||
default:
|
||||
return sanitize_text_field((string) $value);
|
||||
}
|
||||
@@ -993,7 +997,7 @@ class SchemaProvider {
|
||||
// 自定义面板(验证码服务商等)按对象存储
|
||||
'custom' => 'array',
|
||||
'color' => 'string',
|
||||
'icon' => 'string',
|
||||
'icon' => 'icon',
|
||||
'media' => 'url',
|
||||
'upload' => 'url',
|
||||
'gallery' => 'attachment_ids',
|
||||
|
||||
Reference in New Issue
Block a user