Skip to content

[Feature widgets screen] a preload_path filter is missing #28690

@manooweb

Description

@manooweb

Description

In the block editor use for post we are able to filter the $preload_paths variable.
See https://github.com/WordPress/WordPress/blob/5.6/wp-admin/edit-form-blocks.php#L70-L83

It is usefull:

  • to add our own paths to take advantage of the prelaoding process and to retrieve some of our datas to build the UI as soon as possible without making a REST API call.
  • to be able to add the same parameter we're injecting with the use of apiFetch.use middleware not to trigger a new REST API request. For example, I think to the language code for our need.

It seems that this kind of filter doesn't exist yet in for the new widget screen nor for the FSE.
See
https://github.com/WordPress/gutenberg/blob/v9.8.3/lib/widgets-page.php#L57-L66
https://github.com/WordPress/gutenberg/blob/v9.8.3/lib/full-site-editing/edit-site-page.php#L120-L132

Expected behaviour

Have the same kind of preload_path filter than for the block editor.

Metadata

Metadata

Assignees

Labels

[Feature] ExtensibilityThe ability to extend blocks or the editing experience[Status] In ProgressTracking issues with work in progress

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions