Comments (5)
Based on the premise used elsewhere that themes should support the latest WP version and up to three versions before it, this shim should only be needed until WP 5.6 comes out.
With that in mind, I'm not sure whether it's a good idea to make an exception in the sniff (which would need to be removed again later) or whether theme reviewers should be educated to just ignore that particular one.
You wouldn't want to accidentally whitelist a function with the same name which does something completely different (and would conflict with WP core).
from wpthemereview.
With that in mind, I'm not sure whether it's a good idea to make an exception in the sniff (which would need to be removed again later) or whether theme reviewers should be educated to just ignore that particular one.
Ideally it would be best if the reviewers are educated to ignore that, but as most of them never read on the basic requirements, I see this popping up a lot as a question on the TRT channel.
I think I could just ignore this in the Theme Sniffer plugin (just add a whitelist array which is scanned against once the sniffing is done, and remove it from the report).
I do see your point, so I'll close this issue here an move it to the sniffer repo 👍
from wpthemereview.
On second thought, could we maybe throw a warning about this kind of functions, so that reviewers do take a look (just in case something bad is hooked), but can be safely ignored?
from wpthemereview.
@dingo-d Don't know whether you've looked at the logic of the sniff, but that would effectively mean you would need to overload the whole sniff and maintain a duplicate. I cannot imagine that's what you want.
from wpthemereview.
Yeah, that would be a big overhead for a small change. I'll try to see how to implement this in a theme sniffer, as that is the tool that most reviewers are using.
from wpthemereview.
Related Issues (20)
- variables in template files are flagged as global HOT 15
- Exceptions to prefixing hook names HOT 7
- False positive on loading stylesheet in JS file HOT 4
- [New sniff] WC template versions HOT 7
- Dealing with rules that shouldn't apply to templates HOT 1
- Add sniff: WordPress.PHP.IniSet HOT 6
- [New sniff] Check if page templates are using reserved prefix HOT 1
- Detect WPTRT feature project versions HOT 3
- Add sniff documentation HOT 1
- Minimal PHP version HOT 11
- sniff: plugin territory - action hook wp_edit_nav_menu_walker
- File name with reserved slug in subfolder HOT 11
- Optimisation and minor grammar fixes
- [Implement sniff] Warn about short ternary usage in themes HOT 9
- Internal.Exception -- function update_current_version() should be removed.
- [Update existing sniff] Allow register_block_style HOT 1
- Allow `add_menu_page` & `add_submenu_page` HOT 9
- twentyseventeen theme: posts with no date - but date is shown in similar posts HOT 1
- 👍
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wpthemereview.