Skip to content

Commit

Permalink
My Jetpack: Activate plugins in normal mode (#25727)
Browse files Browse the repository at this point in the history
* Activate plugins in normal mode

* remove old comment

* bump versions

Co-authored-by: sdixon194 <[email protected]>
  • Loading branch information
leogermani and sdixon194 authored Aug 23, 2022
1 parent 4e835c0 commit b8d569d
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Activate plugins in normal mode to trigger plugin_activated hooks
2 changes: 1 addition & 1 deletion projects/packages/my-jetpack/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion projects/packages/my-jetpack/src/class-initializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Initializer {
*
* @var string
*/
const PACKAGE_VERSION = '2.0.1';
const PACKAGE_VERSION = '2.0.2-alpha';

/**
* Initialize My Jetapack
Expand Down
5 changes: 1 addition & 4 deletions projects/packages/my-jetpack/src/products/class-extras.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' ) );
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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() );
}

/*
Expand Down

0 comments on commit b8d569d

Please sign in to comment.