WordPress

Smart AI Translate v2.0.x

JC Jose Conti 3 min read
Smart AI Translate v2.0 - Nueva versión con soporte para Anthropic Claude, arquitectura multi-proveedor y navegación FSE

New 2.0.x branch of the plugin Smart AI Translate for WordPress.

Branch versions

2.0.0

New:

  • Added Anthropic (Claude) as a translation provider with support for Claude Sonnet 4, Haiku 4.5, and Opus 4 models.
  • Introduced extensible multi-provider architecture with client interface and factory pattern, facilitating the incorporation of new AI translation engines in the future.
  • Added support for Full Site Editing (FSE) navigation menus for cloning and translating.
  • The posts wp_navigation of FSE now appear in the Source Menu dropdown alongside classic menus.
  • Added function clone_fse_navigation_for_language() to clone posts wp_navigation with localized internal URLs.
  • Added function translate_fse_navigation_labels() to translate labels in blocks navigation-link and navigation-submenu.
  • Added frontend swapping of FSE navigation blocks via the filter pre_render_block for localized rendering.

Improved:

  • The admin dropdown groups classic menus and FSE navigations with labels optgroup when both exist.
  • The background menu service now dispatches to FSE or classic handlers based on the field menu_type.
  • Added modern spinner to the loading state of the translation editor modal so users have clear visual feedback while the iframe loads.

Performance:

  • Removed N+1 queries in term translations — get_term_translation() now relies on batch preloading and no longer resorts to individual SELECT queries for uncached terms (negative cache).
  • Removed N+1 queries in option overloads — get_overrides() now relies on batch preloading and caches empty results for options without translations (negative cache).
  • Removed destructive cache flushing alloptions in get_original_option_value() — original values are now stored in a static array, preventing WordPress from re-querying all autoloaded options on each overload (~154 queries removed).
  • Moved deferred DELETE queries from the hook shutdown to Action Scheduler, so cleanup runs outside the request lifecycle (~24 queries removed per request).
  • The overload of translated term slugs is now opt-in via the filter ai_translate_apply_term_slug (default false) to avoid ~400+ additional searches for WP_Term_Query caused by WordPress when resolving translated slugs to term IDs.
  • Added function prime_translated_term_caches() in template_redirect to batch preload term caches from the WordPress core for all translated term IDs in a single call.
  • Added scheduled cleanup via cron (twicedaily) for obsolete option overloads older than 30 days.

Fixed:

  • Removed noisy debug logs that triggered on every admin page load and optimized the REST API interceptor to skip GET/OPTIONS requests immediately, reducing unnecessary overhead.

2.0.1

Fixed:

  • Corrected fatal error in get_term_translation() when an external object cache (Redis, Memcached, LiteSpeed) returns a corrupt non-array value, causing a TypeError on sites with persistent cache enabled.

¡No te pierdas las novedades!

¡No hacemos spam! y te puedes dar de baja cuando quieras

Share
JC
Jose Conti
Desarrollador WordPress y WooCommerce. Buceando en WordPress desde 2004.

2 comments

Leave your comment

Your email address will not be published. Required fields are marked *