Extend supported request routing

Use these allowlists for public integration requests:

  • pom_translate_rest_route_allowlist;
  • pom_translate_rest_method_allowlist;
  • pom_translate_ajax_action_allowlist.

Return normalized route patterns, uppercase HTTP methods, or sanitized AJAX actions as expected by the corresponding helper. Then use the REST/AJAX field allowlists to limit which response fields may be translated.

pom_translate_should_handle_frontend_routes can disable or enable frontend routing for an exceptional request, but should not be used to implement a second routing system.

Control final HTML translation

POM Translate can translate eligible text in the completed HTML response when the current request uses a non-base language. These filters provide narrow controls for integrations that render unusual markup:

  • pom_translate_output_buffer_should_start( bool $enabled ) decides whether buffering starts for the request;
  • pom_translate_output_buffer_enabled( bool $enabled, string $html ) can stop processing after the response has been collected;
  • pom_translate_output_buffer_max_bytes( int $max_bytes ) changes the maximum response size accepted by the processor; return 0 only when deliberately removing that limit;
  • pom_translate_output_buffer_skip_tags( array $tags, string $html, string $context ) changes the elements whose descendants are ignored;
  • pom_translate_rest_skip_tags( array $tags, string $html ) and pom_translate_ajax_skip_tags( array $tags, string $html ) refine that list for supported REST and AJAX responses;
  • pom_translate_output_buffer_translate_attributes( array $attributes ) changes the HTML attributes eligible for translation.

Return lowercase element names and attribute names. Preserve the default skip list unless the added integration has a specific, tested need: translating executable, structured, media, or embedded content can corrupt the response.

Never allowlist private administration mutations simply to translate their response. Permissions, nonces, and request schemas remain the integration's responsibility.