Skip to content

Commit 7637761

Browse files
johnwatkins0westonruter
authored andcommitted
Include file.php separately from class-wp-upgrader.php (#5539)
1 parent e892b41 commit 7637761

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Admin/ReaderThemes.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,8 +384,11 @@ public function can_install_theme( $theme ) {
384384
}
385385

386386
if ( null === $this->can_install_themes ) {
387-
if ( ! class_exists( 'WP_Upgrader' ) ) {
387+
if ( ! function_exists( 'request_filesystem_credentials' ) ) {
388388
require_once ABSPATH . 'wp-admin/includes/file.php';
389+
}
390+
391+
if ( ! class_exists( 'WP_Upgrader' ) ) {
389392
require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
390393
}
391394

0 commit comments

Comments
 (0)