From b8d569d386003639a63ccbca29effcbb694ed9fb Mon Sep 17 00:00:00 2001 From: leogermani Date: Tue, 23 Aug 2022 15:18:23 -0300 Subject: [PATCH] My Jetpack: Activate plugins in normal mode (#25727) * Activate plugins in normal mode * remove old comment * bump versions Co-authored-by: sdixon194 --- .../my-jetpack/changelog/update-my-jetpack-activate-plugins | 4 ++++ projects/packages/my-jetpack/package.json | 2 +- projects/packages/my-jetpack/src/class-initializer.php | 2 +- projects/packages/my-jetpack/src/products/class-extras.php | 5 +---- .../my-jetpack/src/products/class-hybrid-product.php | 4 +--- 5 files changed, 8 insertions(+), 9 deletions(-) create mode 100644 projects/packages/my-jetpack/changelog/update-my-jetpack-activate-plugins diff --git a/projects/packages/my-jetpack/changelog/update-my-jetpack-activate-plugins b/projects/packages/my-jetpack/changelog/update-my-jetpack-activate-plugins new file mode 100644 index 0000000000000..186410b7eec6a --- /dev/null +++ b/projects/packages/my-jetpack/changelog/update-my-jetpack-activate-plugins @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Activate plugins in normal mode to trigger plugin_activated hooks diff --git a/projects/packages/my-jetpack/package.json b/projects/packages/my-jetpack/package.json index d32fe345b2b46..cd5161ec075c5 100644 --- a/projects/packages/my-jetpack/package.json +++ b/projects/packages/my-jetpack/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@automattic/jetpack-my-jetpack", - "version": "2.0.1", + "version": "2.0.2-alpha", "description": "WP Admin page with information and configuration shared among all Jetpack stand-alone plugins", "homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/packages/my-jetpack/#readme", "bugs": { diff --git a/projects/packages/my-jetpack/src/class-initializer.php b/projects/packages/my-jetpack/src/class-initializer.php index 1a57e52f0c4e3..105f7d5f971e3 100644 --- a/projects/packages/my-jetpack/src/class-initializer.php +++ b/projects/packages/my-jetpack/src/class-initializer.php @@ -29,7 +29,7 @@ class Initializer { * * @var string */ - const PACKAGE_VERSION = '2.0.1'; + const PACKAGE_VERSION = '2.0.2-alpha'; /** * Initialize My Jetapack diff --git a/projects/packages/my-jetpack/src/products/class-extras.php b/projects/packages/my-jetpack/src/products/class-extras.php index d0ffaf8c9a2e3..ec35be1d3e3e6 100644 --- a/projects/packages/my-jetpack/src/products/class-extras.php +++ b/projects/packages/my-jetpack/src/products/class-extras.php @@ -135,9 +135,6 @@ public static function get_manage_url() { * @return null|WP_Error Null on success, WP_Error on invalid file. */ public static function activate_plugin() { - /* - * Silent mode True to avoid redirect - */ - return activate_plugin( static::get_installed_plugin_filename( 'jetpack' ), '', false, true ); + return activate_plugin( static::get_installed_plugin_filename( 'jetpack' ) ); } } diff --git a/projects/packages/my-jetpack/src/products/class-hybrid-product.php b/projects/packages/my-jetpack/src/products/class-hybrid-product.php index 1bb995ffbb746..38ceb7ab911e6 100644 --- a/projects/packages/my-jetpack/src/products/class-hybrid-product.php +++ b/projects/packages/my-jetpack/src/products/class-hybrid-product.php @@ -69,11 +69,9 @@ public static function is_active() { public static function activate_plugin() { /* * Activate self-installed plugin if it's installed. - * Silent mode True to avoid redirects in Backup. - * @TODO When new Hybrid products are added, we might not want to go silent with all of them. */ if ( parent::is_plugin_installed() ) { - return activate_plugin( static::get_installed_plugin_filename(), '', false, true ); + return activate_plugin( static::get_installed_plugin_filename() ); } /*