WordPress.org

Make WordPress Core

Changeset 27045


Ignore:
Timestamp:
01/27/2014 04:31:54 PM (8 years ago)
Author:
nacin
Message:

Add wp_install and wp_upgrade hooks to the respective functions.

props Denis-de-Bernardy.
fixes #25762.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/upgrade.php

    r26692 r27045  
    8686
    8787    wp_cache_flush();
     88
     89    /**
     90     * Fires after a site is fully installed.
     91     *
     92     * @since 3.9.0
     93     *
     94     * @param WP_User $user The site owner.
     95     */
     96    do_action( 'wp_install', $user );
    8897
    8998    return array('url' => $guessurl, 'user_id' => $user_id, 'password' => $user_password, 'password_message' => $message);
     
    318327            $wpdb->query( "INSERT INTO {$wpdb->blog_versions} ( `blog_id` , `db_version` , `last_updated` ) VALUES ( '{$wpdb->blogid}', '{$wp_db_version}', NOW());" );
    319328    }
     329
     330    /**
     331     * Fires after a site is fully upgraded.
     332     *
     333     * @since 3.9.0
     334     *
     335     * @param int $new_db_version The new $wp_db_version.
     336     * @param int $old_db_version The old $wp_db_version.
     337     */
     338    do_action( 'wp_upgrade', $wp_db_version, $wp_current_db_version );
    320339}
    321340endif;
Note: See TracChangeset for help on using the changeset viewer.