Skip to content
/ autoload Public

🚆 Simple WordPress autoloader that will autoload classes or traits with namespace prefix

License

Notifications You must be signed in to change notification settings

wpup/autoload

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WordPress Autoload

Build Status No Maintenance Intended

Simple autoloader that will autoload classes, interfaces or traits with namespace prefix

Install

composer require frozzare/wp-autoload

Example

Example of your main php file.

require 'vendor/autoload.php';
register_wp_autoload( 'Example\\', __DIR__ . '/src' );

Example of src/class-plugin-loader.php

namespace Example;
class Plugin_Loader {}

Example of src/trait-crawler.php

namespace Example;
trait Crawler {}

Example of src/interface-say.php

namespace Example;
interface Say {}

License

MIT © Fredrik Forsmo

About

🚆 Simple WordPress autoloader that will autoload classes or traits with namespace prefix

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages