Skip to content
forked from aochoae/plugin-name

Boilerplate for building WordPress plugins.

License

Notifications You must be signed in to change notification settings

victoraigbeghian/plugin-name

 
 

Repository files navigation

Boilerplate for building WordPress plugins.

WordPress Plugin Boilerplate

Boilerplate for building WordPress plugins.

Fundamental

Requirements

  • PHP version 7.0 or greater
  • WordPress 5.0 or greater
  • Docker 18.06 or greater (Development)
  • Grunt 1.0.4 (Development)

Features

PHP Standards Recommendations

WordPress

  • Settings page
  • About page
  • Contextual Help
  • Plugin action links

Install

Composer

composer create-project --no-install --remove-vcs arya/wordpress-plugin your-plugin dev-master
cd your-plugin

You'll need to rename

  1. The directory plugin-name to your-plugin
  2. The file plugin-name.php to your-plugin.php

Then find and replace in all the templates

  1. plugin-name to your-plugin
  2. plugin_name to your_plugin
  3. PLUGIN_NAME to YOUR_PLUGIN
  4. PluginName to YourPlugin (Namespace)

If you are a Linux or macOS user, you can use the command sed

egrep -lRZ 'plugin-name' . | xargs -0 -l sed -i -e 's/plugin-name/your-plugin/g'

Finally, edit the composer.json file to declare plugin dependencies

composer install

Happy Coding!

Grunt

Install Grunt

npm install --global grunt-cli
npm install --silent

Build (Minify resources)

grunt

Handle the version of the plugin

grunt version

Docker

Create and start the container

docker-compose up -d
docker exec your-plugin chown -R www-data:www-data /var/www/html
sudo chown -R $USER:$USER your-plugin

Stop and remove containers, networks, images, and volumes

docker-compose down --volumes

License

This project is licensed under the GNU General Public License, Version 2.0. See LICENSE for the full license text.

About

Boilerplate for building WordPress plugins.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 82.1%
  • JavaScript 9.6%
  • CSS 8.3%