[ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Source view] [Print] [Project Stats]
Upgrade API: WP_Automatic_Updater class
File Size: | 1836 lines (62 kb) |
Included or required: | 3 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
WP_Automatic_Updater:: (13 methods):
is_disabled()
is_allowed_dir()
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()
has_fatal_error()
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. return: bool True if the automatic updater is disabled, false otherwise. |
is_allowed_dir( $dir ) X-Ref |
Checks whether access to a given directory is allowed. This is used when detecting version control checkouts. Takes into account the PHP `open_basedir` restrictions, so that WordPress does not try to access directories it is not allowed to. return: bool True if access to the directory is allowed, false otherwise. param: string $dir The directory to check. |
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. return: bool True if a VCS checkout was discovered at `$context` or ABSPATH, param: string $context The filesystem path to check, in addition to ABSPATH. |
should_update( $type, $item, $context ) X-Ref |
Tests to see if we can and should update a specific item. return: bool True if the item should be updated, false otherwise. 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 |
send_core_update_notification_email( $item ) X-Ref |
Notifies an administrator of a core update. return: bool True if the site administrator is notified of a core update, param: object $item The update offer. |
update( $type, $item ) X-Ref |
Updates an item, if appropriate. return: null|WP_Error param: string $type The type of update being checked: 'core', 'theme', 'plugin', 'translation'. param: object $item The update offer. |
run() X-Ref |
Kicks off the background update process, looping through all pending updates. |
after_core_update( $update_result ) X-Ref |
Checks whether to send an email and avoid processing future updates after attempting a core update. 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 |
Checks whether an email should be sent after attempting plugin or theme updates. 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. |
has_fatal_error() X-Ref |
Performs a loopback request to check for potential fatal errors. Fatal errors cannot be detected unless maintenance mode is enabled. return: bool Whether a fatal error was detected. |
Generated : Sat Dec 21 08:20:01 2024 | Cross-referenced by PHPXref |