v0.5.3
This commit is contained in:
parent
061329c704
commit
69c8e9eb97
5 changed files with 191 additions and 19 deletions
|
|
@ -323,7 +323,11 @@ class Robotstxt_Manager_Installer {
|
|||
$result = $upgrader->install(
|
||||
$tmp_file,
|
||||
array(
|
||||
'overwrite' => $overwrite,
|
||||
// Option key differs across WP versions: 'overwrite' (5.5-era)
|
||||
// vs 'overwrite_package' (current). Pass both; the unused key
|
||||
// is ignored by wp_parse_args().
|
||||
'overwrite' => $overwrite,
|
||||
'overwrite_package' => $overwrite,
|
||||
)
|
||||
);
|
||||
|
||||
|
|
@ -358,7 +362,11 @@ class Robotstxt_Manager_Installer {
|
|||
}
|
||||
|
||||
if ( ! class_exists( 'Plugin_Upgrader' ) ) {
|
||||
// class-wp-upgrader.php bundles WP_Upgrader + the skins (incl.
|
||||
// Automatic_Upgrader_Skin), but Plugin_Upgrader itself lives in
|
||||
// its own file since the WP 5.3 split — both are required.
|
||||
require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
|
||||
require_once ABSPATH . 'wp-admin/includes/class-plugin-upgrader.php';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue