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

link to a tutorial? #366

Closed titaniumbones closed 8 years ago

titaniumbones commented 8 years ago

I am puzzling through the boilerplate as best I can with my limited php, and am wondering if (a) there is a tutorial outth ere somewhere that you recommend, and (b) if it would make sense to link to such a tutorial from the README.md, so folks like me can find their way to it.

Thank you for the huge headstart!

e4rthdog commented 8 years ago

Hi there are many ways to develop a WP plugin and all are ok. This approach here uses OOP.

Main file is e4afz.php which towards the end of the file gets an instance of the main class.

This main class resides in the includes/class-xxxx.php file ...In THAT file most of the glue magic happens..In this file you will see who is calling whom and you can direct yourself in the other files.

So your question has 2 branches: Are you looking for WP plugin tutorial or for OOP PHP tutorial? Becuase this template just brings these 2 worlds together. If you "feel" lost you have to take alook at either of the previous 2 bracnhes. As soon as you get hold of them you will understand fully the logic of this biolerplate.

There re a plethora of tutorials out there for both things. This is one of them:

http://code.tutsplus.com/articles/object-oriented-programming-in-wordpress-building-the-plugin-i--cms-21083

DevinVinson commented 8 years ago

@titaniumbones I think looking at example plugins is better than a tutorial for the boilerplate. See: https://github.com/DevinVinson/WordPress-Plugin-Boilerplate/wiki/Example-Plugins

titaniumbones commented 8 years ago

thanks to both of you!