Skip to content

Commit 4094489

Browse files
BogdanUngureanumatticbot
authored andcommitted
Untangling: Bring back Tools > Available tools - remove GitHub Deployments and Site Monitoring menus on WPCOM sites (#44315)
* Untangling: Bring back Tools > Available tools menu on WPCOM sites * Remove add_submenu_page * Remove Site Monitoring and GitHub deployments menus * Remove tests * update changelogger message * Fix priority for Tools > Available Tools. Now Available tools because the default submenu item. * Fix priority Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/16346404722 Upstream-Ref: Automattic/jetpack@04117dc
1 parent e9d7c42 commit 4094489

File tree

6 files changed

+87
-113
lines changed

6 files changed

+87
-113
lines changed

jetpack_vendor/automattic/jetpack-masterbar/src/admin-menu/class-admin-menu.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -345,16 +345,15 @@ public function add_tools_menu() {
345345
}
346346
$this->update_submenus( 'tools.php', $submenus_to_update );
347347

348-
$this->hide_submenu_page( 'tools.php', 'tools.php' );
349348
$this->hide_submenu_page( 'tools.php', 'delete-blog' );
350349

351350
// @phan-suppress-next-line PhanTypeMismatchArgumentProbablyReal -- Core should ideally document null for no-callback arg. https://core.trac.wordpress.org/ticket/52539.
352-
add_submenu_page( 'tools.php', esc_attr__( 'Marketing', 'jetpack-masterbar' ), __( 'Marketing', 'jetpack-masterbar' ), 'publish_posts', 'https://wordpress.com/marketing/tools/' . $this->domain, null, 0 );
351+
add_submenu_page( 'tools.php', esc_attr__( 'Marketing', 'jetpack-masterbar' ), __( 'Marketing', 'jetpack-masterbar' ), 'publish_posts', 'https://wordpress.com/marketing/tools/' . $this->domain, null, 1 );
353352

354353
// Temporary "Tools > Monetize" menu for existing users that shows a callout informing that the screen has moved to "Jetpack > Monetize".
355354
if ( ! $this->use_wp_admin_interface() && get_current_user_id() < 268854000 ) {
356355
// @phan-suppress-next-line PhanTypeMismatchArgumentProbablyReal -- Core should ideally document null for no-callback arg. https://core.trac.wordpress.org/ticket/52539.
357-
add_submenu_page( 'tools.php', esc_attr__( 'Monetize', 'jetpack-masterbar' ), __( 'Monetize', 'jetpack-masterbar' ), 'manage_options', 'https://wordpress.com/earn/jetpack-monetize/' . $this->domain, null, 1 );
356+
add_submenu_page( 'tools.php', esc_attr__( 'Monetize', 'jetpack-masterbar' ), __( 'Monetize', 'jetpack-masterbar' ), 'manage_options', 'https://wordpress.com/earn/jetpack-monetize/' . $this->domain, null, 2 );
358357
}
359358
}
360359

jetpack_vendor/automattic/jetpack-masterbar/src/admin-menu/class-atomic-admin-menu.php

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -348,31 +348,6 @@ public function add_options_menu() {
348348
}
349349
}
350350

351-
/**
352-
* Adds Tools menu entries.
353-
*/
354-
public function add_tools_menu() {
355-
parent::add_tools_menu();
356-
357-
// Link the Tools menu to Available Tools when the interface is set to wp-admin.
358-
if ( $this->use_wp_admin_interface() ) {
359-
// @phan-suppress-next-line PhanTypeMismatchArgumentProbablyReal -- Core should ideally document null for no-callback arg. https://core.trac.wordpress.org/ticket/52539.
360-
add_submenu_page( 'tools.php', esc_attr__( 'Available Tools', 'jetpack-masterbar' ), __( 'Available Tools', 'jetpack-masterbar' ), 'edit_posts', 'tools.php', null, 0 );
361-
}
362-
363-
/**
364-
* Adds the WordPress.com Site Monitoring submenu under the main Tools menu.
365-
*/
366-
// @phan-suppress-next-line PhanTypeMismatchArgumentProbablyReal -- Core should ideally document null for no-callback arg. https://core.trac.wordpress.org/ticket/52539.
367-
add_submenu_page( 'tools.php', esc_attr__( 'Site Monitoring', 'jetpack-masterbar' ), __( 'Site Monitoring', 'jetpack-masterbar' ), 'manage_options', 'https://wordpress.com/site-monitoring/' . $this->domain, null, 7 );
368-
369-
/**
370-
* Adds the WordPress.com GitHub Deployments submenu under the main Tools menu.
371-
*/
372-
// @phan-suppress-next-line PhanTypeMismatchArgumentProbablyReal -- Core should ideally document null for no-callback arg. https://core.trac.wordpress.org/ticket/52539.
373-
add_submenu_page( 'tools.php', esc_attr__( 'GitHub Deployments', 'jetpack-masterbar' ), __( 'GitHub Deployments', 'jetpack-masterbar' ), 'manage_options', 'https://wordpress.com/github-deployments/' . $this->domain, null, 8 );
374-
}
375-
376351
/**
377352
* Override the global submenu_file for theme-install.php page so the WP Admin menu item gets highlighted correctly.
378353
*

jetpack_vendor/i18n-map.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
),
5151
'jetpack-masterbar' => array(
5252
'path' => 'jetpack_vendor/automattic/jetpack-masterbar',
53-
'ver' => '0.19.0-alpha1752752834',
53+
'ver' => '0.19.0-alpha1752758796',
5454
),
5555
'jetpack-mu-wpcom' => array(
5656
'path' => 'jetpack_vendor/automattic/jetpack-mu-wpcom',

vendor/composer/installed.json

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
"dist": {
8585
"type": "path",
8686
"url": "/tmp/jetpack-build/Automattic/jetpack-a8c-mc-stats",
87-
"reference": "5a7c110cc7dde76c0f9d085eecdf1f224cf48d10"
87+
"reference": "a05dd132b350e0b2a32c3ae001c725c16cd9153e"
8888
},
8989
"require": {
9090
"php": ">=7.2"
@@ -141,7 +141,7 @@
141141
"dist": {
142142
"type": "path",
143143
"url": "/tmp/jetpack-build/Automattic/jetpack-admin-ui",
144-
"reference": "aec902e30578bcda175383c2534e250cebe4ac17"
144+
"reference": "48a1db9668ee5bf582337c626b773763a891dcbb"
145145
},
146146
"require": {
147147
"php": ">=7.2"
@@ -204,7 +204,7 @@
204204
"dist": {
205205
"type": "path",
206206
"url": "/tmp/jetpack-build/Automattic/jetpack-assets",
207-
"reference": "c8c8dff1b685ceabbfb89350a450dfdb1653c359"
207+
"reference": "057132379853f7d17ed7609780df3190c43358b5"
208208
},
209209
"require": {
210210
"automattic/jetpack-constants": "^3.0.8",
@@ -278,7 +278,7 @@
278278
"dist": {
279279
"type": "path",
280280
"url": "/tmp/jetpack-build/Automattic/jetpack-autoloader",
281-
"reference": "911c02c79d44c44d57ae615f11981f673da2d395"
281+
"reference": "70bfec12b4c3bb9e7ee53de0257f5c027cca3b2c"
282282
},
283283
"require": {
284284
"composer-plugin-api": "^2.2",
@@ -350,7 +350,7 @@
350350
"dist": {
351351
"type": "path",
352352
"url": "/tmp/jetpack-build/Automattic/jetpack-blaze",
353-
"reference": "2188bd166de7e25867ccafe04327e0d092667e2b"
353+
"reference": "939816edcc97b56d4d7ffdeff67937e25c4653ff"
354354
},
355355
"require": {
356356
"automattic/jetpack-assets": "^4.2.0-alpha",
@@ -429,7 +429,7 @@
429429
"dist": {
430430
"type": "path",
431431
"url": "/tmp/jetpack-build/Automattic/jetpack-blocks",
432-
"reference": "e9f398b45e5fa1aa782e33f78d1289b01cce4c7a"
432+
"reference": "9b43421f7dbe6967a9edf50780b5209e5e5708ea"
433433
},
434434
"require": {
435435
"automattic/jetpack-constants": "^3.0.8",
@@ -489,7 +489,7 @@
489489
"dist": {
490490
"type": "path",
491491
"url": "/tmp/jetpack-build/Automattic/jetpack-calypsoify",
492-
"reference": "73bf41e4f0187c00ccadaa8f9ebd3caa008d457b"
492+
"reference": "fd71b0282984680e8036659bbb291085452182c8"
493493
},
494494
"require": {
495495
"automattic/jetpack-assets": "^4.2.0-alpha",
@@ -558,7 +558,7 @@
558558
"dist": {
559559
"type": "path",
560560
"url": "/tmp/jetpack-build/Automattic/jetpack-classic-theme-helper",
561-
"reference": "2daee7d52bc251f38152766cb6bcef25e0f768b0"
561+
"reference": "0c52ebcdf85fa46604baa4ac091228999351cc8a"
562562
},
563563
"require": {
564564
"automattic/jetpack-assets": "^4.2.0-alpha",
@@ -626,7 +626,7 @@
626626
"dist": {
627627
"type": "path",
628628
"url": "/tmp/jetpack-build/Automattic/jetpack-compat",
629-
"reference": "950fe5aec03af1d875fa30365297e00455048529"
629+
"reference": "55e1e31a6a717c6ffaf93b2779857a1bbbb98f55"
630630
},
631631
"require": {
632632
"php": ">=7.2"
@@ -666,7 +666,7 @@
666666
"dist": {
667667
"type": "path",
668668
"url": "/tmp/jetpack-build/Automattic/jetpack-composer-plugin",
669-
"reference": "2ca61ef1eab39e311883b03cbc94c49db0fb15f2"
669+
"reference": "b7114c974e8ca6a5f4a48377933938644efdb932"
670670
},
671671
"require": {
672672
"composer-plugin-api": "^2.2",
@@ -730,7 +730,7 @@
730730
"dist": {
731731
"type": "path",
732732
"url": "/tmp/jetpack-build/Automattic/jetpack-config",
733-
"reference": "5186e5cd555a70e504c4a6bd010e2dbce9acc98e"
733+
"reference": "0dd3d58afb7d228d5cae6de6c90efb47ddaabf35"
734734
},
735735
"require": {
736736
"php": ">=7.2"
@@ -805,7 +805,7 @@
805805
"dist": {
806806
"type": "path",
807807
"url": "/tmp/jetpack-build/Automattic/jetpack-connection",
808-
"reference": "11664c444c42cbeea7eb782a3601db19027d8bb9"
808+
"reference": "8cc3c2865be1982838bea2e6933e952274637e4e"
809809
},
810810
"require": {
811811
"automattic/jetpack-a8c-mc-stats": "^3.0.5",
@@ -893,7 +893,7 @@
893893
"dist": {
894894
"type": "path",
895895
"url": "/tmp/jetpack-build/Automattic/jetpack-constants",
896-
"reference": "d559d1d8afb3797f54d1b73808ea11134a6d4755"
896+
"reference": "1676bb7776f533bf4e5cbc4af2fc00f7b655aa67"
897897
},
898898
"require": {
899899
"php": ">=7.2"
@@ -951,7 +951,7 @@
951951
"dist": {
952952
"type": "path",
953953
"url": "/tmp/jetpack-build/Automattic/jetpack-device-detection",
954-
"reference": "ac75cb2e10e0e535316db49598e0226789cc65ab"
954+
"reference": "f5cf2a033c2acafa247e166b31769c8b2c9a4a43"
955955
},
956956
"require": {
957957
"php": ">=7.2"
@@ -1008,7 +1008,7 @@
10081008
"dist": {
10091009
"type": "path",
10101010
"url": "/tmp/jetpack-build/Automattic/jetpack-google-analytics",
1011-
"reference": "d36b7c4a1df8fa4d71c8401eed574236625a22f5"
1011+
"reference": "0baf6e7f94e0769ef1d71fd2f65cb41eb26b5f75"
10121012
},
10131013
"require": {
10141014
"automattic/jetpack-status": "^5.4.1-alpha",
@@ -1077,7 +1077,7 @@
10771077
"dist": {
10781078
"type": "path",
10791079
"url": "/tmp/jetpack-build/Automattic/jetpack-ip",
1080-
"reference": "b72fad5c030d0de8d445cfebdc87e95d5c9d49bd"
1080+
"reference": "258e59f6f9f266ad28195d8b97034ce9b06af529"
10811081
},
10821082
"require": {
10831083
"php": ">=7.2"
@@ -1139,7 +1139,7 @@
11391139
"dist": {
11401140
"type": "path",
11411141
"url": "/tmp/jetpack-build/Automattic/jetpack-jitm",
1142-
"reference": "49515f7749759f233b6693846fa5399ab881d3f7"
1142+
"reference": "50f71a8fe42ff6e69d638da8b9204bd65320eed5"
11431143
},
11441144
"require": {
11451145
"automattic/jetpack-a8c-mc-stats": "^3.0.5",
@@ -1218,7 +1218,7 @@
12181218
"dist": {
12191219
"type": "path",
12201220
"url": "/tmp/jetpack-build/Automattic/jetpack-logo",
1221-
"reference": "0c3f7505101caac9399fe4fdcfc3d2d363edeef6"
1221+
"reference": "41cdfe8547161d7e03baba8983fcc872ee60ad58"
12221222
},
12231223
"require": {
12241224
"php": ">=7.2"
@@ -1270,12 +1270,12 @@
12701270
},
12711271
{
12721272
"name": "automattic/jetpack-masterbar",
1273-
"version": "0.19.0-alpha.1752752834",
1274-
"version_normalized": "0.19.0.0-alpha1752752834",
1273+
"version": "0.19.0-alpha.1752758796",
1274+
"version_normalized": "0.19.0.0-alpha1752758796",
12751275
"dist": {
12761276
"type": "path",
12771277
"url": "/tmp/jetpack-build/Automattic/jetpack-masterbar",
1278-
"reference": "c7f7ef15c638fa8b79b6e262eac84a7be565db7a"
1278+
"reference": "16dd747415ef3b8a055428b33334698d1c27c7ea"
12791279
},
12801280
"require": {
12811281
"automattic/jetpack-assets": "^4.2.0-alpha",
@@ -1361,7 +1361,7 @@
13611361
"dist": {
13621362
"type": "path",
13631363
"url": "/tmp/jetpack-build/Automattic/jetpack-mu-wpcom",
1364-
"reference": "90fc889fa20a40dbfb353ff84313be244e1e0986"
1364+
"reference": "5d6b5d6e1b64cd58991e5831a1c58f52c40b6bb9"
13651365
},
13661366
"require": {
13671367
"automattic/jetpack-assets": "^4.2.0-alpha",
@@ -1448,7 +1448,7 @@
14481448
"dist": {
14491449
"type": "path",
14501450
"url": "/tmp/jetpack-build/Automattic/jetpack-password-checker",
1451-
"reference": "7e2086ada20ec3d59811da1d9faa03dda008216a"
1451+
"reference": "1e55649d77d7f4e4fab37f8cdc6344ce3a41d0e1"
14521452
},
14531453
"require": {
14541454
"php": ">=7.2"
@@ -1507,7 +1507,7 @@
15071507
"dist": {
15081508
"type": "path",
15091509
"url": "/tmp/jetpack-build/Automattic/jetpack-plans",
1510-
"reference": "2836b233039164ded478ae4d9e3fc855d5148019"
1510+
"reference": "ff5d4ae285d45a6ee51fc2898aea9b69a6e144f4"
15111511
},
15121512
"require": {
15131513
"automattic/jetpack-connection": "^6.15.0-alpha",
@@ -1573,7 +1573,7 @@
15731573
"dist": {
15741574
"type": "path",
15751575
"url": "/tmp/jetpack-build/Automattic/jetpack-post-list",
1576-
"reference": "f67702b989489a6f5b25fecb41e015c751b440e2"
1576+
"reference": "a2565b44d4a9a0556c13ed637bf3690444e0c438"
15771577
},
15781578
"require": {
15791579
"automattic/jetpack-assets": "^4.2.0-alpha",
@@ -1642,7 +1642,7 @@
16421642
"dist": {
16431643
"type": "path",
16441644
"url": "/tmp/jetpack-build/Automattic/jetpack-redirect",
1645-
"reference": "8450e06ac719121cffc50692e285f336da31d054"
1645+
"reference": "d474a30328bd8f270c4fa0f29c43826caf7203a0"
16461646
},
16471647
"require": {
16481648
"automattic/jetpack-status": "^5.4.1-alpha",
@@ -1701,7 +1701,7 @@
17011701
"dist": {
17021702
"type": "path",
17031703
"url": "/tmp/jetpack-build/Automattic/jetpack-roles",
1704-
"reference": "64b6239bf5fe9cff9478aa15ce6774412f710c06"
1704+
"reference": "52d8be6afa342190a3e8053e570306e0114e43be"
17051705
},
17061706
"require": {
17071707
"php": ">=7.2"
@@ -1759,7 +1759,7 @@
17591759
"dist": {
17601760
"type": "path",
17611761
"url": "/tmp/jetpack-build/Automattic/jetpack-stats",
1762-
"reference": "c2da64c60fd310e95f75dd712acb683e9dee07d1"
1762+
"reference": "94af594aade1f05e11dadb604409062bbdd6d237"
17631763
},
17641764
"require": {
17651765
"automattic/jetpack-connection": "^6.15.0-alpha",
@@ -1829,7 +1829,7 @@
18291829
"dist": {
18301830
"type": "path",
18311831
"url": "/tmp/jetpack-build/Automattic/jetpack-stats-admin",
1832-
"reference": "1c80549257980f908300f7ea10b5759d6e515eaa"
1832+
"reference": "65fb793bf182fbc25320205cd7a07957eb243b3a"
18331833
},
18341834
"require": {
18351835
"automattic/jetpack-blaze": "^0.25.36",
@@ -1901,7 +1901,7 @@
19011901
"dist": {
19021902
"type": "path",
19031903
"url": "/tmp/jetpack-build/Automattic/jetpack-status",
1904-
"reference": "6c241a6d524feab428051942093d7a51e0b8bfd5"
1904+
"reference": "b2f2b8f9838c5956a605bf0ced704407ea0d177c"
19051905
},
19061906
"require": {
19071907
"automattic/jetpack-constants": "^3.0.8",
@@ -1969,7 +1969,7 @@
19691969
"dist": {
19701970
"type": "path",
19711971
"url": "/tmp/jetpack-build/Automattic/jetpack-subscribers-dashboard",
1972-
"reference": "58e31d156487f0b8acfd3273e5ca118db227dd66"
1972+
"reference": "02232bdf44faeb504790b772f9d9feb8ac0d9ad5"
19731973
},
19741974
"require": {
19751975
"automattic/jetpack-connection": "^6.15.0-alpha",
@@ -2051,7 +2051,7 @@
20512051
"dist": {
20522052
"type": "path",
20532053
"url": "/tmp/jetpack-build/Automattic/jetpack-sync",
2054-
"reference": "dbb987bef0de8a2ef2ada0f0cc1fd6fb90eca1ab"
2054+
"reference": "0c0c9f8a762a16b12cc3650aced6a29a66d4335c"
20552055
},
20562056
"require": {
20572057
"automattic/jetpack-connection": "^6.15.0-alpha",
@@ -2127,7 +2127,7 @@
21272127
"dist": {
21282128
"type": "path",
21292129
"url": "/tmp/jetpack-build/Automattic/scheduled-updates",
2130-
"reference": "deadb2e2fd8d223616cbaac6fec9f2a721725be7"
2130+
"reference": "23b43021f276386e07923e2a167d3d00f310482d"
21312131
},
21322132
"require": {
21332133
"automattic/jetpack-connection": "^6.15.0-alpha",

0 commit comments

Comments
 (0)