diff --git a/wp-content/mu-plugins/acrib-core.php b/wp-content/mu-plugins/acrib-core.php index 04222c0..177e286 100644 --- a/wp-content/mu-plugins/acrib-core.php +++ b/wp-content/mu-plugins/acrib-core.php @@ -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']; ?>