Skip to content

Commit b842a10

Browse files
committed
Move WP_Autoload::register() to the file containing the class
1 parent 3af27b7 commit b842a10

7 files changed

Lines changed: 3 additions & 6 deletions

File tree

src/index.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
}
1717

1818
require_once ABSPATH . 'wp-includes/class-wp-autoload.php';
19-
WP_Autoload::register();
2019

2120
/*
2221
* Load the actual index.php file if the assets were already built.

src/wp-admin/load-scripts.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
}
1818

1919
require_once ABSPATH . 'wp-includes/class-wp-autoload.php';
20-
WP_Autoload::register();
2120

2221
$protocol = $_SERVER['SERVER_PROTOCOL'];
2322
if ( ! in_array( $protocol, array( 'HTTP/1.1', 'HTTP/2', 'HTTP/2.0', 'HTTP/3' ), true ) ) {

src/wp-admin/load-styles.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
1919

2020
require_once ABSPATH . 'wp-includes/class-wp-autoload.php';
21-
WP_Autoload::register();
2221

2322
require ABSPATH . 'wp-admin/includes/noop.php';
2423
require ABSPATH . WPINC . '/theme.php';

src/wp-admin/setup-config.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
}
3232

3333
require_once ABSPATH . 'wp-includes/class-wp-autoload.php';
34-
WP_Autoload::register();
3534

3635
require ABSPATH . 'wp-settings.php';
3736

src/wp-includes/class-wp-autoload.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,3 +419,6 @@ public static function autoload( $class ) {
419419
}
420420
}
421421
}
422+
423+
// Register the autoloader.
424+
WP_Autoload::register();

src/wp-includes/plugin.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
*/
2323

2424
require_once ABSPATH . 'wp-includes/class-wp-autoload.php';
25-
WP_Autoload::register();
2625

2726
/** @var WP_Hook[] $wp_filter */
2827
global $wp_filter;

src/wp-load.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
}
2727

2828
require_once ABSPATH . 'wp-includes/class-wp-autoload.php';
29-
WP_Autoload::register();
3029

3130
/*
3231
* The error_reporting() function can be disabled in php.ini. On systems where that is the case,

0 commit comments

Comments
 (0)