pre_auto_update
Fires immediately prior to an auto-update.
Usage
add_action( 'pre_auto_update', 'wp_kama_pre_auto_update_action', 10, 3 ); /** * Function for `pre_auto_update` action-hook. * * @param string $type The type of update being checked: 'core', 'theme', 'plugin', or 'translation'. * @param object $item The update offer. * @param string $context The filesystem context (a path) against which filesystem access and status should be checked. * * @return void */ function wp_kama_pre_auto_update_action( $type, $item, $context ){ // action... }
- $type(string)
- The type of update being checked: 'core', 'theme', 'plugin', or 'translation'.
- $item(object)
- The update offer.
- $context(string)
- The filesystem context (a path) against which filesystem access and status should be checked.
Changelog
Since 4.4.0 | Introduced. |
Where the hook is called
pre_auto_update
wp-admin/includes/class-wp-automatic-updater.php 401
do_action( 'pre_auto_update', $type, $item, $context );