regularjack/wp-plugin-boilerplate

An object-oriented boilerplate for developing high-quality, testable WordPress plugins

dev-master 2016-11-19 19:30 UTC

This package is not auto-updated.

Last update: 2024-04-13 16:51:21 UTC


README

An object-oriented boilerplate for developing high-quality, testable WordPress plugins.

Build Status PHP 5.3+

This is an experiment. You probably don't want to use it yet.

Features

  • Autoload PHP classes
    • Use PHP namespaces
    • No more need to include every plugin file
  • Unit Testing
    • Testing with PHPunit works out of the box
    • Just write your test class and run phpunit
    • Ready for travis
  • Integration with WP-CLI
  • And more:
    • Admin settings screen

Installation

Install directly into the plugins folder of a WordPress installation and then rename from wp-plugin-boilerplate to whatever you want your plugin to be named (the following commands assume your plugin will be named wp-foo):

cd wp-content/plugins
git clone git@github.com:regularjack/wp-plugin-boilerplate.git wp-foo
cd wp-plugin-boilerplate
mv languages/wp-plugin-boilerplate.pot languages/wp-foo.pot
find . -type f -exec sed -i 's/WP Plugin Boilerplate/WP Foo/g' {} +
find . -type f -exec sed -i 's/WpPluginBoilerplate/WpFoo/g' {} +
find . -type f -exec sed -i 's/wp-plugin-boilerplate/wp-foo/g' {} +
rm -rf README.md .git

Ack