wp-autoupdates icon indicating copy to clipboard operation
wp-autoupdates copied to clipboard

Documentation

Open jeffpaul opened this issue 5 years ago • 11 comments

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.

jeffpaul avatar Mar 25 '20 03:03 jeffpaul

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

pbiron avatar Apr 03 '20 22:04 pbiron

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

  • ~~WP_DISABLE_PLUGINS_AUTO_UPDATE~~
  • ~~WP_DISABLE_THEMES_AUTO_UPDATE~~
  • ~~WP_DISABLE_PLUGINS_AUTO_UPDATE_EMAIL~~
  • ~~WP_DISABLE_THEMES_AUTO_UPDATE_EMAIL~~

~~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 avatar Apr 03 '20 22:04 pbiron

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

  • wp_plugins_auto_update_enabled
  • wp_themes_auto_update_enabled
  • wp_autoupdates_notifications_email
  • send_plugins_auto_update_email
  • send_themes_auto_update_email

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.

pbiron avatar Apr 03 '20 22:04 pbiron

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.

mahnunchik avatar Apr 20 '20 20:04 mahnunchik

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.

paaljoachim avatar Apr 23 '20 21:04 paaljoachim

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

lukecav avatar May 06 '20 23:05 lukecav

No new constants and no additional filters, but

  • wp_plugins_auto_update_enabled
  • wp_themes_auto_update_enabled

still exist.

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

pbiron avatar May 07 '20 14:05 pbiron

@pbiron

Thank you.

lukecav avatar May 07 '20 14:05 lukecav

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

lukecav avatar Jul 02 '20 20:07 lukecav

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

  • plugins_auto_update_enabled
  • themes_auto_update_enabled

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

pbiron avatar Jul 02 '20 20:07 pbiron

@pbiron Thanks for the info.

lukecav avatar Jul 02 '20 20:07 lukecav