qtranslate-slug
qtranslate-slug copied to clipboard
do not add a (non prefixed) two letters language code to the body css classes
at
https://github.com/not-only-code/qtranslate-slug/blob/trunk/includes/class-qtranslate-slug.php#L572
the current language is added as a two letters language code to the body classes.
this clashes
- for the french language with the woocommerce "standard" theme canvas theme (as already reported in #74)
- for the farsi language with fontawesome (see https://github.com/qTranslate-Team/qtranslate-x/issues/344)
most (if not all) qtranslate-slug's css classes are prefixed with qts_
and i would suggest that the prefix should also be used for the language in the body classes:
$classes[] = 'qts_'.call_user_func($this->get_plugin_prefix() . 'getLanguage');
or even better
$classes[] = 'qts_lang_'.call_user_func($this->get_plugin_prefix() . 'getLanguage');
sadly, i could not find out where the value is being used and cannot create a correct pull request (but my supposition is that the value is never used... and the filter could simply be removed).
in my local copy i've patched the code as suggested above and i will try to see if anything breaks.
hi @aoloe , yes, thats a good suggestion! i have to see if it breaks other sites that could rely on this