Coder Social home page Coder Social logo

tukutoi / better-wp-plugin-boilerplate Goto Github PK

View Code? Open in Web Editor NEW
62.0 62.0 10.0 1011 KB

(Hard) Fork of WordPress Plugin Boilerplate, actively taking PRs and actively maintained. Following WordPress Coding Standards. With more features than the original.

Home Page: https://www.generateplugins.com

License: GNU General Public License v3.0

PHP 95.07% CSS 0.52% JavaScript 4.41%
boilerplate plugin wordpress wordpress-plugin wpcs

better-wp-plugin-boilerplate's People

Contributors

afragen avatar akshayraje avatar alertmybanjos avatar anabelle avatar andrejcremoznik avatar anwas avatar barryceelen avatar bluehiveinteractive avatar bradp avatar cliffordp avatar cudazi avatar danielantunes avatar davidshq avatar devinvinson avatar dmtrmrv avatar douglsmith avatar emeraldjava avatar geertdd avatar grappler avatar ipstenu avatar japh avatar jonathanbossenger avatar michaelbeil avatar pippinsplugins avatar rob avatar smilebeda avatar thuijssoon avatar tmeister avatar tommcfarlin avatar w3bdesign avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

better-wp-plugin-boilerplate's Issues

Add Translation instructions (and if any needed, translation POT)

It is easy enough to run wp i18n make-pot <target-dir> in terminal to generate the POT of a plugin, but not many know it.

We should add at least a description to the readme about this (it can also be done with GNU's native gettext utility xgettext --add-comments *.php, but that isn't as nice for Plugins as the WP CLI command is)

More complicated setups can be seen here for example, however that is really not needed given WP CLI exists.

Complete rewrite of the plugin

This is just a "catch all" ticket to jot down things that should be added, removed, or changed in the new version.

As folder structure, we are breaking away from the public/admin structure which became pointless (and never really had a point) and instead approach it with the only somewhat globally accepted "standard" in PHP.
This will also allow more freedom in the actual application structure itself.

Full autoloader should be implemented, thus, all classes should likely reside inside one single folder, and access controls should be done on a more granular base and not like in the old approach on a more "global" level

Namespaces should be used

See full list of "no go" here https://github.com/szepeviktor/starter-plugin/blob/wp-63/README.md#what-to-avoid

Potentially it should include more examples for newbies, as it is always easier to remove than to add: so we should add a menu page, shortcode (already there in current version), perhaps some more examples on filters and actions, localised AJAX script, and so on.

Also, a very important point is to NOT abstract the add_action and add_filter (which is currently the case in the plugin boilerplate)
This has not only confused people but also is based on pure "personal opinion" by the original author, and makes no real sense, as it is just adding clutter code and does not really improve anything: filters and actions are not going to change and do not require plugin-side abstraction.

While the concept is a good idea, it is futile in this case and teaches the user nothing useful.
The abstraction can be better brought to example in a admin-side page or menu with settings, or custom /user field implementation

Thinking of which, the plugin should show how to add custom fields of all kinds, custom field tables, taxonomy, post type, settings and options (best exampled on the admin page) as well.

The plugin should and will keep full WPCS compliance, overruling any other PCR rule

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.