function ctools_class_remove

Remove an array of classes from the body.

Parameters

mixed $classes: A string or an array of class strings to remove.

string $hook: The theme hook to remove the class from. The default is 'html' which will affect the body tag.

3 calls to ctools_class_remove()
CtoolsModuleTestCase::testClassesAddRemove in tests/ctools.test
Test that the ctools_classs_add and ctools_classs_remove interact well.
CtoolsModuleTestCase::testClassesAddRemove2 in tests/ctools.test
Test that the ctools_classs_add and ctools_classs_remove interact well .. 2.
CtoolsModuleTestCase::testClassesRemove in tests/ctools.test
Test that the ctools_classs_remove works.

File

./ctools.module, line 558

Code

function ctools_class_remove($classes, $hook = 'html') {
    if (!is_array($classes)) {
        // @todo Consider using explode(' ', $classes);
        // @todo Consider checking that $classes is a string before adding.
        $classes = array(
            $classes,
        );
    }
    $static =& drupal_static('ctools_process_classes', array());
    if (!isset($static[$hook]['remove'])) {
        $static[$hook]['remove'] = array();
    }
    foreach ($classes as $class) {
        $static[$hook]['remove'][] = $class;
    }
}