upgrade_300

Execute changes made in WordPress 3.0.

Description

upgrade_300(); 

Usage

  1. if ( !function_exists( 'upgrade_300' ) ) { 
  2. require_once ABSPATH . '/wp-admin/includes/upgrade.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = upgrade_300(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-admin/includes/upgrade.php  
  1. function upgrade_300() { 
  2. global $wp_current_db_version, $wpdb; 
  3.  
  4. if ( $wp_current_db_version < 15093 ) 
  5.  
  6. if ( $wp_current_db_version < 14139 && is_multisite() && is_main_site() && ! defined( 'MULTISITE' ) && get_site_option( 'siteurl' ) === false ) 
  7. add_site_option( 'siteurl', '' ); 
  8.  
  9. // 3.0 screen options key name changes. 
  10. $sql = "DELETE FROM $wpdb->usermeta 
  11. WHERE meta_key LIKE %s 
  12. OR meta_key LIKE %s 
  13. OR meta_key LIKE %s 
  14. OR meta_key LIKE %s 
  15. OR meta_key LIKE %s 
  16. OR meta_key LIKE %s 
  17. OR meta_key = 'manageedittagscolumnshidden' 
  18. OR meta_key = 'managecategoriescolumnshidden' 
  19. OR meta_key = 'manageedit-tagscolumnshidden' 
  20. OR meta_key = 'manageeditcolumnshidden' 
  21. OR meta_key = 'categories_per_page' 
  22. OR meta_key = 'edit_tags_per_page'"; 
  23. $prefix = $wpdb->esc_like( $wpdb->base_prefix ); 
  24. $wpdb->query( $wpdb->prepare( $sql,  
  25. $prefix . '%' . $wpdb->esc_like( 'meta-box-hidden' ) . '%',  
  26. $prefix . '%' . $wpdb->esc_like( 'closedpostboxes' ) . '%',  
  27. $prefix . '%' . $wpdb->esc_like( 'manage-' ) . '%' . $wpdb->esc_like( '-columns-hidden' ) . '%',  
  28. $prefix . '%' . $wpdb->esc_like( 'meta-box-order' ) . '%',  
  29. $prefix . '%' . $wpdb->esc_like( 'metaboxorder' ) . '%',  
  30. $prefix . '%' . $wpdb->esc_like( 'screen_layout' ) . '%' 
  31. ) ); 
  32.