diff --git a/CHANGELOG.md b/CHANGELOG.md index 25ac5b1..f8ddae1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,25 @@ Formato: `X.Y.Z` según `VERSIONADO.md` ## [1.1.0] — 2026-06-05 +### feat: LOPDP Ecuador completo +- **router.php** — PHP built-in server ahora soporta permalinks (`/%postname%/`). +- **start-wordpress.sh** — actualizado para usar `router.php`. +- **Permalinks** configurados a `/%postname%/` en BD dev y producción. +- **Navegación** en los 4 temas usa `home_url()` base cuando no es front page, para que los links ancla funcionen desde páginas internas. +- **index.php** reescrito en los 4 temas con estilo propio del tema, botón "Volver al CV" y tipografía coherente. +- **Página Política de Privacidad** (`/politica-de-privacidad/`) creada en BD con contenido LOPDP completo (Art. 26 LOPDP Ecuador, base legal interés legítimo, datos anónimos). +- **Banner LOPDP** en footer: fondo navy `#1B3A5C`, botón rojo `#c0392b`, `display:flex` sin `!important`, JS con `localStorage`, responsive 600px. Sin los bugs de `removeAttribute('hidden')` ni `flex!important`. +- **Widget dashboard** "CV Patricia Flores — Estadísticas de visitas" con 4 temas + total. +- **Link de privacidad** en footer de los 4 temas usando `home_url()`. + +### fix: cédula eliminada del sitio público (incluido en esta versión) +- Quitada la cédula (1103591648) de `pflores_get_cv_data()`, fallback y todos los `inc/cv-data.php`. +- Limpiada de BD dev y producción. + +--- + +## [1.1.0] — 2026-06-05 (revisado) + ### fix: eliminar cédula del sitio público - Quitada la cédula (1103591648) de `pflores_get_cv_data()`, `pflores_cv_fallback_data()` y todos los `inc/cv-data.php` de los 4 temas. - Limpiados los campos `'id'` y `'C.I.'` de las opciones `pflores_perfil` en BD dev (`.20`) y producción (`.32`). diff --git a/backend/router.php b/backend/router.php new file mode 100644 index 0000000..66b4215 --- /dev/null +++ b/backend/router.php @@ -0,0 +1,7 @@ +Responsable del tratamiento

Patricia Soledad Flores Sánchez · patricflorsanchez@gmail.com · pflores.linkedcorp.net

@@ -359,6 +355,28 @@ function pflores_create_privacy_page(): void

Última actualización

Junio de 2026.

'; + // Si ya existe, reparar si tiene contenido genérico de WordPress + $existing = get_page_by_path('politica-de-privacidad'); + if ($existing) { + update_option('pflores_privacy_page_created', $existing->ID); + if (str_contains((string) $existing->post_content, 'Qui') || + str_contains((string) $existing->post_content, 'sample') || + trim($existing->post_content) === '') { + wp_update_post([ + 'ID' => $existing->ID, + 'post_content' => $content, + 'post_status' => 'publish', + 'post_name' => 'politica-de-privacidad', + ]); + } + return; + } + + // Si no existe, crearla + if (get_option('pflores_privacy_page_created')) { + return; + } + $id = wp_insert_post([ 'post_title' => 'Política de Privacidad', 'post_name' => 'politica-de-privacidad', @@ -369,7 +387,14 @@ function pflores_create_privacy_page(): void ]); if ($id && ! is_wp_error($id)) { - update_option('pflores_privacy_page_created', 1); + update_option('pflores_privacy_page_created', $id); + // Asegurar permalinks bonitos + global $wpdb; + $wpdb->update( + $wpdb->options, + ['option_value' => '/%postname%/'], + ['option_name' => 'permalink_structure'] + ); } } @@ -380,6 +405,7 @@ function pflores_lopd_banner(): void if (is_admin()) { return; } + $privacy_url = esc_url(home_url('/politica-de-privacidad/')); ?> +
+ Volver al CV + +

+ +
+ + diff --git a/frontend/cvfolio-theme/footer.php b/frontend/cvfolio-theme/footer.php index f75b788..b7f4a98 100644 --- a/frontend/cvfolio-theme/footer.php +++ b/frontend/cvfolio-theme/footer.php @@ -3,7 +3,7 @@ diff --git a/frontend/cvfolio-theme/functions.php b/frontend/cvfolio-theme/functions.php index 7d2eca5..e0ded77 100644 --- a/frontend/cvfolio-theme/functions.php +++ b/frontend/cvfolio-theme/functions.php @@ -92,13 +92,14 @@ function cvolio_render_primary_menu(): string ])); } + $base = is_front_page() ? '' : home_url('/'); $items = [ - '#resumen' => __('Resumen', 'cvolio'), - '#impacto' => __('Impacto', 'cvolio'), - '#experiencia' => __('Experiencia', 'cvolio'), - '#formacion' => __('Formación', 'cvolio'), - '#certificaciones' => __('Certificaciones', 'cvolio'), - '#contacto' => __('Contacto', 'cvolio'), + $base . '#resumen' => __('Resumen', 'cvolio'), + $base . '#impacto' => __('Impacto', 'cvolio'), + $base . '#experiencia' => __('Experiencia', 'cvolio'), + $base . '#formacion' => __('Formación', 'cvolio'), + $base . '#certificaciones' => __('Certificaciones', 'cvolio'), + $base . '#contacto' => __('Contacto', 'cvolio'), ]; $html = '