- 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>
36 lines
1.5 KiB
PHP
36 lines
1.5 KiB
PHP
<?php
|
|
/* Accesos grandes a perros y gatos (inspirado en «Meet our dogs / Meet our cats»). */
|
|
$tiles = array();
|
|
foreach ( array( 'dog' => 'perro', 'cat' => 'gato' ) as $key => $slug ) {
|
|
$term = get_term_by( 'slug', $slug, 'especie' );
|
|
if ( $term && function_exists( 'pll_get_term' ) ) {
|
|
$translated = pll_get_term( $term->term_id, ga_lang() );
|
|
$term = $translated ? get_term( $translated, 'especie' ) : $term;
|
|
}
|
|
$tiles[ $key ] = array(
|
|
'url' => $term && ! is_wp_error( $term ) ? get_term_link( $term ) : get_post_type_archive_link( 'animal' ),
|
|
'label' => ga_opt( 'adopcion', "{$key}_label" ),
|
|
'image' => (int) ga_opt( 'adopcion', "{$key}_image" ),
|
|
);
|
|
}
|
|
?>
|
|
<section class="ga-section ga-species-section">
|
|
<div class="ga-wrap">
|
|
<?php if ( ga_opt( 'species', 'title' ) ) : ?>
|
|
<h2 class="ga-center"><?php ga_opt_e( 'species', 'title' ); ?></h2>
|
|
<?php endif; ?>
|
|
<div class="ga-species">
|
|
<?php foreach ( $tiles as $key => $tile ) : ?>
|
|
<a class="ga-species__tile ga-species__tile--<?php echo esc_attr( $key ); ?>" href="<?php echo esc_url( $tile['url'] ); ?>">
|
|
<?php if ( $tile['image'] ) : ?>
|
|
<?php echo wp_get_attachment_image( $tile['image'], 'large', false, array( 'loading' => 'lazy', 'alt' => '' ) ); ?>
|
|
<?php else : ?>
|
|
<span class="ga-species__paw"><?php echo ga_placeholder_svg(); ?></span>
|
|
<?php endif; ?>
|
|
<span class="ga-species__label"><?php echo esc_html( $tile['label'] ); ?> <span aria-hidden="true">→</span></span>
|
|
</a>
|
|
<?php endforeach; ?>
|
|
</div>
|
|
</div>
|
|
</section>
|