Skip to content

Commit

Permalink
Sync: avoid conflicts with other plugins using the filter (#39681)
Browse files Browse the repository at this point in the history
* Sync: avoid conflicts with other plugins using the filter

Fixes #39654

* Provide actual plugin data to filter

See https://github.com/Automattic/jetpack/pull/39681/files#r1793690662

* Update projects/packages/sync/src/modules/class-callables.php

Co-authored-by: Brad Jorsch <[email protected]>

---------

Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/11343258663

Upstream-Ref: Automattic/jetpack@f467c5d
  • Loading branch information
jeherve authored and matticbot committed Oct 15, 2024
1 parent 2d33eca commit 55b3437
Show file tree
Hide file tree
Showing 6 changed files with 122 additions and 121 deletions.
1 change: 1 addition & 0 deletions jetpack_vendor/automattic/jetpack-sync/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ This is an alpha version! The changes listed here are not final.

### Fixed
- Jetpack Sync: Ensure Full Sync is only triggered on backend admin POST requests
- Update plugin action links filter parameter to avoid conflicts with other plugins.

## [3.14.1] - 2024-10-14
### Changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,8 @@ public function set_plugin_action_links() {
if ( ! empty( $plugins_lock ) && ( isset( $current_screeen->id ) && 'plugins' !== $current_screeen->id ) ) {
return;
}
$plugins = array_keys( Functions::get_plugins() );
foreach ( $plugins as $plugin_file ) {
$plugins = Functions::get_plugins();
foreach ( $plugins as $plugin_file => $plugin_data ) {
/**
* Plugins often like to unset things but things break if they are not able to.
*/
Expand All @@ -396,13 +396,13 @@ public function set_plugin_action_links() {
'edit' => '',
);
/** This filter is documented in src/wp-admin/includes/class-wp-plugins-list-table.php */
$action_links = apply_filters( 'plugin_action_links', $action_links, $plugin_file, null, 'all' );
$action_links = apply_filters( 'plugin_action_links', $action_links, $plugin_file, $plugin_data, 'all' );
// Verify $action_links is still an array.
if ( ! is_array( $action_links ) ) {
$action_links = array();
}
/** This filter is documented in src/wp-admin/includes/class-wp-plugins-list-table.php */
$action_links = apply_filters( "plugin_action_links_{$plugin_file}", $action_links, $plugin_file, null, 'all' );
$action_links = apply_filters( "plugin_action_links_{$plugin_file}", $action_links, $plugin_file, $plugin_data, 'all' );
// Verify $action_links is still an array to resolve warnings from filters not returning an array.
if ( is_array( $action_links ) ) {
$action_links = array_filter( $action_links );
Expand Down
2 changes: 1 addition & 1 deletion jetpack_vendor/i18n-map.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
),
'jetpack-sync' => array(
'path' => 'jetpack_vendor/automattic/jetpack-sync',
'ver' => '3.14.2-alpha1728913359',
'ver' => '3.14.2-alpha1728984618',
),
),
);
60 changes: 30 additions & 30 deletions vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-a8c-mc-stats",
"reference": "102dff77b9c9dc47bfaf570bb05eadb1d365a5e9"
"reference": "440e776992537e6d08d48331114b965bbec7d196"
},
"require": {
"php": ">=7.0"
Expand Down Expand Up @@ -60,7 +60,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-admin-ui",
"reference": "fd3127fc9b772128e980b81de635a7e6f1d2b456"
"reference": "fdd1e3939a3d1624498866ecdc3609c46bbeffa6"
},
"require": {
"php": ">=7.0"
Expand Down Expand Up @@ -125,7 +125,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-assets",
"reference": "fcdbee206c7d7b26c94c8618a2014278995b02d2"
"reference": "e2428c0fe70d76ed71c3a443a9b4f54527d763bd"
},
"require": {
"automattic/jetpack-constants": "^2.0.4",
Expand Down Expand Up @@ -194,7 +194,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-autoloader",
"reference": "6997f6c50cb7626983089273f1b44018317230a7"
"reference": "f8da5e0fe7a33682d8a2a3f7cdc67b3d5ea9b3d0"
},
"require": {
"composer-plugin-api": "^1.1 || ^2.0",
Expand Down Expand Up @@ -261,7 +261,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-backup",
"reference": "b3d72ad8b80a204a154b40fb0479b8ef08dd9f7e"
"reference": "08609f7152143aeb66f93c9184b0856686dbf01a"
},
"require": {
"automattic/jetpack-admin-ui": "^0.4.5",
Expand Down Expand Up @@ -351,7 +351,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-backup-helper-script-manager",
"reference": "d3a27f9f499e6841bfe84fce767882f928cd8347"
"reference": "a1d231b31158c1d477519f6d44bcd09860370c81"
},
"require": {
"php": ">=7.0"
Expand Down Expand Up @@ -411,7 +411,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-boost-core",
"reference": "3e6d7a65ac011847f5ac07e53d8bec63ec9a7f46"
"reference": "0a601a98916043042158613c1afa4afb8fe668e6"
},
"require": {
"automattic/jetpack-connection": "^5.1.3",
Expand Down Expand Up @@ -479,7 +479,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-boost-speed-score",
"reference": "d0810e29474ed91bd730dac3f10759bebd98ede2"
"reference": "3cbfb4e896857511943580db6f9860eb25cbb7fe"
},
"require": {
"automattic/jetpack-boost-core": "^0.2.12",
Expand Down Expand Up @@ -555,7 +555,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-composer-plugin",
"reference": "e471c6d9a41cdf91deaaa88d287933e4700ac340"
"reference": "8ed1860a58e56d4eceee90c4019d76d4ca8deefb"
},
"require": {
"composer-plugin-api": "^2.1.0",
Expand Down Expand Up @@ -615,7 +615,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-config",
"reference": "d922010545baa3a79581f93a97ee50976cf914c1"
"reference": "a2f6b734e711879827a2d0e418e510193864c261"
},
"require": {
"php": ">=7.0"
Expand Down Expand Up @@ -690,7 +690,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-connection",
"reference": "98e8fd07e4e12e82fa34751234e0f5ab9eedc37c"
"reference": "66438378716850b01237421250aa8d742918092f"
},
"require": {
"automattic/jetpack-a8c-mc-stats": "^2.0.3",
Expand Down Expand Up @@ -780,7 +780,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-constants",
"reference": "3835a49d460854febee498fd557a8f0fe2aed51d"
"reference": "901097cf0b66141a1668ead7ab93c60e4e1281c5"
},
"require": {
"php": ">=7.0"
Expand Down Expand Up @@ -834,7 +834,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-device-detection",
"reference": "7fca046372ee324da949b5feb1ae8724a956ceec"
"reference": "5c5cdfee8259d7d8b3354c0a647dd37c27b49844"
},
"require": {
"php": ">=7.0"
Expand Down Expand Up @@ -887,7 +887,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-explat",
"reference": "590562b68bcd8c180d49e29926099fd3c3b11999"
"reference": "922ac4f38020cbac20a86b9ac2a110f4246d0242"
},
"require": {
"automattic/jetpack-connection": "^5.1.3",
Expand Down Expand Up @@ -962,7 +962,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-ip",
"reference": "f38b7e6e933c2ae4a65fd90a12c842701d20e05a"
"reference": "e66c5c9a0236f7e1ef804a53d9cdd93da53ba43f"
},
"require": {
"php": ">=7.0"
Expand Down Expand Up @@ -1020,7 +1020,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-jitm",
"reference": "4de655ffb27d058c44bb2dc08864556cdbf7d1d8"
"reference": "cce1ec255dfca4a797543c3d1d05abf8ff52077f"
},
"require": {
"automattic/jetpack-a8c-mc-stats": "^2.0.3",
Expand Down Expand Up @@ -1095,7 +1095,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-licensing",
"reference": "511f844803f16ac6f9c7b4bed96ae2b8ffedd43d"
"reference": "fe936c6dea7691d9fb4259ef33590642321ec5b4"
},
"require": {
"automattic/jetpack-connection": "^5.1.3",
Expand Down Expand Up @@ -1157,7 +1157,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-logo",
"reference": "04962e354eb38a6804fd7509c572577b1098eac2"
"reference": "496ba4dc465abbb8700f21e248c02e3750095d78"
},
"require": {
"php": ">=7.0"
Expand Down Expand Up @@ -1210,7 +1210,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-my-jetpack",
"reference": "757ef97a34d8c0b2f07ab4ac90c1e2022e674cba"
"reference": "086f6fad7490fabe3ee0918d3dcb97072dd10dc5"
},
"require": {
"automattic/jetpack-admin-ui": "^0.4.5",
Expand Down Expand Up @@ -1312,7 +1312,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-password-checker",
"reference": "ccc35815f94ef2c2e956f7cf9ef75e29412fff66"
"reference": "4270f56a1010f48bf727d5c68957939a749cf7ad"
},
"require": {
"php": ">=7.0"
Expand Down Expand Up @@ -1373,7 +1373,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-plans",
"reference": "ea88ca6975196302d2d607aff98fd59ddfdc0cca"
"reference": "9188a9b6a4a6c3e2c9e89ea20655bfc8fd11a08f"
},
"require": {
"automattic/jetpack-connection": "^5.1.3",
Expand Down Expand Up @@ -1441,7 +1441,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-plugins-installer",
"reference": "909ef9767a61be83d059b904daae2a07526b0821"
"reference": "d5ff68613f6a983c2abb4e34750a060aa0289d97"
},
"require": {
"automattic/jetpack-a8c-mc-stats": "^2.0.3",
Expand Down Expand Up @@ -1497,7 +1497,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-protect-models",
"reference": "a20144c665a3248a22dc210ea3450086c37199dd"
"reference": "0d84d7a55d39a20041ef4230d922f0cf6be9c468"
},
"require": {
"php": ">=7.0"
Expand Down Expand Up @@ -1567,7 +1567,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-protect-status",
"reference": "a5621096a274bff5a722722e09abbebed2a4255f"
"reference": "24d03155cda50f10158ee2543a9366e88c18326a"
},
"require": {
"automattic/jetpack-connection": "^5.1.3",
Expand Down Expand Up @@ -1642,7 +1642,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-redirect",
"reference": "2d3eeb77e2f5bc11c8f8d72eea6773b2a4b99329"
"reference": "7c3031b1bd3bb33e3fbdccc67e66c276cfc47389"
},
"require": {
"automattic/jetpack-status": "^4.0.2",
Expand Down Expand Up @@ -1697,7 +1697,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-roles",
"reference": "c3bdb1e22a462346540050a78a2b3ace2598997c"
"reference": "561767cbee5898a60863e50eb605e6a42899a3e4"
},
"require": {
"php": ">=7.0"
Expand Down Expand Up @@ -1751,7 +1751,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-status",
"reference": "0223cf7160eaa0d75d27e233beeefae25a5189b4"
"reference": "bc625a98cbc120b599f468818dc2ad8f9d72faa8"
},
"require": {
"automattic/jetpack-constants": "^2.0.4",
Expand Down Expand Up @@ -1810,12 +1810,12 @@
},
{
"name": "automattic/jetpack-sync",
"version": "3.14.2-alpha.1728913359",
"version_normalized": "3.14.2.0-alpha1728913359",
"version": "3.14.2-alpha.1728984618",
"version_normalized": "3.14.2.0-alpha1728984618",
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-sync",
"reference": "a0e70c34868af9b24ed6daa346c9d5b135d91e5d"
"reference": "102f37ecfae8bc6e1aa22417775e4d16cb3e82cd"
},
"require": {
"automattic/jetpack-connection": "^5.1.3",
Expand Down
Loading

0 comments on commit 55b3437

Please sign in to comment.