Opened 3 years ago
Last modified 3 years ago
#55074 new defect (bug)
Deactivating WP_Widget_Recent_Comments kills the whole Widgets area
Reported by: | madeinua | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 5.9 |
Component: | Widgets | Keywords: | |
Focuses: | Cc: |
Description
This expression makes the Widgets page empty:
unregister_widget( 'WP_Widget_Recent_Comments' );
Were no problems with WordPress 5.8.
Attachments (1)
Change History (3)
#2
@
3 years ago
This may be the problem with my customized theme. But what I found is that this part:
functions.php
remove_action('init', 'wp_widgets_init', 1); add_action('init', static function () { register_widget( 'WP_Nav_Menu_Widget' ); do_action( 'widgets_init' ); }, 1);
Throws this error:
Warning: foreach() argument must be of type array|object, null given in \wp-includes\widgets.php on line 1552
Note: See
TracTickets for help on using
tickets.
I was trying to recreate the issue in the latest 5.9 however I am unable to do this. Could you please add some more details on this?