regularjack / wp-plugin-boilerplate
An object-oriented boilerplate for developing high-quality, testable WordPress plugins
Installs: 22
Dependents: 0
Suggesters: 0
Security: 0
Stars: 12
Watchers: 1
Forks: 7
Open Issues: 0
Type:wordpress-plugin
Requires
- php: >=5.3
Requires (Dev)
- php: >=5.3
- johnpbloch/wordpress: ^4.5
- phpunit/phpunit: ^4.8
- vlucas/phpdotenv: ^2.4
This package is not auto-updated.
Last update: 2024-11-09 20:01:46 UTC
README
An object-oriented boilerplate for developing high-quality, testable WordPress plugins.
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