WordPress / wp-autoupdates

Feature plugin building a UI for opting-in to plugin, theme, and core auto-updates.
https://wordpress.org/plugins/wp-autoupdates/
GNU General Public License v2.0
57 stars 18 forks source link

Documentation #20

Open jeffpaul opened 4 years ago

jeffpaul commented 4 years ago

Migrated from: https://github.com/audrasjb/wp-autoupdates/issues/71 Previously opened by: @jeffpaul Original description:

We'll want to ensure that ahead of any submission to merge this plugin into WordPress core that we've sufficiently documented within the plugin code and within the markdown/text files in this plugin. Assuming there is a feature plugin merge proposal for this plugin, we'll want to ensure we capture items that should be included in the WordPress Core HelpHub documentation site as well.

pbiron commented 4 years ago

I'll add separate comments below for the constants and hooks that control various aspects of functionality.

pbiron commented 4 years ago

These are the constants used by this plugin that are not already in core:

Like the existing AUTOMATIC_UPDATER_DISABLED constant, the merge proposal will not define these constants, but site owners (or other plugins) may define them. If they are defined and true, then the auto-update UI for their respective extension type will not display.

On 2020-05-05 it was decided to remove all the constants. That decision was implemented in #112 and is now part of Version 0.7.0.

pbiron commented 4 years ago

These are the filters defined by this plugin (and will be part of the merge proposal):

All have complete DocBlocks (except for the @since tag, which I think is OK).

_I suspect that the name of wp_autoupdates_notifications_email will change as part of the merge proposal._

mahnunchik commented 4 years ago

It is a bit off topic but there are two constants DISALLOW_FILE_EDIT and DISALLOW_FILE_MODS https://wordpress.org/support/article/editing-wp-config-php/#disable-the-plugin-and-theme-editor

They are not related directly to UPDATE functions but there is conflict for example if WP_AUTO_UPDATE_CORE = true and DISALLOW_FILE_MODS = true. Which of the constants should take precedence?

I think it should be documented at least.

paaljoachim commented 4 years ago

I am hoping that there will be a toggle/or some other switch to turn off email notification. Perhaps add a control to one of the WP Settings pages.

lukecav commented 4 years ago

With the existing constants being removed will there be any new constants or filters to be able to disable automatic plugin or theme updates from showing in the UI? https://github.com/WordPress/wp-autoupdates/pull/112

pbiron commented 4 years ago

No new constants and no additional filters, but

still exist.

e.g. add_filter( 'wp_plugins_auto_update_enabled', '__return_false' ) will disable the UI on the plugins screen.

lukecav commented 4 years ago

@pbiron

Thank you.

lukecav commented 4 years ago
add_filter( 'wp_plugins_auto_update_enabled', '__return_false' );
add_filter( 'wp_themes_auto_update_enabled', '__return_false' );

Those filters do not disable either of the plugins or themes UI from showing does not seem to work correctly when testing on the nightly build (5.5-alpha-48271) of WordPress.

Auto Updates UI will still show

Themes auto updates still showing in the UI

pbiron commented 4 years ago

Thanx for the reminder. As part of the core merge, those filters were renamed to:

they still have the same names in the latest version of this feature plugin.

lukecav commented 4 years ago

@pbiron Thanks for the info.