Please QA and enhance Branda Text Replacement. This request is only about admin/back-end text.
The Text Replacement has always been a good start but it’s never been complete. Here are some examples that anyone here can try to see the anomalies that I’m seeing:
Change the name Smush to Compression for this exercise.
– Case sensitivity needs to be used because the source text is both “smush” and “Smush”. We can’t say “match the original casing. But this also means that we need to create a case sensitive match for every usage.
– For some replacements the text replacement seems to be based on words, not plain text. So for this exercise, a separate rule is required for Smush, SMUSH, Smushed, smushing, and “smushing!”. I also had to replace “smush” and “to smush” in separate rules.
If you’re not running Smush, try Defender, which I just replaced with SecureSite. You’ll find some text is replaced, others not. This might be due to how some of the text is used in code for i18n, as constants, etc.
Specific Requests:
1) Make sure replacement works for all text types. It’s dirt-simple to test this right now and somehow QA never notices that it’s not working. Ensure the text replacement is performed during all required filter hook events in the page generation cycle. If you’re concerned about performance, give us a hook or defined constant that we can use to add or remove specific hooks for our own fine-tuning.
2) Allow for RegEx. That will help a lot. (Make sure case sensitivity checking is disabled when regex is used.)
3) Allow us to move rules around. I created a rule and then found another following rule didn’t work because the text it needed to change was no longer there. So I deleted the first rule to allow the other to process first, then I recreated the first rule afterward. (This might have been that “smush” and “to smush” anomaly.) This is too precarious. We might need to do this sort of juggle anyway, like changing text to “FOOBAR” and then later processing all FOOBAR to FooBar or something else. But that’s very difficult if we can’t move the rules around.
4) (Would be nice) Allow selection of the number of items per page. What’s the deal with 10 items?
Thanks