451 lines
29 KiB
PHP
451 lines
29 KiB
PHP
<?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',
|
||
'Protectora y residencia de animales en Jaizubia, Hondarribia. Desde hace más de 25 años recogemos, cuidamos y buscamos hogar a los perros y gatos abandonados de Irun y Hondarribia.',
|
||
'Animalien babesleku eta egoitza Jaizubian, Hondarribian. 25 urte baino gehiago daramatzagu Irun eta Hondarribiko txakur eta katu abandonatuak jasotzen, zaintzen eta etxe bat bilatzen.', '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', 'default' => '943 64 52 79' ),
|
||
'email' => array( 'type' => 'email', 'label' => 'Email', 'default' => 'hola@gureametsabilagun.org' ),
|
||
'horario' => $t( 'Horario', 'Lunes a viernes: 10:00–13:00 y 14:00–19:00', 'Astelehenetik ostiralera: 10:00–13:00 eta 14:00–19:00' ),
|
||
),
|
||
),
|
||
'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' => '' ),
|
||
),
|
||
),
|
||
|
||
/* ================= Portada ================= */
|
||
'hero' => array(
|
||
'panel' => 'ga_home',
|
||
'title' => 'Portada principal y «puertas»',
|
||
'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', 'default' => 0 ),
|
||
'video' => array( 'type' => 'video', 'label' => 'Vídeo de fondo (opcional, MP4 corto y sin sonido)', 'default' => 0, 'description' => 'Se reproduce en bucle. La foto se muestra mientras carga.' ),
|
||
'overlay' => array( 'type' => 'range', 'label' => 'Velo de color sobre la foto (%)', 'default' => 70, 'min' => 0, 'max' => 95, 'step' => 5 ),
|
||
'eyebrow' => $t( 'Etiqueta superior', 'Protectora de animales · Hondarribia', 'Animalien babeslekua · Hondarribia' ),
|
||
'title' => $t( 'Título (pon *entre asteriscos* la parte resaltada)', 'Tu mejor amigo *te está esperando*', 'Zure lagunik onena *zure zain dago*' ),
|
||
'lead' => $t( 'Texto',
|
||
'La mayoría nos conoce porque quiere adoptar. Pero adoptar es solo una de las cuatro puertas: acoger, echar una mano y donar son las que mantienen la primera abierta. Elige la que encaja con tu vida ahora.',
|
||
'Gehienek adoptatu nahi dutelako ezagutzen gaituzte. Baina adoptatzea lau ateetako bat baino ez da: harrera egitea, laguntzea eta dohaintzak egitea dira lehena irekita mantentzen dutenak. Aukeratu orain zure bizitzara hobekien egokitzen dena.', 'textarea' ),
|
||
'btn1' => $t( 'Botón 1', 'Ver quién está disponible', 'Ikusi nor dagoen zain' ),
|
||
'btn1_url' => array( 'type' => 'text', 'label' => 'Botón 1 · enlace (vacío = listado de adopción)', 'default' => '' ),
|
||
'btn2' => $t( 'Botón 2', 'Planifica tu visita', 'Antolatu zure bisita' ),
|
||
'btn2_url' => array( 'type' => 'text', 'label' => 'Botón 2 · enlace (vacío = página de contacto)', 'default' => '' ),
|
||
'doors' => array( 'type' => 'checkbox', 'label' => 'Mostrar las cuatro «puertas» bajo la portada', 'default' => true ),
|
||
),
|
||
$door( 1, array( 'Adopta', 'Adoptatu' ), array( 'Conócelos', 'Ezagutu' ), array( 'Perros y gatos que buscan una familia para siempre.', 'Betiko 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 su 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, mimos, fotos y ayuda en jornadas.', 'Ibilaldiak, laztanak, argazkiak eta laguntza jardunaldietan.' ), array( 'Apúntate', 'Eman izena' ) ),
|
||
$door( 4, array( 'Dona', 'Dohaintza' ), array( 'Colabora', 'Lagundu' ), array( 'Pienso, mantas, material o una aportación.', 'Pentsua, mantak, materiala edo ekarpen bat.' ), array( 'Cómo donar', 'Nola eman' ) )
|
||
),
|
||
),
|
||
'animals' => array(
|
||
'panel' => 'ga_home',
|
||
'title' => 'Animales en adopción',
|
||
'section' => true,
|
||
'fields' => array(
|
||
'eyebrow' => $t( 'Antetítulo', 'Puerta uno · Adopta', 'Lehen atea · Adoptatu' ),
|
||
'title' => $t( 'Título', 'Te están esperando', 'Zure zain daude' ),
|
||
'text' => $t( 'Texto', 'Todos se entregan con microchip, vacunas al día y esterilizados. Si alguno te roba el corazón, escríbenos y te contamos todo sobre él.', 'Guztiak mikrotxiparekin, txertoak egunean eta antzututa ematen dira. Norbaitek bihotza lapurtzen badizu, idatzi iezaguzu eta dena kontatuko dizugu.', 'textarea' ),
|
||
'button' => $t( 'Botón', 'Ver todos los animales', 'Ikusi animalia guztiak' ),
|
||
'count' => array( 'type' => 'number', 'label' => 'Número de animales', 'default' => 8, 'min' => 2, 'max' => 24 ),
|
||
'view' => array( 'type' => 'select', 'label' => 'Presentación', 'default' => 'carrusel', 'choices' => array(
|
||
'carrusel' => 'Carrusel (se desliza)',
|
||
'rejilla' => 'Rejilla',
|
||
) ),
|
||
'filter' => array( 'type' => 'select', 'label' => 'Qué animales mostrar', 'default' => '', 'choices' => array(
|
||
'' => 'Todos los disponibles',
|
||
'urgente,acogida' => 'Solo urgentes y los que buscan acogida',
|
||
) ),
|
||
),
|
||
),
|
||
'steps' => array(
|
||
'panel' => 'ga_home',
|
||
'title' => 'Cómo adoptar',
|
||
'section' => true,
|
||
'fields' => array_merge(
|
||
array(
|
||
'eyebrow' => $t( 'Antetítulo', 'Qué pasa después', 'Zer gertatzen da gero' ),
|
||
'title' => $t( 'Título', 'Una adopción clara, paso a paso', 'Adopzio argia, urratsez urrats' ),
|
||
'text' => $t( 'Texto', 'Queremos que la adopción salga bien para siempre. Por eso vamos sin prisas y te acompañamos en cada paso.', 'Adopzioak betirako ondo irtetea nahi dugu. Horregatik presarik gabe goaz eta urrats bakoitzean lagunduko dizugu.', 'textarea' ),
|
||
),
|
||
$step( 1, 'Escríbenos', 'Rellena el formulario o llámanos. Cuéntanos cómo es tu casa, tu día a día y qué animal buscas.',
|
||
'Idatzi iezaguzu', 'Bete formularioa edo deitu iezaguzu. Kontaiguzu nolakoa den zure etxea, zure eguneroko bizitza eta zer animalia bilatzen duzun.' ),
|
||
$step( 2, 'Hablamos', 'Te llamamos para conocerte y resolver dudas. Es una conversación, no un examen.',
|
||
'Hitz egingo dugu', 'Deituko dizugu zu ezagutzeko eta zalantzak argitzeko. Elkarrizketa bat da, ez azterketa bat.' ),
|
||
$step( 3, 'Os conocéis', 'Ven a Jaizubia a conocerle. Paseos y visitas sin prisas, con toda la familia.',
|
||
'Elkar ezagutu', 'Etorri Jaizubira hura ezagutzera. Ibilaldiak eta bisitak presarik gabe, familia osoarekin.' ),
|
||
$step( 4, '¡A casa!', 'Firmamos el contrato de adopción y seguimos a tu lado para lo que necesites.',
|
||
'Etxera!', 'Adopzio-kontratua sinatuko dugu eta behar duzun guztirako zure ondoan jarraituko dugu.' ),
|
||
array( 'button' => $t( 'Botón', 'Quiero adoptar', 'Adoptatu nahi dut' ) )
|
||
),
|
||
),
|
||
'foster' => array(
|
||
'panel' => 'ga_home',
|
||
'title' => 'Acogida',
|
||
'section' => true,
|
||
'fields' => array(
|
||
'eyebrow' => $t( 'Antetítulo', 'Puerta dos · Acoge', 'Bigarren atea · Harrera' ),
|
||
'title' => $t( 'Título', 'Acoger es lo que nos permite decir que sí', 'Harrera egiteak baietz esateko aukera ematen digu' ),
|
||
'text' => $t( 'Texto', 'Cachorros, animales mayores o convalecientes necesitan salir del centro cuanto antes. Una casa de acogida les da tiempo y cariño mientras encuentran su familia definitiva.', 'Kumeek, animalia zaharrek edo gaixorik daudenek lehenbailehen irten behar dute zentrotik. Harrera-etxe batek denbora eta maitasuna ematen die behin betiko familia aurkitu bitartean.', 'textarea' ),
|
||
'list_title' => $t( 'Título de la lista', 'Contigo en todo momento', 'Zurekin uneoro' ),
|
||
'list' => $t( 'Lista (una línea por punto)',
|
||
"Te explicamos qué necesita cada animal antes de llevarlo a casa\nResolvemos tus dudas durante toda la acogida\nBuscamos juntos su familia definitiva",
|
||
"Etxera eraman aurretik animalia bakoitzak zer behar duen azaltzen dizugu\nHarrera osoan zehar zure zalantzak argitzen ditugu\nElkarrekin bilatzen dugu haren behin betiko familia", 'textarea' ),
|
||
'image' => array( 'type' => 'image', 'label' => 'Foto', 'default' => 0 ),
|
||
'caption' => $t( 'Pie de foto', '', '' ),
|
||
'button' => $t( 'Botón', 'Quiero ser casa de acogida', 'Harrera-etxe izan nahi dut' ),
|
||
),
|
||
),
|
||
'give' => array(
|
||
'panel' => 'ga_home',
|
||
'title' => 'Donaciones',
|
||
'section' => true,
|
||
'fields' => array(
|
||
'eyebrow' => $t( 'Antetítulo', 'Puerta cuatro · Dona', 'Laugarren atea · Dohaintza' ),
|
||
'title' => $t( 'Título', 'Cada ayuda se nota', 'Laguntza oro nabaritzen da' ),
|
||
'text' => $t( 'Texto', 'Con tu aportación compramos pienso, medicinas y todo lo que necesitan mientras esperan una familia.', 'Zure ekarpenarekin pentsua, sendagaiak eta familia baten zain dauden bitartean behar duten guztia erosten dugu.', 'textarea' ),
|
||
'card_title' => $t( 'Tarjeta · título', 'Cómo donar', 'Nola eman' ),
|
||
'card_text' => $t( 'Tarjeta · texto', 'Escríbenos y te indicamos cómo hacer una aportación económica o dónde traer material. ¡Gracias!', 'Idatzi iezaguzu eta diru-ekarpena nola egin edo materiala non ekarri azalduko dizugu. Eskerrik asko!', 'textarea' ),
|
||
'shortcode' => array( 'type' => 'text', 'label' => 'Formulario de donación (opcional): pega aquí el shortcode de GiveWP, p. ej. [give_form id="12"]', 'default' => '' ),
|
||
'button' => $t( 'Botón', 'Quiero donar', 'Dohaintza egin nahi dut' ),
|
||
'needs_title' => $t( 'Necesidades · título', 'Lo que más necesitamos', 'Gehien behar duguna' ),
|
||
'needs' => $t( 'Necesidades (una línea por punto)',
|
||
"Pienso para perros y gatos\nArena para gatos\nMantas, toallas y camas\nCorreas, collares y juguetes",
|
||
"Txakur eta katuentzako pentsua\nKatuentzako harea\nMantak, eskuoihalak eta oheak\nUhalak, lepokoak eta jostailuak", 'textarea' ),
|
||
),
|
||
),
|
||
'stats' => array(
|
||
'panel' => 'ga_home',
|
||
'title' => 'Cifras',
|
||
'section' => true,
|
||
'fields' => array(
|
||
'eyebrow' => $t( 'Antetítulo', 'Nuestro impacto', 'Gure eragina' ),
|
||
'title' => $t( 'Título', 'Cada número es una vida', 'Zenbaki bakoitza bizitza bat da' ),
|
||
'num1' => array( 'type' => 'text', 'label' => 'Cifra 1', 'default' => '+25' ),
|
||
'label1' => $t( 'Cifra 1 · texto', 'años cuidando animales', 'urte animaliak zaintzen' ),
|
||
'num2' => array( 'type' => 'text', 'label' => 'Cifra 2', 'default' => '2' ),
|
||
'label2' => $t( 'Cifra 2 · texto', 'municipios: Irun y Hondarribia', 'udalerri: Irun eta Hondarribia' ),
|
||
'num3' => array( 'type' => 'text', 'label' => 'Cifra 3', 'default' => '100%' ),
|
||
'label3' => $t( 'Cifra 3 · texto', 'con microchip, vacunas y esterilización', 'mikrotxip, txerto eta antzutzearekin' ),
|
||
'num4' => array( 'type' => 'text', 'label' => 'Cifra 4 (vacío = ocultar)', 'default' => '' ),
|
||
'label4' => $t( 'Cifra 4 · texto', '', '' ),
|
||
),
|
||
),
|
||
'stories' => array(
|
||
'panel' => 'ga_home',
|
||
'title' => 'Historias con final feliz',
|
||
'section' => true,
|
||
'description' => 'Muestra automáticamente los últimos animales marcados como «Adoptado». Si no hay ninguno, la sección no aparece.',
|
||
'fields' => array(
|
||
'eyebrow' => $t( 'Antetítulo', 'Ya están en casa', 'Etxean daude jada' ),
|
||
'title' => $t( 'Título', 'Historias con final feliz', 'Amaiera zoriontsuko istorioak' ),
|
||
'text' => $t( 'Texto', 'Gracias a las familias que les abrieron su casa.', 'Eskerrik asko etxeko ateak ireki zizkieten familiei.', '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' => 'Si necesitas ayuda (perdidos, encontrados…)',
|
||
'section' => true,
|
||
'fields' => array_merge(
|
||
array(
|
||
'eyebrow' => $t( 'Antetítulo', 'Si eres tú quien necesita ayuda', 'Laguntza behar duzuna zu bazara' ),
|
||
'title' => $t( 'Título', 'Perdidos, encontrados y entregas', 'Galduak, aurkituak eta entregak' ),
|
||
),
|
||
$card( 'caso', 1, array( 'He perdido a mi animal', 'Nire animalia galdu dut' ),
|
||
array( 'Llámanos cuanto antes y avisa a la Policía Municipal. Los animales que se recogen en Irun y Hondarribia llegan a nuestras instalaciones: el microchip actualizado es la forma más rápida de volver a casa.',
|
||
'Deitu iezaguzu lehenbailehen eta jakinarazi Udaltzaingoari. Irunen eta Hondarribian jasotzen diren animaliak gure instalazioetara iristen dira: mikrotxipa eguneratuta izatea da etxera itzultzeko modurik azkarrena.' ) ),
|
||
$card( 'caso', 2, array( 'He encontrado un animal', 'Animalia bat aurkitu dut' ),
|
||
array( 'Si está en la calle en Irun u Hondarribia, avisa a la Policía Municipal: ellos lo recogen y lo traen a Gure Ametsa, donde pasa control veterinario y le buscamos a su familia.',
|
||
'Irunen edo Hondarribian kalean badago, jakinarazi Udaltzaingoari: haiek jaso eta Gure Ametsara ekartzen dute, non albaitari-kontrola egiten zaion eta bere familia bilatzen diogun.' ) ),
|
||
$card( 'caso', 3, array( 'No puedo seguir cuidándolo', 'Ezin dut gehiago zaindu' ),
|
||
array( 'Escríbenos o llámanos antes de tomar una decisión. Te escucharemos sin juzgarte y buscaremos juntos la mejor salida para él.',
|
||
'Idatzi edo deitu iezaguzu erabaki bat hartu aurretik. Epaitu gabe entzungo dizugu eta elkarrekin bilatuko dugu harentzat irtenbiderik onena.' ) )
|
||
),
|
||
),
|
||
'faq' => array(
|
||
'panel' => 'ga_home',
|
||
'title' => 'Preguntas frecuentes',
|
||
'section' => true,
|
||
'fields' => array_merge(
|
||
array(
|
||
'eyebrow' => $t( 'Antetítulo', 'Dudas', 'Zalantzak' ),
|
||
'title' => $t( 'Título', 'Preguntas frecuentes', 'Ohiko galderak' ),
|
||
),
|
||
$qa( 1, '¿Qué incluye la adopción?', 'Todos los animales se entregan con microchip, vacunas al día, desparasitados y esterilizados, como marca la Ley de Bienestar Animal.',
|
||
'Zer barne hartzen du adopzioak?', 'Animalia guztiak mikrotxiparekin, txertoak egunean, desparasitatuta eta antzututa ematen dira, Animalien Ongizaterako Legeak agintzen duen bezala.' ),
|
||
$qa( 2, '¿Puedo ir a conocerlos?', 'Sí. Estamos en Jaizubia, 44 (Hondarribia), de lunes a viernes de 10:00 a 13:00 y de 14:00 a 19:00. Llámanos antes para organizar la visita.',
|
||
'Joan naiteke haiek ezagutzera?', 'Bai. Jaizubian gaude, 44 (Hondarribia), astelehenetik ostiralera 10:00etatik 13:00etara eta 14:00etatik 19:00etara. Deitu aurretik bisita antolatzeko.' ),
|
||
$qa( 3, '¿Puedo ser casa de acogida o voluntario/a?', 'Sí, nos ayuda muchísimo. Escríbenos desde el formulario de contacto y te contamos cómo empezar.',
|
||
'Harrera-etxe edo boluntario izan naiteke?', 'Bai, asko laguntzen digu. Idatzi iezaguzu harremanetarako formularioaren bidez eta nola hasi kontatuko dizugu.' ),
|
||
$qa( 4, '¿Cuidáis de mi perro o gato en vacaciones?', 'Sí, tenemos hotel para perros y gatos. Consulta disponibilidad con antelación, sobre todo en verano.',
|
||
'Nire txakurra edo katua zaintzen duzue oporretan?', 'Bai, txakur eta katuentzako hotela dugu. Galdetu erabilgarritasuna aldez aurretik, batez ere udan.' ),
|
||
$qa( 5, '', '', '', '' )
|
||
),
|
||
),
|
||
'content' => array(
|
||
'panel' => 'ga_home',
|
||
'title' => 'Contenido libre de la página «Inicio»',
|
||
'section' => true,
|
||
'description' => 'Lo que escribáis en la página Inicio (y en «Hasiera» para euskera) con el editor de bloques. Ideal para añadir patrones de «Gure Ametsa».',
|
||
'fields' => array(),
|
||
),
|
||
'visit' => array(
|
||
'panel' => 'ga_home',
|
||
'title' => 'Hotel y visita',
|
||
'section' => true,
|
||
'fields' => array(
|
||
'eyebrow' => $t( 'Antetítulo', 'Visítanos', 'Etorri gu ikustera' ),
|
||
'title' => $t( 'Título', 'Estamos en Jaizubia', 'Jaizubian gaude' ),
|
||
'text' => $t( 'Texto', 'Ven a conocer a los animales. Y si te vas de vacaciones, también cuidamos de tu perro o gato en nuestro hotel.', 'Etorri animaliak ezagutzera. Eta oporretara bazoaz, zure txakurra edo katua ere zaintzen dugu gure hotelean.', 'textarea' ),
|
||
'image' => array( 'type' => 'image', 'label' => 'Foto del hotel o las instalaciones', 'default' => 0 ),
|
||
'button' => $t( 'Botón del hotel', 'Hotel para perros y gatos', 'Txakur eta katuentzako hotela' ),
|
||
),
|
||
),
|
||
'talk' => array(
|
||
'panel' => 'ga_home',
|
||
'title' => 'Contacto con formulario',
|
||
'section' => true,
|
||
'fields' => array(
|
||
'eyebrow' => $t( 'Antetítulo', 'Hablemos', 'Hitz egin dezagun' ),
|
||
'title' => $t( 'Título', 'Habla con una persona', 'Hitz egin pertsona batekin' ),
|
||
'text' => $t( 'Texto', 'Adopciones, acogidas, voluntariado, hotel o un animal perdido: escríbenos y te responde alguien del equipo.', 'Adopzioak, harrerak, boluntariotza, hotela edo animalia galdu bat: idatzi iezaguzu eta taldeko norbaitek erantzungo dizu.', 'textarea' ),
|
||
'form_title' => $t( 'Título del formulario', 'Escríbenos', 'Idatzi iezaguzu' ),
|
||
),
|
||
),
|
||
'help' => array(
|
||
'panel' => 'ga_home',
|
||
'title' => 'Formas de ayudar (tarjetas)',
|
||
'section' => true,
|
||
'hidden' => true,
|
||
'fields' => array(
|
||
'eyebrow' => $t( 'Antetítulo', 'Colabora', 'Lagundu' ),
|
||
'title' => $t( 'Título', 'Hay muchas formas de ayudar', 'Laguntzeko modu asko daude' ),
|
||
'text' => $t( 'Texto', 'No hace falta adoptar para cambiar la vida de un animal.', 'Ez da beharrezkoa adoptatzea animalia baten bizitza aldatzeko.', 'textarea' ),
|
||
),
|
||
),
|
||
'species' => array(
|
||
'panel' => 'ga_home',
|
||
'title' => 'Perros y gatos (accesos con foto)',
|
||
'section' => true,
|
||
'hidden' => true,
|
||
'fields' => array(
|
||
'title' => $t( 'Título (vacío = ocultar)', '¿A quién vas a conocer hoy?', 'Nor ezagutuko duzu gaur?' ),
|
||
'dog_label' => $t( 'Perros · texto', 'Conoce a los perros', 'Ezagutu txakurrak' ),
|
||
'dog_image' => array( 'type' => 'image', 'label' => 'Perros · foto', 'default' => 0 ),
|
||
'cat_label' => $t( 'Gatos · texto', 'Conoce a los gatos', 'Ezagutu katuak' ),
|
||
'cat_image' => array( 'type' => 'image', 'label' => 'Gatos · foto', 'default' => 0 ),
|
||
),
|
||
),
|
||
);
|
||
|
||
// 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;
|
||
}
|