Recommend this page to a friend! |
Download |
Info | Example | Files | Install with Composer | Download | Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not enough user ratings | Total: 156 | All time: 9,014 This week: 673 |
Version | License | PHP version | Categories | |||
wordpress-plugin-bas 1.0.0 | The PHP License | 5 | PHP 5, Content management, Code Gener..., B... |
Description | Author | |||||||||||||||||||||||
This package can generate a WordPress plugin from developer answers. Innovation Award |
|
#!/usr/bin/env php |
The Wordpress Plugin Generator lets you generate a MVC base files for a new Wordpress Plugin using the Terminal. IMPORTANT This project doesn't need Wordpress to run. It is not a PLUGIN, it creates a base files for a new Wordpress Plugin.
Minimum Requirements
Install composer dependence packages.
composer install
or download it from and run
php composer.phar install
Run the command bellow just to make sure the file has "execute mode permission".
chmod +x WPG
Run the command bellow.
./WPG Plugin:Generator
After you input your information it creates a new folder on the inputted directory so unzip the "lib/wordpress-plugin-base.zip" file which contains all base plugin files there. So, scan every file inside the new plugin folder and make replacements by defined tags per inputted information. Finally, download and run composer to install dependence packages and delete the composer.phar.
There's some default file extensions to have tags replaced by the entered information. This message means the file extension you can see above is not in a default range of these extension so you can choose to make replacement tags on this file or not.
For sure! Open the file WordpressPluginGenerator.php and include the extension you want on private $validExtensions = ['php', 'json', 'tpl', 'css', 'js'];.
There's a default limit size. When a file is bigger than this default size you can choose to make replacement tags on this file or not.
For sure! Open the file WordpressPluginGenerator.php and change the limit to the number you want private $fileSizeLimit = 1024; //kb. Just keep in mind, this number is in KB!
This is a security check to make sure everything goes right with the replacements and do not try to replace on a huge file if it doesn't need.
Make sure you have write permission on the plugin destination folder, you have ZipArchive installed, you are running PHP 5.6 or greater, the WPG file has "execute mode permission" and you have successfully run composer install. If all of that is done and you are still having any problem, send me an email and I will try to help you!
Yes you can! All you need is take your base files, replace variable content with "{{tags}}", zip that and replace the file lib/wordpress-plugin-base.zip by your new zip. To see the {{tags}} it has open the file WordpressPluginGenerator.php and take a lok at the method makeReplacements()
This project is licensed under the MIT License - see the LICENSE.md file for details
Files (5) |
File | Role | Description | ||
---|---|---|---|---|
docs (1 file) | ||||
composer.json | Data | Auxiliary data | ||
README.md | Doc. | Documentation | ||
WordpressPluginGenerator.php | Class | Class source | ||
WPG | Example | Example script |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
Install with Composer |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.