You are here

function ctools_init in Chaos Tool Suite (ctools) 6

Same name and namespace in other branches
  1. 7 ctools.module \ctools_init()

Implement hook_init to keep our global CSS at the ready.

File

./ctools.module, line 347
CTools primary module file.

Code

function ctools_init() {
  ctools_add_css('ctools');

  // If we are sure that CTools' AJAX is in use, change the error handling.
  if (!empty($_REQUEST['ctools_ajax'])) {
    ini_set('display_errors', 0);
    register_shutdown_function('ctools_shutdown_handler');
  }

  // Clear plugin cache on the module page submit.
  if ($_GET['q'] == 'admin/build/modules/list/confirm' && !empty($_POST)) {
    cache_clear_all('ctools_plugin_files:', 'cache', TRUE);
  }
}