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

Ensure "Automatic Updates" column is not added if no content would be output in the column #57

Merged
merged 1 commit into from Mar 13, 2020

Conversation

pbiron
Copy link
Collaborator

@pbiron pbiron commented Mar 12, 2020

Fixes #56

… output in the column.

Be sure to keep the test here in sync with the early exit test in wp_autoupdates_add_plugins_autoupdates_column_content().

Fixes #56
@pbiron pbiron requested a review from audrasjb March 12, 2020 18:45
@@ -87,6 +87,9 @@ function wp_autoupdates_selected_plugins( $update, $item ) {
* Add autoupdate column to plugins screen.
*/
function wp_autoupdates_add_plugins_autoupdates_column( $columns ) {
if ( ! current_user_can( 'update_plugins' ) || ! wp_autoupdates_is_plugins_auto_update_enabled() ) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should be sure to keep the test here in sync with the early exit test in wp_autoupdates_add_plugins_autoupdates_column_content().

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch 👍

@pbiron pbiron added this to the 0.3.0 milestone Mar 12, 2020
@audrasjb audrasjb merged commit 9cfb8ef into master Mar 13, 2020
@audrasjb audrasjb deleted the fix/issue-56 branch March 13, 2020 13:29
pedro-mendonca pushed a commit to pedro-mendonca/wp-autoupdates that referenced this pull request Apr 4, 2020
…-checks

Add filters and constant to allow developers to disable plugins and themes autoupdate email notifications
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants