lplabs / wordpress-muplugin-installer
Install WordPress must-use plugins with Composer
Installs: 3 122
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 5
Forks: 0
Open Issues: 0
Type:composer-plugin
Requires
- php: ^5.5 || ^7.0
- composer-plugin-api: ^1.0
- composer/installers: ^1.0
Requires (Dev)
- codeclimate/php-test-reporter: dev-master
- composer/composer: ^1.0
- phpdocumentor/phpdocumentor: ^2.9
- phpmd/phpmd: ^2.4
- phpunit/phpunit: ^5.4
- squizlabs/php_codesniffer: ^2.6
This package is auto-updated.
Last update: 2024-12-11 14:52:59 UTC
README
composer require lplabs/wordpress-muplugin-installer
The Multi-Framework Composer Library Installer does not completely install WordPress must-use plugins.
It does put the plugin in the mu-plugins
folder, but that isn't enough to be recognized as a must-use plugin by WordPress.
This plugin addresses that by copying the plugin entry point file into the mu-plugins
folder.
Your plugin can indicate which file is the main entry point by specifying it in the extra
section of your composer.json
file.
{ "name": "vendorname/muplugin", "description": "Just another must-use plugin", "type": "wordpress-muplugin", "extra": { "wordpress-muplugin-entry": "your-plugin-entry-point-file.php" }, "require": { "lplabs/wordpress-muplugin-installer": "^2.0" } }
If you do not specify wordpress-muplugin-entry
, this plugin will figure out which PHP files
are WordPress plugins by looking for Plugin Name:
in the first 8 kilobytes of each PHP file in the root of your plugin folder.
Git hooks
Run this to install a git hook that will run PHPCS, PHPMD, and PHPUnit before you commit.
composer setup-hooks