Allow slbd_count_widgets function to be overridden

Allow slbd_count_widgets function to be overridden by child them so that more responsive classes can be added if desired.
e.g. `$widget_classes .= ' col-md-3 col-sm-6';`
This commit is contained in:
Sam Blowes 2017-05-18 15:23:50 +01:00 committed by GitHub
parent be25a1fea4
commit 0ddf5ff086
1 changed files with 33 additions and 32 deletions

View File

@ -9,6 +9,7 @@
* Count number of widgets in a sidebar
* Used to add classes to widget areas so widgets can be displayed one, two, three or four per row
*/
if ( ! function_exists( 'slbd_count_widgets' ) ) {
function slbd_count_widgets( $sidebar_id ) {
// If loading from front page, consult $_wp_sidebars_widgets rather than options
// to see if wp_convert_widget_settings() has made manipulations in memory.
@ -41,7 +42,7 @@ function slbd_count_widgets( $sidebar_id ) {
return $widget_classes;
endif;
}
}
if ( ! function_exists( 'understrap_widgets_init' ) ) {
/**