This plugin template is based on the work of dmhendricks/wordpress-base-plugin. Thank you for this great starting point!
This is a boilerplate WordPress plugin featuring namespace autoloading and integration with Carbon Fields. It is intended to be used as a starting point for creating quick WordPress plugins. It contains several examples and dependencies to get you started.
It may also be used as the means of separating custom code from the theme.
- At command prompt, change to your
wp-content/pluginsdirectory. - Close the repository:
git clone https://github.com/obstschale/wordpress-base-plugin.git
- Modify
composer.jsonto suit your needs - Run
composer installto install dependencies and autoload namespace
- Use Yarn oder NPM to install Laravel Mix
- Laravel Mix is used to compile SASS and JS
yarnornpm install
From this point on, obstschale/wordpress-base-plugin is developed separately, due to some different ideas.
- Introduce new project structure
- Move Widgets, Shortcodes, Post Types to separate directories
- Split
WidgetLoaderinto separate files - Add
ShortcodeLoader, which handles all shortocde classes - Add
ShortcodeInterface. All Shortcode classes need to implement this interface. - Use Laravel's Code Style across project
- Move
assets/toresources/ - Use Laravel Mix (Webpack) for SASS and JS compiler
- Compiled files will be copied to
public/ - Use
yarn run productionwhen plugin version is deployed - Use
yarn run developmentduring dev for file watcher
- Compiled files will be copied to
- Remove
vendor/from repo
- Moved
/srcto/app
- Refactored code
- Added
is_production()andis_ajax()methods
- Initial commit
Please support humans.txt. It's an initiative for knowing the people behind a web site. It's an unobtrusive text file that contains information about the different people who have contributed to building the web site.
WordPress Base Plugin
URL: https://github.com/dmhendricks/wordpress-base-plugin
Author: Daniel M. Hendricks
GitHub: dmhendricks
Author URI: https://2lab.net
Carbon Fields:
URL: http://carbonfields.net/
Author: htmlBurger.com
Twitter: @htmlburger
Author URI: https://htmlburger.com/
Location: London, England
PostTypes:
URL: https://github.com/jjgrainger/PostTypes/
Author: Joe Grainger
Twitter: @jjgrainger
Author URI: https://jjgrainger.co.uk/
Location: Falmouth, England