wp_attach_theme_preview_middleware


wp_attach_theme_preview_middleware ( No parameters )

Defined at:

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.

Related Functions

wp_get_theme_preview_path, wp_attachment_is_image, wp_initialize_theme_preview_hooks, wp_robots_max_image_preview_large, wp_edit_theme_plugin_file

Top Google Results

User discussions

wpseek mobile