Skip to content

Commit

Permalink
Update Jetpack Scan link (#39619)
Browse files Browse the repository at this point in the history
* Update Jetpack Scan link in menu

* changelog

* Update Jetpack scan link for Default view

* changelog

* Fix test
  • Loading branch information
candy02058912 authored Oct 2, 2024
1 parent 3ec77d7 commit 27be713
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Update Jetpack Scan link
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ function wpcom_add_jetpack_submenu() {
$monetize_url = 'https://wordpress.com/earn/' . $domain;
$subscribers_url = 'https://wordpress.com/subscribers/' . $domain;
$newsletter_url = 'https://wordpress.com/settings/newsletter/' . $domain;
$scan_url = 'https://wordpress.com/scan/history/' . $domain;
$scan_url = 'https://wordpress.com/scan/' . $domain;

// Add submenu items that link to WordPress.com.
add_submenu_page(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Update Jetpack Scan link
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ public function add_jetpack_menu() {
}

// @phan-suppress-next-line PhanTypeMismatchArgumentProbablyReal -- Core should ideally document null for no-callback arg. https://core.trac.wordpress.org/ticket/52539.
add_submenu_page( 'jetpack', esc_attr__( 'Scan', 'jetpack-masterbar' ), __( 'Scan', 'jetpack-masterbar' ), 'manage_options', 'https://wordpress.com/scan/history/' . $this->domain, null, $scan_position );
add_submenu_page( 'jetpack', esc_attr__( 'Scan', 'jetpack-masterbar' ), __( 'Scan', 'jetpack-masterbar' ), 'manage_options', 'https://wordpress.com/scan/' . $this->domain, null, $scan_position );

/**
* Prevent duplicate menu items that link to Jetpack Backup.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,6 @@ public function test_add_jetpack_scan_submenu() {
static::$admin_menu->add_jetpack_menu();
$links = wp_list_pluck( array_values( $submenu['jetpack'] ), 2 );

$this->assertContains( 'https://wordpress.com/scan/history/' . static::$domain, $links );
$this->assertContains( 'https://wordpress.com/scan/' . static::$domain, $links );
}
}
4 changes: 4 additions & 0 deletions projects/plugins/jetpack/changelog/update-jetpack-scan-link
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: enhancement

Update Jetpack Scan link
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Update Jetpack Scan link
4 changes: 4 additions & 0 deletions projects/plugins/wpcomsh/changelog/update-jetpack-scan-link
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Update Jetpack Scan link

0 comments on commit 27be713

Please sign in to comment.