thiagolcks / generator-wp-plugin-boilerplate

A generator for Yeoman to customize the WP Plugin Boilerplate (https://github.com/tommcfarlin/WordPress-Plugin-Boilerplate).
MIT License
16 stars 2 forks source link

Class names not following WordPress Coding Standards #2

Closed mpchadwick closed 10 years ago

mpchadwick commented 10 years ago

Hey,

Thanks for putting this tool together. Definitely great quick way to set up a boilerplate WP plugin. I noticed that class names are being camel cased. The WordPress coding standard is to use initial caps with underscores Like_This for classes.

http://make.wordpress.org/core/handbook/coding-standards/php/#naming-conventions

I took a quick look to see if there was a quick solution but looks like underscore.string doesn't offer a method to format the string that way. Not sure if that's why you went with _s.classify? I wonder if underscore.string would accept a PR for a _s.capunderscored method or something like that, or if there's an alternate solution that is better. Would be great to find a solution here so that plugins can be scaffolded to follow WP standards.

Max