PluginProbe ʕ •ᴥ•ʔ
SEOPress – AI SEO Plugin & On-site SEO / 9.3.0.3
SEOPress – AI SEO Plugin & On-site SEO v9.3.0.3
9.9.2 9.9.1 9.9 9.8.5 9.8.4 9.8.3 9.8.2 9.8.1 trunk 7.0 7.0.1 7.0.2 7.0.3 7.1 7.1.1 7.1.2 7.2 7.3 7.3.1 7.3.2 7.4 7.5 7.5.0.1 7.5.0.2 7.5.0.3 7.5.1 7.5.2 7.5.2.1 7.6 7.6.1 7.7 7.7.1 7.7.2 7.8 7.9 7.9.1 7.9.2 8.0 8.0.1 8.1 8.1.1 8.2 8.3 8.3.1 8.4 8.4.1 8.5 8.5.0.2 8.5.1 8.5.1.1 8.6 8.6.1 8.7 8.7.0.1 8.7.0.2 8.8 8.8.1 8.9 8.9.0.1 8.9.0.2 9.0 9.0.1 9.1 9.2 9.3 9.3.0.1 9.3.0.2 9.3.0.3 9.3.0.4 9.4 9.4.1 9.5 9.6 9.7 9.7.1 9.7.2 9.7.3 9.7.4 9.8
wp-seopress / seopress-autoload.php
wp-seopress Last commit date
assets 7 months ago inc 7 months ago languages 7 months ago public 7 months ago src 7 months ago templates 7 months ago vendor 7 months ago contributors.txt 7 months ago readme.txt 7 months ago seopress-autoload.php 7 months ago seopress-functions.php 7 months ago seopress.php 7 months ago uninstall.php 7 months ago wpml-config.xml 7 months ago
seopress-autoload.php
34 lines
1 <?php
2
3 defined( 'ABSPATH' ) || exit( 'Please don&rsquo;t call the plugin directly. Thanks :)' );
4
5 spl_autoload_register(
6 function ( $class ) {
7 // project-specific namespace prefix
8 $prefix = 'SEOPress\\';
9
10 // base directory for the namespace prefix
11 $base_dir = __DIR__ . '/src/';
12
13 // does the class use the namespace prefix?
14 $len = strlen( $prefix );
15 if ( 0 !== strncmp( $prefix, $class, $len ) ) {
16 // no, move to the next registered autoloader
17 return;
18 }
19
20 // get the relative class name
21 $relative_class = substr( $class, $len );
22
23 // replace the namespace prefix with the base directory, replace namespace
24 // separators with directory separators in the relative class name, append
25 // with .php
26 $file = $base_dir . str_replace( '\\', '/', $relative_class ) . '.php';
27
28 // if the file exists, require it
29 if ( file_exists( $file ) ) {
30 require $file;
31 }
32 }
33 );
34