You are here

function imagecrop_process_html in Image javascript crop 7

Implements hook_process_html(). Set the theme hook suggestion to html-imagecrop for imagecrop pages.

File

./imagecrop.module, line 464
Provides a javascript toolbox through an imagecache action.

Code

function imagecrop_process_html(&$variables) {
  if (arg(0) == 'imagecrop') {
    $js = drupal_add_js();
    if (module_exists('admin_menu')) {
      $path = drupal_get_path('module', 'admin_menu');
      if (isset($js[$path . '/admin_menu.js'])) {
        unset($js[$path . '/admin_menu.js']);
        $variables['scripts'] = drupal_get_js('header', $js);
      }
    }
    $variables['theme_hook_suggestion'] = 'html-imagecrop';
  }
}