Extend parser extraction

The parser exposes:

  • pom_translate_parser_container_tags( array $tags );
  • pom_translate_parser_inline_tags( array $tags );
  • pom_translate_parser_translatable_attributes( array $attributes );
  • pom_translate_parser_skip_tags( array $tags );
  • pom_translate_parser_translatable_shortcode_attributes( array $map );
  • pom_translate_parser_should_extract_shortcode_attribute( bool $extract, string $tag, string $attribute, string $value ).

pom_translate_parser_shortcode_attribute_seen is an observation action carrying tag, attribute, value, post ID, shortcode path, and parser source.

pom_translate_shortcode_layout_block_tags( array $tags ) identifies shortcodes that render block-level layouts. Add a shortcode tag when its rendered section must not be wrapped by WordPress paragraph formatting.

Callbacks must be pure and fast. Changing classification after content has already been extracted requires resaving or regenerating that content and reviewing existing translations.