feat: legal pages, footer identity, contact address sidebar
- Create 9 pages (ES/RO/EN): Estatutos, Código Ético, Código Deontológico linked as Polylang translation groups - Update Aviso Legal + Privacy Policy with official data: CIF G22992846, Registro Asoc. Illes Balears Secc.1ª n.º 311000012342, Avda. Asima 17, 07009 Palma, presidencia@acrib.es - Footer: add language-aware links to new legal pages (ES/RO/EN labels) - Footer: show CIF and registry number on every page - Contact section: inject address sidebar (JS-based) alongside CF7 form with address, info@acrib.es, presidencia@acrib.es; responsive grid layout - Kadence CSS: add .acrib-footer-ids rule for identity line Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -24,12 +24,25 @@ add_filter('body_class', function ($classes) {
|
||||
return $classes;
|
||||
}, 999);
|
||||
|
||||
// --- Footer: bottom bar with legal links + Cloud Host credit ---
|
||||
// --- Footer: bottom bar with legal links + org identity + Cloud Host credit ---
|
||||
add_action('wp_footer', function () {
|
||||
$year = date('Y');
|
||||
$legal_url = home_url('/aviso-legal/');
|
||||
$pp_url = home_url('/politica-privacidad/');
|
||||
$cookie_url = home_url('/politica-cookies/');
|
||||
|
||||
// Language-aware labels + new legal page URLs
|
||||
$lang = function_exists('pll_current_language') ? pll_current_language() : 'es';
|
||||
$ids = get_option('acrib_legal_page_ids', []);
|
||||
$estatutos_url = !empty($ids['estatutos'][$lang]) ? get_permalink($ids['estatutos'][$lang]) : home_url('/estatutos/');
|
||||
$etica_url = !empty($ids['etica'][$lang]) ? get_permalink($ids['etica'][$lang]) : home_url('/codigo-etico/');
|
||||
$deon_url = !empty($ids['deon'][$lang]) ? get_permalink($ids['deon'][$lang]) : home_url('/codigo-deontologico/');
|
||||
$ll = [
|
||||
'es' => ['al' => 'Aviso Legal', 'pp' => 'Privacidad', 'ck' => 'Cookies', 'est' => 'Estatutos', 'eta' => 'Código Ético', 'deo' => 'Código Deontológico'],
|
||||
'ro' => ['al' => 'Mențiuni Legale', 'pp' => 'Confidențialitate', 'ck' => 'Cookie-uri', 'est' => 'Statut', 'eta' => 'Cod Etic', 'deo' => 'Cod Deontologic'],
|
||||
'en' => ['al' => 'Legal Notice', 'pp' => 'Privacy Policy', 'ck' => 'Cookies', 'est' => 'Statutes', 'eta' => 'Code of Ethics', 'deo' => 'Deontological Code'],
|
||||
];
|
||||
$l = $ll[$lang] ?? $ll['es'];
|
||||
?>
|
||||
<div class="acrib-footer-bottom">
|
||||
<div class="acrib-footer-bottom-inner">
|
||||
@@ -37,11 +50,17 @@ add_action('wp_footer', function () {
|
||||
© <?php echo $year; ?> <strong>ACRIB</strong> — Asociación Casa Românească de las Islas Baleares
|
||||
</p>
|
||||
<a class="acrib-footer-fb" href="https://www.facebook.com/profile.php?id=61583585888787" target="_blank" rel="noopener noreferrer" aria-label="ACRIB en Facebook"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><path d="M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"/></svg></a>
|
||||
<ul class="acrib-footer-legal-links">
|
||||
<li><a href="<?php echo esc_url($legal_url); ?>">Aviso Legal</a></li>
|
||||
<li><a href="<?php echo esc_url($pp_url); ?>">Privacidad</a></li>
|
||||
<li><a href="<?php echo esc_url($cookie_url); ?>">Cookies</a></li>
|
||||
<ul class="acrib-footer-legal-links">
|
||||
<li><a href="<?php echo esc_url($legal_url); ?>"><?php echo esc_html($l['al']); ?></a></li>
|
||||
<li><a href="<?php echo esc_url($pp_url); ?>"><?php echo esc_html($l['pp']); ?></a></li>
|
||||
<li><a href="<?php echo esc_url($cookie_url); ?>"><?php echo esc_html($l['ck']); ?></a></li>
|
||||
<li><a href="<?php echo esc_url($estatutos_url); ?>"><?php echo esc_html($l['est']); ?></a></li>
|
||||
<li><a href="<?php echo esc_url($etica_url); ?>"><?php echo esc_html($l['eta']); ?></a></li>
|
||||
<li><a href="<?php echo esc_url($deon_url); ?>"><?php echo esc_html($l['deo']); ?></a></li>
|
||||
</ul>
|
||||
<p class="acrib-footer-ids">
|
||||
CIF: <strong>G22992846</strong> • Reg. Asoc. Illes Balears, Secc. 1.ª, n.º 311000012342
|
||||
</p>
|
||||
<p class="acrib-footer-hosted">
|
||||
Hosted & Maintained by <a href="https://cloudhost.es" target="_blank" rel="noopener noreferrer">Cloud Host</a>
|
||||
</p>
|
||||
@@ -50,6 +69,54 @@ add_action('wp_footer', function () {
|
||||
<?php
|
||||
}, 100);
|
||||
|
||||
// ── Contact section: inject address sidebar next to CF7 form ──
|
||||
add_action('wpcf7_enqueue_scripts', function () {
|
||||
add_action('wp_footer', function () {
|
||||
$lang = function_exists('pll_current_language') ? pll_current_language() : 'es';
|
||||
$ll = [
|
||||
'es' => ['title' => 'Información de contacto', 'addr' => 'Dirección', 'email' => 'Correo general', 'pres' => 'Presidencia'],
|
||||
'ro' => ['title' => 'Informații de contact', 'addr' => 'Adresă', 'email' => 'E-mail general', 'pres' => 'Președinție'],
|
||||
'en' => ['title' => 'Contact information', 'addr' => 'Address', 'email' => 'General email', 'pres' => 'Presidency'],
|
||||
];
|
||||
$l = $ll[$lang] ?? $ll['es'];
|
||||
?>
|
||||
<style id="acrib-contact-layout-css">
|
||||
.acrib-contact-layout{display:grid;grid-template-columns:280px 1fr;gap:2.5rem;align-items:start;}
|
||||
.acrib-contact-info{background:#f4f7fb;border-radius:6px;padding:1.75rem 1.5rem;border-top:3px solid #c69c48;}
|
||||
.acrib-contact-info h4{font-family:"Lato",sans-serif;font-size:.75rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:#13294b;margin:0 0 1.25rem;}
|
||||
.acrib-ci-row{display:flex;flex-direction:column;margin-bottom:1rem;}
|
||||
.acrib-ci-label{font-size:.7rem;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:#8a9ab5;font-family:"Lato",sans-serif;margin-bottom:.25rem;}
|
||||
.acrib-ci-value,.acrib-contact-info address{font-size:.9rem;color:#13294b;line-height:1.6;font-style:normal;}
|
||||
.acrib-contact-info a{color:#c69c48;text-decoration:none;}
|
||||
.acrib-contact-info a:hover{text-decoration:underline;}
|
||||
.acrib-ci-cif{font-size:.72rem;color:#8a9ab5;margin:.75rem 0 0;padding-top:.75rem;border-top:1px solid #dce6f0;}
|
||||
@media(max-width:820px){.acrib-contact-layout{grid-template-columns:1fr;}}
|
||||
</style>
|
||||
<script id="acrib-contact-layout-js">
|
||||
(function(){
|
||||
var form=document.querySelector('.wpcf7');
|
||||
if(!form) return;
|
||||
var layout=document.createElement('div');
|
||||
layout.className='acrib-contact-layout';
|
||||
form.parentNode.insertBefore(layout,form);
|
||||
var info=document.createElement('div');
|
||||
info.className='acrib-contact-info';
|
||||
info.innerHTML='<h4><?php echo esc_js($l['title']); ?></h4>'
|
||||
+'<div class="acrib-ci-row"><span class="acrib-ci-label"><?php echo esc_js($l['addr']); ?></span>'
|
||||
+'<address>Avda. Asima, n.\u00ba\u00a017<br>Planta\u00a01, Puerta\u00a0A<br>07009 Palma de Mallorca<br>Illes Balears, Espa\u00f1a</address></div>'
|
||||
+'<div class="acrib-ci-row"><span class="acrib-ci-label"><?php echo esc_js($l['email']); ?></span>'
|
||||
+'<span class="acrib-ci-value"><a href="mailto:info@acrib.es">info@acrib.es</a></span></div>'
|
||||
+'<div class="acrib-ci-row"><span class="acrib-ci-label"><?php echo esc_js($l['pres']); ?></span>'
|
||||
+'<span class="acrib-ci-value"><a href="mailto:presidencia@acrib.es">presidencia@acrib.es</a></span></div>'
|
||||
+'<p class="acrib-ci-cif">CIF: G22992846</p>';
|
||||
layout.appendChild(info);
|
||||
layout.appendChild(form);
|
||||
}());
|
||||
</script>
|
||||
<?php
|
||||
}, 55);
|
||||
});
|
||||
|
||||
// --- Security headers ---
|
||||
add_action('send_headers', function () {
|
||||
if (!is_admin()) {
|
||||
|
||||
Reference in New Issue
Block a user