DevinVinson / WordPress-Plugin-Boilerplate

[WordPress] A foundation for WordPress Plugin Development that aims to provide a clear and consistent guide for building your plugins.
http://wppb.io
7.62k stars 2.25k forks source link

Composer and PSR-2 refactoritzation #582

Open albeertito7 opened 1 year ago

albeertito7 commented 1 year ago

Added Composer so that this project can be based on namespaces and dependencies, enabling more complex solutions. Also, applied the PHP PSR-2 coding standard.

Plugin tested on local environment.

75th commented 1 year ago

I don't think this goes far enough. Instead of PluginName/Includes/PluginNameActivator, you could just have PluginName/Activator. I've got a branch in progress that does that, along with some reorganization to have traditional plugin stuff live alongside custom Gutenberg blocks, etc.

75th commented 1 year ago

(...and now that branch activates cleanly in WordPress.)

albeertito7 commented 1 year ago

I don't think this goes far enough. Instead of PluginName/Includes/PluginNameActivator, you could just have PluginName/Activator. I've got a branch in progress that does that, along with some reorganization to have traditional plugin stuff live alongside custom Gutenberg blocks, etc.

you can definitely organize your namespace as you wish of course, this is just a guide for those who want to orient themselves in this schema.