I AM LISTENING TO
|

WHAT I LIKE

Purify and filter HTML, XHTML or XML in PHP with htmLawed Include WebP images in WordPress
API     Design     Development     WordPress    

WordPress Plugins, lets split them into modules



27. March 2015


While building plugins for WordPress is fun, it often means repeating tasks over and over again. I love clean and organized code! For my last internal project, a Visual Composer addon bundle,  I decided to build a modular system.

So I have one central plugin, handling multiple modules that access methods from the plugin. This allows me to reuse public and admin routines. In combination with _autoload and traits, this makes the codebase lean and mean.

I also decided to use TWIG fully for the presentation layer. Each module can be activated, deactivated, registers their own public and admin views, admin menus, ajax calls, dashboard widgets and additional context.

I am currently in the process of cleaning this up and will share some more details soon.

Cheers
Alex

  1. __autoload & traits
  2. TWIG
  3. Timber




Leave a Reply

Be the First to Comment!

Notify of
avatar
wpDiscuz