Title Sanitizer Regex Tweak
-
Hi ShadowsDweller –
Great plugin, thank-you.
Wondering if there is an easy tweak that I can make somewhere to your sanitizer code so that it will not remove an “x” (as in “times”) from filenames when porting them to the post title of the image?
For example, I have a series of lenses in a product catalogue which as part of the filename and the resulting post title need to have their focal length and zoom ratio intact (i.e. 8×32). When I rename/retitle in bulk this “x” is being removed from the post title so a file name of:
lens-rightangle-8×32-rear-projection.jpg is being sanitized to “Lens Rightangle 8 32 Rear Projection” which is great except I need that “x” back. I’ve been adding it manually, but that negates the power of your plugin!Unfortunately, regular expressions are not my strong point. I suspect the magic is around line 238 in class-media-rename and based on reading on regex would have thought the ‘x’ as a regular alphanumeric would be untouched in the current args. I don’t want to go tinkering where I shouldn’t be without some guidance.
Thanks for your time in advance, hope you can point me in the right direction!
- The topic ‘Title Sanitizer Regex Tweak’ is closed to new replies.