Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync: avoid conflicts with other plugins using the filter #39681

Merged
merged 3 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions projects/packages/sync/changelog/fix-sync-filter-null-array
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Update plugin action links filter parameter to avoid conflicts with other plugins.
8 changes: 4 additions & 4 deletions projects/packages/sync/src/modules/class-callables.php
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: fixed
Comment: Sync: update filter parameter to avoid conflicts with other plugins.


5 changes: 5 additions & 0 deletions projects/plugins/backup/changelog/fix-sync-filter-null-array
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: fixed
Comment: Sync: update filter parameter to avoid conflicts with other plugins.


5 changes: 5 additions & 0 deletions projects/plugins/boost/changelog/fix-sync-filter-null-array
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: fixed
Comment: Sync: update filter parameter to avoid conflicts with other plugins.


4 changes: 4 additions & 0 deletions projects/plugins/jetpack/changelog/fix-sync-filter-null-array
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: compat

Plugin action links filters: update parameter to avoid any conflicts with other plugins.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: fixed
Comment: Sync: update filter parameter to avoid conflicts with other plugins.


Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: fixed
Comment: Sync: update filter parameter to avoid conflicts with other plugins.


5 changes: 5 additions & 0 deletions projects/plugins/protect/changelog/fix-sync-filter-null-array
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: fixed
Comment: Sync: update filter parameter to avoid conflicts with other plugins.


5 changes: 5 additions & 0 deletions projects/plugins/search/changelog/fix-sync-filter-null-array
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: fixed
Comment: Sync: update filter parameter to avoid conflicts with other plugins.


5 changes: 5 additions & 0 deletions projects/plugins/social/changelog/fix-sync-filter-null-array
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: fixed
Comment: Sync: update filter parameter to avoid conflicts with other plugins.


Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: fixed
Comment: Sync: update filter parameter to avoid conflicts with other plugins.


Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: fixed
Comment: Sync: update filter parameter to avoid conflicts with other plugins.


5 changes: 5 additions & 0 deletions projects/plugins/wpcomsh/changelog/fix-sync-filter-null-array
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: fixed
Comment: Sync: update filter parameter to avoid conflicts with other plugins.


Loading