Advertisements

wp_upgrade

Definition:
function wp_upgrade() {}

Run WordPress Upgrade functions.

Source code

function wp_upgrade() {

	global $wp_current_db_version, $wp_db_version, $wpdb;



	$wp_current_db_version = __get_option('db_version');



	// We are up-to-date.  Nothing to do.

	if ( $wp_db_version == $wp_current_db_version )

		return;



	if ( ! is_blog_installed() )

		return;



	wp_check_mysql_version();

	wp_cache_flush();

	pre_schema_upgrade();

	make_db_current_silent();

	upgrade_all();

	if ( is_multisite() && is_main_site() )

		upgrade_network();

	wp_cache_flush();



	if ( is_multisite() ) {

		if ( $wpdb->get_row( "SELECT blog_id FROM {$wpdb->blog_versions} WHERE blog_id = '{$wpdb->blogid}'" ) )

4247

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: