Download the PHP package wordpress-phoenix/abstract-plugin-base without Composer
On this page you can find all versions of the php package wordpress-phoenix/abstract-plugin-base. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download wordpress-phoenix/abstract-plugin-base
More information about wordpress-phoenix/abstract-plugin-base
Files in wordpress-phoenix/abstract-plugin-base
Package abstract-plugin-base
Short Description PHP class to extend when building a WordPress plugin allowing you to follow smart plugin setup standards.
License GPL-3.0-or-later
Homepage https://github.com/WordPress-Phoenix/abstract-plugin-base
Informations about the package abstract-plugin-base
Abstract Plugin Base
Used as a base class to help standardize the way we build WordPress plugins.
Table of Contents
- Installation
- Usage
Installation
You can use this library to start a new plugin from scratch, or you can enhance your existing plugins with this library. Once you have read over the installation instructions it should make sense which direction to go.
Composer style (recommended)
- Confirm that composer is installed in your development environment using
which composer
. If CLI does not print any path, you need to install Composer. - Set CLI working directory to wp-content/plugins/{your-plugin-name}
-
Install Abstract_Plugin class via composer command line like
- Look at sample code below to see how to include this library in your plugin.
Manual Installation
- Download the most updated copy of this repository from
https://api.github.com/repos/WordPress-Phoenix/abstract-plugin-base/zipball
- Extract the zip file, and copy the PHP file into your plugin project.
- Include the file in your plugin.
Usage
Why should you use this library when building your plugin?
By building your plugin using OOP principals, and extending this Plugin_Base class object, you will be able to quickly and efficiently build your plugin, allowing it to be simple to start, but giving it the ability to grow complex without changing its architecture.
Immediate features include:
- Built in SPL Autoload for your includes folder, should you follow WordPress codex naming standards for class files.
- Template class provides you all the best practices for standard plugin initialization
- Minimizes code needed / maintenance of your main plugin file.
- Assists developers new to WordPress plugin development in file / folder architecture.
- By starting all your plugins with the same architecture, we create a standard that is better for the dev community.
Simplest example of the main plugin file, and required plugin class file
custom-my-plugin.php
:
app/class-app.php
: