function themekey_debug_filter_css_array in ThemeKey 7.3
Function for filtering array elements.
Filters elements with empty strings and elements with strings that contains '<style>' tag from array generated by explode("\n", drupal_get_css()). drupal_get_css() returns html markup with "@import" statements combined in <style> tags. themekey_set_debug_message() use filter_xss() to filtering html from string, but filter_xss() leaves empty string where was html markup.
Parameters
string $element: Array element.
Return value
bool TRUE if element is not an empty string or string without <style> tag.
1 string reference to 'themekey_debug_filter_css_array'
- themekey_debug_page_alter in ./
themekey_debug.module - Implements hook_page_alter().
File
- ./
themekey_debug.module, line 210 - Provides a debug mode for module ThemeKey.
Code
function themekey_debug_filter_css_array($element) {
if (strlen(trim($element)) > 0 && strpos($element, '<style') === FALSE && strpos($element, '</style>') === FALSE) {
return TRUE;
}
else {
return FALSE;
}
}