Commit 502e4f5
committed
Introduce Token Map: An optimized static translation class.
This patch introduces a new class: `WP_Token_Map`, which is designed for
efficient lookup and translation of static mappings between string keys
or tokens, and string replacements (for example, HTML character
references).
The token map incorporates certain limitations on the string length of
the tokens, but takes advantage of multiple optimizations to efficiently
find and replace tokens in a string.1 parent 3a6cca9 commit 502e4f5
3 files changed
Lines changed: 1926 additions & 0 deletions
File tree
- src
- wp-includes
- html-api
0 commit comments