- Verificación de entorno XAMPP (PHP 8.0.30, Composer 2.9.1, WP-CLI 2.12.0) - Configuración de Composer con PSR-4 para 24 namespaces - Configuración de PHPUnit con 140 tests preparados - Configuración de PHPCS con WordPress Coding Standards - Scripts de backup y rollback con mejoras de seguridad - Estructura de contextos (admin/, public/, shared/) - Schemas JSON para 11 componentes del sistema - Código fuente inicial con arquitectura limpia en src/ - Documentación de procedimientos de emergencia 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
259 lines
8.0 KiB
JSON
259 lines
8.0 KiB
JSON
{
|
|
"component_name": "top_notification_bar",
|
|
"version": "1.0.0",
|
|
"description": "Barra de notificación superior con anuncio destacado, ícono y enlace de acción",
|
|
"groups": {
|
|
"visibility": {
|
|
"label": "Visibilidad",
|
|
"priority": 10,
|
|
"fields": {
|
|
"is_enabled": {
|
|
"type": "boolean",
|
|
"label": "Mostrar barra de notificación",
|
|
"default": true,
|
|
"required": true,
|
|
"description": "Activa o desactiva la barra de notificación superior"
|
|
},
|
|
"show_on_pages": {
|
|
"type": "select",
|
|
"label": "Mostrar en",
|
|
"default": "all",
|
|
"options": {
|
|
"all": "Todas las páginas",
|
|
"home": "Solo página de inicio",
|
|
"posts": "Solo posts individuales",
|
|
"pages": "Solo páginas",
|
|
"custom": "Páginas específicas"
|
|
},
|
|
"required": true,
|
|
"description": "Define en qué páginas se mostrará la barra"
|
|
},
|
|
"custom_page_ids": {
|
|
"type": "text",
|
|
"label": "IDs de páginas específicas",
|
|
"default": "",
|
|
"placeholder": "Ej: 1,5,10",
|
|
"conditional_logic": {
|
|
"field": "show_on_pages",
|
|
"operator": "==",
|
|
"value": "custom"
|
|
},
|
|
"description": "IDs de páginas separados por comas"
|
|
},
|
|
"hide_on_mobile": {
|
|
"type": "boolean",
|
|
"label": "Ocultar en dispositivos móviles",
|
|
"default": false,
|
|
"description": "Oculta la barra en pantallas menores a 768px"
|
|
},
|
|
"is_dismissible": {
|
|
"type": "boolean",
|
|
"label": "Permitir cerrar",
|
|
"default": false,
|
|
"description": "Agrega botón X para que el usuario pueda cerrar la barra"
|
|
},
|
|
"dismissible_cookie_days": {
|
|
"type": "number",
|
|
"label": "Días antes de volver a mostrar",
|
|
"default": 7,
|
|
"min": 1,
|
|
"max": 365,
|
|
"conditional_logic": {
|
|
"field": "is_dismissible",
|
|
"operator": "==",
|
|
"value": true
|
|
},
|
|
"description": "Días que permanece oculta después de cerrarla"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"label": "Contenido",
|
|
"priority": 20,
|
|
"fields": {
|
|
"icon_type": {
|
|
"type": "select",
|
|
"label": "Tipo de ícono",
|
|
"default": "bootstrap",
|
|
"options": {
|
|
"bootstrap": "Bootstrap Icons",
|
|
"custom": "Imagen personalizada",
|
|
"none": "Sin ícono"
|
|
},
|
|
"required": true,
|
|
"description": "Selecciona el tipo de ícono a mostrar"
|
|
},
|
|
"bootstrap_icon": {
|
|
"type": "text",
|
|
"label": "Clase de ícono Bootstrap",
|
|
"default": "bi-megaphone-fill",
|
|
"placeholder": "Ej: bi-megaphone-fill",
|
|
"conditional_logic": {
|
|
"field": "icon_type",
|
|
"operator": "==",
|
|
"value": "bootstrap"
|
|
},
|
|
"required": true,
|
|
"description": "Nombre de la clase del ícono sin el prefijo 'bi' (ej: megaphone-fill)"
|
|
},
|
|
"custom_icon_url": {
|
|
"type": "media",
|
|
"label": "Imagen personalizada",
|
|
"default": "",
|
|
"media_type": "image",
|
|
"conditional_logic": {
|
|
"field": "icon_type",
|
|
"operator": "==",
|
|
"value": "custom"
|
|
},
|
|
"description": "Sube una imagen personalizada (recomendado: PNG 24x24px)"
|
|
},
|
|
"announcement_label": {
|
|
"type": "text",
|
|
"label": "Etiqueta del anuncio",
|
|
"default": "Nuevo:",
|
|
"placeholder": "Ej: Nuevo:, Importante:, Aviso:",
|
|
"maxlength": 30,
|
|
"required": true,
|
|
"description": "Texto destacado en negrita antes del mensaje"
|
|
},
|
|
"announcement_text": {
|
|
"type": "textarea",
|
|
"label": "Texto del anuncio",
|
|
"default": "Accede a más de 200,000 Análisis de Precios Unitarios actualizados para 2025.",
|
|
"maxlength": 200,
|
|
"rows": 3,
|
|
"required": true,
|
|
"description": "Mensaje principal del anuncio (máximo 200 caracteres)"
|
|
},
|
|
"link_enabled": {
|
|
"type": "boolean",
|
|
"label": "Mostrar enlace",
|
|
"default": true,
|
|
"description": "Activa o desactiva el enlace de acción"
|
|
},
|
|
"link_text": {
|
|
"type": "text",
|
|
"label": "Texto del enlace",
|
|
"default": "Ver Catálogo",
|
|
"maxlength": 50,
|
|
"conditional_logic": {
|
|
"field": "link_enabled",
|
|
"operator": "==",
|
|
"value": true
|
|
},
|
|
"required": true,
|
|
"description": "Texto del enlace de acción"
|
|
},
|
|
"link_url": {
|
|
"type": "url",
|
|
"label": "URL del enlace",
|
|
"default": "#",
|
|
"placeholder": "https://",
|
|
"conditional_logic": {
|
|
"field": "link_enabled",
|
|
"operator": "==",
|
|
"value": true
|
|
},
|
|
"required": true,
|
|
"description": "URL de destino del enlace"
|
|
},
|
|
"link_target": {
|
|
"type": "select",
|
|
"label": "Abrir enlace en",
|
|
"default": "_self",
|
|
"options": {
|
|
"_self": "Misma ventana",
|
|
"_blank": "Nueva ventana"
|
|
},
|
|
"conditional_logic": {
|
|
"field": "link_enabled",
|
|
"operator": "==",
|
|
"value": true
|
|
},
|
|
"description": "Define cómo se abrirá el enlace"
|
|
}
|
|
}
|
|
},
|
|
"styles": {
|
|
"label": "Estilos",
|
|
"priority": 30,
|
|
"fields": {
|
|
"background_color": {
|
|
"type": "color",
|
|
"label": "Color de fondo",
|
|
"default": "#FF8600",
|
|
"description": "Color de fondo de la barra (por defecto: orange primary)"
|
|
},
|
|
"text_color": {
|
|
"type": "color",
|
|
"label": "Color del texto",
|
|
"default": "#FFFFFF",
|
|
"description": "Color del texto del anuncio"
|
|
},
|
|
"link_color": {
|
|
"type": "color",
|
|
"label": "Color del enlace",
|
|
"default": "#FFFFFF",
|
|
"description": "Color del enlace de acción"
|
|
},
|
|
"font_size": {
|
|
"type": "select",
|
|
"label": "Tamaño de fuente",
|
|
"default": "small",
|
|
"options": {
|
|
"extra-small": "Muy pequeño (0.75rem)",
|
|
"small": "Pequeño (0.875rem)",
|
|
"normal": "Normal (1rem)",
|
|
"large": "Grande (1.125rem)"
|
|
},
|
|
"description": "Tamaño del texto del anuncio"
|
|
},
|
|
"padding_vertical": {
|
|
"type": "select",
|
|
"label": "Padding vertical",
|
|
"default": "normal",
|
|
"options": {
|
|
"compact": "Compacto (0.5rem)",
|
|
"normal": "Normal (0.75rem)",
|
|
"spacious": "Espacioso (1rem)"
|
|
},
|
|
"description": "Espaciado vertical interno de la barra"
|
|
},
|
|
"text_alignment": {
|
|
"type": "select",
|
|
"label": "Alineación del texto",
|
|
"default": "center",
|
|
"options": {
|
|
"left": "Izquierda",
|
|
"center": "Centro",
|
|
"right": "Derecha"
|
|
},
|
|
"description": "Alineación del contenido de la barra"
|
|
},
|
|
"animation_enabled": {
|
|
"type": "boolean",
|
|
"label": "Activar animación",
|
|
"default": false,
|
|
"description": "Activa animación de entrada al cargar la página"
|
|
},
|
|
"animation_type": {
|
|
"type": "select",
|
|
"label": "Tipo de animación",
|
|
"default": "slide-down",
|
|
"options": {
|
|
"slide-down": "Deslizar desde arriba",
|
|
"fade-in": "Aparecer gradualmente"
|
|
},
|
|
"conditional_logic": {
|
|
"field": "animation_enabled",
|
|
"operator": "==",
|
|
"value": true
|
|
},
|
|
"description": "Tipo de animación de entrada"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|