From a0e9c828f8b074f399e8866f1c56285614bd5454 Mon Sep 17 00:00:00 2001 From: JohnAlbin Date: Fri, 13 Feb 2009 06:08:42 +0000 Subject: [PATCH] #311529: Remove core's page-ARG0 body class, leaving zen's page-PATH --- CHANGELOG.txt | 3 ++- zen/template.php | 4 ++++ 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index b90e24f..a3d39f8 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,6 @@ Zen 6.x-1.x-dev - * Simplified body class generation code. + #311529: Remove core's page-ARG0 body class, leaving zen's page-PATH + * Simplified body class generation code #334956 by hansrossel: Remove no-longer-needed fix for "Flash of Unstyled Content in IE" * Fixed theme settings CSS for IE6 users * Added Photoshop file for STARTERKIT screenshot diff --git a/zen/template.php b/zen/template.php index 0f5c486..756d6eb 100644 --- a/zen/template.php +++ b/zen/template.php @@ -125,6 +125,10 @@ function zen_preprocess_page(&$vars, $hook) { // Classes for body element. Allows advanced theming based on context // (home page, node of certain type, etc.) $classes = split(' ', $vars['body_classes']); + // Remove the mostly useless page-ARG0 class. + if ($index = array_search(preg_replace('![^abcdefghijklmnopqrstuvwxyz0-9-_]+!s', '', 'page-'. drupal_strtolower(arg(0))), $classes)) { + unset($classes[$index]); + } if (!$vars['is_front']) { // Add unique class for each page. $path = drupal_get_path_alias($_GET['q']); -- 1.7.4.1