Skip to content

Releases: yosnap/real-state-headless

v1.1.0 — Datos de contacto del agente en la ficha del inmueble

Choose a tag to compare

@yosnap yosnap released this 15 Jul 08:59

Novedades

  • GET /properties y GET /properties/{id} incluyen ahora una clave agents: el array de perfiles públicos completos de los agentes responsables asignados al inmueble (reutilizando la asignación interna ya existente, sin exponer IDs de usuario de WordPress).
  • El perfil de agente (GET /agents, GET /agents/{id}) incluye ahora teléfono, email y whatsapp.
  • Nueva vinculación en el admin: cada perfil público de agente (rsh_agent) puede enlazarse con su usuario WordPress correspondiente desde el editor del perfil ("Contacto y usuario vinculado").

Notas técnicas

  • Cambio aditivo: no rompe consumidores existentes de la API.
  • La vinculación fuerza unicidad (un usuario solo puede estar enlazado a un perfil público a la vez).
  • Verificado en vivo contra datos de ejemplo antes del release.
  • Revisado por code-reviewer subagent — sin hallazgos bloqueantes.

v1.0.7 — Fix fatal 500 en /properties/{id} y /agents/{id}

Choose a tag to compare

@yosnap yosnap released this 10 Jul 00:26

Fix crítico

Las rutas /properties/{id} y /agents/{id} (fichas de detalle) devolvían HTTP 500 en cada petición.

Causa raíz: el validate_callback de esas rutas usaba directamente el string 'is_numeric'. WordPress invoca validate_callback con 3 argumentos ($value, $request, $param), y en PHP 8+ las funciones internas de PHP aplican arity estricta: al recibir más argumentos de los que declaran, lanzan ArgumentCountError (fatal).

Fix: se añadió Router::validate_numeric_id() como wrapper estático y ambas rutas ahora apuntan a ese método en lugar del string crudo.

Verificado en vivo: ambos endpoints devuelven 200 con JSON correcto tras el fix.

v1.0.6 - Fix API Keys UI

Choose a tag to compare

@yosnap yosnap released this 09 Jul 17:30

Fixed the root cause of the API Keys admin screen showing every key as revoked and hiding the delete/revoke button: KeyManager::list() returned the revoked column as a string ('0'), which is truthy in JavaScript. Also added: a proper copy-friendly box for a newly generated key, a permanent-delete option for revoked keys, and clear documentation of the single real permission (reveal_precise_location) and what it affects.

v1.0.5 - Fix backup restore losing taxonomies and images

Choose a tag to compare

@yosnap yosnap released this 09 Jul 17:15

Fixed three real bugs found via live testing: (1) wp_list_filter() misuse meant exported taxonomies were always empty; (2) the v1.0.2 SSRF fix blocked re-importing your own site's images since same-site URLs often resolve to a private IP; (3) self-signed HTTPS certs (common on local/staging) broke the same-site image download even after fix #2. Same-site allowlisting is scoped tightly (host+port match, per-request re-validation, no broadened trust for third-party URLs).

v1.0.4 - Thumbnail and rating columns

Choose a tag to compare

@yosnap yosnap released this 09 Jul 16:55

Admin UX: added a Miniatura (thumbnail) column right after the checkbox in the Inmuebles and Agentes list tables, and a Calificación (star rating) column right after the title in the Reseñas list table.

v1.0.3 - Demo installer fixes: images, configurable counts, key UX

Choose a tag to compare

@yosnap yosnap released this 09 Jul 16:47

Fixed via real user testing against the live site: (1) demo images never sideloaded despite a valid Unsplash key — media_sideload_image() rejects Unsplash's query-string-based format URLs, fixed with download_url()+media_handle_sideload(); (2) added configurable property/agent/review counts to the installer UI; (3) the Unsplash key was persisting correctly but the UI never showed it, causing users to accidentally wipe it with an empty resubmit — fixed. Code review caught and fixed 1 critical: a stale pre-1.0.3 transient would crash the installer with a fatal TypeError on next use.

v1.0.2 - Critical: manage_options capability collision fix

Choose a tag to compare

@yosnap yosnap released this 08 Jul 17:37

Critical fix: a hand-rolled CPT capabilities array in the Leads post type mapped its meta-capability keys to the literal string 'manage_options', which corrupted that primitive site-wide via WordPress's internal meta-cap reverse-lookup mechanism. This broke every admin-only page in the plugin (Fields Builder, API Keys, Installer, Backup) from v0.3.0 through v1.0.1 with a 'Sorry, you are not allowed to access this page' error, even for real administrators. Found and fixed via live runtime testing against a running WordPress install — a static code review would never have caught this. Fixed by switching to WordPress's own capability_type=[singular,plural] convention, which cannot collide. Self-heals already-active installs automatically on the next page load, no manual action needed.

v1.0.1 - Version sync fix

Choose a tag to compare

@yosnap yosnap released this 08 Jul 03:56

Fix: rsh_version option now syncs automatically on every boot instead of getting stuck at the version live during the plugin's first activation. Found and verified via live runtime testing against the dev site.

v1.0.0 - First stable release

Choose a tag to compare

@yosnap yosnap released this 07 Jul 19:37

Full Changelog: v0.6.0...v1.0.0