Building a custom wordpress plugin.
- Plugin is hosted on github
- Plugin automatically installed by composer
- Can develop plugin in Wordpress and push changes to github.
- Will update installed plugin point to the github repo
Resources
Setup for development
- Create composer.json file in root directory. -
composer init
- Add "type": "wordpress-plugin" to get composer to install it in the wordpress plugin directory
{
"name": "",
"description": "",
"authors": [
{
"name": "Johan Martin",
"homepage": "http://www.johan-martin.com",
"role": "developer"
}
],
"keywords":[
"Wordpress",
"Plug-in",
],
"type": "wordpress-plugin"
}
- Add any necessary requirements for the plugin.
- Enable debug log in wp-config.php