Skip to content
This repository was 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
audrasjb merged 1 commit intomasterfrom
fix/issue-56
Mar 13, 2020
Merged

Ensure "Automatic Updates" column is not added if no content would be output in the column#57
audrasjb merged 1 commit intomasterfrom
fix/issue-56

Conversation

@pbiron
Copy link
Copy Markdown
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
* 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
Copy Markdown
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
Copy Markdown
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

Development

Successfully merging this pull request may close these issues.

"Automatic Updates" column should not be added if wp_autoupdates_add_plugins_autoupdates_column_content() wouldn't output any content for that column

2 participants