- Add Schemas/theme-settings.json with analytics and custom_code groups - Add ThemeSettingsFormBuilder for Admin Panel UI - Add ThemeSettingsFieldMapper for AJAX field mapping - Add ThemeSettingsRenderer for injecting GA/CSS/JS - Add ThemeSettingsInjector for wp_head/wp_footer hooks - Register component in AdminDashboardRenderer::getComponents() - Register FieldMapper in FieldMapperProvider 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
55 lines
1.6 KiB
JSON
55 lines
1.6 KiB
JSON
{
|
|
"component_name": "theme-settings",
|
|
"version": "1.1.0",
|
|
"description": "Configuraciones globales del tema: analytics y codigo personalizado",
|
|
"groups": {
|
|
"analytics": {
|
|
"label": "Analytics",
|
|
"priority": 10,
|
|
"fields": {
|
|
"ga_tracking_id": {
|
|
"type": "text",
|
|
"label": "Google Analytics ID",
|
|
"default": "",
|
|
"editable": true,
|
|
"description": "ID de seguimiento de Google Analytics (ej: G-XXXXXXXXXX o UA-XXXXXXXX-X)"
|
|
},
|
|
"ga_anonymize_ip": {
|
|
"type": "boolean",
|
|
"label": "Anonimizar IP",
|
|
"default": true,
|
|
"editable": true,
|
|
"description": "Anonimiza las direcciones IP de los visitantes (recomendado para GDPR)"
|
|
}
|
|
}
|
|
},
|
|
"custom_code": {
|
|
"label": "Codigo Personalizado",
|
|
"priority": 20,
|
|
"fields": {
|
|
"custom_css": {
|
|
"type": "textarea",
|
|
"label": "CSS Personalizado",
|
|
"default": "",
|
|
"editable": true,
|
|
"description": "CSS personalizado que se inyecta en wp_head. No incluir etiquetas <style>"
|
|
},
|
|
"custom_js_header": {
|
|
"type": "textarea",
|
|
"label": "JavaScript en Header",
|
|
"default": "",
|
|
"editable": true,
|
|
"description": "JavaScript que se inyecta en wp_head. No incluir etiquetas <script>"
|
|
},
|
|
"custom_js_footer": {
|
|
"type": "textarea",
|
|
"label": "JavaScript en Footer",
|
|
"default": "",
|
|
"editable": true,
|
|
"description": "JavaScript que se inyecta en wp_footer. No incluir etiquetas <script>"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|