Skip to content
This repository has been archived by the owner on Jun 29, 2023. It is now read-only.

Commit

Permalink
docs(Readme): Add the initial readme markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkramer committed Jan 8, 2021
1 parent 6ec1a5d commit 5aa0506
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# WordPress Plugin Boilerplate
An organized, object-oriented, and lightweight boilerplate for testable WordPress plugin development


## Installation
Install directly into the plugins folder of a WordPress installation and then rename from `wordpress-plugin-boilerplate` to whatever you want your plugin to be named:

composer create-project wpstrap/wordpress-plugin-boilerplate

Currently a lot of Find and Replace is needed.

### Plugin Structure

You can add your own new class files by naming them correctly and putting the files in the most appropriate location, see other files for examples. Composer's Autoloader and the Bootstrap class will auto include your file and instantiate the class. The idea of this organisation is to be more conscious of structuring your code.

* `classes/App` - holds the plugin application-specific functionality
* `classes/App/Frontend` - all public-facing functionality
* `classes/App/Backend` - all admin-specific functionality
* `classes/App/General` - functionality shared between the back-end and frontend
* `classes/App/Cli` - code for cli integrations
* `classes/App/Cron` - code for cron events
* `classes/App/Rest` - code for rest API functionalities
* `classes/Config` - plugin configuration code
* `classes/Common` - utilities shared in the whole plugin application
* `classes/Integrations` - includes the integration with libraries, API's or other plugins
* `classes/Compatability` - 3rd party compatibility code
* `templates` - all the template files
* `tests` - all the tests using Codeception
* `assets` - all the assets files (css/js/images), can be extended with Webpack/Gulp for SCSS and babel etc.

### Acceptance & Unit Testing
- Testing with Codeception works out of the box
- Create test files with `composer generate:wpunit` or `composer generate:acceptance`
- Write your test methods and run `composer run:wpunit` or `composer run:acceptance`

0 comments on commit 5aa0506

Please # to comment.