/**
 * Implementation of hook_theme_registry_alter().
 *
 * Make csstidy's page preprocess function run *after* everything else's,
 * so that a theme can't call drupal_get_js() and mess everything up.
 *
 * @param &$theme_registry
 *   The entire cache of theme registry information, post-processing.
 */
function csstidy_theme_registry_alter(&$theme_registry) {
  if (isset($theme_registry['page'])) {
    // If csstidy's preprocess function is there already, remove it.
    if ($key = array_search('csstidy_preprocess_page', $theme_registry['page']['preprocess functions'])) {
      unset($theme_registry['page']['preprocess functions'][$key]);
    }
    // Now tack it on at the end so it runs after everything else.
    $theme_registry['page']['preprocess functions'][] = 'csstidy_preprocess_page';

    // Move parallel's preprocess function after ours.
    if ($key = array_search('parallel_preprocess_page', $theme_registry['page']['preprocess functions'])) {
      unset($theme_registry['page']['preprocess functions'][$key]);
      $theme_registry['page']['preprocess functions'][] = 'parallel_preprocess_page';
    }

  }
}
 

Comments

philbar’s picture

Status: Active » Closed (cannot reproduce)
rma4ok’s picture

Version: 6.x-2.0-beta3 » 6.x-2.0
Status: Closed (cannot reproduce) » Active

Still reproduce in 2.0 version.
Probably it depends on how much implementations of hook_theme_registry_alter() you use.
I have parallel, csstidy, JavaScript Aggregator with JSMin+
You MUST include my patch. Because is reproduces on my website and on the websites of couple of my friends.
If you can not reproduce that it means that you are not trying enough.
U can find same implementation of hook_theme_registry_alter() sorting in css_emimage.module

philbar’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)
Issue tags: -comparability, -parallel

Automatically closed -- issue fixed for 2 weeks with no activity.