eliasis-framework / wordpress-plugin
Skeleton for create WordPress plugins with Eliasis Framework
Installs: 8
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:wordpress-plugin
Requires
- php: ^5.3 || ^7.0
- composer/installers: master
- eliasis-framework/eliasis: ^1.1.0
- josantonius/hook: ^1.0.5
- josantonius/json: ^1.1.2
- josantonius/wp_menu: ^1.0.3
- josantonius/wp_register: ^1.0.2
README
A skeleton for creating WordPress plugins with Eliasis Framework.
Installation
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
Requirements
This framework is supported by PHP versions 5.6 or higher and is compatible with HHVM versions 3.0 or higher.
Quick Start and Examples
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'); }
Contribute
- 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.
Licensing
This project is licensed under GPL-2.0+. See the LICENSE file for more info.
Copyright
2017 Josantonius, josantonius.com
If you find it useful, let me know 😉
You can contact me on Twitter or through my email.
Sponsor
If this project helps you to reduce your development time, you can sponsor me to support my open source work 😊
License
This repository is licensed under the GPL-2.0+ License.
Copyright © 2017-2022, Josantonius