fix+feat: quitar cédula + LOPDP Ecuador (banner, política, widget, footer)
This commit is contained in:
@@ -298,7 +298,6 @@ function pflores_get_cv_data(): array
|
||||
'focus' => $perfil['pf_focus'] ?? '',
|
||||
'languages' => $perfil['pf_languages'] ?? '',
|
||||
'born' => $perfil['pf_born'] ?? '',
|
||||
'id' => $perfil['pf_ci'] ?? '',
|
||||
'web' => $perfil['pf_web'] ?? '',
|
||||
],
|
||||
'photo' => $photoUrl,
|
||||
@@ -321,7 +320,6 @@ function pflores_get_cv_data(): array
|
||||
'additional' => [
|
||||
'Idiomas' => $perfil['pf_languages'] ?? '',
|
||||
'Disponibilidad' => $perfil['pf_availability'] ?? '',
|
||||
'C.I.' => $perfil['pf_ci'] ?? '',
|
||||
'Fecha de nacimiento' => $perfil['pf_born'] ?? '',
|
||||
'Web profesional' => $perfil['pf_web'] ?? '',
|
||||
],
|
||||
@@ -329,12 +327,152 @@ function pflores_get_cv_data(): array
|
||||
}
|
||||
|
||||
/* ─────────────────────────────────────────────
|
||||
3. FALLBACK si CMB2 no está activo
|
||||
3. LOPDP — Política de privacidad, banner y widget
|
||||
────────────────────────────────────────────── */
|
||||
|
||||
// A) Crear página de Política de Privacidad (una sola vez)
|
||||
add_action('admin_init', 'pflores_create_privacy_page');
|
||||
function pflores_create_privacy_page(): void
|
||||
{
|
||||
if (get_option('pflores_privacy_page_created')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$content = '<h2>Responsable del tratamiento</h2>
|
||||
<p>Patricia Soledad Flores Sánchez · <a href="mailto:patricflorsanchez@gmail.com">patricflorsanchez@gmail.com</a> · pflores.linkedcorp.net</p>
|
||||
|
||||
<h2>Datos recopilados</h2>
|
||||
<p>Este sitio web registra únicamente estadísticas anónimas de visitas: número de páginas vistas por intervalo horario. No se recopila ningún dato personal identificable (nombre, correo, IP persistente ni cookies de seguimiento).</p>
|
||||
|
||||
<h2>Finalidad</h2>
|
||||
<p>Estadísticas propias del sitio para conocer el nivel de uso. Los datos no se comparten con terceros.</p>
|
||||
|
||||
<h2>Base legal</h2>
|
||||
<p>Interés legítimo de la titular del sitio, conforme al <strong>Art. 26 de la Ley Orgánica de Protección de Datos Personales del Ecuador (LOPDP)</strong>.</p>
|
||||
|
||||
<h2>Conservación</h2>
|
||||
<p>Los registros se almacenan como transients de WordPress y se eliminan automáticamente cada hora.</p>
|
||||
|
||||
<h2>Derechos ARCO</h2>
|
||||
<p>Puede ejercer sus derechos de acceso, rectificación, cancelación y oposición contactando por correo electrónico a <a href="mailto:patricflorsanchez@gmail.com">patricflorsanchez@gmail.com</a>.</p>
|
||||
|
||||
<h2>Última actualización</h2>
|
||||
<p>Junio de 2026.</p>';
|
||||
|
||||
$id = wp_insert_post([
|
||||
'post_title' => 'Política de Privacidad',
|
||||
'post_name' => 'politica-de-privacidad',
|
||||
'post_content' => $content,
|
||||
'post_status' => 'publish',
|
||||
'post_type' => 'page',
|
||||
'post_author' => 1,
|
||||
]);
|
||||
|
||||
if ($id && ! is_wp_error($id)) {
|
||||
update_option('pflores_privacy_page_created', 1);
|
||||
}
|
||||
}
|
||||
|
||||
// B) Banner LOPDP en el footer público
|
||||
add_action('wp_footer', 'pflores_lopd_banner');
|
||||
function pflores_lopd_banner(): void
|
||||
{
|
||||
if (is_admin()) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<style>
|
||||
#pflores-lopd-banner {
|
||||
position: fixed; bottom: 0; left: 0; right: 0;
|
||||
z-index: 9999;
|
||||
background: #1B3A5C; color: #e8f0f8;
|
||||
display: flex;
|
||||
align-items: center; justify-content: space-between;
|
||||
padding: .9rem 1.5rem; font-size: .82rem;
|
||||
box-shadow: 0 -2px 12px rgba(0,0,0,.3);
|
||||
flex-wrap: wrap; gap: .5rem;
|
||||
}
|
||||
#pflores-lopd-banner p { margin: 0; flex: 1; min-width: 220px; line-height: 1.5; }
|
||||
.pflores-lopd-actions { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }
|
||||
.pflores-lopd-link { color: #a8c8e8; font-size: .8rem; text-decoration: underline; }
|
||||
.pflores-lopd-link:hover { color: #fff; }
|
||||
#pflores-lopd-accept {
|
||||
background: #c0392b; color: #fff; border: none;
|
||||
padding: .45rem 1.1rem; border-radius: 4px;
|
||||
font-size: .8rem; font-weight: 600; cursor: pointer;
|
||||
font-family: inherit;
|
||||
}
|
||||
#pflores-lopd-accept:hover { background: #a93226; }
|
||||
@media (max-width: 600px) {
|
||||
#pflores-lopd-banner { flex-direction: column; align-items: flex-start; }
|
||||
.pflores-lopd-actions { width: 100%; justify-content: flex-end; }
|
||||
}
|
||||
</style>
|
||||
<div id="pflores-lopd-banner" role="dialog" aria-label="Aviso de privacidad" style="display:none">
|
||||
<p>
|
||||
<strong>Privacidad</strong> — Este sitio registra estadísticas de visitas de forma anónima.
|
||||
Ningún dato personal es almacenado ni compartido, conforme a la
|
||||
<strong>Ley Orgánica de Protección de Datos Personales del Ecuador (LOPDP)</strong>.
|
||||
</p>
|
||||
<div class="pflores-lopd-actions">
|
||||
<a href="/politica-de-privacidad/" class="pflores-lopd-link">Política de privacidad</a>
|
||||
<button id="pflores-lopd-accept" type="button">Aceptar</button>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
(function(){
|
||||
var banner = document.getElementById('pflores-lopd-banner');
|
||||
if (!banner) return;
|
||||
if (!localStorage.getItem('pflores_lopd_ok')) {
|
||||
banner.style.display = 'flex';
|
||||
}
|
||||
document.getElementById('pflores-lopd-accept')
|
||||
.addEventListener('click', function(){
|
||||
localStorage.setItem('pflores_lopd_ok', '1');
|
||||
banner.style.display = 'none';
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
|
||||
// C) Widget de visitas en el dashboard
|
||||
add_action('wp_dashboard_setup', 'pflores_visitas_widget');
|
||||
function pflores_visitas_widget(): void
|
||||
{
|
||||
wp_add_dashboard_widget(
|
||||
'pflores_visitas_totales',
|
||||
'CV Patricia Flores — Estadísticas de visitas',
|
||||
'pflores_render_visitas_widget'
|
||||
);
|
||||
}
|
||||
function pflores_render_visitas_widget(): void
|
||||
{
|
||||
$temas = [
|
||||
'persona-cv' => (int) get_option('persona_total_visits', 0),
|
||||
'cvolio' => (int) get_option('cvolio_total_visits', 0),
|
||||
'lumina' => (int) get_option('lumina_total_visits', 0),
|
||||
'apex-cv' => (int) get_option('apex_total_visits', 0),
|
||||
];
|
||||
$total = array_sum($temas);
|
||||
echo '<table style="width:100%;border-collapse:collapse;font-size:.9rem">';
|
||||
foreach ($temas as $slug => $visitas) {
|
||||
echo '<tr><td style="padding:4px 8px">' . esc_html($slug) . '</td>';
|
||||
echo '<td style="padding:4px 8px;text-align:right;font-weight:600">' . esc_html((string) $visitas) . '</td></tr>';
|
||||
}
|
||||
echo '<tr style="border-top:1px solid #ccc"><td style="padding:6px 8px;font-weight:700">Total</td>';
|
||||
echo '<td style="padding:6px 8px;text-align:right;font-weight:700">' . esc_html((string) $total) . '</td></tr>';
|
||||
echo '</table>';
|
||||
echo '<p style="margin-top:8px;font-size:.78rem;color:#666">Visitas únicas por hora (LOPDP — datos anónimos)</p>';
|
||||
}
|
||||
|
||||
/* ─────────────────────────────────────────────
|
||||
4. FALLBACK si CMB2 no está activo
|
||||
────────────────────────────────────────────── */
|
||||
function pflores_cv_fallback_data(): array
|
||||
{
|
||||
return [
|
||||
'hero' => ['eyebrow' => 'Currículum ejecutivo', 'name' => 'Patricia Soledad Flores Sánchez', 'role' => 'Gerente / Jefa de Operaciones Financieras', 'role2' => 'Sector financiero y microfinanzas', 'intro' => 'Ejecutiva financiera con más de 22 años de trayectoria en banca y microfinanzas.', 'location' => 'Loja, Ecuador', 'email' => 'patricflorsanchez@gmail.com', 'phone' => '+593 99 469 8405', 'linkedin' => 'https://www.linkedin.com/in/patricia-soledad-flores-s%C3%A1nchez-43b84418/', 'availability' => 'Inmediata | Presencial / Híbrida / Remota', 'focus' => 'Operaciones financieras, control interno y transformación digital', 'languages' => 'Español nativo | Inglés básico en formación activa', 'born' => '3 de agosto de 1980', 'id' => '1103591648', 'web' => 'pflores.linkedcorp.net'],
|
||||
'hero' => ['eyebrow' => 'Currículum ejecutivo', 'name' => 'Patricia Soledad Flores Sánchez', 'role' => 'Gerente / Jefa de Operaciones Financieras', 'role2' => 'Sector financiero y microfinanzas', 'intro' => 'Ejecutiva financiera con más de 22 años de trayectoria en banca y microfinanzas.', 'location' => 'Loja, Ecuador', 'email' => 'patricflorsanchez@gmail.com', 'phone' => '+593 99 469 8405', 'linkedin' => 'https://www.linkedin.com/in/patricia-soledad-flores-s%C3%A1nchez-43b84418/', 'availability' => 'Inmediata | Presencial / Híbrida / Remota', 'focus' => 'Operaciones financieras, control interno y transformación digital', 'languages' => 'Español nativo | Inglés básico en formación activa', 'born' => '3 de agosto de 1980', 'web' => 'pflores.linkedcorp.net'],
|
||||
'photo' => '',
|
||||
'metrics' => [],
|
||||
'highlights' => [],
|
||||
|
||||
@@ -140,6 +140,10 @@ $skills = array_filter($skillsFlat);
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<p style="font-size:.65rem;color:rgba(255,255,255,.25);text-align:center;margin-top:auto;padding-top:.75rem">
|
||||
<a href="/politica-de-privacidad/" style="opacity:.6;text-decoration:underline;color:inherit">Política de Privacidad · LOPDP</a>
|
||||
</p>
|
||||
|
||||
</aside><!-- /.ax-sidebar -->
|
||||
|
||||
<?php /* ===================================================================
|
||||
|
||||
@@ -196,7 +196,6 @@ function apex_cv_data(): array
|
||||
'additional' => [
|
||||
'Idiomas' => 'Español nativo | Inglés básico en formación activa',
|
||||
'Disponibilidad' => 'Inmediata | Presencial / Híbrida / Remota',
|
||||
'C.I.' => '1103591648',
|
||||
'Fecha de nacimiento'=> '3 de agosto de 1980',
|
||||
'Web profesional' => 'pflores.linkedcorp.net',
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user