WPTT / theme-sniffer

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

Missing theme files that are not required #134

Open justintadlock opened 5 years ago

justintadlock commented 5 years ago

Theme Sniffer is erroneously requiring several theme files on https://github.com/WPTRT/theme-sniffer/blob/master/src/callback/class-run-sniffer-callback.php#L783

comments.php

This file is not required. What's required is a call to the comments_template() function, which can reference any file name.

functions.php

Themes do not need a functions.php.

screenshot.png

I believe we also allow a screenshot.jpg at .ORG. Other image file types may be allowed. Need to check.

justintadlock commented 5 years ago

There's some crossover with this issue and https://github.com/WPTRT/theme-sniffer/issues/128.

pattonwebz commented 5 years ago

I have some work related to this issue inside of #129.

timelsass commented 5 years ago

@justintadlock do you know who can update the handbook reference - I thought it was weird comments.php was listed as a requirement and had updated a few themes to account for that.

pattonwebz commented 5 years ago

@timelsass I can update the page if we come up with a more correct wording for it. The current text is Include comments.php (via comments_template()). which I agree is incorrect.

justintadlock commented 5 years ago

I don't have access to the themes handbook (just the Make blog).

@pattonwebz - Because the handbook page is referring to required files, maybe it can simply be removed. The requirement of comments_template() should be listed elsewhere.

Or, possibly have a sub-section under that of "maybe required" files and cover all the /wp-includes/theme-compat things that a theme may need to have if using certain templates/features.

timelsass commented 5 years ago

Yeah thanks for linking that @justintadlock that's the page I was thinking of

carolinan commented 5 years ago

Doesn't the uploader also require sidebar.php? All 3 would need to require the same files, uploader, theme check, theme sniffer (And not show errors for child themes).

justintadlock commented 5 years ago

Doesn't the uploader also require sidebar.php?

No. I have many themes without that file.

What you're probably thinking of is: the sidebar check from TC is to see if dynamic_sidebar() is called in the scenario that a register_sidebar() call is found.