WPTT / theme-sniffer

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

Theme prefixes check #147

Closed weavertheme closed 5 years ago

weavertheme commented 5 years ago

Variables in theme templates (e.g., 404.php, archive.php, etc.) are incorrectly flagged as errors. Since these files are actually included via get_template_part(), the variables really aren't global in scope as the error implies. Perhaps a comment in the template files could silence this error for these files?

joyously commented 5 years ago

See https://github.com/WPTRT/WPThemeReview/issues/200 and https://github.com/WPTRT/WPThemeReview/issues/205

dingo-d commented 5 years ago

Closing as a duplicate plus upstream. For the globals discussion there is a #103 issue 🙂