@@ -380,15 +380,6 @@ function wpcom_launchpad_get_task_definitions() {
380
380
},
381
381
),
382
382
383
- // Write tasks.
384
- 'setup_write ' => array (
385
- 'get_title ' => function () {
386
- return __ ( 'Set up your site ' , 'jetpack-mu-wpcom ' );
387
- },
388
- 'is_complete_callback ' => '__return_true ' ,
389
- 'is_disabled_callback ' => '__return_true ' ,
390
- ),
391
-
392
383
// Publish a Blog tasks.
393
384
'complete_profile ' => array (
394
385
'get_title ' => function () {
@@ -680,18 +671,6 @@ function wpcom_launchpad_get_task_definitions() {
680
671
return '/subscribers/ ' . $ data ['site_slug_encoded ' ] . '#add-subscribers ' ;
681
672
},
682
673
),
683
- 'add_first_subscribers ' => array (
684
- // We do not want this mapped to the 'subscribers_added' task, since this task supports
685
- // being marked as complete in situations where subscribers are not added.
686
- 'get_title ' => function () {
687
- return __ ( 'Add subscribers ' , 'jetpack-mu-wpcom ' );
688
- },
689
- 'is_complete_callback ' => 'wpcom_launchpad_is_add_first_subscribers_completed ' ,
690
- 'is_visible_callback ' => '__return_true ' ,
691
- 'get_calypso_path ' => function ( $ task , $ default , $ data ) {
692
- return '/subscribers/ ' . $ data ['site_slug_encoded ' ] . '#add-subscribers ' ;
693
- },
694
- ),
695
674
'add_subscribe_block ' => array (
696
675
'get_title ' => function () {
697
676
return __ ( 'Add the Subscribe Block to your site ' , 'jetpack-mu-wpcom ' );
@@ -2414,16 +2393,12 @@ function wpcom_launchpad_is_front_page_updated_visible() {
2414
2393
/**
2415
2394
* Determine `site_title` task visibility. The task is not visible if the name was already set.
2416
2395
*
2417
- * @param Task $task The task data.
2418
- * @param bool $is_visible Whether the task is currently visible.
2419
- * @param array $data Metadata about the launchpad.
2420
- *
2421
2396
* @return bool True if we should show the task, false otherwise.
2422
2397
*/
2423
- function wpcom_launchpad_is_site_title_task_visible ( $ task , $ is_visible , $ data ) {
2398
+ function wpcom_launchpad_is_site_title_task_visible () {
2424
2399
// Hide the task if it's already completed on write intent
2425
2400
if (
2426
- ( 'launched ' === get_option ( 'launch-status ' ) || ! $ data [ ' updated_write_tasklist ' ] ) &&
2401
+ ( 'launched ' === get_option ( 'launch-status ' ) ) &&
2427
2402
get_option ( 'site_intent ' ) === 'write ' &&
2428
2403
wpcom_launchpad_is_task_option_completed ( array ( 'id ' => 'site_title ' ) )
2429
2404
) {
@@ -2800,25 +2775,6 @@ function wpcom_launchpad_is_domain_customize_completed( $task, $default ) {
2800
2775
return $ default ;
2801
2776
}
2802
2777
2803
- /**
2804
- * Determines whether the add_first_subscribers task is complete by checking both the task option
2805
- * and related tasks like subscribers_added and import_subscribers.
2806
- *
2807
- * This exists because we need a 1-way relationship between these tasks: completion of other
2808
- * subscriber tasks implies add_first_subscribers is completed, but completion of
2809
- * add_first_subscribers does not imply completion of other subscriber tasks. This is because
2810
- * add_first_subscribers is allowed to be marked complete at times when no subscribers are actually
2811
- * added, and why using id_map here will not work since it creates a 2-way relationship.
2812
- *
2813
- * @param Task $task The Task object.
2814
- * @return bool True if either condition is met.
2815
- */
2816
- function wpcom_launchpad_is_add_first_subscribers_completed ( $ task ) {
2817
- return wpcom_launchpad_is_task_option_completed ( $ task )
2818
- || wpcom_is_checklist_task_complete ( 'subscribers_added ' )
2819
- || wpcom_is_checklist_task_complete ( 'import_subscribers ' );
2820
- }
2821
-
2822
2778
/**
2823
2779
* Mark `domain_claim`, `domain_upsell`, and `domain_upsell_deferred` tasks complete
2824
2780
* when a domain product is activated.
0 commit comments