[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-admin/includes/ -> class-wp-automatic-updater.php (summary)

Upgrade API: WP_Automatic_Updater class

File Size: 1423 lines (50 kb)
Included or required: 3 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

WP_Automatic_Updater:: (11 methods):
  is_disabled()
  is_vcs_checkout()
  should_update()
  send_core_update_notification_email()
  update()
  run()
  after_core_update()
  send_email()
  after_plugin_theme_update()
  send_plugin_theme_email()
  send_debug_email()


Class: WP_Automatic_Updater  - X-Ref

Core class used for handling automatic background updates.

is_disabled()   X-Ref
Whether the entire automatic updater is disabled.


is_vcs_checkout( $context )   X-Ref
Check for version control checkouts.

Checks for Subversion, Git, Mercurial, and Bazaar. It recursively looks up the
filesystem to the top of the drive, erring on the side of detecting a VCS
checkout somewhere.

ABSPATH is always checked in addition to whatever `$context` is (which may be the
wp-content directory, for example). The underlying assumption is that if you are
using version control *anywhere*, then you should be making decisions for
how things get updated.

param: string $context The filesystem path to check, in addition to ABSPATH.
return: bool True if a VCS checkout was discovered at `$context` or ABSPATH,

should_update( $type, $item, $context )   X-Ref
Tests to see if we can and should update a specific item.

param: string $type    The type of update being checked: 'core', 'theme',
param: object $item    The update offer.
param: string $context The filesystem context (a path) against which filesystem
return: bool True if the item should be updated, false otherwise.

send_core_update_notification_email( $item )   X-Ref
Notifies an administrator of a core update.

param: object $item The update offer.
return: bool True if the site administrator is notified of a core update,

update( $type, $item )   X-Ref
Update an item, if appropriate.

param: string $type The type of update being checked: 'core', 'theme', 'plugin', 'translation'.
param: object $item The update offer.
return: null|WP_Error

run()   X-Ref
Kicks off the background update process, looping through all pending updates.


after_core_update( $update_result )   X-Ref
If we tried to perform a core update, check if we should send an email,
and if we need to avoid processing future updates.

param: object $update_result The result of the core update. Includes the update offer and result.

send_email( $type, $core_update, $result = null )   X-Ref
Sends an email upon the completion or failure of a background core update.

param: string $type        The type of email to send. Can be one of 'success', 'fail', 'manual', 'critical'.
param: object $core_update The update offer that was attempted.
param: mixed  $result      Optional. The result for the core update. Can be WP_Error.

after_plugin_theme_update( $update_results )   X-Ref
If we tried to perform plugin or theme updates, check if we should send an email.

param: array $update_results The results of update tasks.

send_plugin_theme_email( $type, $successful_updates, $failed_updates )   X-Ref
Sends an email upon the completion or failure of a plugin or theme background update.

param: string $type               The type of email to send. Can be one of 'success', 'fail', 'mixed'.
param: array  $successful_updates A list of updates that succeeded.
param: array  $failed_updates     A list of updates that failed.

send_debug_email()   X-Ref
Prepares and sends an email of a full log of background update results, useful for debugging and geekery.




Generated : Sat Oct 31 08:20:01 2020 Cross-referenced by PHPXref