-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Usage of CRON functions in theme #146
Comments
Cron jobs are plugin territory and not currently allowed in themes. |
@jrfnl Feel free to exclude this sniff then :) |
Well, we just won't be adding the sniff. However, this does raise another question: should there be a sniff that prohibits adding/touching cron ? |
Yes, I think that would make sense as theme should not be running regular tasks. |
Team discussed this. Can this be combined with an existing sniff for disallowed functions? If that's the best route, take it. Otherwise, implement a specific sniff for this. Meeting: https://wordpress.slack.com/archives/C02RP4Y3K/p1528822802001090 |
Thanks for the update. There will be one or more sniffs which will disallow functions, this is not included yet, but being worked on. If all that needs forbidding is functions, this will be included when I pull it. Are there any cron hooks which should be forbidden too ? |
We didn't mention specific hooks, but in general, all cron meddling in the theme should be forbidden. |
Functions to disallow? |
Should this be in the |
This has been merged in the |
We were going through the upstream sniffs during the meeting, especially through CronIntervalSniff, and we don't know whether to use it or not, because we don't have an agreement if we should allow cron jobs inside themes at all.
So a discussion is needed on this prefferably in the WPTRT meeting.
The text was updated successfully, but these errors were encountered: