wp_upgrade
Fires after a site is fully upgraded.
Usage
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.
Changelog
Since 3.9.0 | Introduced. |
Where the hook is called
wp_upgrade
wp-admin/includes/upgrade.php 683
do_action( 'wp_upgrade', $wp_db_version, $wp_current_db_version );