pre_auto_update хук-событиеWP 4.4.0

Fires immediately prior to an auto-update.

Использование

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(строка)
The type of update being checked: 'core', 'theme', 'plugin', or 'translation'.
$item(объект)
The update offer.
$context(строка)
The filesystem context (a path) against which filesystem access and status should be checked.

Список изменений

С версии 4.4.0 Введена.

Где вызывается хук

WP_Automatic_Updater::update()
pre_auto_update
wp-admin/includes/class-wp-automatic-updater.php 401
do_action( 'pre_auto_update', $type, $item, $context );

Где используется хук в WordPress

Использование не найдено.