Add class to before_widget for all widgets with a dropdown and a counter
The CSS classes are applied in the function dynamic_sidebar(). There is no specific filter for that: // Substitute HTML id and class attributes into before_widget $classname_ = ”; foreach ( (array) $wp_registered_widgets[$id][‘classname’] as $cn ) { if ( is_string($cn) ) $classname_ .= ‘_’ . $cn; elseif ( is_object($cn) ) $classname_ .= ‘_’ . get_class($cn); } … Read more