function bb_upgrade_1050() { if (($dbv = bb_get_option_from_db('bb_db_version')) && $dbv >= 1234) { return; } // Only do this when upgrading if (defined('BB_UPGRADING') && BB_UPGRADING) { if ($theme = bb_get_option('bb_active_theme')) { bb_update_option('bb_active_theme', bb_theme_basename($theme)); } } bb_update_option('bb_db_version', 1234); return 'Done updating active theme if present: ' . __FUNCTION__; }
function bb_register_theme_deactivation_hook($file, $function) { $file = bb_theme_basename($file); add_action('bb_deactivate_theme_' . $file, $function); }