Fulcrum - The customization central repository to extend and custom WordPress. This plugin provides the centralized infrastructure for the custom plugins and theme.
This plugin provides a central location for all redundant functionality. It keeps your plugins and theme DRY, reusable, and modular. It is meant to be extended. Therefore, when you need a feature-specific plugin like a Portfolio, Testimonials, or FAQ, you extend the Fulcrum\Addon\Addon
class in your plugin. Then you configure what service providers you need.
It saves you a ton of time and code in your plugins.
This plugin is fully crafted in OOP. It utilizes DI Container, Dependency Injection, Polymorphism, Inheritance, etc. It shows you how to build OOP-capable plugins.
It also uses:
- Composer and its autoload functionality in place of filling a function with includes and requires.
- Gulp as it's task runner
- Config files, which abstract the runtime configuration out of the modules and into
fulcrum/config
folder where they belong. - Service Providers for the Addons to utilize, which simply the need-to-know in the addons. Configure and fire them up.
Includes:
- Pimple - as the DI Container
- Shortcodes
- Meta boxes
- Custom Post Types
- Custom Taxonomy
- Widgets
Fulcrum includes some cool packages to make your job more fun.
- Kint - a modern and powerful PHP debugging helper
- Whoops - PHP Errors for Cook Kids
- Carbon - A simple PHP API extension for DateTime.
- Pimple - as the DI Container
Installation from GitHub is as simple as cloning the repo onto your local machine. Typically, we advise that you place this plugin in the wp-content/mu-plugins
folder to ensure that it is not accidentally disabled. However, the choice is yours.
To clone the repo, do the following:
- Using PhpStorm, open your project and navigate to either the
wp-content/mu-plugins
orwp-content/plugins/
. (Or open terminal and navigate there). - Then type:
git clone https://github.com/KnowTheCode/Fulcrum-Site.git
.
If you put it into the wp-content/mu-plugins
, then you need to have a starting file in the root:
- Go to
wp-content/mu-plugins
- Create a new file called
mu-autoloader.php
; - Put this code in the file:
include( 'fulcrum/plugin.php' );
Don't forget the opening PHP tag and docblock too. - Save and close the file.
All feedback, bug reports, and pull requests are welcome.