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

status links count off if all_plugins filter has been used. #50

Closed
timnashcouk opened this issue Mar 11, 2020 · 1 comment · Fixed by #59
Closed

status links count off if all_plugins filter has been used. #50

timnashcouk opened this issue Mar 11, 2020 · 1 comment · Fixed by #59
Labels
bug Something isn't working good first issue Good for newcomers
Milestone

Comments

@timnashcouk
Copy link

line 354 wp-autoupdates.php
$wp_autoupdate_plugins = array_intersect( $wp_autoupdate_plugins, array_keys( get_plugins() ) );
The get_plugins should be prefiltered via the all_plugins filter, otherwise plugins that have been filtered will appear in the count, but not on the update page and will show different totals to the other status links

$all_plugins = apply_filters( 'all_plugins', get_plugins() ); $wp_autoupdate_plugins = array_intersect( $wp_autoupdate_plugins, array_keys( $all_plugins ) );

@pbiron pbiron added the good first issue Good for newcomers label Mar 11, 2020
@pbiron
Copy link
Collaborator

pbiron commented Mar 11, 2020

Thanx @timnashcouk you are absolutely right.

Would you like to open a PR with a fix?

@pbiron pbiron added the bug Something isn't working label Mar 11, 2020
@audrasjb audrasjb added this to the 0.3.0 milestone Mar 12, 2020
pbiron added a commit that referenced this issue Mar 16, 2020
…number of plugins displayed for that view by applying 'all_plugins' filter before computing that count.

Fixes #50.
pedro-mendonca pushed a commit to pedro-mendonca/wp-autoupdates that referenced this issue Apr 4, 2020
Network > Sites > Edit > Themes screen doesn't have the Autoupdates column
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
3 participants