A skeleton for creating WordPress plugins with Eliasis Framework.
You can install this application using Composer. In the root folder of WordPress run:
composer create-project --prefer-dist eliasis-framework/wordpress-plugin
The previous command will only install the necessary files, if you prefer to download the entire source code (including tests, vendor folder, exceptions not used, docs...) you can use:
composer create-project --prefer-source eliasis-framework/wordpress-plugin
Or you can also clone the complete repository with Git:
https://github.com/Eliasis-Framework/WordPress-Plugin.git
This framework is supported by PHP versions 5.6 or higher and is compatible with HHVM versions 3.0 or higher.
To use Eliasis PHP Framework in a plugin, simply:
$DS = DIRECTORY_SEPARATOR;
require dirname(__DIR__) . $DS . 'lib' . $DS . 'vendor' . $DS .'autoload.php';
use Eliasis\App\App;
App::run(dirname(__DIR__), 'wordpress-plugin', 'unique_id');
/**
* The unique id is used to run Eliasis on several
* WordPress plugins without any conflict between them.
*
* Let's tell the App class the plugin that is in use using:
* App::unique_id('namespace')
*
* For example:
*/
# Plugin one
App::run(dirname(__DIR__), 'wordpress-plugin', 'pluginOneId');
function getPublicPath() {
App::pluginOneId('path', 'public');
}
# Plugin two
App::run(dirname(__DIR__), 'wordpress-plugin', 'pluginTwoId');
function getPublicPath() {
App::pluginTwoId('path', 'public');
}
- Check for open issues or open a new issue to start a discussion around a bug or feature.
- Fork the repository on GitHub to start making your changes.
- Write one or more tests for the new feature or that expose the bug.
- Make code changes to implement the feature or fix the bug.
- Send a pull request to get your changes merged and published.
This is intended for large and long-lived objects.
This project is licensed under GPL-2.0+. See the LICENSE file for more info.
2017 Josantonius, josantonius.com
If you find it useful, let me know 😉
You can contact me on Twitter or through my email.
If this project helps you to reduce your development time, you can sponsor me to support my open source work 😊
This repository is licensed under the GPL-2.0+ License.
Copyright © 2017-2022, Josantonius