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.66k stars 2.25k forks source link

Installation & Naming Conventions #580

Open stevegiorgi opened 2 years ago

stevegiorgi commented 2 years ago

In the installation instructions it clearly states to replace "plugin_name" with "my_plugin_name". However in many example uses of this boilerplate I see $plugin_name not renamed and in fact $plugin_name is usually defined as such "$plugin_name = my_plugin_name". I've seen this as part of the construct when including additional class files, and also in the root of new classes. This is really confusing - what is the proper naming convention and are there are any instances of "plugin_name" that should not be replaced, such as those that are not exact matches and/or begin with special characters ('>', '$', etc.). If so, why is this not documented in the installation instructions?

stevegiorgi commented 2 years ago

It looks like some of the discrepancy in naming comes from the online generator by Enrique; it does not update all instances of "plugin_name" when it generates a boilerplate. What is the correct usage/convention?