wp_attach_theme_preview_middleware
wp_attach_theme_preview_middleware ( No parameters )
- Introduced in WordPress: 6.3.0
- Deprecated in WordPress: —
Description
Adds a middleware to `apiFetch` to set the theme for the preview.This adds a `wp_theme_preview` URL parameter to API requests from the Site Editor, so they also respond as if the theme is set to the value of the parameter.