Programming is easier using WP Autoload

Autoloading is a technique in PHP by which classes are automatically called according to their namespace. This removes the necessity of requiring PHP files manually.

The WP Autoload gives an example of one way how you can implement autoloading for WordPress.

Installation

Include the WP Autoload Script as found on Github in any of your WordPress development projects.
Make sure that you adapt the Autoloading script according your namespacing and folder structure.
For example, a class with the namespace Components and a name Breadcrumbs may be called through new Components\Breadcrumbs(). Following the autoloader script, this file should be placed within components\breadcrumbs.php.

Our Complete WordPress Script Collection

During the years, we found out that we were repeating the same code over and over in our WordPress development projects. The obvious thought came in mind: Why don’t we store these pieces of code in reusable scripts on GitHub? And so it happened, our repository was born.

WP Components is a collection of common components used in the development of websites, such as breadcrumbs.

WP Custom Fields is a kick-ass framework for custom customizer, options pages and post, taxonomy or user metabox fields.

WP Enqueue is a script for enqueing scripts and styles easily.

WP Optimize allows to implement basic optimizations to a WordPress installation by the removal of redundant scripts and code.

WP Register is a script that allows to easily register custom posts, taxonomies, sidebars, menus and widgets.

WP Updater is a script to update a theme or plugin through an external repository.

WP Router is a WordPress script that enables a developer to add custom routes and link these to custom templates.

WP Config is a class which can be used to store, add or modify configurations for a theme or plugin.

WP Autoload shows how one can use autoloading with WordPress.