Created
August 21, 2017 12:37
-
-
Save JoryHogeveen/e7837bd1bce2884d3117ada1e4ef7833 to your computer and use it in GitHub Desktop.
Widget CSS Classes: Define your own classes through filters.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin hooks: | |
* widget_css_classes_first | |
* widget_css_classes_last | |
* widget_css_classes_even | |
* widget_css_classes_odd | |
* widget_css_classes_number | |
* | |
* Passes 1 parameter: the current class | |
*/ | |
add_filter( 'widget_css_classes_first', 'custom_widget_css_classes_first' ); | |
function custom_widget_css_classes_first( $class ) { | |
return 'widget-first'; // You can return any valid CSS class. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment