function coder_upgrade_create_theme_cache_submit in Coder 7
Same name and namespace in other branches
- 7.2 coder_upgrade/includes/settings.inc \coder_upgrade_create_theme_cache_submit()
Submit callback; creates a core theme information cache file.
This file is used when the upgrade routines are run in a separate process.
1 call to coder_upgrade_create_theme_cache_submit()
- coder_upgrade_install in coder_upgrade/
coder_upgrade.install - Implements hook_install().
File
- coder_upgrade/
includes/ settings.inc, line 157 - Provides module conversion settings form.
Code
function coder_upgrade_create_theme_cache_submit($form, &$form_state) {
global $_coder_upgrade_theme_registry;
module_load_include('inc', 'coder_upgrade', 'includes/conversion');
module_load_include('inc', 'coder_upgrade', 'conversions/begin');
// Create a core theme information cache.
coder_upgrade_cache_theme_registry();
// Write cache to file.
$path = coder_upgrade_path('theme_cache');
if (file_put_contents($path, serialize($_coder_upgrade_theme_registry)) === FALSE) {
drupal_set_message(t('Could not write to core theme information cache file.'), 'error');
return;
}
drupal_set_message(t('Core theme information cache created at @file.', array(
'@file' => $path,
)));
}