WPTT / theme-sniffer

Theme Sniffer plugin using sniffs.
MIT License
270 stars 3 forks source link

kirki outputted twice for textdomain sniff error message #108

Closed timelsass closed 5 years ago

timelsass commented 5 years ago

image

dingo-d commented 5 years ago

Hmm interesting bug. Can you provide the theme that caused it? Easier to test it.

timelsass commented 5 years ago

Hey it was caused because the depth of 4 in the php files loop. I had a folder with a few classes like "class-themename-extend-kirki-typography.php", "class-themename-extend-kirki-palette.php". The loop just kept appending kirki for found matches without checking if it existed in the array of text domains already.

I pushed up some changes for that, and a few optimizations to help reduce some of the overhead of the file search that was in there.