Loads namespaces and classes following the WordPress naming conventions.
composer require claudiosanches/wp-autoloader
require __DIR__ . '/vendor/autoload.php';
use ClaudioSanches\WPAutoloader\Autoloader;
$autoloader = new Autoloader();
// Add namespace.
$autoloader->addNamespace('ClaudioSanches\Foo\Bar', __DIR__ . '/src');
// Register all autoload.
$autoloader->register();
- 2017-01-17 - 1.0.0 - Stable release.