PHP code example of johnwatkins0 / wp-autoload
1. Go to this page and download the library: Download johnwatkins0/wp-autoload library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
johnwatkins0 / wp-autoload example snippets
namespace My_Namespace;
class My_Class implements My_Interface {
use My_Trait;
}
// functions.php
register_wp_autoload( 'My_Namespace', __DIR__ . '/inc' );
| functions.php
| inc
class-my-class.php
trait-my-trait.php
interface-my-interface.php