Understrap: What happened to `understrap_slbd_count_widgets`?

Created on 27 Jan 2019  路  4Comments  路  Source: understrap/understrap

Hi. I'm trying to understand what happened to understrap_slbd_count_widgets and what to use as the replacement. I see the function was removed as part of a pull request to solve an issue for Polylang, but it was removed abruptly, without deprecation. Consequently, my child theme broke after updating from 0.8.8 to 0.8.9.

Most helpful comment

You had probably override understrap_widgets_init function in your child theme functions.php. Update it with the new code found in 0.8.9 (understrap/inc/widgets.php:98) but keep your changes and you will be fine again

All 4 comments

You had probably override understrap_widgets_init function in your child theme functions.php. Update it with the new code found in 0.8.9 (understrap/inc/widgets.php:98) but keep your changes and you will be fine again

@alexbogias Not the case. Just to reiterate, understrap_slbd_count_widgets was completely removed in 0.8.9. The reason my child theme broke was because it called understrap_slbd_count_widgets(), which of course errors as an undefined function.

It was removed because of its incompatibility with the widget_display_callback hook which affected e.g. the plugin Polylang (see #796 and #852). It would have been better to keep the function as deprecated - my fault. The quickest fix is to put the old understrap_slbd_count_widgets() into your child theme's functions.php.

Yes, copying into my child's functions.php was what I did. Just checking it really should be gone. ;) Cheers.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jsgaonac picture jsgaonac  路  5Comments

davidshq picture davidshq  路  4Comments

blachawk picture blachawk  路  5Comments

kmob2 picture kmob2  路  4Comments

typeplus picture typeplus  路  5Comments