qtranslate / qtranslate-xt

qTranslate-XT (eXTended) - reviving qTranslate-X multilingual plugin for WordPress. A new community-driven plugin soon. Built-in modules for WooCommerce, ACF, slugs and others.
GNU General Public License v2.0
554 stars 104 forks source link

Remove internal QTS filter hooks #1176

Closed herrvigg closed 2 years ago

herrvigg commented 2 years ago

The QTS filters come from the legacy plugin:

For easier maintenance and readability, remove those filters and replace them with direct calls instead. New qtranslate filters will be added on request if the need is justified.

Rename the two validate slugs functions to sanitize (post/term). Minor cleanup to improve phpdoc and code readability.

herrvigg commented 2 years ago

Reverted the empty string checks. It should never be false with qtranxf but that's for the post title / term name. For the input slugs there might be special cases with false that I don't see well yet. This can probably be rewritten but it's a different topic, it would be for another patch.