Only load BP Legacy Widgets when the Widgets Block editor is disabled
To improve the Widgets Block editor's users experience, we are making a new step towards deprecating BP Legacy Widgets by not loading them by default. As a result, into this editor, only BP Widget Blocks will be loaded and listed into the Block inserter of the Widgets screen.
If users want to keep the Legacy Widgets into the Widgets Block editor, they can do so returning true
to this filter 'bp_core_retain_legacy_widgets'
.
If users are using the Classic Widgets Editor plugin or if advanced users are directly filtering 'use_widgets_block_editor'
to return false
: Legacy Widgets will still be available into the Classic Widgets Editor.
Fixes #8594