Files
gureametsabilagun/wp-content/themes/gure-ametsa/inc/registry.php
Josep Piguillem 4acc8b62d1 Indicaciones del cliente: adopción solo Perros/Gatos, fichas nuevas y todo configurable
- Adopción sin filtros ni etiquetas: acceso a Perros y Gatos, tarjetas de foto y nombre.
- Ficha nueva: galería, vídeo, fecha de nacimiento o edad aproximada, carácter,
  necesidades, convivencia y hogar que buscamos (textos por idioma, datos compartidos).
- Estados disponible / en proceso / adoptado y animales destacados.
- Botón «Quiero conocerlo/la» con formulario breve (animal incluido) y confirmación.
- Botones para compartir cada ficha (WhatsApp, Facebook, copiar enlace).
- Portada corta según la propuesta del cliente; donaciones, cifras, etc. ocultas.
- Páginas Acoge y Preguntas frecuentes, menú con submenús, sin hotel.
- Aviso de cita previa y lista de ayuda material editables desde el panel.
- Plugin núcleo dividido en módulos (i18n, animales, formularios, APIs).
- Migración 5 idempotente: respeta las páginas editadas por el cliente.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 22:16:24 +02:00

484 lines
28 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
/**
* Registro de opciones del tema (Apariencia → Personalizar).
*
* Cada sección: title, panel, fields. Cada campo: type (text, textarea, url, email, color,
* checkbox, number, range, select, image, video), label, default (o es/eu si 'i18n' => true).
* Las secciones con 'section' => true son bloques de la portada (se pueden ocultar y reordenar).
*/
defined( 'ABSPATH' ) || exit;
/** Tipografías incluidas en el tema (assets/fonts) y de sistema. */
function ga_fonts() {
return array(
'fraunces' => array( 'label' => 'Fraunces (serif, con carácter)', 'file' => 'fraunces', 'family' => 'Fraunces', 'stack' => 'Fraunces, Georgia, serif' ),
'karla' => array( 'label' => 'Karla (sans, cercana)', 'file' => 'karla', 'family' => 'Karla', 'stack' => 'Karla, system-ui, sans-serif' ),
'lora' => array( 'label' => 'Lora (serif, clásica)', 'file' => 'lora', 'family' => 'Lora', 'stack' => 'Lora, Georgia, serif' ),
'playfair' => array( 'label' => 'Playfair Display (serif, elegante)', 'file' => 'playfair-display', 'family' => 'Playfair Display', 'stack' => '"Playfair Display", Georgia, serif' ),
'nunito' => array( 'label' => 'Nunito (redondeada, amable)', 'file' => 'nunito', 'family' => 'Nunito', 'stack' => 'Nunito, system-ui, sans-serif' ),
'inter' => array( 'label' => 'Inter (moderna, muy legible)', 'file' => 'inter', 'family' => 'Inter', 'stack' => 'Inter, system-ui, sans-serif' ),
'opensans' => array( 'label' => 'Open Sans (neutra)', 'file' => 'open-sans', 'family' => 'Open Sans', 'stack' => '"Open Sans", system-ui, sans-serif' ),
'system-serif' => array( 'label' => 'Serif del sistema', 'stack' => '"Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif' ),
'system-sans' => array( 'label' => 'Sans del sistema', 'stack' => '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif' ),
);
}
/** Paletas rápidas. 'custom' usa los colores elegidos a mano. */
function ga_palettes() {
return array(
'logo' => array(
'label' => 'Colores del logo (marrón y beige)',
'primary' => '#401f0c', // marrón del logo
'accent' => '#bd8537', // caramelo: el tono del beige, más intenso
'background' => '#fcfaf5',
'surface' => '#f3ecdc', // beige del logo aclarado
'text' => '#2b1508',
),
'ciruela' => array(
'label' => 'Ciruela y mostaza',
'primary' => '#5b2c4e',
'accent' => '#e8a317',
'background' => '#fdf8f1',
'surface' => '#f5ead9',
'text' => '#241a21',
),
'verde' => array(
'label' => 'Verde y rojo',
'primary' => '#1e5b3e',
'accent' => '#c23b2a',
'background' => '#fffcf6',
'surface' => '#f7f1e6',
'text' => '#1d2721',
),
'mar' => array(
'label' => 'Azul mar y coral',
'primary' => '#1f4e6b',
'accent' => '#f07b5a',
'background' => '#fbfaf7',
'surface' => '#eaf1f2',
'text' => '#1b2a33',
),
'bosque' => array(
'label' => 'Bosque y teja',
'primary' => '#2f4a34',
'accent' => '#d9822b',
'background' => '#fbf8f2',
'surface' => '#efe8da',
'text' => '#20261f',
),
);
}
function ga_customizer_registry() {
static $registry = null;
if ( null !== $registry ) {
return $registry;
}
$t = fn( $label, $es, $eu, $type = 'text' ) => array( 'type' => $type, 'label' => $label, 'i18n' => true, 'es' => $es, 'eu' => $eu );
$step = function ( $n, $es_t, $es_d, $eu_t, $eu_d ) use ( $t ) {
return array(
"step{$n}_title" => $t( "Paso $n · título", $es_t, $eu_t ),
"step{$n}_text" => $t( "Paso $n · texto", $es_d, $eu_d, 'textarea' ),
);
};
$door = function ( $n, $kicker, $title, $text, $link ) use ( $t ) {
return array(
"door{$n}_kicker" => $t( "Puerta $n · etiqueta", $kicker[0], $kicker[1] ),
"door{$n}_title" => $t( "Puerta $n · título", $title[0], $title[1] ),
"door{$n}_text" => $t( "Puerta $n · texto", $text[0], $text[1] ),
"door{$n}_link" => $t( "Puerta $n · enlace", $link[0], $link[1] ),
);
};
$card = function ( $prefix, $n, $title, $text ) use ( $t ) {
return array(
"{$prefix}{$n}_title" => $t( ucfirst( $prefix ) . " $n · título (vacío = ocultar)", $title[0], $title[1] ),
"{$prefix}{$n}_text" => $t( ucfirst( $prefix ) . " $n · texto", $text[0], $text[1], 'textarea' ),
);
};
$qa = function ( $n, $es_q, $es_a, $eu_q, $eu_a ) use ( $t ) {
return array(
"q{$n}" => $t( "Pregunta $n (vacío = ocultar)", $es_q, $eu_q ),
"a{$n}" => $t( "Respuesta $n", $es_a, $eu_a, 'textarea' ),
);
};
$palette_choices = array_map( fn( $p ) => $p['label'], ga_palettes() ) + array( 'custom' => 'Personalizada (colores de abajo)' );
$default = ga_palettes()['logo'];
$registry = array(
/* ================= Diseño ================= */
'colors' => array(
'panel' => 'ga_design',
'title' => 'Colores',
'fields' => array(
'palette' => array( 'type' => 'select', 'label' => 'Paleta', 'default' => 'logo', 'choices' => $palette_choices, 'description' => 'Elige una paleta lista, o «Personalizada» para usar los colores de abajo.' ),
'primary' => array( 'type' => 'color', 'label' => 'Color principal', 'default' => $default['primary'], 'description' => 'Títulos, botones de la cabecera, secciones oscuras y pie.' ),
'accent' => array( 'type' => 'color', 'label' => 'Color de acento', 'default' => $default['accent'], 'description' => 'Botones principales, detalles y palabras resaltadas.' ),
'background' => array( 'type' => 'color', 'label' => 'Fondo de la página', 'default' => $default['background'] ),
'surface' => array( 'type' => 'color', 'label' => 'Fondo de secciones alternas', 'default' => $default['surface'] ),
'text' => array( 'type' => 'color', 'label' => 'Color del texto', 'default' => $default['text'] ),
),
),
'typography' => array(
'panel' => 'ga_design',
'title' => 'Tipografía',
'fields' => array(
'heading_font' => array( 'type' => 'select', 'label' => 'Tipografía de títulos', 'default' => 'fraunces', 'choices' => wp_list_pluck( ga_fonts(), 'label' ) ),
'heading_weight' => array( 'type' => 'select', 'label' => 'Grosor de los títulos', 'default' => '800', 'choices' => array(
'500' => 'Normal',
'600' => 'Seminegrita',
'700' => 'Negrita',
'800' => 'Extra negrita',
'900' => 'Máximo',
) ),
'body_font' => array( 'type' => 'select', 'label' => 'Tipografía del texto', 'default' => 'karla', 'choices' => wp_list_pluck( ga_fonts(), 'label' ) ),
'base_size' => array( 'type' => 'range', 'label' => 'Tamaño del texto (px)', 'default' => 17, 'min' => 15, 'max' => 20, 'step' => 1 ),
'radius' => array( 'type' => 'range', 'label' => 'Redondeo de esquinas (px)', 'default' => 14, 'min' => 0, 'max' => 32, 'step' => 2 ),
),
),
'header' => array(
'panel' => 'ga_design',
'title' => 'Cabecera',
'fields' => array(
'logo_style' => array( 'type' => 'select', 'label' => 'Logo en la cabecera', 'default' => 'mark', 'choices' => array(
'mark' => 'Símbolo + nombre escrito',
'full' => 'Logo completo',
'text' => 'Solo el nombre escrito',
), 'description' => 'Si subes otro logo en «Identidad del sitio», se usa ese.' ),
'phone' => array( 'type' => 'checkbox', 'label' => 'Mostrar el teléfono en la cabecera', 'default' => true ),
'switcher' => array( 'type' => 'checkbox', 'label' => 'Mostrar selector de idioma ES | EU', 'default' => true ),
'sticky' => array( 'type' => 'checkbox', 'label' => 'Cabecera fija al hacer scroll', 'default' => true ),
'topbar' => array( 'type' => 'checkbox', 'label' => 'Barra superior con horario y redes', 'default' => false ),
'highlight_first' => array( 'type' => 'checkbox', 'label' => 'Resaltar el primer elemento del menú como botón', 'default' => false ),
'brand_line1' => array( 'type' => 'text', 'label' => 'Nombre (si no hay logo) · línea 1', 'default' => 'Gure Ametsa' ),
'brand_line2' => array( 'type' => 'text', 'label' => 'Nombre (si no hay logo) · línea 2', 'default' => 'Bi Lagun' ),
'brand_line3' => array( 'type' => 'text', 'label' => 'Nombre (si no hay logo) · lugar', 'default' => 'Hondarribia' ),
'cta1' => $t( 'Botón de cabecera (vacío = ocultar)', 'Conoce a los animales', 'Ezagutu animaliak' ),
'cta1_url' => array( 'type' => 'text', 'label' => 'Botón · enlace (vacío = listado de adopción)', 'default' => '' ),
'cta2' => $t( 'Segundo botón (vacío = ocultar)', '', '' ),
'cta2_url' => array( 'type' => 'text', 'label' => 'Segundo botón · enlace (vacío = Colabora → Donaciones)', 'default' => '' ),
),
),
'footer' => array(
'panel' => 'ga_design',
'title' => 'Pie de página',
'fields' => array(
'about' => $t( 'Texto de presentación',
'Bilagun es la protectora de Jaizubia, en Hondarribia. Cuidamos de los perros y gatos que llegan a nosotras y les buscamos una segunda oportunidad.',
'Bilagun Jaizubiko babeslekua da, Hondarribian. Guregana iristen diren txakur eta katuak zaintzen ditugu eta bigarren aukera bat bilatzen diegu.', 'textarea' ),
'copyright' => array( 'type' => 'text', 'label' => 'Texto de copyright', 'default' => 'Gure Ametsa Bi Lagun' ),
),
),
/* ================= Contacto ================= */
'contact' => array(
'panel' => 'ga_info',
'title' => 'Datos de contacto',
'fields' => array(
'direccion' => array( 'type' => 'text', 'label' => 'Dirección', 'default' => 'Jaizubia, 44 · 20280 Hondarribia (Gipuzkoa)' ),
'maps' => array( 'type' => 'url', 'label' => 'Enlace a Google Maps', 'default' => 'https://www.google.com/maps/search/?api=1&query=Jaizubia+44+Hondarribia' ),
'telefono' => array( 'type' => 'text', 'label' => 'Teléfono de atención', 'default' => '943 64 52 79', 'description' => 'El de atención de Bilagun, no el del servicio municipal.' ),
'email' => array( 'type' => 'email', 'label' => 'Email', 'default' => 'hola@gureametsabilagun.org' ),
'horario' => $t( 'Horario de atención al público', 'Lunes a viernes: 10:00–13:00 y 14:00–19:00', 'Astelehenetik ostiralera: 10:00–13:00 eta 14:00–19:00' ),
'cita' => $t( 'Aviso de cita previa (vacío = ocultar)', 'Atendemos con cita previa. Escríbenos o llámanos antes de venir.', 'Aurretiko hitzorduarekin artatzen dugu. Idatzi edo deitu iezaguzu etorri aurretik.', 'textarea' ),
),
),
'social' => array(
'panel' => 'ga_info',
'title' => 'Redes sociales',
'fields' => array(
'instagram' => array( 'type' => 'url', 'label' => 'Instagram', 'default' => 'https://www.instagram.com/gureametsabilagun/' ),
'facebook' => array( 'type' => 'url', 'label' => 'Facebook', 'default' => 'https://www.facebook.com/gureametsabilagun/' ),
'tiktok' => array( 'type' => 'url', 'label' => 'TikTok', 'default' => '' ),
'youtube' => array( 'type' => 'url', 'label' => 'YouTube', 'default' => '' ),
'whatsapp' => array( 'type' => 'text', 'label' => 'WhatsApp (número con prefijo, p. ej. 34600111222)', 'default' => '' ),
),
),
/* ================= Adopción ================= */
'adopcion' => array(
'panel' => 'ga_adopt',
'title' => 'Listado y fichas',
'fields' => array(
'archive_mode' => array( 'type' => 'select', 'label' => 'Página «Adopta»', 'default' => 'tiles', 'choices' => array(
'tiles' => 'Dos accesos: Perros y Gatos',
'grid' => 'Todos los animales juntos',
) ),
'intro' => $t( 'Texto de la página Adopta',
'Queremos que conozcas a cada animal por su historia y por cómo es. Entra en sus fichas y descubre quién hay detrás de cada nombre.',
'Animalia bakoitza bere istorioagatik eta nolakoa den ezagutzea nahi dugu. Sartu haien fitxetan eta ezagutu izen bakoitzaren atzean nor dagoen.', 'textarea' ),
'dog_label' => $t( 'Acceso a perros · texto', 'Perros', 'Txakurrak' ),
'dog_image' => array( 'type' => 'image', 'label' => 'Acceso a perros · foto', 'default' => 0 ),
'cat_label' => $t( 'Acceso a gatos · texto', 'Gatos', 'Katuak' ),
'cat_image' => array( 'type' => 'image', 'label' => 'Acceso a gatos · foto', 'default' => 0 ),
'card' => array( 'type' => 'select', 'label' => 'Tarjetas del listado', 'default' => 'simple', 'choices' => array(
'simple' => 'Solo foto y nombre',
'detallada' => 'Foto, nombre, edad y frase corta',
) ),
'show_in_process' => array( 'type' => 'checkbox', 'label' => 'Mostrar en el listado los que están «En proceso»', 'default' => true ),
'card_status' => array( 'type' => 'checkbox', 'label' => 'Indicar «En proceso» en su tarjeta', 'default' => true ),
'order' => array( 'type' => 'select', 'label' => 'Orden del listado', 'default' => 'recientes', 'choices' => array(
'recientes' => 'Los últimos publicados primero',
'antiguos' => 'Los que llevan más tiempo primero',
) ),
'btn_m' => $t( 'Botón de la ficha (macho)', 'Quiero conocerlo', 'Ezagutu nahi dut' ),
'btn_f' => $t( 'Botón de la ficha (hembra)', 'Quiero conocerla', 'Ezagutu nahi dut' ),
'form_intro' => $t( 'Texto sobre el formulario', 'Déjanos tus datos y te escribiremos para enviarte nuestro cuestionario de adopción.', 'Utzi zure datuak eta idatziko dizugu gure adopzio-galdetegia bidaltzeko.', 'textarea' ),
'confirm' => $t( 'Confirmación tras «Quiero conocerlo/la»', 'Hemos recibido tu solicitud. Nos pondremos en contacto contigo para enviarte nuestro cuestionario y conoceros un poquito mejor.', 'Zure eskaera jaso dugu. Zurekin harremanetan jarriko gara gure galdetegia bidaltzeko eta elkar hobeto ezagutzeko.', 'textarea' ),
'confirm_contact' => $t( 'Confirmación del formulario de contacto', '¡Gracias! Hemos recibido tu mensaje y te responderemos lo antes posible.', 'Eskerrik asko! Zure mezua jaso dugu eta ahalik eta lasterren erantzungo dizugu.', 'textarea' ),
'process_title' => $t( 'Proceso · título', '¿Cómo es el proceso?', 'Nolakoa da prozesua?' ),
'process' => $t( 'Proceso · pasos (uno por línea)',
"Nos escribes y te enviamos nuestro cuestionario.\nLo valoramos con el equipo.\nQuedamos para conoceros, siempre con cita previa.",
"Idazten diguzu eta gure galdetegia bidaltzen dizugu.\nTaldearekin baloratzen dugu.\nElkar ezagutzeko geratzen gara, beti aurretiko hitzorduarekin.", 'textarea' ),
'process_note' => $t( 'Proceso · nota', 'Enviar la solicitud no confirma una adopción: es el primer paso para conocernos.', 'Eskaera bidaltzeak ez du adopzioa baieztatzen: elkar ezagutzeko lehen urratsa da.' ),
'share' => array( 'type' => 'checkbox', 'label' => 'Botones para compartir la ficha (WhatsApp, Facebook, copiar enlace)', 'default' => true ),
'form_email' => array( 'type' => 'email', 'label' => 'Correo que recibe las solicitudes y mensajes', 'default' => '', 'description' => 'Vacío = el de la variable GA_CONTACT_EMAIL del servidor.' ),
),
),
'material' => array(
'panel' => 'ga_adopt',
'title' => 'Ayuda material',
'fields' => array(
'title' => $t( 'Título', 'Qué necesitamos ahora', 'Zer behar dugun orain' ),
'list' => $t( 'Necesidades actuales (una por línea)',
"Pienso para perros y gatos\nArena para gatos\nMantas y toallas",
"Txakur eta katuentzako pentsua\nKatuentzako harea\nMantak eta eskuoihalak", 'textarea' ),
'note' => $t( 'Nota', 'Antes de traer nada, escríbenos para concretar la entrega y comprobar qué necesitamos.', 'Ezer ekarri aurretik, idatzi iezaguzu entrega zehazteko eta zer behar dugun egiaztatzeko.', 'textarea' ),
),
),
/* ================= Portada ================= */
'hero' => array(
'panel' => 'ga_home',
'title' => 'Portada principal',
'section' => true,
'fields' => array_merge(
array(
'layout' => array( 'type' => 'select', 'label' => 'Diseño', 'default' => 'full', 'choices' => array(
'full' => 'Foto o vídeo a pantalla completa',
'split' => 'Texto a la izquierda, foto a la derecha',
) ),
'image' => array( 'type' => 'image', 'label' => 'Foto (real, de vuestros animales)', 'default' => 0 ),
'video' => array( 'type' => 'video', 'label' => 'Vídeo de fondo (opcional, MP4 corto y sin sonido)', 'default' => 0 ),
'overlay' => array( 'type' => 'range', 'label' => 'Velo de color sobre la foto (%)', 'default' => 55, 'min' => 0, 'max' => 95, 'step' => 5 ),
'eyebrow' => $t( 'Etiqueta superior (vacío = ocultar)', 'Protectora de animales · Hondarribia', 'Animalien babeslekua · Hondarribia' ),
'title' => $t( 'Título (pon *entre asteriscos* la parte resaltada)', 'Su próxima oportunidad *puede empezar contigo*', 'Haren hurrengo aukera *zurekin has daiteke*' ),
'lead' => $t( 'Texto', 'Conoce a los perros y gatos de Bilagun que están esperando una familia.', 'Ezagutu familia baten zain dauden Bilaguneko txakur eta katuak.', 'textarea' ),
'btn1' => $t( 'Botón 1', 'Conoce a nuestros perros', 'Ezagutu gure txakurrak' ),
'btn1_url' => array( 'type' => 'text', 'label' => 'Botón 1 · enlace (vacío = perros)', 'default' => '' ),
'btn2' => $t( 'Botón 2', 'Conoce a nuestros gatos', 'Ezagutu gure katuak' ),
'btn2_url' => array( 'type' => 'text', 'label' => 'Botón 2 · enlace (vacío = gatos)', 'default' => '' ),
'doors' => array( 'type' => 'checkbox', 'label' => 'Mostrar cuatro accesos («puertas») bajo la portada', 'default' => false ),
),
$door( 1, array( 'Adopta', 'Adoptatu' ), array( 'Conócelos', 'Ezagutu' ), array( 'Perros y gatos que buscan una familia.', 'Familia bila dabiltzan txakur eta katuak.' ), array( 'Ver animales', 'Ikusi animaliak' ) ),
$door( 2, array( 'Acoge', 'Harrera' ), array( 'Abre tu casa', 'Ireki etxea' ), array( 'Un hogar temporal mientras encuentran familia.', 'Aldi baterako etxe bat, familia aurkitu bitartean.' ), array( 'Quiero acoger', 'Harrera egin nahi dut' ) ),
$door( 3, array( 'Voluntariado', 'Boluntariotza' ), array( 'Echa una mano', 'Eman esku bat' ), array( 'Paseos, compañía y socialización.', 'Ibilaldiak, konpainia eta sozializazioa.' ), array( 'Quiero ser voluntario', 'Boluntario izan nahi dut' ) ),
$door( 4, array( 'Ayuda material', 'Laguntza materiala' ), array( 'Colabora', 'Lagundu' ), array( 'Lo que necesitamos ahora.', 'Orain behar duguna.' ), array( 'Ver necesidades', 'Ikusi beharrak' ) )
),
),
'animals' => array(
'panel' => 'ga_home',
'title' => 'Animales destacados',
'section' => true,
'fields' => array(
'eyebrow' => $t( 'Antetítulo', 'Te están esperando', 'Zure zain daude' ),
'title' => $t( 'Título', 'Conócelos', 'Ezagutu' ),
'text' => $t( 'Texto', 'Algunos llevan tiempo esperando o necesitan un hogar especialmente adaptado a ellos.', 'Batzuk denbora daramate zain edo haientzat bereziki egokitutako etxe bat behar dute.', 'textarea' ),
'button' => $t( 'Botón', 'Ver todos', 'Denak ikusi' ),
'filter' => array( 'type' => 'select', 'label' => 'Qué animales mostrar', 'default' => 'destacados', 'choices' => array(
'destacados' => 'Los marcados como «Destacado» (si no hay, los que llevan más tiempo)',
'' => 'Los últimos disponibles',
) ),
'count' => array( 'type' => 'number', 'label' => 'Número de animales', 'default' => 4, 'min' => 1, 'max' => 24 ),
'view' => array( 'type' => 'select', 'label' => 'Presentación', 'default' => 'rejilla', 'choices' => array(
'rejilla' => 'Rejilla',
'carrusel' => 'Carrusel (se desliza)',
) ),
),
),
'foster' => array(
'panel' => 'ga_home',
'title' => 'Acogida',
'section' => true,
'fields' => array(
'eyebrow' => $t( 'Antetítulo', 'Acoge', 'Harrera' ),
'title' => $t( 'Título', 'Un hogar temporal *también puede cambiar una vida*', 'Aldi baterako etxe batek *ere bizitza bat alda dezake*' ),
'text' => $t( 'Texto', 'Quizá ahora no puedas adoptar, pero sí ofrecer un hogar durante un tiempo. Escríbenos y te contamos qué animales necesitan acogida y cómo puedes ayudar.', 'Agian orain ezin duzu adoptatu, baina bai etxe bat eskaini denbora batez. Idatzi iezaguzu eta kontatuko dizugu zein animaliak behar duten harrera eta nola lagun dezakezun.', 'textarea' ),
'list_title' => $t( 'Título de la lista (opcional)', '', '' ),
'list' => $t( 'Lista (una línea por punto, opcional)', '', '', 'textarea' ),
'image' => array( 'type' => 'image', 'label' => 'Foto', 'default' => 0 ),
'caption' => $t( 'Pie de foto', '', '' ),
'button' => $t( 'Botón', 'Quiero acoger', 'Harrera egin nahi dut' ),
),
),
'about' => array(
'panel' => 'ga_home',
'title' => 'Quiénes somos y formas de ayudar',
'section' => true,
'fields' => array(
'eyebrow' => $t( 'Antetítulo', 'Quiénes somos', 'Nor gara' ),
'title' => $t( 'Título', 'Somos *Bilagun*', '*Bilagun* gara' ),
'text' => $t( 'Texto', 'Somos la protectora de Jaizubia, en Hondarribia. Cuidamos de cada perro y cada gato como lo que es, un individuo con su historia, y buscamos para él una familia que encaje con su forma de ser.', 'Jaizubiko babeslekua gara, Hondarribian. Txakur eta katu bakoitza zaintzen dugu dena den bezala, bere istorioa duen norbait, eta bere izaerarekin bat datorren familia bat bilatzen diogu.', 'textarea' ),
'image' => array( 'type' => 'image', 'label' => 'Foto (equipo o instalaciones)', 'default' => 0 ),
'button' => $t( 'Botón', 'Conócenos', 'Ezagutu gaitzazu' ),
'help_title' => $t( 'Formas de ayudar · título', 'Otras formas de ayudar', 'Laguntzeko beste modu batzuk' ),
'help1' => $t( 'Ayuda 1 · voluntariado', 'Hazte voluntario/a', 'Egin boluntario' ),
'help2' => $t( 'Ayuda 2 · material', 'Aporta material', 'Ekarri materiala' ),
'help3' => $t( 'Ayuda 3 · compartir', 'Comparte sus historias', 'Partekatu haien istorioak' ),
),
),
'talk' => array(
'panel' => 'ga_home',
'title' => 'Contacto',
'section' => true,
'fields' => array(
'eyebrow' => $t( 'Antetítulo', 'Contacto', 'Harremanetarako' ),
'title' => $t( 'Título', '¿Hablamos?', 'Hitz egingo dugu?' ),
'text' => $t( 'Texto', '¿Te gustaría conocer a alguno de ellos? Escríbenos y te contamos un poquito más.', 'Haietako bat ezagutu nahiko zenuke? Idatzi iezaguzu eta zerbait gehiago kontatuko dizugu.', 'textarea' ),
'form' => array( 'type' => 'checkbox', 'label' => 'Mostrar el formulario', 'default' => true ),
'form_title' => $t( 'Título del formulario', 'Escríbenos', 'Idatzi iezaguzu' ),
),
),
'steps' => array(
'panel' => 'ga_home',
'title' => 'Cómo adoptar (pasos)',
'section' => true,
'hidden' => true,
'fields' => array_merge(
array(
'eyebrow' => $t( 'Antetítulo', 'Adopción', 'Adopzioa' ),
'title' => $t( 'Título', '¿Cómo es el proceso?', 'Nolakoa da prozesua?' ),
'text' => $t( 'Texto', '', '', 'textarea' ),
),
$step( 1, 'Primer contacto', 'Nos escribes y te enviamos nuestro cuestionario.', 'Lehen harremana', 'Idazten diguzu eta gure galdetegia bidaltzen dizugu.' ),
$step( 2, 'Valoración', 'Lo valoramos con el equipo.', 'Balorazioa', 'Taldearekin baloratzen dugu.' ),
$step( 3, 'Nos conocemos', 'Quedamos con cita previa para conoceros.', 'Elkar ezagutu', 'Aurretiko hitzorduarekin geratzen gara elkar ezagutzeko.' ),
$step( 4, '', '', '', '' ),
array( 'button' => $t( 'Botón', 'Ver animales', 'Ikusi animaliak' ) )
),
),
'give' => array(
'panel' => 'ga_home',
'title' => 'Donaciones',
'section' => true,
'hidden' => true,
'description' => 'Oculta hasta confirmar los medios de pago.',
'fields' => array(
'eyebrow' => $t( 'Antetítulo', 'Donaciones', 'Dohaintzak' ),
'title' => $t( 'Título', 'Tu ayuda se nota', 'Zure laguntza nabaritzen da' ),
'text' => $t( 'Texto', '', '', 'textarea' ),
'card_title' => $t( 'Tarjeta · título', 'Cómo donar', 'Nola eman' ),
'card_text' => $t( 'Tarjeta · texto', '', '', 'textarea' ),
'shortcode' => array( 'type' => 'text', 'label' => 'Formulario de donación (opcional): shortcode de GiveWP, p. ej. [give_form id="12"]', 'default' => '' ),
'button' => $t( 'Botón', 'Quiero ayudar', 'Lagundu nahi dut' ),
'needs_title' => $t( 'Necesidades · título', '', '' ),
'needs' => $t( 'Necesidades (una línea por punto)', '', '', 'textarea' ),
),
),
'stats' => array(
'panel' => 'ga_home',
'title' => 'Cifras',
'section' => true,
'hidden' => true,
'fields' => array(
'eyebrow' => $t( 'Antetítulo', 'Nuestro trabajo', 'Gure lana' ),
'title' => $t( 'Título', 'En cifras', 'Zenbakitan' ),
'num1' => array( 'type' => 'text', 'label' => 'Cifra 1', 'default' => '' ),
'label1' => $t( 'Cifra 1 · texto', '', '' ),
'num2' => array( 'type' => 'text', 'label' => 'Cifra 2', 'default' => '' ),
'label2' => $t( 'Cifra 2 · texto', '', '' ),
'num3' => array( 'type' => 'text', 'label' => 'Cifra 3', 'default' => '' ),
'label3' => $t( 'Cifra 3 · texto', '', '' ),
'num4' => array( 'type' => 'text', 'label' => 'Cifra 4', 'default' => '' ),
'label4' => $t( 'Cifra 4 · texto', '', '' ),
),
),
'stories' => array(
'panel' => 'ga_home',
'title' => 'Finales felices',
'section' => true,
'hidden' => true,
'description' => 'Muestra automáticamente los animales marcados como «Adoptado».',
'fields' => array(
'eyebrow' => $t( 'Antetítulo', 'Ya están en casa', 'Etxean daude jada' ),
'title' => $t( 'Título', 'Finales felices', 'Amaiera zoriontsuak' ),
'text' => $t( 'Texto', 'Gracias por formar parte de sus segundas oportunidades.', 'Eskerrik asko haien bigarren aukeren parte izateagatik.', 'textarea' ),
'count' => array( 'type' => 'number', 'label' => 'Número de animales', 'default' => 8, 'min' => 1, 'max' => 24 ),
'view' => array( 'type' => 'select', 'label' => 'Presentación', 'default' => 'carrusel', 'choices' => array(
'carrusel' => 'Carrusel (se desliza)',
'rejilla' => 'Rejilla',
) ),
),
),
'intake' => array(
'panel' => 'ga_home',
'title' => 'Animales perdidos o encontrados',
'section' => true,
'hidden' => true,
'fields' => array_merge(
array(
'eyebrow' => $t( 'Antetítulo', 'Si necesitas ayuda', 'Laguntza behar baduzu' ),
'title' => $t( 'Título', 'Perdidos y encontrados', 'Galduak eta aurkituak' ),
),
$card( 'caso', 1, array( '', '' ), array( '', '' ) ),
$card( 'caso', 2, array( '', '' ), array( '', '' ) ),
$card( 'caso', 3, array( '', '' ), array( '', '' ) )
),
),
'faq' => array(
'panel' => 'ga_home',
'title' => 'Preguntas frecuentes',
'section' => true,
'hidden' => true,
'description' => 'Las preguntas completas están en la página «Preguntas frecuentes», enlazada en el pie.',
'fields' => array_merge(
array(
'eyebrow' => $t( 'Antetítulo', 'Dudas', 'Zalantzak' ),
'title' => $t( 'Título', 'Preguntas frecuentes', 'Ohiko galderak' ),
),
$qa( 1, '', '', '', '' ),
$qa( 2, '', '', '', '' ),
$qa( 3, '', '', '', '' ),
$qa( 4, '', '', '', '' ),
$qa( 5, '', '', '', '' )
),
),
'content' => array(
'panel' => 'ga_home',
'title' => 'Contenido libre de la página «Inicio»',
'section' => true,
'hidden' => true,
'description' => 'Lo que escribáis en la página Inicio (y en «Hasiera» para euskera) con el editor de bloques.',
'fields' => array(),
),
'species' => array(
'panel' => 'ga_home',
'title' => 'Accesos a perros y gatos con foto',
'section' => true,
'hidden' => true,
'description' => 'Usa las fotos de Adopción → Listado y fichas.',
'fields' => array(
'title' => $t( 'Título (vacío = ocultar)', '¿A quién vas a conocer hoy?', 'Nor ezagutuko duzu gaur?' ),
),
),
);
// Cada sección de portada tiene «Mostrar» y «Orden» (el orden del registro es el inicial).
$order = 10;
foreach ( $registry as $id => &$section ) {
if ( ! empty( $section['section'] ) ) {
$section['fields'] = array(
'show' => array( 'type' => 'checkbox', 'label' => 'Mostrar esta sección', 'default' => empty( $section['hidden'] ) ),
'order' => array( 'type' => 'number', 'label' => 'Orden (menor = más arriba)', 'default' => $order, 'min' => 0, 'max' => 200 ),
) + $section['fields'];
$order += 10;
}
}
unset( $section );
return $registry;
}