wp_upgrade
Fires after a site is fully upgraded.
Использование
add_action( 'wp_upgrade', 'wp_kama_upgrade_action', 10, 2 ); /** * Function for `wp_upgrade` action-hook. * * @param int $wp_db_version The new $wp_db_version. * @param int $wp_current_db_version The old (current) $wp_db_version. * * @return void */ function wp_kama_upgrade_action( $wp_db_version, $wp_current_db_version ){ // action... }
- $wp_db_version(int)
- The new $wp_db_version.
- $wp_current_db_version(int)
- The old (current) $wp_db_version.
Список изменений
С версии 3.9.0 | Введена. |
Где вызывается хук
wp_upgrade
wp-admin/includes/upgrade.php 683
do_action( 'wp_upgrade', $wp_db_version, $wp_current_db_version );