Open jrfnl opened 8 years ago
The text domain in style.css needs to be the theme slug as well. It would be good if this could be checked at the same time I think. Though getting the theme slug might prove tricky.
The text domain in style.css needs to be the theme slug as well. It would be good if this could be checked at the same time I think. Though getting the theme slug might prove tricky.
That's in point 3 / #35, but yes these two items might possible be combined implementation wise.
I have included action item 2 above in Issue #50
Is this something we want to work on, any volunteers? Or should I leave this for the Theme Sniffer?
Rule type:
Error
Rule:
From what I can see, there are actually 5 distinct i18n related rules which may need sniffs - this issue covers the second item on the list.
Refs: https://make.wordpress.org/themes/handbook/review/required/#language https://make.wordpress.org/themes/handbook/review/required/theme-check-plugin/#additional-checks
The second item should be quite doable to implement as a sniff which checks the CSS files until it finds the one called style.css and only then searches for the required text string.
Theme check file covering this rule:
https://github.com/Otto42/theme-check/blob/master/checks/textdomain.php
To do: