summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/3rd-party/jetpack-backup.php')
-rw-r--r--plugins/jetpack/3rd-party/jetpack-backup.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/jetpack/3rd-party/jetpack-backup.php b/plugins/jetpack/3rd-party/jetpack-backup.php
index ec1880b3..50872fba 100644
--- a/plugins/jetpack/3rd-party/jetpack-backup.php
+++ b/plugins/jetpack/3rd-party/jetpack-backup.php
@@ -10,6 +10,8 @@
namespace Automattic\Jetpack\Jetpack_Backup;
+use Automattic\Jetpack\Plugins_Installer;
+
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
@@ -67,8 +69,7 @@ function try_install() {
* @return bool result of installation
*/
function install_and_activate() {
- jetpack_require_lib( 'plugins' );
- $result = \Jetpack_Plugins::install_and_activate_plugin( PLUGIN_SLUG );
+ $result = Plugins_Installer::install_and_activate_plugin( PLUGIN_SLUG );
if ( is_wp_error( $result ) ) {
return false;
@@ -86,7 +87,7 @@ function activate() {
$result = activate_plugin( PLUGIN_FILE );
// Activate_plugin() returns null on success.
- return is_null( $result );
+ return $result === null;
}
/**