Skip to content
This repository was archived by the owner on May 29, 2020. It is now read-only.

Commit cdbf249

Browse files
authored
Merge pull request #59 from audrasjb/fix/issue-50
Prevent mis-match between count in Auto-updates Enabled view and the number of plugins displayed for that view by applying 'all_plugins' filter before computing that count.
2 parents a04b1ae + 3dc0f9e commit cdbf249

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

wp-autoupdates.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,8 +362,10 @@ function wp_autoupdates_plugins_status_links( $status_links ) {
362362
return $status_links;
363363
}
364364

365+
/** This filter is documented in wp-admin/includes/class-wp-plugins-list-table.php */
366+
$all_plugins = apply_filters( 'all_plugins', get_plugins() );
365367
$wp_autoupdate_plugins = get_site_option( 'wp_auto_update_plugins', array() );
366-
$wp_autoupdate_plugins = array_intersect( $wp_autoupdate_plugins, array_keys( get_plugins() ) );
368+
$wp_autoupdate_plugins = array_intersect( $wp_autoupdate_plugins, array_keys( $all_plugins ) );
367369
$enabled_count = count( $wp_autoupdate_plugins );
368370

369371
// when merged, these counts will need to be set in WP_Plugins_List_Table::prepare_items().

0 commit comments

Comments
 (0)