johnwatkins0 / wp-autoload
There is no license information available for the latest version (1.0.0) of this package.
Autoloader for WordPress classes, traits, and interfaces.
1.0.0
2019-01-13 22:02 UTC
Requires (Dev)
- phpunit/phpunit: ^7.5
- squizlabs/php_codesniffer: ^3.4
- wp-coding-standards/wpcs: ^1.2
This package is auto-updated.
Last update: 2025-03-11 16:11:40 UTC
README
Registers an SPL autoloader that loads classes, interfaces, and traits using WordPress file naming conventions.
Example
| functions.php
| inc
class-my-class.php
trait-my-trait.php
interface-my-interface.php
<?php namespace My_Namespace; class My_Class implements My_Interface { use My_Trait; }
// functions.php register_wp_autoload( 'My_Namespace', __DIR__ . '/inc' );