close
Skip to content

Add does_plugin_auto_updates()#1167

Open
donmhico wants to merge 1 commit intoWordPress:masterfrom
donmhico:trac-52963
Open

Add does_plugin_auto_updates()#1167
donmhico wants to merge 1 commit intoWordPress:masterfrom
donmhico:trac-52963

Conversation

@donmhico
Copy link
Copy Markdown

@donmhico donmhico commented Apr 5, 2021

This PR adds a new function does_plugin_auto_updates( $plugin ) which returns whether a plugin is toggled for auto updates.

A few things.

  1. The function does not check whether a plugin is activated or not since it's possible to enable or disable the auto updates regardless of a plugin activation state.
  2. The function is added in src/wp-admin/includes/plugin.php so that file should be included first, include_once( ABSPATH . 'wp-admin/includes/plugin.php' );, if the function is needed in the frontend.

Trac ticket: https://core.trac.wordpress.org/ticket/52963


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant