Skip to content

Commit

Permalink
Post-migration Experience: Add the plugin review task (#39711)
Browse files Browse the repository at this point in the history
* Add the Review Plugins task

* changelog

* Add the calypso path for the task

---------

Co-authored-by: Valter Lorran <[email protected]>
  • Loading branch information
valterlorran and Valter Lorran authored Oct 10, 2024
1 parent 702274e commit 5e8fec9
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: added

Add the Plugin Review task for the Post-migration launchpad experience
Original file line number Diff line number Diff line change
Expand Up @@ -816,6 +816,19 @@ function wpcom_launchpad_get_task_definitions() {
'is_complete_callback' => 'wpcom_launchpad_is_task_option_completed',
'is_visible_callback' => '__return_true',
),
'review_plugins' => array(
'get_title' => function () {
return __( 'Review the migrated plugins', 'jetpack-mu-wpcom' );
},
'is_complete_callback' => 'wpcom_launchpad_is_task_option_completed',
'is_visible_callback' => '__return_true',
'add_listener_callback' => function () {
add_action( 'pre_current_active_plugins', 'wpcom_launchpad_mark_review_plugins_complete' );
},
'get_calypso_path' => function () {
return admin_url( 'plugins.php' );
},
),
);

$extended_task_definitions = apply_filters( 'wpcom_launchpad_extended_task_definitions', array() );
Expand Down Expand Up @@ -1774,6 +1787,14 @@ function wpcom_track_site_launch_task() {
}
}

/**
* Mark the plugins reviewed task as complete.
*
* @return void
*/
function wpcom_launchpad_mark_review_plugins_complete() {
wpcom_mark_launchpad_task_complete( 'review_plugins' );
}
/**
* Callback that conditionally adds the site launch listener based on platform.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ function wpcom_launchpad_get_task_list_definitions() {
'task_ids' => array(
'migrating_site',
'review_site',
'review_plugins',
),
),
);
Expand Down

0 comments on commit 5e8fec9

Please sign in to comment.