Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do not add a (non prefixed) two letters language code to the body css classes #126

Open
aoloe opened this issue Nov 28, 2016 · 1 comment

Comments

@aoloe
Copy link

aoloe commented Nov 28, 2016

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

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.

@aoloe aoloe changed the title avoid adding a (non prefixed) two letters language code to the body css classes do not add a (non prefixed) two letters language code to the body css classes Nov 28, 2016
@LC43
Copy link
Collaborator

LC43 commented Dec 6, 2016

hi @aoloe , yes, thats a good suggestion! i have to see if it breaks other sites that could rely on this

LC43 added a commit that referenced this issue Feb 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants