Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Widget Visibility: Disable in Block Editor
Currently, on `widget_admin_setup`, in the Widget Visibility module we'll run heavy operations to retrieve a bunch of entities, but we only really use those on the widgets page. Among those entities include all pages, categories, tags, custom taxonomy terms, all registered post types, users. For sites that don't leverage cache and have many pages with a lot of content, this can cause significant delays in TTFB and even end up in OOM errors. The reason for this is that since Gutenberg 8.3 we'll call the `widget_admin_setup` hook on the block editor, too (see WordPress/gutenberg#22807), but never actually use this data in the block editor. This means that we can disable the heavy logic on the block editor pages. This is what this PR does.
- Loading branch information