You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Code sample(s) which should pass./*Template: test-dir/test-templateVersion: 1.0*/
// Code sample(s) which should be flagged by the sniff./*Template: test-dir/test-template Version: 1.0*/
When get_file_data() will try to parse the above, it will attempt to process the template as test-dir/test-template Version: 1.0 instead of test-dir/test-template
To do:
Add the rule in the Theme Review handbook to the Requirements page.
Create unit tests
Create new sniff
Adjust existing WPCS / PHPCS sniff and send in PR upstream.
Add existing sniffname sniff to the ruleset.
The text was updated successfully, but these errors were encountered:
Having bad spacing/incorrect line breaks in the theme style.css "Template:" header will prevent a child theme from working properly.
Rule:
Couldn't find anything in the handbook but I found this: https://codex.wordpress.org/Theme_Development#Theme_Stylesheet
Theme check file covering this rule:
https://github.com/WordPress/theme-check/blob/da79a6f17b126b52998474cd234e4210de5a2d6f/checks/style_needed.php
https://github.com/WordPress/theme-check/blob/da79a6f17b126b52998474cd234e4210de5a2d6f/checks/style_suggested.php
Closest I could find ^^
[For new sniffs only] Code Samples:
When
get_file_data()
will try to parse the above, it will attempt to process the template astest-dir/test-template Version: 1.0
instead oftest-dir/test-template
To do:
sniffname
sniff to the ruleset.The text was updated successfully, but these errors were encountered: