Plugin boilerplate code

Continuing discussion from Forking Hello Dolly.

This might be of interest. Not a boilerplate but a generator:

and here’s the boilerplate from the same person behind the above


I didn’t care for the structure of that boilerplate. I’m thinking it had a wonky way of wrapping and implementing hooks, as well, can’t recall for sure. The generators at GenerateWP have been handy from time to time – they’re just the basics, without all the opinionated* parts. :slight_smile:


“Highly Opinionated” --> made me think of some guy’s code I was scanning through on ST3 when I hit a code comment that said something like this “Hey you! This was damn hard to write. If you’re grumbling, stop it and tell me how you’d do it better.” I love finding little traces of humans like that. Cracked me up.


I really love this community.
That summarizes it all.
Thanks for the hint about the generator. Will have a look at it later.


But this is great! All set out in a clear style guide. I think I’ll adopt this as my own too.

I’d never heard of Yoda conditions before. :laughing:


And here I thought it would only be helpful for pull requests. :slight_smile: Since I’m getting my repos in order (and have started receiving issues and pull requests) I had to get it documented as part of the “Community Health Files” of a GitHub org account – these are used as defaults for every new repo and will save me tons of time. Glad you can get some extra use of it.