[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

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

Upgrade API: WP_Automatic_Updater class

File Size: 1467 lines (51 kb)
Included or required:0 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
Determines whether the entire automatic updater is disabled.

since: 3.7.0

is_vcs_checkout( $context )   X-Ref
Checks 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,
since: 3.7.0

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.
since: 3.7.0

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,
since: 3.7.0

update( $type, $item )   X-Ref
Updates 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
since: 3.7.0

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

since: 3.7.0

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.
since: 3.7.0

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.
since: 3.7.0

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.
since: 5.5.0

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.
since: 5.5.0

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

since: 3.7.0



Generated: Sun Dec 22 01:00:02 2024 Cross-referenced by PHPXref 0.7.1