A framework for building a WordPress plugin at WSU.
.git
directory that provides the history for the WSUWP Plugin Skeleton project.origin
remote.git clone https://github.com/washingtonstateuniversity/WSUWP-Plugin-Skeleton.git wsuwp-new-feature
cd wsuwp-new-feature
rm -fr .git
git init
git remote add origin https://github.com/washingtonstateuniversity/WSUWP-Plugin-New-Feature.git
git status
There are several places throughout the WSUWP Plugin Skeleton code that should be changed to match the new plugin.
includes/
file, includes/wsuwp-plugin-skeleton.php
, should be renamed to match the new plugin's slug.tests/
file, tests/test-wsuwp-plugin-skeleton.php
, should be renamed to match the new plugin's slug.includes/
files should be updated to reflect the new plugin.plugin.php
to provide the project name, description, authors, etc...composer.json
.package.json
.phpcs.ruleset.xml
.README.md
, replacing all of this text.LICENSE
.After completing these, search for the terms "WSUWP Plugin Skeleton", "WSUWP_Plugin_Skeleton", and "wsuwp-plugin-skeleton" to be sure that all uses were caught.
npm install
composer install
grunt phpcs
phpunit
If you have not previously setup unit tests for WordPress projects, phpunit
will not run properly. Use the test install script in the bin
directory to setup a base for testing locally.
sh bin/install-wp-tests.sh wordpress_tests root ''
The plugin should now be in its initial state, with all pieces renamed to fit the new project. An initial commit can be added with all of these files.
git status
to be sure only the intended files are being added.git status
git add -A
git commit -m "Initial commit"
git push origin master
The repository provides a .travis.yml
configuration file for use with Travis CI. As a member of the WSU organization, you should be able to enable your new repository for continuous integration under the WSU Profile.
Look at the general settings for this project to view how new projects should be configured.