PluginProbe
Black Bar / 2.1.2
Black Bar v2.1.2
trunk 1.0.0 1.1.0 1.2.0 2.0.0 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.2.0 2.2.1 3.0.0 3.1.0 4.0.0 4.0.1 4.0.2 4.0.3 4.1.0 4.1.1 4.1.2 4.1.3 4.1.4 4.2.0
blackbar / autoload.php

autoload.php in Black Bar 2.1.2, at autoload.php

23 lines 512 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 defined( 'WPINC' ) || die;
4
5 /**
6 * PSR-4 autoloader
7 */
8 spl_autoload_register( function( $class )
9 {
10 $namespaces = [
11 'GeminiLabs\\BlackBar\\' => __DIR__.'/src/',
12 'GeminiLabs\\BlackBar\\Tests\\' => __DIR__.'/tests/',
13 ];
14 foreach( $namespaces as $prefix => $base_dir ) {
15 $len = strlen( $prefix );
16 if( strncmp( $prefix, $class, $len ) !== 0 )continue;
17 $file = $base_dir.str_replace( '\\', '/', substr( $class, $len )).'.php';
18 if( !file_exists( $file ))continue;
19 require $file;
20 break;
21 }
22 });
23