Skip to content
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

require vs require_once #222

Closed
ryanhellyer opened this issue Oct 7, 2014 · 2 comments
Closed

require vs require_once #222

ryanhellyer opened this issue Oct 7, 2014 · 2 comments

Comments

@ryanhellyer
Copy link

This is very minor, but it's the first thing I would change when using this boilerplate ...

require_once() is used in the main plugin file, but I'm not seeing any reason to do that there. Typically, you use that when there is a possibility of a file being loaded twice. That is not possible with a main plugin file, therefore it should use a plain old require() instead.

Technically it's a smidgeon faster, but the main reason for doing it that way is just to make it more "correct".

@tommcfarlin
Copy link
Contributor

Great point - this is something that will be resolved.

NikV added a commit to NikV/WordPress-Plugin-Boilerplate that referenced this issue Nov 4, 2014
See : DevinVinson#222. I believe this was in favor of doing it "correctly"?
@tnorthcutt
Copy link

Bump - suggest closing this issue now that #231 is merged 😄

azuredevil0818 pushed a commit to azuredevil0818/WordPress-Plugin-Boilerplate that referenced this issue Jul 18, 2023
See : DevinVinson/WordPress-Plugin-Boilerplate#222. I believe this was in favor of doing it "correctly"?
harry908nilson pushed a commit to marcolane/wordpress that referenced this issue Sep 1, 2023
See : DevinVinson/WordPress-Plugin-Boilerplate#222. I believe this was in favor of doing it "correctly"?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants